mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 10:30:01 +01:00
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#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;
|
|
}
|