Project SkyFire Core
SkyFire 5.4.8 server core API documentation
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
7SDName: Blasted_Lands
8SD%Complete: 90
9SDComment: Quest support: 3628. Teleporter to Rise of the Defiler missing group support.
10SDCategory: Blasted Lands
11EndScriptData */
12
13/* ContentData
14npc_deathly_usher
15EndContentData */
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
34
36{
37public:
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))
56
57 player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
58
59 return true;
60 }
61};
62
64{
66}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ GOSSIP_ICON_CHAT
Definition GossipDef.h:46
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:89
@ GOSSIP_SENDER_MAIN
@ GOSSIP_ACTION_INFO_DEF
CreatureScript(const char *name)
bool OnGossipHello(Player *player, Creature *creature) OVERRIDE
bool OnGossipSelect(Player *player, Creature *creature, uint32, uint32 action) OVERRIDE
void AddSC_blasted_lands()
@ SPELL_TELEPORT_SINGLE_IN_GROUP
@ SPELL_TELEPORT_SINGLE
@ SPELL_TELEPORT_GROUP
#define GOSSIP_ITEM_USHER