mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Scripts/EoE: fixed crash
- removed some useless code (and some other random changes)
(cherry picked from commit 6680a7c331)
Conflicts:
src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
This commit is contained in:
@@ -77,9 +77,9 @@ public:
|
||||
|
||||
/// @todo this should be handled in map, maybe add a summon function in map
|
||||
// There is no other way afaik...
|
||||
void SpawnGameObject(uint32 entry, Position& pos)
|
||||
void SpawnGameObject(uint32 entry, Position const& pos)
|
||||
{
|
||||
GameObject* go = new GameObject;
|
||||
GameObject* go = new GameObject();
|
||||
if (!go->Create(instance->GenerateLowGuid<HighGuid::GameObject>(), entry, instance,
|
||||
PHASEMASK_NORMAL, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(),
|
||||
0, 0, 0, 0, 120, GO_STATE_READY))
|
||||
@@ -98,30 +98,19 @@ public:
|
||||
platformGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_FOCUSING_IRIS_10:
|
||||
if (instance->GetDifficultyID() == DIFFICULTY_10_N)
|
||||
{
|
||||
irisGUID = go->GetGUID();
|
||||
focusingIrisPosition = go->GetPosition();
|
||||
}
|
||||
break;
|
||||
case GO_FOCUSING_IRIS_25:
|
||||
if (instance->GetDifficultyID() == DIFFICULTY_25_N)
|
||||
{
|
||||
irisGUID = go->GetGUID();
|
||||
focusingIrisPosition = go->GetPosition();
|
||||
}
|
||||
irisGUID = go->GetGUID();
|
||||
focusingIrisPosition = go->GetPosition();
|
||||
break;
|
||||
case GO_EXIT_PORTAL:
|
||||
exitPortalGUID = go->GetGUID();
|
||||
exitPortalPosition = go->GetPosition();
|
||||
break;
|
||||
case GO_HEART_OF_MAGIC_10:
|
||||
if (instance->GetDifficultyID() == DIFFICULTY_10_N)
|
||||
heartOfMagicGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_HEART_OF_MAGIC_25:
|
||||
if (instance->GetDifficultyID() == DIFFICULTY_25_N)
|
||||
heartOfMagicGUID = go->GetGUID();
|
||||
heartOfMagicGUID = go->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -166,10 +155,10 @@ public:
|
||||
if (eventId == EVENT_FOCUSING_IRIS)
|
||||
{
|
||||
if (Creature* alexstraszaBunny = instance->GetCreature(alexstraszaBunnyGUID))
|
||||
{
|
||||
alexstraszaBunny->CastSpell(alexstraszaBunny, SPELL_IRIS_OPENED);
|
||||
instance->GetGameObject(irisGUID)->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
}
|
||||
|
||||
if (GameObject* iris = instance->GetGameObject(irisGUID))
|
||||
iris->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
|
||||
if (Creature* malygos = instance->GetCreature(malygosGUID))
|
||||
malygos->AI()->DoAction(0); // ACTION_LAND_ENCOUNTER_START
|
||||
@@ -183,17 +172,17 @@ public:
|
||||
{
|
||||
if (Creature* malygos = instance->GetCreature(malygosGUID))
|
||||
{
|
||||
std::list<HostileReference*> m_threatlist = malygos->getThreatManager().getThreatList();
|
||||
ThreatContainer::StorageType const& threatList = malygos->getThreatManager().getThreatList();
|
||||
for (GuidList::const_iterator itr_vortex = vortexTriggers.begin(); itr_vortex != vortexTriggers.end(); ++itr_vortex)
|
||||
{
|
||||
if (m_threatlist.empty())
|
||||
if (threatList.empty())
|
||||
return;
|
||||
|
||||
uint8 counter = 0;
|
||||
if (Creature* trigger = instance->GetCreature(*itr_vortex))
|
||||
{
|
||||
// each trigger have to cast the spell to 5 players.
|
||||
for (std::list<HostileReference*>::const_iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
|
||||
for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
|
||||
{
|
||||
if (counter >= 5)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user