mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/ToC: The Lich King event should only be started by the announcer
This commit is contained in:
@@ -255,12 +255,6 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
if (GetBossState(BOSS_VALKIRIES) == SPECIAL)
|
||||
state = DONE;
|
||||
break;
|
||||
case DONE:
|
||||
if (instance->GetPlayers().getFirst()->GetSource()->GetTeam() == ALLIANCE)
|
||||
EventStage = 4020;
|
||||
else
|
||||
EventStage = 4030;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ class npc_announcer_toc10 : public CreatureScript
|
||||
|
||||
char const* _message = "We are ready!";
|
||||
|
||||
if (player->IsInCombat() || instance->IsEncounterInProgress() || instance->GetData(TYPE_EVENT))
|
||||
if (player->IsInCombat() || instance->IsEncounterInProgress())
|
||||
return true;
|
||||
|
||||
uint8 i = 0;
|
||||
@@ -199,17 +199,11 @@ class npc_announcer_toc10 : public CreatureScript
|
||||
}
|
||||
else if (instance->GetBossState(BOSS_LICH_KING) != DONE)
|
||||
{
|
||||
if (GameObject* floor = ObjectAccessor::GetGameObject(*player, instance->GetGuidData(GO_ARGENT_COLISEUM_FLOOR)))
|
||||
floor->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
|
||||
|
||||
creature->CastSpell(creature, SPELL_CORPSE_TELEPORT, false);
|
||||
creature->CastSpell(creature, SPELL_DESTROY_FLOOR_KNOCKUP, false);
|
||||
|
||||
if (!ObjectAccessor::GetCreature(*creature, instance->GetGuidData(NPC_ANUBARAK)))
|
||||
creature->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
|
||||
|
||||
if (creature->IsVisible())
|
||||
creature->SetVisible(false);
|
||||
if (creature->GetMap()->GetPlayers().getFirst()->GetSource()->GetTeam() == ALLIANCE)
|
||||
instance->SetData(TYPE_EVENT, 4020);
|
||||
else
|
||||
instance->SetData(TYPE_EVENT, 4030);
|
||||
instance->SetBossState(BOSS_LICH_KING, NOT_STARTED);
|
||||
}
|
||||
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user