Core/AI: added sOnDummyEffect() for all AIs

Core/SmartAI: added EVENT_DUMMY_EFFECT (66)

--HG--
branch : trunk
This commit is contained in:
Rat
2010-11-17 23:24:21 +01:00
parent 2e68705e22
commit 3de2f6af01
7 changed files with 41 additions and 7 deletions
@@ -2390,7 +2390,13 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
sLog.outDebug("AuraEffect::TriggerSpell: Spell %u Trigger %u",GetId(), triggeredSpellInfo->Id);
}
else if (target->GetTypeId() != TYPEID_UNIT || !sScriptMgr.OnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()), triggerTarget->ToCreature()))
{
if (Creature* c = triggerTarget->ToCreature())
{
c->AI()->sOnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()));
}
sLog.outError("AuraEffect::TriggerSpell: Spell %u has value 0 in EffectTriggered[%d] and is therefor not handled. Define as custom case?",GetId(),GetEffIndex());
}
}
void AuraEffect::TriggerSpellWithValue(Unit * target, Unit * caster) const