aboutsummaryrefslogtreecommitdiff
path: root/src/game/ScriptedGuardAI.cpp
diff options
context:
space:
mode:
authorSpp <none@none>2010-04-19 17:04:28 +0200
committerSpp <none@none>2010-04-19 17:04:28 +0200
commit452cada8b63e3a894fe75e1700c56e5ce3a79301 (patch)
treeeda4157cc1b3723d54ad05e58b4d4a32ed86701a /src/game/ScriptedGuardAI.cpp
parentbe01821050dd30ff65e89b347d528efb20aba028 (diff)
ScriptedAI: Fix types in SelectSpell
--HG-- branch : trunk
Diffstat (limited to 'src/game/ScriptedGuardAI.cpp')
-rw-r--r--src/game/ScriptedGuardAI.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/ScriptedGuardAI.cpp b/src/game/ScriptedGuardAI.cpp
index 2fbf8bff1cb..68dc8690470 100644
--- a/src/game/ScriptedGuardAI.cpp
+++ b/src/game/ScriptedGuardAI.cpp
@@ -71,7 +71,7 @@ void guardAI::UpdateAI(const uint32 diff)
if (BuffTimer <= diff)
{
//Find a spell that targets friendly and applies an aura (these are generally buffs)
- SpellEntry const *info = SelectSpell(me, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA);
+ SpellEntry const *info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA);
if (info && !GlobalCooldown)
{
@@ -102,11 +102,11 @@ void guardAI::UpdateAI(const uint32 diff)
//Select a healing spell if less than 30% hp
if (me->GetHealth()*100 / me->GetMaxHealth() < 30)
- info = SelectSpell(me, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING);
+ info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING);
//No healing spell available, select a hostile spell
if (info) Healing = true;
- else info = SelectSpell(me->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, 0, 0, SELECT_EFFECT_DONTCARE);
+ else info = SelectSpell(me->getVictim(), 0, 0, SELECT_TARGET_ANY_ENEMY, 0, 0, 0, 0, SELECT_EFFECT_DONTCARE);
//20% chance to replace our white hit with a spell
if (info && rand() % 5 == 0 && !GlobalCooldown)
@@ -133,11 +133,11 @@ void guardAI::UpdateAI(const uint32 diff)
//Select a healing spell if less than 30% hp ONLY 33% of the time
if (me->GetHealth()*100 / me->GetMaxHealth() < 30 && rand() % 3 == 0)
- info = SelectSpell(me, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING);
+ info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING);
//No healing spell available, See if we can cast a ranged spell (Range must be greater than ATTACK_DISTANCE)
if (info) Healing = true;
- else info = SelectSpell(me->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, NOMINAL_MELEE_RANGE, 0, SELECT_EFFECT_DONTCARE);
+ else info = SelectSpell(me->getVictim(), 0, 0, SELECT_TARGET_ANY_ENEMY, 0, 0, NOMINAL_MELEE_RANGE, 0, SELECT_EFFECT_DONTCARE);
//Found a spell, check if we arn't on cooldown
if (info && !GlobalCooldown)