Spell script target
Материал из YTDB DataBase
NeatElves (Обсуждение | вклад) |
NeatElves (Обсуждение | вклад) (→inverseEffectMask) |
||
Строка 82: | Строка 82: | ||
Example: | Example: | ||
- | (Spell, 1, NpcA, 2^0), — NpcA will NOT be chosen for spell-effect 0, so it will be chosen for effects 1 or 2 | + | (Spell, 1, NpcA, 2^0), — NpcA will NOT be chosen for spell-effect 0, so it will be chosen for effects 1 or 2\n |
(Spell, 1, NpcB, 2^1|2^2), — NpcB will NOT be chosen for spell-effects 1, 2, so it will be chosen for effect 0. | (Spell, 1, NpcB, 2^1|2^2), — NpcB will NOT be chosen for spell-effects 1, 2, so it will be chosen for effect 0. | ||
So with this we can define targets for a spell (assuming that the targets for the effects can make use of spell_script_target!) in a way that Effect0 will hit NpcB, and Effect1,2 will hit NpcA | So with this we can define targets for a spell (assuming that the targets for the effects can make use of spell_script_target!) in a way that Effect0 will hit NpcB, and Effect1,2 will hit NpcA |
Версия 10:34, 27 ноября 2013
|
К описанию таблиц базы данных mangos.
Таблица `spell_script_target`
Used to control SpellEffect with ImpliciteTargetA-B == 7|8|38|40|46|52.
Эта таблица содержит информацию о возможности использования некоторых заклинаний на некоторые объекты или некоторых существ.
Структура
Field | Type | Attributes | Null | Key | Default | Comments |
entry | mediumint(8) | unsigned | NO | PRI | ||
type | tinyint(3) | unsigned | NO | PRI | 0 | |
targetEntry | mediumint(8) | unsigned | NO | PRI | 0 | |
inverseEffectMask | mediumint(8) | unsigned | NO | 0 |
Описание полей
entry
Идентификатор заклинания. См. Spell.dbc
When adding a new entry, be sure to check to see if the spell triggers another spell. If it does, don’t forget to check that spell as well to see if it has ImplictTargetA-B = 38 || ImpliciteTargetA-B == 7 and if it does, add an entry in this table for it as well.
NOTE: The only valide targets for ImpliciteTargetA-B == 7 are creatures(dead or alive).
type
Допустимые значения:
- 0 = Объект
- 1 = Существо(живое)
- 2 = Существо(мертвое, убито игроком иди другим существом)
targetEntry
Идентификатор цели: creature_template.entry или gameobject_template.entry в зависимости от типа.
This specified entry will be automatically targeted if it is near the player casting the spell.
inverseEffectMask
A mask value defining if the target is only applicable for specifiq effect indexes. This is an inverseMask, so you need to filter effects for which you don’t want the target to be valid. The mask is 1 << EffectIndex (EffectIndex going from 0 to 2)
Example: (Spell, 1, NpcA, 2^0), — NpcA will NOT be chosen for spell-effect 0, so it will be chosen for effects 1 or 2\n (Spell, 1, NpcB, 2^1|2^2), — NpcB will NOT be chosen for spell-effects 1, 2, so it will be chosen for effect 0.
So with this we can define targets for a spell (assuming that the targets for the effects can make use of spell_script_target!) in a way that Effect0 will hit NpcB, and Effect1,2 will hit NpcA