ScriptedAI: Fix types in SelectSpell

--HG--
branch : trunk
This commit is contained in:
Spp
2010-04-19 17:04:28 +02:00
parent be01821050
commit 452cada8b6
4 changed files with 14 additions and 14 deletions

View File

@@ -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