From 3cd8da7560b7a8901f8ece5d0e76e7d596e41200 Mon Sep 17 00:00:00 2001 From: talamortis Date: Mon, 19 Mar 2018 11:54:00 +0000 Subject: [PATCH] Players can now re enter zul'aman after raid wipes. --- src/server/game/Handlers/PetitionsHandler.cpp | 2 +- .../EasternKingdoms/ZulAman/boss_akilzon.cpp | 13 +++++++++---- .../EasternKingdoms/ZulAman/boss_nalorakk.cpp | 14 ++++++++++---- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp index e452c282b..1e89d6bd6 100644 --- a/src/server/game/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Handlers/PetitionsHandler.cpp @@ -270,7 +270,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData) WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8 + 8 + 4 + 1 + signs * 12)); data << petitionguid; // petition guid data << _player->GetGUID(); // owner guid - data << petitionguid_low; // guild guid (in Oregon always same as GUID_LOPART(petitionguid) + data << petitionguid_low; // guild guid data << signs; // sign's count for (uint8 i = 1; i <= signs; ++i) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index 7ea3a0a62..76a25eb33 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2 * Copyright (C) 2008-2016 TrinityCore * Copyright (C) 2005-2009 MaNGOS @@ -89,7 +89,9 @@ class boss_akilzon : public CreatureScript memset(BirdGUIDs, 0, sizeof(BirdGUIDs)); StormCount = 0; isRaining = false; - instance->SetData(DATA_AKILZONEVENT, NOT_STARTED); + + if (instance) + instance->SetData(DATA_AKILZONEVENT, NOT_STARTED); SetWeather(WEATHER_STATE_FINE, 0.0f); } @@ -105,14 +107,17 @@ class boss_akilzon : public CreatureScript Talk(SAY_AGGRO); //DoZoneInCombat(); - instance->SetData(DATA_AKILZONEVENT, IN_PROGRESS); + + if (instance) + instance->SetData(DATA_AKILZONEVENT, IN_PROGRESS); } void JustDied(Unit* /*killer*/) { Talk(SAY_DEATH); _JustDied(); - instance->SetData(DATA_AKILZONEVENT, DONE); + if (instance) + instance->SetData(DATA_AKILZONEVENT, DONE); } void KilledUnit(Unit* who) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index 29d2aa294..fbc1a3d1c 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -1,4 +1,4 @@ - /* + /* * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2 * Copyright (C) 2008-2016 TrinityCore * Copyright (C) 2005-2009 MaNGOS @@ -138,7 +138,10 @@ class boss_nalorakk : public CreatureScript (*me).GetMotionMaster()->MovePoint(0, NalorakkWay[7][0], NalorakkWay[7][1], NalorakkWay[7][2]); } - instance->SetData(DATA_NALORAKKEVENT, NOT_STARTED); + if (instance) + { + instance->SetData(DATA_NALORAKKEVENT, NOT_STARTED); + } Surge_Timer = urand(15000, 20000); BrutalSwipe_Timer = urand(7000, 12000); @@ -291,7 +294,8 @@ class boss_nalorakk : public CreatureScript void EnterCombat(Unit* /*who*/) { - instance->SetData(DATA_NALORAKKEVENT, IN_PROGRESS); + if (instance) + instance->SetData(DATA_NALORAKKEVENT, IN_PROGRESS); me->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(me, SOUND_YELL_AGGRO); @@ -301,7 +305,9 @@ class boss_nalorakk : public CreatureScript void JustDied(Unit* /*killer*/) { ResetMobs(); - instance->SetData(DATA_NALORAKKEVENT, DONE); + + if (instance) + instance->SetData(DATA_NALORAKKEVENT, DONE); me->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(me, SOUND_YELL_DEATH);