[10935] Move script calls to ScriptMgr

- Script library presence is now optional.
- Some script hooks have new names. Scripting libraries need to be adjusted accordingly.

Signed-off-by: zergtmn <zerg@myisp.com>
This commit is contained in:
zergtmn 2010-12-29 21:48:06 +05:00
parent 918e646ca2
commit ec6089bbd8
32 changed files with 454 additions and 435 deletions

View file

@ -39,7 +39,7 @@
#include "Formulas.h"
#include "BattleGround.h"
#include "CreatureAI.h"
#include "ScriptCalls.h"
#include "ScriptMgr.h"
#include "Util.h"
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
@ -1903,7 +1903,7 @@ void Aura::TriggerSpell()
{
if (Unit* caster = GetCaster())
{
if (triggerTarget->GetTypeId() != TYPEID_UNIT || !Script->EffectDummyCreature(caster, GetId(), GetEffIndex(), (Creature*)triggerTarget))
if (triggerTarget->GetTypeId() != TYPEID_UNIT || !sScriptMgr.OnEffectDummy(caster, GetId(), GetEffIndex(), (Creature*)triggerTarget))
sLog.outError("Aura::TriggerSpell: Spell %u have 0 in EffectTriggered[%d], not handled custom case?",GetId(),GetEffIndex());
}
}
@ -2804,7 +2804,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
// script has to "handle with care", only use where data are not ok to use in the above code.
if (target->GetTypeId() == TYPEID_UNIT)
Script->EffectAuraDummy(this, apply);
sScriptMgr.OnAuraDummy(this, apply);
}
void Aura::HandleAuraMounted(bool apply, bool Real)