Core/Scripts: Always run OnSpellClick AI hook, even if there are no spells defined for spellclick event.

This commit is contained in:
Shauren committed 2013-06-01 18:30:36 +02:00
1 parent 891d97ec4c
commit fb718d20aa
7 files changed
+20 -12

No files matched your search

+3 -6
View File
@@ -16801,12 +16801,9 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
result = true;
}
if (result)
{
Creature* creature = ToCreature();
if (creature && creature->IsAIEnabled)
creature->AI()->OnSpellClick(clicker);
}
Creature* creature = ToCreature();
if (creature && creature->IsAIEnabled)
creature->AI()->OnSpellClick(clicker, result);
return result;
}