Core/CreatureAI: Implement an OnSpellClick hook instead of the ugly way that uses DoAction with EVENT_SPELLCLICK.
Core/SmartAI: Implement SMART_EVENT_ON_SPELLCLICK. Parameter is the clicker. If someone could update the wiki accordingly for SAI I would appreciate that. Thanks to @Shauren for some help!
This commit is contained in:
1 parent
29f1ab2438
commit
e190a202ca
11 files changed
+26
-27
No files matched your search
@@ -16935,7 +16935,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
|
||||
|
||||
Creature* creature = ToCreature();
|
||||
if (creature && creature->IsAIEnabled)
|
||||
creature->AI()->DoAction(EVENT_SPELLCLICK);
|
||||
creature->AI()->OnSpellClick(clicker);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user