Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
isle_of_conquest.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#include "ScriptMgr.h"
7#include "ScriptedCreature.h"
8#include "PassiveAI.h"
9#include "BattlegroundIC.h"
10#include "Player.h"
11
12// TO-DO: This should be done with SmartAI, but yet it does not correctly support vehicles's AIs.
13// Even adding ReactState Passive we still have issues using SmartAI.
14
16{
17 public:
18 npc_four_car_garage() : CreatureScript("npc_four_car_garage") { }
19
21 {
23
24 void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) OVERRIDE
25 {
26 if (apply)
27 {
28 uint32 spellId = 0;
29
30 switch (me->GetEntry())
31 {
32 case NPC_DEMOLISHER:
34 break;
38 break;
42 break;
43 case NPC_CATAPULT:
45 break;
46 default:
47 return;
48 }
49
50 me->CastSpell(who, spellId, true);
51 }
52 }
53 };
54
56 {
57 return new npc_four_car_garageAI(creature);
58 }
59};
60
@ NPC_SIEGE_ENGINE_H
@ NPC_SIEGE_ENGINE_A
@ NPC_GLAIVE_THROWER_A
@ NPC_GLAIVE_THROWER_H
@ NPC_DEMOLISHER
@ NPC_CATAPULT
@ SPELL_DRIVING_CREDIT_GLAIVE
@ SPELL_DRIVING_CREDIT_SIEGE
@ SPELL_DRIVING_CREDIT_DEMOLISHER
@ SPELL_DRIVING_CREDIT_CATAPULT
std::uint32_t uint32
Definition Define.h:77
std::int8_t int8
Definition Define.h:75
#define OVERRIDE
Definition Define.h:60
Creature *const me
Definition CreatureAI.h:56
CreatureScript(const char *name)
NullCreatureAI(Creature *c)
Definition PassiveAI.cpp:12
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
void AddSC_isle_of_conquest()
void PassengerBoarded(Unit *who, int8, bool apply) OVERRIDE
== Fields =======================================