Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
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
15
class
npc_four_car_garage
:
public
CreatureScript
16
{
17
public
:
18
npc_four_car_garage
() :
CreatureScript
(
"npc_four_car_garage"
) { }
19
20
struct
npc_four_car_garageAI
:
public
NullCreatureAI
21
{
22
npc_four_car_garageAI
(
Creature
* creature) :
NullCreatureAI
(creature) { }
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
:
33
spellId =
SPELL_DRIVING_CREDIT_DEMOLISHER
;
34
break
;
35
case
NPC_GLAIVE_THROWER_A
:
36
case
NPC_GLAIVE_THROWER_H
:
37
spellId =
SPELL_DRIVING_CREDIT_GLAIVE
;
38
break
;
39
case
NPC_SIEGE_ENGINE_H
:
40
case
NPC_SIEGE_ENGINE_A
:
41
spellId =
SPELL_DRIVING_CREDIT_SIEGE
;
42
break
;
43
case
NPC_CATAPULT
:
44
spellId =
SPELL_DRIVING_CREDIT_CATAPULT
;
45
break
;
46
default
:
47
return
;
48
}
49
50
me
->CastSpell(who, spellId,
true
);
51
}
52
}
53
};
54
55
CreatureAI
*
GetAI
(
Creature
* creature)
const
OVERRIDE
56
{
57
return
new
npc_four_car_garageAI
(creature);
58
}
59
};
60
61
void
AddSC_isle_of_conquest
()
62
{
63
new
npc_four_car_garage
();
64
}
BattlegroundIC.h
NPC_SIEGE_ENGINE_H
@ NPC_SIEGE_ENGINE_H
Definition
BattlegroundIC.h:27
NPC_SIEGE_ENGINE_A
@ NPC_SIEGE_ENGINE_A
Definition
BattlegroundIC.h:28
NPC_GLAIVE_THROWER_A
@ NPC_GLAIVE_THROWER_A
Definition
BattlegroundIC.h:29
NPC_GLAIVE_THROWER_H
@ NPC_GLAIVE_THROWER_H
Definition
BattlegroundIC.h:30
NPC_DEMOLISHER
@ NPC_DEMOLISHER
Definition
BattlegroundIC.h:26
NPC_CATAPULT
@ NPC_CATAPULT
Definition
BattlegroundIC.h:31
SPELL_DRIVING_CREDIT_GLAIVE
@ SPELL_DRIVING_CREDIT_GLAIVE
Definition
BattlegroundIC.h:653
SPELL_DRIVING_CREDIT_SIEGE
@ SPELL_DRIVING_CREDIT_SIEGE
Definition
BattlegroundIC.h:654
SPELL_DRIVING_CREDIT_DEMOLISHER
@ SPELL_DRIVING_CREDIT_DEMOLISHER
Definition
BattlegroundIC.h:652
SPELL_DRIVING_CREDIT_CATAPULT
@ SPELL_DRIVING_CREDIT_CATAPULT
Definition
BattlegroundIC.h:655
uint32
std::uint32_t uint32
Definition
Define.h:77
int8
std::int8_t int8
Definition
Define.h:75
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
PassiveAI.h
Player.h
ScriptMgr.h
ScriptedCreature.h
CreatureAI
Definition
CreatureAI.h:54
CreatureAI::me
Creature *const me
Definition
CreatureAI.h:56
Creature
Definition
Creature.h:427
CreatureScript::CreatureScript
CreatureScript(const char *name)
Definition
ScriptMgr.cpp:1436
NullCreatureAI::NullCreatureAI
NullCreatureAI(Creature *c)
Definition
PassiveAI.cpp:12
Unit
Definition
Unit.h:1367
npc_four_car_garage
Definition
isle_of_conquest.cpp:16
npc_four_car_garage::GetAI
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition
isle_of_conquest.cpp:55
npc_four_car_garage::npc_four_car_garage
npc_four_car_garage()
Definition
isle_of_conquest.cpp:18
AddSC_isle_of_conquest
void AddSC_isle_of_conquest()
Definition
isle_of_conquest.cpp:61
npc_four_car_garage::npc_four_car_garageAI
Definition
isle_of_conquest.cpp:21
npc_four_car_garage::npc_four_car_garageAI::npc_four_car_garageAI
npc_four_car_garageAI(Creature *creature)
Definition
isle_of_conquest.cpp:22
npc_four_car_garage::npc_four_car_garageAI::PassengerBoarded
void PassengerBoarded(Unit *who, int8, bool apply) OVERRIDE
== Fields =======================================
Definition
isle_of_conquest.cpp:24
src
server
scripts
Northrend
isle_of_conquest.cpp
Generated on
for Project SkyFire Core by
1.17.0