Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 262d8bdfc040819969dafcf82c738831f2463660 Mon Sep 17 00:00:00 2001
- From: unknown <cristi@cristis-PC.(none)>
- Date: Sun, 15 Jul 2012 23:26:51 +0300
- Subject: [PATCH] Fix quest Elementary!
- ---
- src/server/scripts/World/npcs_special.cpp | 62 +++++++++++++++++++++++++++++
- 1 file changed, 62 insertions(+)
- diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
- index b295267..f6325aa 100644
- --- a/src/server/scripts/World/npcs_special.cpp
- +++ b/src/server/scripts/World/npcs_special.cpp
- @@ -3461,6 +3461,67 @@ public:
- }
- };
- +/*##########
- +#### Npc Crucible of Earth/Air/Fire/Water
- +###########*/
- +
- +enum QuestElementaryEntries
- +{
- + NPC_CRUCIBLE_OF_AIR = 39736,
- + NPC_CRUCIBLE_OF_EARTH = 39737,
- + NPC_CRUCIBLE_OF_FIRE = 39730,
- + NPC_CRUCIBLE_OF_WATER = 39738,
- + CREDIT_CRUCIBLE_OF_AIR = 39739,
- + CREDIT_CRUCIBLE_OF_EARTH = 39741,
- + CREDIT_CRUCIBLE_OF_WATER = 39740,
- + CREDIT_CRUCIBLE_OF_FIRE = 39727,
- + QUEST_ELEMENTARY = 25303
- +};
- +
- +#define GOSSIP_NPC_ACTIVATE "Activate now..."
- +
- +class npc_crucible_of : public CreatureScript
- +{
- +public:
- + npc_crucible_of() : CreatureScript("npc_crucible_of") { }
- +
- + bool OnGossipHello(Player* player, Creature* creature)
- + {
- + if (player->GetQuestStatus(QUEST_ELEMENTARY)==QUEST_STATUS_INCOMPLETE)
- + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NPC_ACTIVATE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- + player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
- +
- + return true;
- + }
- +
- + bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
- + {
- + player->PlayerTalkClass->ClearMenus();
- + if (action == GOSSIP_ACTION_INFO_DEF+1)
- + {
- + uint64 uCredit = 0;
- +
- + player->CLOSE_GOSSIP_MENU();
- +
- + switch (creature->GetEntry()) {
- + case NPC_CRUCIBLE_OF_AIR : uCredit = CREDIT_CRUCIBLE_OF_AIR; break;
- + case NPC_CRUCIBLE_OF_EARTH : uCredit = CREDIT_CRUCIBLE_OF_EARTH; break;
- + case NPC_CRUCIBLE_OF_FIRE : uCredit = CREDIT_CRUCIBLE_OF_FIRE; break;
- + case NPC_CRUCIBLE_OF_WATER : uCredit = CREDIT_CRUCIBLE_OF_WATER; break;
- + default: break;
- + }
- +
- + if(uCredit!=0)
- + {
- + player->KilledMonsterCredit(uCredit,0);
- + creature->DespawnOrUnsummon();
- + }
- + }
- +
- + return true;
- + }
- +};
- +
- void AddSC_npcs_special()
- {
- new npc_air_force_bots;
- @@ -3498,4 +3559,5 @@ void AddSC_npcs_special()
- new npc_frostfire_orb;
- new npc_power_word_barrier;
- new npc_shadowy_apparition;
- + new npc_crucible_of();
- }
- --
- 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment