Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 4367e51ed12b2dcc0f6249eab9407c313b67d7b7 Mon Sep 17 00:00:00 2001
- From: unknown <cristi@cristis-PC.(none)>
- Date: Mon, 23 Jul 2012 23:30:36 +0300
- Subject: [PATCH] Fix quest Audience with the Stonemother
- ---
- src/server/scripts/Maelstrom/deepholm.cpp | 135 +++++++++++++++++++++++++++++
- 1 file changed, 135 insertions(+)
- diff --git a/src/server/scripts/Maelstrom/deepholm.cpp b/src/server/scripts/Maelstrom/deepholm.cpp
- index e3da6b2..8027806 100644
- --- a/src/server/scripts/Maelstrom/deepholm.cpp
- +++ b/src/server/scripts/Maelstrom/deepholm.cpp
- @@ -1037,6 +1037,140 @@ public:
- }
- };
- +/*####
- +## Support for quest An Audience with the Stonemother
- +##########*/
- +
- +enum eTherazaneEntries
- +{
- + QUEST_AN_AUDIENCE_WITH_THE_STONEMOTHER = 26752,
- + NPC_EARTHCALLER_TORUNSCAR = 43809,
- + QUEST_CREDIT = 44051
- +};
- +
- +#define THERAZANE_EMOTE_01 "Stay where you are..."
- +
- +//therazane text
- +#define TEXT_THEREZANE_01 "So small. So soft. It's a wonder you've even lasted this long down here, fleshling."
- +#define TEXT_THEREZANE_02 "Or perhaps a testament to your abilities?"
- +#define TEXT_THEREZANE_03 "All of this for a piece of the World Pillar? What exactly shaman do you intend to do with it?"
- +#define TEXT_THEREZANE_04 "And what then? Will you leave Deepholm to its denizens?"
- +#define TEXT_THEREZANE_05 "I'm glad you're at least that perceptive."
- +#define TEXT_THEREZANE_06 "I propose this: We will march on the Twilight cult and extinguish any utterings of Deathwing's name from this realm. Your Earthen Ring will march with us."
- +#define TEXT_THEREZANE_07 "You do this, and I will send Gorsik to the temple with our piece of the World Pillar."
- +#define TEXT_THEREZANE_08 "Seal the rift and leave this place."
- +#define TEXT_THEREZANE_09 "Save your thanks. We march upon the Twilight Precipice as soon as our forces are gathered. I expect to see you on the battlefield."
- +//earthcaller text
- +#define TEXT_EARTHCALLER_01 "We came here to seal da rift Deathwing tore into Azeroth. We need the World Pillar to repair da hole on dis side."
- +#define TEXT_EARTHCALLER_02 "We'll leave. We've no desire to be stayin' where we're not welcome."
- +#define TEXT_EARTHCALLER_03 "We'll be doin' exactly that then. Ya have our tanks, Stonemother."
- +
- +class npc_therazane: public CreatureScript
- +{
- + public:
- + npc_therazane() : CreatureScript("npc_therazane") { }
- +
- + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
- + {
- + if (quest->GetQuestId() == QUEST_AN_AUDIENCE_WITH_THE_STONEMOTHER)
- + {
- + creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_SELECTABLE);
- + creature->MonsterTextEmote(THERAZANE_EMOTE_01,player->GetGUID(),true);
- + if (npc_therazane::npc_therazaneAI* pTherazane = CAST_AI(npc_therazane::npc_therazaneAI, creature->AI()))
- + {
- + pTherazane->bAudienceWithTheStonemother = true;
- + pTherazane->pQuestOwner = player;
- + }
- + }
- + return true;
- + }
- +
- + bool OnGossipHello(Player* player, Creature* creature)
- + {
- + if (creature->isQuestGiver())
- + player->PrepareQuestMenu(creature->GetGUID());
- +
- + player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
- +
- + return true;
- + }
- +
- + struct npc_therazaneAI : public ScriptedAI
- + {
- + npc_therazaneAI(Creature* creature) : ScriptedAI(creature)
- + { pQuestOwner = NULL; }
- +
- + bool bAudienceWithTheStonemother;
- + uint32 m_saytimer;
- + uint32 m_phase;
- + Player* pQuestOwner;
- + Unit* pEarthCaller;
- +
- + void Reset()
- + {
- + me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_SELECTABLE);
- + me->SetFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_GOSSIP+UNIT_NPC_FLAG_QUESTGIVER);
- + bAudienceWithTheStonemother = false;
- + m_saytimer = 3000;
- + m_phase = 0;
- + pQuestOwner = NULL;
- + pEarthCaller = me->FindNearestCreature(NPC_EARTHCALLER_TORUNSCAR,100.0f);
- + }
- +
- + void UpdateAI(uint32 const diff)
- + {
- + if(bAudienceWithTheStonemother)
- + {
- + if(m_saytimer <= diff)
- + {
- + if(pQuestOwner && pQuestOwner->isAlive() && me->GetDistance(pQuestOwner) <= 50.0f && pEarthCaller)
- + {
- + switch (m_phase)
- + {
- + case 0: me->MonsterYell(TEXT_THEREZANE_01,LANG_UNIVERSAL,pQuestOwner->GetGUID());m_phase++;break;
- + case 1: me->MonsterYell(TEXT_THEREZANE_02,LANG_UNIVERSAL,pQuestOwner->GetGUID());m_phase++;break;
- + case 2: me->MonsterYell(TEXT_THEREZANE_03,LANG_UNIVERSAL,pQuestOwner->GetGUID());m_phase++;break;
- + case 3: pEarthCaller->MonsterYell(TEXT_EARTHCALLER_01,LANG_UNIVERSAL,pQuestOwner->GetGUID());m_phase++;break;
- + case 4: me->MonsterYell(TEXT_THEREZANE_04,LANG_UNIVERSAL,pQuestOwner->GetGUID());m_phase++;break;
- + case 5: pEarthCaller->MonsterYell(TEXT_EARTHCALLER_02,LANG_UNIVERSAL,pQuestOwner->GetGUID());m_phase++;break;
- + case 6: me->MonsterYell(TEXT_THEREZANE_05,LANG_UNIVERSAL,pQuestOwner->GetGUID());m_phase++;break;
- + case 7: me->MonsterYell(TEXT_THEREZANE_06,LANG_UNIVERSAL,pQuestOwner->GetGUID());m_phase++;break;
- + case 8: me->MonsterYell(TEXT_THEREZANE_07,LANG_UNIVERSAL,pQuestOwner->GetGUID());m_phase++;break;
- + case 9: me->MonsterYell(TEXT_THEREZANE_08,LANG_UNIVERSAL,pQuestOwner->GetGUID());m_phase++;break;
- + case 10: pEarthCaller->MonsterYell(TEXT_EARTHCALLER_03,LANG_UNIVERSAL,pQuestOwner->GetGUID());m_phase++;break;
- + case 11: me->MonsterYell(TEXT_THEREZANE_09,LANG_UNIVERSAL,pQuestOwner->GetGUID());m_phase++;break;
- + default: break;
- + }
- +
- + if(m_phase == 12 && pQuestOwner->isAlive())
- + {
- + pQuestOwner->KilledMonsterCredit(QUEST_CREDIT,0);
- + me->GetAI()->Reset();
- + return;
- + }
- +
- + m_saytimer = 3000;
- + }
- + else
- + me->GetAI()->Reset();
- + }
- + else m_saytimer -= diff;
- + }
- +
- + if(!UpdateVictim())
- + return;
- +
- + DoMeleeAttackIfReady();
- + }
- +
- + };
- +
- + CreatureAI* GetAI(Creature *creature) const
- + {
- + return new npc_therazaneAI(creature);
- + }
- +};
- +
- void AddSC_deepholm()
- {
- new npc_lodestone();
- @@ -1058,4 +1192,5 @@ void AddSC_deepholm()
- new npc_bound_elemental();
- new go_rod_of_subjugations();
- new spell_smash_chains();
- + new npc_therazane();
- }
- --
- 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment