mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-29 00:13:47 +00:00
Ulduar flame leviathan (normal mode)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user