[9444] Add script call EffectAuraDummy, called at dummy aura(4) apply/remove

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-02-24 17:14:44 +01:00
parent 9f3b42d8ee
commit 24f2d4658f
6 changed files with 22 additions and 2 deletions

View file

@ -23,6 +23,7 @@
#include "../../game/Player.h"
#include "../../game/Map.h"
#include "../../game/ObjectMgr.h"
#include "../../game/SpellAuras.h"
//uint8 loglevel = 0;
int nrscripts;
@ -310,6 +311,16 @@ bool EffectDummyItem(Unit *caster, uint32 spellId, SpellEffectIndex effIndex, It
return tmpscript->pEffectDummyItem(caster, spellId, effIndex, itemTarget);
}
MANGOS_DLL_EXPORT
bool EffectAuraDummy(const Aura* pAura, bool apply)
{
Script *tmpscript = m_scripts[((Creature*)pAura->GetTarget())->GetScriptId()];
if (!tmpscript || !tmpscript->pEffectAuraDummy)
return false;
return tmpscript->pEffectAuraDummy(pAura, apply);
}
void ScriptedAI::UpdateAI(const uint32)
{
//Check if we have a current target