correction on var names

This commit is contained in:
bash
2025-10-21 00:33:27 +02:00
parent 65bd49ce16
commit afc3bdb8af

View File

@@ -3498,22 +3498,22 @@ bool PlayerbotAI::CastSpell(uint32 spellId, Unit* target, Item* itemTarget)
// check if the actual target is valid, spell system uses targets.GetUnitTarget(), GetItemTarget(), GetGOTarget() internally. // check if the actual target is valid, spell system uses targets.GetUnitTarget(), GetItemTarget(), GetGOTarget() internally.
Unit* unitTarget = targets.GetUnitTarget(); Unit* uTarget = targets.GetUnitTarget();
if (unitTarget && (!unitTarget->IsInWorld() || unitTarget->IsDuringRemoveFromWorld())) if (uTarget && (!uTarget->IsInWorld() || uTarget->IsDuringRemoveFromWorld()))
{ {
// fail if the spell has a unit target that is invalid or being removed from the world // fail if the spell has a unit target that is invalid or being removed from the world
delete spell; delete spell;
return false; return false;
} }
Item* itemTarget = targets.GetItemTarget(); Item* iTarget = targets.GetItemTarget();
if (!itemTarget && (spellInfo->Targets & (TARGET_FLAG_ITEM | TARGET_FLAG_GAMEOBJECT_ITEM))) if (!iTarget && (spellInfo->Targets & (TARGET_FLAG_ITEM | TARGET_FLAG_GAMEOBJECT_ITEM)))
{ {
// fail only if the spell requires a specific item or GO item to cast but the bot does not have one // fail only if the spell requires a specific item or GO item to cast but the bot does not have one
delete spell; delete spell;
return false; return false;
} }
GameObject* goTarget = targets.GetGOTarget(); GameObject* gTarget = targets.GetGOTarget();
if (goTarget && !goTarget->isSpawned()) if (gTarget && !gTarget->isSpawned())
{ {
// fail if the spell has a GO target that is not spawned or does not exist // fail if the spell has a GO target that is not spawned or does not exist
delete spell; delete spell;