diff options
author | Rat <none@none> | 2010-01-19 11:36:05 +0100 |
---|---|---|
committer | Rat <none@none> | 2010-01-19 11:36:05 +0100 |
commit | 0cc053ea4d42ce405a915857f75ee00f0f65666b (patch) | |
tree | 7c25955ee5db618deee963f515ba061fbb1e1e8c /src/game/Spell.cpp | |
parent | f5dea61b66a616110cfc82ff640ec448b1efa702 (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/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index c5836a6b466..f723cdeb297 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -52,6 +52,7 @@ #include "ScriptCalls.h" #include "SpellAuraEffects.h" #include "SpellId.h" +#include "ScriptMgr.h" #define SPELL_CHANNEL_UPDATE_INTERVAL (1 * IN_MILISECONDS) @@ -4297,7 +4298,7 @@ void Spell::HandleThreatSpells(uint32 spellId) void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTarget,uint32 i) { - if (!Script->OnSpellCast(pUnitTarget,pItemTarget,pGOTarget,i,m_spellInfo)) + if (!sScriptMgr.OnSpellCast(pUnitTarget,pItemTarget,pGOTarget,i,m_spellInfo)) return; //effect has been handled, skip it @@ -4467,7 +4468,7 @@ SpellCastResult Spell::CheckCast(bool strict) { if (target->GetTypeId() == TYPEID_PLAYER) return SPELL_FAILED_BAD_TARGETS; - else if ((target->GetCreatureTypeMask() & CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) == 0) + else if ((target->GetCreatureTypeMask() & CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) == 0) return SPELL_FAILED_TARGET_NO_POCKETS; } |