Skip to content

Npc_spellclick_spells

Schmoozerd edited this page Oct 9, 2013 · 3 revisions

Back to world database list of tables.

The `npc_spellclick_spells` table

This table holds information about spells to be casted upon receiving CMSG_SPELLCLICK. That opcode is sent for quests in which you have to loot creatures, who are already dead at spawning. Examples are Planning for the Future and Rifle the bodies.

Structure

Field Type Null Key Default Extra
npc_entry int(10) unsigned NO
spell_id int(10) unsigned NO
quest_start mediumint(8) unsigned NO 0
quest_start_active tinyint(1) unsigned NO 0
quest_end mediumint(3) unsigned NO 0
cast_flags tinyint(3) unsigned NO
condition_id mediumint(8) unsigned NO 0

Note: The fields quest_* are obsolete and will be removed

Description of the fields

npc_entry

Reference to Creature_template#entry

spell_id

The spell which should be casted.

Note that for several quests there are more than one spell per click. Planing for the Future for example has Planning for the Future: Create Snowfall Glade Pup which will create the item in the player’s inventory and Planning for the Future: Create Snowfall Glade Pup Cover which despawns the creature.

This creates the illusion that the creature has been looted.

quest_start

Same as Spell_area#quest_start..

quest_start_active

Same as Spell_area#quest_start_active..

quest_end

Same as Spell_area#quest_end..

cast_flags

On every spellclick event a player and a creature "participate". This field defines who casts the spell on who.

Lower bit defines caster: 1=player, 0=creature; higher bit defines target, same mapping as caster bit.

You can use that table for the actual value:

cast_flags value Caster Target
0 Creature Creature
1 Player Creature
2 Creature Player
3 Player Player

condition_id

Value that represents a condition that must be met in order for the item to drop.
See Conditions table for detailed description.

Note: If set != 0 it will override any meaning within the quest_* fields.

Clone this wiki locally