Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 10c1eb8a1412e3f11f7d53bc45b6793c55ecbff6 Mon Sep 17 00:00:00 2001
- From: unknown <cristi@cristis-PC.(none)>
- Date: Thu, 19 Jul 2012 19:04:03 +0300
- Subject: [PATCH] This will fix quests:
- Pebble & Clingy
- ---
- src/server/scripts/Maelstrom/deepholm.cpp | 103 +++++++++++++++++++++++++++++
- 1 file changed, 103 insertions(+)
- diff --git a/src/server/scripts/Maelstrom/deepholm.cpp b/src/server/scripts/Maelstrom/deepholm.cpp
- index 61918b2..d6e6487 100644
- --- a/src/server/scripts/Maelstrom/deepholm.cpp
- +++ b/src/server/scripts/Maelstrom/deepholm.cpp
- @@ -329,6 +329,107 @@ class npc_petrified_stone_bat : public CreatureScript
- }
- };
- +/*###
- +## Kor the Immovable - Peeble spawn when player has quest Peeble incomplete or rewarded
- +## Peelbe will be used for a long chain of quests
- +## Player can take it by coming here (near Kor);
- +####*/
- +
- +enum eKorTheImmovableEntries
- +{
- + QUEST_PEBBLE = 28869,
- + SPELL_SUMMON_PEBBLE = 80665,
- + NPC_PEBBLE = 43116
- +};
- +
- +class npc_kor_the_immovable : public CreatureScript
- +{
- + public:
- + npc_kor_the_immovable() : CreatureScript("npc_kor_the_immovable") { }
- +
- + struct npc_kor_the_immovableAI : public ScriptedAI
- + {
- + npc_kor_the_immovableAI(Creature* creature) : ScriptedAI(creature) { }
- +
- + void MoveInLineOfSight(Unit* who)
- + {
- + Player* player = who->ToPlayer();
- +
- + if(player && (player->GetQuestStatus(QUEST_PEBBLE)==QUEST_STATUS_COMPLETE || player->IsQuestRewarded(QUEST_PEBBLE))
- + && !HasPeebleCompanion(player))
- + {
- + player->CastSpell(player,SPELL_SUMMON_PEBBLE);
- + }
- + }
- +
- + bool HasPeebleCompanion(Player* player)
- + {
- + std::list<Creature*> lMinions;
- + player->GetAllMinionsByEntry(lMinions,NPC_PEBBLE);
- +
- + if(lMinions.size() == 1 && (*lMinions.begin())->isAlive())
- + {
- + return true;
- + }
- +
- + return false;
- + }
- +
- + };
- +
- + CreatureAI* GetAI(Creature *creature) const
- + {
- + return new npc_kor_the_immovableAI(creature);
- + }
- +};
- +
- +/*###
- +## Pebble script - support for quest Clingy
- +####*/
- +
- +enum ePebbleEntries
- +{
- + QUEST_CLINGY = 26440,
- + SPELL_CHANNELING = 74379,
- + NPC_CREDIT_BUNNY = 43172,
- + NPC_FLAYER = 42606,
- +};
- +
- +class npc_pebble : public CreatureScript
- +{
- + public:
- + npc_pebble() : CreatureScript("npc_pebble") { }
- +
- + struct npc_pebbleAI : public ScriptedAI
- + {
- + npc_pebbleAI(Creature* creature) : ScriptedAI(creature) { }
- +
- + Player* Owner;
- +
- + void Reset()
- + {
- + Owner = me->GetCharmerOrOwnerPlayerOrPlayerItself();
- + }
- +
- + void UpdateAI(uint32 const diff)
- + {
- + if(Owner && (Owner->GetQuestStatus(QUEST_CLINGY)==QUEST_STATUS_INCOMPLETE))
- + {
- + if(me->FindNearestCreature(NPC_CREDIT_BUNNY,35.0f))
- + {
- + Owner->KilledMonsterCredit(NPC_CREDIT_BUNNY,0);
- + }
- + }
- + }
- +
- + };
- +
- + CreatureAI* GetAI(Creature *creature) const
- + {
- + return new npc_pebbleAI(creature);
- + }
- +};
- +
- void AddSC_deepholm()
- {
- new npc_lodestone();
- @@ -337,4 +438,6 @@ void AddSC_deepholm()
- new npc_clues_gunship_down();
- new npc_violent_gale_credit_bunny();
- new npc_petrified_stone_bat();
- + new npc_kor_the_immovable();
- + new npc_pebble();
- }
- --
- 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment