aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-11-23 17:55:16 +0100
committerShauren <shauren.trinity@gmail.com>2011-11-23 17:55:16 +0100
commit638693e78f7c67602ea07c340f5078d494846d01 (patch)
tree0cff7b8410d6cd8db3d189cde8e79f47f4784367 /src/server/game/AI/SmartScripts
parent44693cfa99b871dd46b794594334d5e286c4e881 (diff)
Core: Fixed more warnings (C6246: Local declaration of 'x' hides declaration of the same name in outer scope.)
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 29340660435..ffe21536de4 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -1490,9 +1490,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsSmart(target))
CAST_AI(SmartAI, target->AI())->SetScript9(e, e.action.timedActionList.id, GetLastInvoker());
}
- else if (GameObject* target = (*itr)->ToGameObject())
+ else if (GameObject* goTarget = (*itr)->ToGameObject())
{
- if (IsSmartGO(target))
+ if (IsSmartGO(goTarget))
CAST_AI(SmartGameObjectAI, target->AI())->SetScript9(e, e.action.timedActionList.id, GetLastInvoker());
}
}
@@ -1607,9 +1607,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsSmart(target))
CAST_AI(SmartAI, target->AI())->SetScript9(e, id, GetLastInvoker());
}
- else if (GameObject* target = (*itr)->ToGameObject())
+ else if (GameObject* goTarget = (*itr)->ToGameObject())
{
- if (IsSmartGO(target))
+ if (IsSmartGO(goTarget))
CAST_AI(SmartGameObjectAI, target->AI())->SetScript9(e, id, GetLastInvoker());
}
}
@@ -1637,9 +1637,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsSmart(target))
CAST_AI(SmartAI, target->AI())->SetScript9(e, id, GetLastInvoker());
}
- else if (GameObject* target = (*itr)->ToGameObject())
+ else if (GameObject* goTarget = (*itr)->ToGameObject())
{
- if (IsSmartGO(target))
+ if (IsSmartGO(goTarget))
CAST_AI(SmartGameObjectAI, target->AI())->SetScript9(e, id, GetLastInvoker());
}
}
@@ -2298,10 +2298,10 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
if (!me || !me->isInCombat())
return;
- Unit* unit = DoSelectLowestHpFriendly((float)e.event.friendlyHealt.radius, e.event.friendlyHealt.hpDeficit);
- if (!unit)
+ Unit* target = DoSelectLowestHpFriendly((float)e.event.friendlyHealt.radius, e.event.friendlyHealt.hpDeficit);
+ if (!target)
return;
- ProcessAction(e, unit);
+ ProcessAction(e, target);
RecalcTimer(e, e.event.friendlyHealt.repeatMin, e.event.friendlyHealt.repeatMax);
break;
}