mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 11:43:18 -04:00
Core/Misc: Fix static analysis issues
This commit is contained in:
@@ -1039,8 +1039,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
else
|
||||
creature->DespawnOrUnsummon(respawnDelay);
|
||||
}
|
||||
else if (GameObject* go = target->ToGameObject())
|
||||
go->SetRespawnTime(respawnDelay);
|
||||
else if (GameObject* goTarget = target->ToGameObject())
|
||||
goTarget->SetRespawnTime(respawnDelay);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1588,10 +1588,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (IsSmart(creature))
|
||||
ENSURE_AI(SmartAI, creature->AI())->SetScript9(e, e.action.timedActionList.id, GetLastInvoker());
|
||||
}
|
||||
else if (GameObject* go = target->ToGameObject())
|
||||
else if (GameObject* goTarget = target->ToGameObject())
|
||||
{
|
||||
if (IsSmartGO(go))
|
||||
ENSURE_AI(SmartGameObjectAI, go->AI())->SetScript9(e, e.action.timedActionList.id, GetLastInvoker());
|
||||
if (IsSmartGO(goTarget))
|
||||
ENSURE_AI(SmartGameObjectAI, goTarget->AI())->SetScript9(e, e.action.timedActionList.id, GetLastInvoker());
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1675,10 +1675,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (IsSmart(creature))
|
||||
ENSURE_AI(SmartAI, creature->AI())->SetScript9(e, id, GetLastInvoker());
|
||||
}
|
||||
else if (GameObject* go = target->ToGameObject())
|
||||
else if (GameObject* goTarget = target->ToGameObject())
|
||||
{
|
||||
if (IsSmartGO(go))
|
||||
ENSURE_AI(SmartGameObjectAI, go->AI())->SetScript9(e, id, GetLastInvoker());
|
||||
if (IsSmartGO(goTarget))
|
||||
ENSURE_AI(SmartGameObjectAI, goTarget->AI())->SetScript9(e, id, GetLastInvoker());
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1699,10 +1699,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (IsSmart(creature))
|
||||
ENSURE_AI(SmartAI, creature->AI())->SetScript9(e, id, GetLastInvoker());
|
||||
}
|
||||
else if (GameObject* go = target->ToGameObject())
|
||||
else if (GameObject* goTarget = target->ToGameObject())
|
||||
{
|
||||
if (IsSmartGO(go))
|
||||
ENSURE_AI(SmartGameObjectAI, go->AI())->SetScript9(e, id, GetLastInvoker());
|
||||
if (IsSmartGO(goTarget))
|
||||
ENSURE_AI(SmartGameObjectAI, goTarget->AI())->SetScript9(e, id, GetLastInvoker());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user