From 03def08976ec940fe3034694dd9df36347259331 Mon Sep 17 00:00:00 2001 From: trickerer Date: Fri, 25 Oct 2024 11:02:45 +0700 Subject: [PATCH] NPCBots: Fix Sindragosa's Ice Tomb on bots being permanent and without visual --- .../IcecrownCitadel/boss_sindragosa.cpp | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index f8a322f54a16f..561b1f1a5e8bf 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -609,6 +609,20 @@ struct npc_ice_tomb : public ScriptedAI { me->RemoveAllGameObjects(); + //npcbot + if (_trappedPlayerGUID.IsCreature()) + { + if (Creature* bot = ObjectAccessor::GetCreature(*me, _trappedPlayerGUID)) + { + _trappedPlayerGUID.Clear(); + bot->RemoveAurasDueToSpell(SPELL_ICE_TOMB_DAMAGE); + bot->RemoveAurasDueToSpell(SPELL_ASPHYXIATION); + bot->RemoveAurasDueToSpell(SPELL_ICE_TOMB_UNTARGETABLE); + } + return; + } + //end npcbot + if (Player* player = ObjectAccessor::GetPlayer(*me, _trappedPlayerGUID)) { _trappedPlayerGUID.Clear(); @@ -625,6 +639,21 @@ struct npc_ice_tomb : public ScriptedAI if (_existenceCheckTimer <= diff) { + //npcbot + if (_trappedPlayerGUID.IsCreature()) + { + Creature* bot = ObjectAccessor::GetCreature(*me, _trappedPlayerGUID); + if (!bot || !bot->IsAlive() || !bot->HasAura(SPELL_ICE_TOMB_DAMAGE)) + { + JustDied(me); + me->DespawnOrUnsummon(); + return; + } + _existenceCheckTimer = 1000; + return; + } + //end npcbot + Player* player = ObjectAccessor::GetPlayer(*me, _trappedPlayerGUID); if (!player || player->isDead() || !player->HasAura(SPELL_ICE_TOMB_DAMAGE)) {