mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-15 04:32:35 -04:00
Core: Fixed more warnings (C6246: Local declaration of 'x' hides declaration of the same name in outer scope.)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user