Skip to content

Npc_spellclick_spells

Schmoozerd edited this page Apr 14, 2013 · 2 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

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:

Target Caster cast_flags value
Creature Creature 0
Creature Player 1
Player Creature 2
Player Player 3
Clone this wiki locally