diff options
author | Spp <none@none> | 2010-04-19 17:04:28 +0200 |
---|---|---|
committer | Spp <none@none> | 2010-04-19 17:04:28 +0200 |
commit | 452cada8b63e3a894fe75e1700c56e5ce3a79301 (patch) | |
tree | eda4157cc1b3723d54ad05e58b4d4a32ed86701a /src/game/ScriptedCreature.cpp | |
parent | be01821050dd30ff65e89b347d528efb20aba028 (diff) |
ScriptedAI: Fix types in SelectSpell
--HG--
branch : trunk
Diffstat (limited to 'src/game/ScriptedCreature.cpp')
-rw-r--r-- | src/game/ScriptedCreature.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/ScriptedCreature.cpp b/src/game/ScriptedCreature.cpp index 1a2060f330c..8c4ddd14f07 100644 --- a/src/game/ScriptedCreature.cpp +++ b/src/game/ScriptedCreature.cpp @@ -197,7 +197,7 @@ Unit* ScriptedAI::SelectUnit(SelectAggroTarget pTarget, uint32 uiPosition) } } -SpellEntry const* ScriptedAI::SelectSpell(Unit* pTarget, int32 uiSchool, int32 uiMechanic, SelectTargetType selectTargets, uint32 uiPowerCostMin, uint32 uiPowerCostMax, float fRangeMin, float fRangeMax, SelectEffect selectEffects) +SpellEntry const* ScriptedAI::SelectSpell(Unit* pTarget, uint32 uiSchool, uint32 uiMechanic, SelectTargetType selectTargets, uint32 uiPowerCostMin, uint32 uiPowerCostMax, float fRangeMin, float fRangeMax, SelectEffect selectEffects) { //No target so we can't cast if (!pTarget) @@ -235,11 +235,11 @@ SpellEntry const* ScriptedAI::SelectSpell(Unit* pTarget, int32 uiSchool, int32 u continue; //Check for school if specified - if (uiSchool >= 0 && pTempSpell->SchoolMask & uiSchool) + if (uiSchool && (pTempSpell->SchoolMask & uiSchool) == 0) continue; //Check for spell mechanic if specified - if (uiMechanic >= 0 && pTempSpell->Mechanic != uiMechanic) + if (uiMechanic && pTempSpell->Mechanic != uiMechanic) continue; //Make sure that the spell uses the requested amount of power |