fix(Scripts/ZulAman): Update Malacrass adds spawn positions (#20580)

Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com>
This commit is contained in:
Andrew
2024-11-15 09:01:31 -03:00
committed by GitHub
parent 07793f6cc8
commit e2a57dbfb2
@@ -22,16 +22,10 @@
#include "Player.h" #include "Player.h"
#include "SpellScriptLoader.h" #include "SpellScriptLoader.h"
#include "zulaman.h" #include "zulaman.h"
/* ScriptData
SDName: Boss_Hex_Lord_Malacrass
SD%Complete:
SDComment:
SDCategory: Zul'Aman
EndScriptData */
enum Says enum Says
{ {
SAY_AGGRO = 0, SAY_AGGRO,
SAY_KILL_ONE, SAY_KILL_ONE,
SAY_KILL_TWO, SAY_KILL_TWO,
SAY_DRAIN_POWER, SAY_DRAIN_POWER,
@@ -117,18 +111,18 @@ enum Spells
// Death Knight // Death Knight
SPELL_DK_PLAGUE_STRIKE = 57599, SPELL_DK_PLAGUE_STRIKE = 57599,
SPELL_DK_DEATH_AND_DECAY = 43265, SPELL_DK_DEATH_AND_DECAY = 43265,
SPELL_DK_BLOOD_WORMS = 97630, SPELL_DK_BLOOD_WORMS = 97630
}; };
const Position addPosition[4] = const Position AddPosition[4] =
{ {
{112.8827f, 921.2795f, 33.8883f, 1.5696f}, { 128.48448f, 923.04285f, 33.97255f, 1.588249564170837402f },
{107.8827f, 921.2795f, 33.8883f, 1.5696f}, { 122.60526f, 923.24536f, 33.97256f, 1.570796370506286621f },
{122.8827f, 921.2795f, 33.8883f, 1.5696f}, { 111.69282f, 923.15314f, 33.972576f, 1.570796370506286621f },
{127.8827f, 921.2795f, 33.8883f, 1.5696f} { 105.40299f, 923.3421f, 33.972588f, 1.553343057632446289f }
}; };
static uint32 addEntrySets[4][2] = static uint32 AddEntrySets[4][2] =
{ {
{ NPC_THURG, NPC_ALYSON_ANTILLE }, { NPC_THURG, NPC_ALYSON_ANTILLE },
{ NPC_LORD_RADAAN, NPC_SLITHER }, { NPC_LORD_RADAAN, NPC_SLITHER },
@@ -243,7 +237,7 @@ struct boss_hexlord_malacrass : public BossAI
for (uint8 i = 0; i < MAX_ADD_COUNT; ++i) for (uint8 i = 0; i < MAX_ADD_COUNT; ++i)
{ {
uint8 flip = urand(0, 1); uint8 flip = urand(0, 1);
me->SummonCreature(addEntrySets[i][flip], addPosition[i], TEMPSUMMON_DEAD_DESPAWN, 0); me->SummonCreature(AddEntrySets[i][flip], AddPosition[i], TEMPSUMMON_DEAD_DESPAWN, 0);
} }
} }
@@ -274,21 +268,14 @@ struct boss_hexlord_malacrass : public BossAI
siphonTrigger->AI()->DoCast(target, SPELL_SIPHON_SOUL, true); siphonTrigger->AI()->DoCast(target, SPELL_SIPHON_SOUL, true);
siphonTrigger->GetMotionMaster()->MoveChase(me); siphonTrigger->GetMotionMaster()->MoveChase(me);
if (Player* player = target->ToPlayer()) if (Player* player = target->ToPlayer())
{ _currentClass = player->HasAura(AURA_SHADOW_FORM) ? ADDITIONAL_CLASS_SPRIEST : player->getClass() - 1;
if (player->HasAura(AURA_SHADOW_FORM))
_currentClass = ADDITIONAL_CLASS_SPRIEST;
else
_currentClass = player->getClass() - 1;
}
} }
} }
}); });
}, 40s); }, 40s);
ScheduleTimedEvent(_classAbilityTimer, [&]{ ScheduleTimedEvent(_classAbilityTimer, [&]{
if (_currentClass) if (_currentClass)
{
UseAbility(); UseAbility();
}
}, _classAbilityTimer); }, _classAbilityTimer);
} }