Ulduar flame leviathan (normal mode)

This commit is contained in:
Yunfan Li
2024-08-19 19:30:04 +08:00
parent 2c7cef0dc2
commit 47f8eb3e4a
22 changed files with 639 additions and 113 deletions

View File

@@ -1,6 +1,45 @@
#include "RaidUlduarTriggers.h"
#include "EventMap.h"
#include "Object.h"
#include "Playerbots.h"
#include "RaidUlduarScripts.h"
#include "ScriptedCreature.h"
#include "SharedDefines.h"
#include "Trigger.h"
#include "Vehicle.h"
const std::vector<uint32> availableVehicles = {NPC_VEHICLE_CHOPPER, NPC_SALVAGED_DEMOLISHER,
NPC_SALVAGED_DEMOLISHER_TURRET, NPC_SALVAGED_SIEGE_ENGINE,
NPC_SALVAGED_SIEGE_ENGINE_TURRET};
bool FlameLeviathanOnVehicleTrigger::IsActive()
{
Unit* vehicleBase = bot->GetVehicleBase();
Vehicle* vehicle = bot->GetVehicle();
if (!vehicleBase || !vehicle)
return false;
uint32 entry = vehicleBase->GetEntry();
for (uint32 comp : availableVehicles)
{
if (entry == comp)
return true;
}
return false;
}
bool FlameLeviathanVehicleNearTrigger::IsActive()
{
if (bot->GetVehicle())
return false;
Player* master = botAI->GetMaster();
if (!master)
return false;
if (!master->GetVehicle())
return false;
return true;
}