Fix flame leviathan chasing

This commit is contained in:
Yunfan Li
2024-08-20 00:40:52 +08:00
parent 6d9aba4066
commit 84d65cc136

View File

@@ -46,7 +46,7 @@ bool FlameLeviathanVehicleAction::Execute(Event event)
continue; continue;
if (unit->GetEntry() == 33142) // Leviathan Defense Turret if (unit->GetEntry() == 33142) // Leviathan Defense Turret
continue; continue;
if (unit->GetEntry() == 33133) // Flame Leviathan if (unit->GetEntry() == 33113) // Flame Leviathan
flame = unit; flame = unit;
if (!target || bot->GetExactDist(target) > bot->GetExactDist(unit)) if (!target || bot->GetExactDist(target) > bot->GetExactDist(unit))
{ {
@@ -58,7 +58,7 @@ bool FlameLeviathanVehicleAction::Execute(Event event)
// Flame Leviathan is chasing me // Flame Leviathan is chasing me
if (flame && flame->GetVictim() == vehicleBase_) if (flame && flame->GetVictim() == vehicleBase_)
if (MoveAvoidChasing(target)) if (MoveAvoidChasing(flame))
return true; return true;
uint32 entry = vehicleBase_->GetEntry(); uint32 entry = vehicleBase_->GetEntry();
@@ -69,7 +69,7 @@ bool FlameLeviathanVehicleAction::Execute(Event event)
case NPC_SALVAGED_DEMOLISHER_TURRET: case NPC_SALVAGED_DEMOLISHER_TURRET:
return DemolisherTurretAction(target); return DemolisherTurretAction(target);
case NPC_SALVAGED_SIEGE_ENGINE: case NPC_SALVAGED_SIEGE_ENGINE:
return SiegeEngineAction(target); return SiegeEngineAction(flame ? flame : target);
case NPC_SALVAGED_SIEGE_ENGINE_TURRET: case NPC_SALVAGED_SIEGE_ENGINE_TURRET:
return SiegeEngineTurretAction(target); return SiegeEngineTurretAction(target);
case NPC_VEHICLE_CHOPPER: case NPC_VEHICLE_CHOPPER: