Scripts/InstanceScript: Fix an issue where LoadAllGrids would load creatures before TeamInInstance was properly set (PR #25340)
# Conflicts: # src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
This commit is contained in:
1 parent
bdb6705911
commit
e6e20bd574
5 files changed
+14
-22
No files matched your search
@@ -114,7 +114,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadBossBoundaries(boundaries);
|
||||
LoadDoorData(doorData);
|
||||
TeamInInstance = 0;
|
||||
TeamInInstance = map->GetTeamInInstance();
|
||||
IsBonedEligible = true;
|
||||
IsOozeDanceEligible = true;
|
||||
IsNauseaEligible = true;
|
||||
@@ -143,9 +143,6 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
|
||||
void OnPlayerEnter(Player* player) override
|
||||
{
|
||||
if (!TeamInInstance)
|
||||
TeamInInstance = player->GetTeam();
|
||||
|
||||
if (GetBossState(DATA_LADY_DEATHWHISPER) == DONE && GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE)
|
||||
SpawnGunship();
|
||||
}
|
||||
@@ -271,14 +268,6 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
// Weekly quest spawn prevention
|
||||
uint32 GetCreatureEntry(ObjectGuid::LowType /*guidLow*/, CreatureData const* data) override
|
||||
{
|
||||
if (!TeamInInstance)
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (Player* player = players.begin()->GetSource())
|
||||
TeamInInstance = player->GetTeam();
|
||||
}
|
||||
|
||||
uint32 entry = data->id;
|
||||
switch (entry)
|
||||
{
|
||||
@@ -1356,7 +1345,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
ObjectGuid FrozenBolvarGUID;
|
||||
ObjectGuid PillarsChainedGUID;
|
||||
ObjectGuid PillarsUnchainedGUID;
|
||||
uint32 TeamInInstance;
|
||||
Team TeamInInstance;
|
||||
uint32 ColdflameJetsState;
|
||||
uint32 UpperSpireTeleporterActiveState;
|
||||
std::set<uint32> FrostwyrmGUIDs;
|
||||
|
||||
Reference in new issue
Block a user