Core: Fixed more warnings (C6246: Local declaration of 'x' hides declaration of the same name in outer scope.)

This commit is contained in:
Shauren
2011-11-23 17:55:16 +01:00
parent 44693cfa99
commit 638693e78f
16 changed files with 120 additions and 133 deletions

View File

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