-
Notifications
You must be signed in to change notification settings - Fork 93
wiki_us_npc_spellclick_spells
Frank edited this page Jul 9, 2019
·
10 revisions
The `npc_spellclick_spells` table
Structure
Field | Type | Attributes | Key | Null | Default | Extra | Comment' |
npc_entry | int(10) | unsigned | NO | NULL | reference to creature_template | ||
spell_id | int(10) | unsigned | NO | NULL | spell which should be casted | ||
cast_flags | tinyint(3) | unsigned | NO | NULL | description below | ||
user_type | smallint(3) | unsigned | NO | 0 | relation with summoner: 0-no 1-friendly 2-raid 3-party player can click |
Description of the fields
Reference to creature_template
The spell which should be cast.
NPC_CLICK_CAST_CASTER_CLICKER | 0x01 | table below |
NPC_CLICK_CAST_TARGET_CLICKER | 0x02 | table below |
NPC_CLICK_CAST_ORIG_CASTER_OWNER | 0x04 | the spellcast becomes added a OriginalCasterGUID |
NPC_CLICK_CAST_USE_TARGET_POSITION | 0x08 | the spellcast becomes a position as target |
NPC_CLICK_CAST_ONLY_PLAYER_CLICKER | 0x10 | define this line only for used on a player clicker |
NPC_CLICK_CAST_ONLY_VEHICLE_CLICKER | 0x20 | define this line only for used on a vehicle clicker |
On every spellclick event a player and a creature "participate". The first 2 bit defines who casts the spell on who.
Lower bit defines caster: 1=clicker; higher bit defines clickee.
As result does the core something like: clicker->castspell(clickee, spell_id, trigger full, originalCasterGUID)
Caster | Target | cast_flags value | description |
---|---|---|---|
Creature | Creature | 0 | used only for spellclick between creatures |
Clicker | Clickee | 1 | clicker->castspell(clickee... |
Clickee | Clicker | 2 | clickee->castspell(clicker... |
Clicker | Clicker | 3 | clicker->castspell(clicker... |
Relation with summoner: defines who is able to use this spellclick.
Value | Description |
---|---|
0 | Only self |
1 | Friendly |
2 | Raid |
3 | Party |