Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 999cefa5765348c5a0036a947e97f54457025c06 Mon Sep 17 00:00:00 2001
- From: unknown <cristi@cristis-PC.(none)>
- Date: Tue, 24 Jul 2012 00:25:31 +0300
- Subject: [PATCH] Fix quest Putting the Pieces Toghether
- ---
- src/server/scripts/Maelstrom/deepholm.cpp | 47 +++++++++++++++++++++++++++++
- 1 file changed, 47 insertions(+)
- diff --git a/src/server/scripts/Maelstrom/deepholm.cpp b/src/server/scripts/Maelstrom/deepholm.cpp
- index 8027806..ed3451d 100644
- --- a/src/server/scripts/Maelstrom/deepholm.cpp
- +++ b/src/server/scripts/Maelstrom/deepholm.cpp
- @@ -1171,6 +1171,52 @@ class npc_therazane: public CreatureScript
- }
- };
- +/*####
- +## Support for quest Putting the Pieces Together
- +########*/
- +
- +enum PuttingPiecesTogetherEntries
- +{
- + QUEST_PUTTING_PIECES_TOGHETHER = 26439,
- + NPC_DORMANT_STONEBOUND_ELEMENTAL = 43115,
- +};
- +
- +class npc_dormant_stonebound_elemental : public CreatureScript
- +{
- + public:
- + npc_dormant_stonebound_elemental() : CreatureScript("npc_dormant_stonebound_elemental") { }
- +
- + bool OnGossipHello(Player* player, Creature* creature)
- + {
- + if(player->GetQuestStatus(QUEST_PUTTING_PIECES_TOGHETHER)==QUEST_STATUS_INCOMPLETE)
- + {
- + player->KilledMonsterCredit(NPC_DORMANT_STONEBOUND_ELEMENTAL,0);
- + creature->RemoveFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_GOSSIP);
- + creature->DespawnOrUnsummon(2000);
- + }
- + return true;
- + }
- +
- + struct npc_dormant_stonebound_elementalAI : public ScriptedAI
- + {
- + npc_dormant_stonebound_elementalAI(Creature* creature) : ScriptedAI(creature){}
- +
- + void Reset()
- + {
- + me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE);
- + me->SetFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_GOSSIP);
- + me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
- + me->HandleEmoteCommand(65);
- + me->SetByteFlag(UNIT_FIELD_BYTES_1, 0, 7);
- + }
- + };
- +
- + CreatureAI* GetAI(Creature *creature) const
- + {
- + return new npc_dormant_stonebound_elementalAI(creature);
- + }
- +};
- +
- void AddSC_deepholm()
- {
- new npc_lodestone();
- @@ -1193,4 +1239,5 @@ void AddSC_deepholm()
- new go_rod_of_subjugations();
- new spell_smash_chains();
- new npc_therazane();
- + new npc_dormant_stonebound_elemental();
- }
- --
- 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment