Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
zone_blasted_lands.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
/* ScriptData
7
SDName: Blasted_Lands
8
SD%Complete: 90
9
SDComment: Quest support: 3628. Teleporter to Rise of the Defiler missing group support.
10
SDCategory: Blasted Lands
11
EndScriptData */
12
13
/* ContentData
14
npc_deathly_usher
15
EndContentData */
16
17
#include "
ScriptMgr.h
"
18
#include "
ScriptedCreature.h
"
19
#include "
ScriptedGossip.h
"
20
#include "
Player.h
"
21
22
/*######
23
## npc_deathly_usher
24
######*/
25
26
#define GOSSIP_ITEM_USHER "I wish to to visit the Rise of the Defiler."
27
28
enum
DeathlyUsher
29
{
30
SPELL_TELEPORT_SINGLE
= 12885,
31
SPELL_TELEPORT_SINGLE_IN_GROUP
= 13142,
32
SPELL_TELEPORT_GROUP
= 27686
33
};
34
35
class
npc_deathly_usher
:
public
CreatureScript
36
{
37
public
:
38
npc_deathly_usher
() :
CreatureScript
(
"npc_deathly_usher"
) { }
39
40
bool
OnGossipSelect
(
Player
* player,
Creature
* creature,
uint32
/*sender*/
,
uint32
action)
OVERRIDE
41
{
42
player->PlayerTalkClass->ClearMenus();
43
if
(action ==
GOSSIP_ACTION_INFO_DEF
)
44
{
45
player->CLOSE_GOSSIP_MENU();
46
creature->CastSpell(player,
SPELL_TELEPORT_SINGLE
,
true
);
47
}
48
49
return
true
;
50
}
51
52
bool
OnGossipHello
(
Player
* player,
Creature
* creature)
OVERRIDE
53
{
54
if
(player->GetQuestStatus(3628) ==
QUEST_STATUS_INCOMPLETE
&& player->HasItemCount(10757))
55
player->ADD_GOSSIP_ITEM(
GOSSIP_ICON_CHAT
,
GOSSIP_ITEM_USHER
,
GOSSIP_SENDER_MAIN
,
GOSSIP_ACTION_INFO_DEF
);
56
57
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
58
59
return
true
;
60
}
61
};
62
63
void
AddSC_blasted_lands
()
64
{
65
new
npc_deathly_usher
();
66
}
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
GOSSIP_ICON_CHAT
@ GOSSIP_ICON_CHAT
Definition
GossipDef.h:46
Player.h
QUEST_STATUS_INCOMPLETE
@ QUEST_STATUS_INCOMPLETE
Definition
QuestDef.h:89
ScriptMgr.h
ScriptedCreature.h
ScriptedGossip.h
GOSSIP_SENDER_MAIN
@ GOSSIP_SENDER_MAIN
Definition
ScriptedGossip.h:58
GOSSIP_ACTION_INFO_DEF
@ GOSSIP_ACTION_INFO_DEF
Definition
ScriptedGossip.h:56
Creature
Definition
Creature.h:427
CreatureScript::CreatureScript
CreatureScript(const char *name)
Definition
ScriptMgr.cpp:1436
Player
Definition
Player.h:1289
npc_deathly_usher
Definition
zone_blasted_lands.cpp:36
npc_deathly_usher::OnGossipHello
bool OnGossipHello(Player *player, Creature *creature) OVERRIDE
Definition
zone_blasted_lands.cpp:52
npc_deathly_usher::OnGossipSelect
bool OnGossipSelect(Player *player, Creature *creature, uint32, uint32 action) OVERRIDE
Definition
zone_blasted_lands.cpp:40
npc_deathly_usher::npc_deathly_usher
npc_deathly_usher()
Definition
zone_blasted_lands.cpp:38
AddSC_blasted_lands
void AddSC_blasted_lands()
Definition
zone_blasted_lands.cpp:63
DeathlyUsher
DeathlyUsher
Definition
zone_blasted_lands.cpp:29
SPELL_TELEPORT_SINGLE_IN_GROUP
@ SPELL_TELEPORT_SINGLE_IN_GROUP
Definition
zone_blasted_lands.cpp:31
SPELL_TELEPORT_SINGLE
@ SPELL_TELEPORT_SINGLE
Definition
zone_blasted_lands.cpp:30
SPELL_TELEPORT_GROUP
@ SPELL_TELEPORT_GROUP
Definition
zone_blasted_lands.cpp:32
GOSSIP_ITEM_USHER
#define GOSSIP_ITEM_USHER
Definition
zone_blasted_lands.cpp:26
src
server
scripts
EasternKingdoms
zone_blasted_lands.cpp
Generated on
for Project SkyFire Core by
1.17.0