aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKillyana <morphone1@gmail.com>2017-01-01 15:05:06 +0100
committerGitHub <noreply@github.com>2017-01-01 15:05:06 +0100
commit10f4138f6c3398b9c512586bb18f6179a8af373a (patch)
tree8f383f167cdf6bb2f58e8f0e244aa7ee01bb90df /src
parentb15ae6b560510f41bc6a6db1732d530a8448d59b (diff)
parentbee2975e4bd49b63adbcffff3996ce9ca95fb166 (diff)
Merge pull request #18702 from Rushor/peon
Scripts/Quest: Work Work! Move Lazy Peon script to SAI
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Kalimdor/zone_durotar.cpp90
1 files changed, 0 insertions, 90 deletions
diff --git a/src/server/scripts/Kalimdor/zone_durotar.cpp b/src/server/scripts/Kalimdor/zone_durotar.cpp
index 62a041e7798..a667797ee04 100644
--- a/src/server/scripts/Kalimdor/zone_durotar.cpp
+++ b/src/server/scripts/Kalimdor/zone_durotar.cpp
@@ -21,95 +21,6 @@
#include "SpellScript.h"
#include "Player.h"
-/*######
-##Quest 5441: Lazy Peons
-##npc_lazy_peon
-######*/
-
-enum LazyPeonYells
-{
- SAY_SPELL_HIT = 0
-};
-
-enum LazyPeon
-{
- QUEST_LAZY_PEONS = 5441,
- GO_LUMBERPILE = 175784,
- SPELL_BUFF_SLEEP = 17743,
- SPELL_AWAKEN_PEON = 19938
-};
-
-class npc_lazy_peon : public CreatureScript
-{
-public:
- npc_lazy_peon() : CreatureScript("npc_lazy_peon") { }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_lazy_peonAI(creature);
- }
-
- struct npc_lazy_peonAI : public ScriptedAI
- {
- npc_lazy_peonAI(Creature* creature) : ScriptedAI(creature)
- {
- Initialize();
- }
-
- void Initialize()
- {
- RebuffTimer = 0;
- work = false;
- }
-
- uint32 RebuffTimer;
- bool work;
-
- void Reset() override
- {
- Initialize();
- }
-
- void MovementInform(uint32 /*type*/, uint32 id) override
- {
- if (id == 1)
- work = true;
- }
-
- void SpellHit(Unit* caster, const SpellInfo* spell) override
- {
- if (spell->Id != SPELL_AWAKEN_PEON)
- return;
-
- Player* player = caster->ToPlayer();
- if (player && player->GetQuestStatus(QUEST_LAZY_PEONS) == QUEST_STATUS_INCOMPLETE)
- {
- player->KilledMonsterCredit(me->GetEntry(), me->GetGUID());
- Talk(SAY_SPELL_HIT, caster);
- me->RemoveAllAuras();
- if (GameObject* Lumberpile = me->FindNearestGameObject(GO_LUMBERPILE, 20))
- me->GetMotionMaster()->MovePoint(1, Lumberpile->GetPositionX()-1, Lumberpile->GetPositionY(), Lumberpile->GetPositionZ());
- }
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (work == true)
- me->HandleEmoteCommand(EMOTE_ONESHOT_WORK_CHOPWOOD);
- if (RebuffTimer <= diff)
- {
- DoCast(me, SPELL_BUFF_SLEEP);
- RebuffTimer = 300000; //Rebuff agian in 5 minutes
- }
- else
- RebuffTimer -= diff;
- if (!UpdateVictim())
- return;
- DoMeleeAttackIfReady();
- }
- };
-};
-
enum Texts
{
// Tiger Matriarch Credit
@@ -596,7 +507,6 @@ class spell_voodoo : public SpellScriptLoader
void AddSC_durotar()
{
- new npc_lazy_peon();
new npc_tiger_matriarch_credit();
new npc_tiger_matriarch();
new npc_troll_volunteer();