aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuraEffects.cpp
diff options
context:
space:
mode:
authorRat <none@none>2010-01-19 11:36:05 +0100
committerRat <none@none>2010-01-19 11:36:05 +0100
commit0cc053ea4d42ce405a915857f75ee00f0f65666b (patch)
tree7c25955ee5db618deee963f515ba061fbb1e1e8c /src/game/SpellAuraEffects.cpp
parentf5dea61b66a616110cfc82ff640ec448b1efa702 (diff)
*Integrate Script system to Core
-added ScriptMgr for loading scripts -removed bindings -moved script system to src/game -moved scripts to src/scripts -VC project files updated -cmakes updated (not 100% done yet) NOTE to Devs: -file locations changed -precompiled renamed to ScriptedPch -ecsort_ai renamed to ScriptedEscortAI -follower_ai renamed to ScriptedFollowerAI -guard_ai renamed to ScriptedGuardAI -simple_ai renamed to ScriptedSimpleAI -sc_creature renamed to ScriptedCreature -sc_gossip renamed to ScriptedGossip -sc_instance renamed to ScriptedInstance *use the new headers in scripts, thank you NOTE to ALL: cmake not fully tested, please report any errors with it could make creashes, incompability USE AT YOUR OWN RISK before further tests!! --HG-- branch : trunk
Diffstat (limited to 'src/game/SpellAuraEffects.cpp')
-rw-r--r--src/game/SpellAuraEffects.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp
index b3eaed41dde..ef13b9901bc 100644
--- a/src/game/SpellAuraEffects.cpp
+++ b/src/game/SpellAuraEffects.cpp
@@ -38,6 +38,7 @@
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "CellImpl.h"
+#include "ScriptMgr.h"
class Aura;
//
@@ -2189,7 +2190,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
triggerTarget = target; //for druid dispel poison
target->CastSpell(triggerTarget, triggeredSpellInfo, true, 0, this, GetCasterGUID());
}
- else if(target->GetTypeId()!=TYPEID_UNIT || !Script->EffectDummyCreature(caster, GetId(), GetEffIndex(), (Creature*)target))
+ else if(target->GetTypeId()!=TYPEID_UNIT || !sScriptMgr.EffectDummyCreature(caster, GetId(), GetEffIndex(), (Creature*)target))
sLog.outError("AuraEffect::TriggerSpell: Spell %u have 0 in EffectTriggered[%d], not handled custom case?",GetId(),GetEffIndex());
}
@@ -6007,13 +6008,13 @@ void AuraEffect::HandleAuraModFaction(AuraApplication const * aurApp, uint8 mode
if(apply)
{
target->setFaction(GetMiscValue());
- if(target->GetTypeId()==TYPEID_PLAYER)
+ if(target->GetTypeId()==TYPEID_PLAYER)
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
}
else
{
target->RestoreFaction();
- if(target->GetTypeId()==TYPEID_PLAYER)
+ if(target->GetTypeId()==TYPEID_PLAYER)
target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
}
}