Skip to content

Instantly share code, notes, and snippets.

@D4R4
Last active September 5, 2019 07:59
Show Gist options
  • Save D4R4/2f0fe5736eb174d60de6 to your computer and use it in GitHub Desktop.
Save D4R4/2f0fe5736eb174d60de6 to your computer and use it in GitHub Desktop.
Syndragosa fix for IceTombs
diff -r 5a94d526dd3a src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp Mon Feb 09 10:51:06 2015 +0330
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp Wed Feb 11 21:22:36 2015 +0330
@@ -188,9 +188,36 @@
bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/)
{
+
+ //start custom code ** create GOs in place of the IceTomb NPC
+ std::list<Creature*> IceTombList;
+ _owner->GetCreatureListWithEntryInGrid(IceTombList, NPC_ICE_TOMB, 150.0f);
+ if (!IceTombList.empty())
+ for (std::list<Creature*>::iterator itr = IceTombList.begin(); itr != IceTombList.end(); ++itr)
+ {
+ Position pos = (*itr)->GetPosition();
+ if (GameObject* go = (*itr)->SummonGameObject(GO_ICE_BLOCK, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0))
+ {
+ go->SetSpellId(SPELL_ICE_TOMB_DAMAGE);
+ (*itr)->AddGameObject(go);
+ }
+ }
+ //end custom code **
+
_owner->CastSpell((Unit*)NULL, SPELL_FROST_BOMB, false, NULL, NULL, _sindragosaGUID);
_owner->RemoveAurasDueToSpell(SPELL_FROST_BOMB_VISUAL);
- return true;
+
+ //start custom code ** remove all IceBlock GOs
+ std::list<GameObject*> IceTombGoList;
+ _owner->GetGameObjectListWithEntryInGrid(IceTombGoList, GO_ICE_BLOCK, 150.0f);
+ if (!IceTombGoList.empty())
+ for (std::list<GameObject*>::iterator itr = IceTombGoList.begin(); itr != IceTombGoList.end(); ++itr)
+ {
+ (*itr)->Delete();
+ }
+ //end custom code **
+
+ return true;
}
private:
@@ -1469,11 +1496,13 @@
if (TempSummon* summon = GetCaster()->SummonCreature(NPC_ICE_TOMB, pos))
{
summon->AI()->SetGUID(GetHitUnit()->GetGUID(), DATA_TRAPPED_PLAYER);
- if (GameObject* go = summon->SummonGameObject(GO_ICE_BLOCK, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0))
- {
- go->SetSpellId(SPELL_ICE_TOMB_DAMAGE);
- summon->AddGameObject(go);
- }
+
+ //start custom code ** no need for this anymore
+ //if (GameObject* go = summon->SummonGameObject(GO_ICE_BLOCK, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0))
+ //{
+ // go->SetSpellId(SPELL_ICE_TOMB_DAMAGE);
+ // summon->AddGameObject(go);
+ //}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment