Scripts/ToC: fixed typo introduced in cfc0c50b5e

* also update anub arak position to sniffed values

Closes #13323
This commit is contained in:
joschiwald
2014-10-14 18:35:46 +02:00
parent c3276ed27c
commit 8fdc7a6286
4 changed files with 19 additions and 42 deletions

View File

@@ -212,7 +212,6 @@ class boss_anubarak_trial : public CreatureScript
}
void MoveInLineOfSight(Unit* /*who*/) override
{
if (!_intro)
{

View File

@@ -68,15 +68,10 @@ class instance_trial_of_the_crusader : public InstanceMapScript
else
player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 0);
// make sure Anub'arak isnt missing and floor is destroyed after a crash
// make sure Anub'arak isnt missing
if (GetBossState(BOSS_LICH_KING) == DONE && TrialCounter && GetBossState(BOSS_ANUBARAK) != DONE)
{
if (Creature* anubArak = ObjectAccessor::GetCreature(*player, GetGuidData(NPC_ANUBARAK)))
anubArak = player->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
if (GameObject* floor = ObjectAccessor::GetGameObject(*player, GetGuidData(GO_ARGENT_COLISEUM_FLOOR)))
floor->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
}
if (!ObjectAccessor::GetCreature(*player, GetGuidData(NPC_ANUBARAK)))
player->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
}
void OpenDoor(ObjectGuid guid)
@@ -160,23 +155,15 @@ class instance_trial_of_the_crusader : public InstanceMapScript
switch (go->GetEntry())
{
case GO_CRUSADERS_CACHE_10:
if (instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_NORMAL)
CrusadersCacheGUID = go->GetGUID();
break;
case GO_CRUSADERS_CACHE_25:
if (instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_NORMAL)
CrusadersCacheGUID = go->GetGUID();
break;
case GO_CRUSADERS_CACHE_10_H:
if (instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
CrusadersCacheGUID = go->GetGUID();
break;
case GO_CRUSADERS_CACHE_25_H:
if (instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_HEROIC)
CrusadersCacheGUID = go->GetGUID();
CrusadersCacheGUID = go->GetGUID();
break;
case GO_ARGENT_COLISEUM_FLOOR:
FloorGUID = go->GetGUID();
if (GetBossState(BOSS_LICH_KING) == DONE)
go->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
break;
case GO_MAIN_GATE_DOOR:
MainGateDoorGUID = go->GetGUID();

View File

@@ -207,11 +207,8 @@ class npc_announcer_toc10 : public CreatureScript
creature->CastSpell(creature, SPELL_CORPSE_TELEPORT, false);
creature->CastSpell(creature, SPELL_DESTROY_FLOOR_KNOCKUP, false);
Creature* anubArak = ObjectAccessor::GetCreature(*creature, instance->GetGuidData(NPC_ANUBARAK));
if (!anubArak || !anubArak->IsAlive())
anubArak = creature->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
instance->SetBossState(BOSS_ANUBARAK, NOT_STARTED);
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);
@@ -319,19 +316,15 @@ class boss_lich_king_toc : public CreatureScript
case 5080:
{
if (GameObject* go = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(GO_ARGENT_COLISEUM_FLOOR)))
{
go->SetDisplayId(DISPLAYID_DESTROYED_FLOOR);
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_NODESPAWN);
go->SetGoState(GO_STATE_ACTIVE);
}
go->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
me->CastSpell(me, SPELL_CORPSE_TELEPORT, false);
me->CastSpell(me, SPELL_DESTROY_FLOOR_KNOCKUP, false);
_instance->SetBossState(BOSS_LICH_KING, DONE);
Creature* temp = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_ANUBARAK));
if (!temp || !temp->IsAlive())
temp = me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
if (!ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_ANUBARAK)))
me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
_instance->SetData(TYPE_EVENT, 0);

View File

@@ -42,9 +42,7 @@ enum SpellIds
enum MiscData
{
DESPAWN_TIME = 1200000,
DISPLAYID_DESTROYED_FLOOR = 9060
DESPAWN_TIME = 1200000
};
const Position ToCSpawnLoc[]=
@@ -133,7 +131,7 @@ const Position LichKingLoc[]=
const Position AnubarakLoc[]=
{
{787.932556f, 133.289780f, 142.612152f, 0}, // 0 - Anub'arak start location
{783.9305f, 132.9722f, 142.6711f, 3.141593f}, // 0 - Anub'arak Spawn Location (sniffed)
{695.240051f, 137.834824f, 142.200000f, 0}, // 1 - Anub'arak move point location
{694.886353f, 102.484665f, 142.119614f, 0}, // 3 - Nerub Spawn
{694.500671f, 185.363968f, 142.117905f, 0}, // 5 - Nerub Spawn
@@ -232,13 +230,13 @@ enum CreatureIds
NPC_HORDE_WARLOCK = 34450,
NPC_HORDE_WARRIOR = 34453,
NPC_LIGHTBANE = 34497,
NPC_DARKBANE = 34496,
NPC_LIGHTBANE = 34497,
NPC_DARKBANE = 34496,
NPC_DARK_ESSENCE = 34567,
NPC_LIGHT_ESSENCE = 34568,
NPC_DARK_ESSENCE = 34567,
NPC_LIGHT_ESSENCE = 34568,
NPC_ANUBARAK = 34564
NPC_ANUBARAK = 34564
};
enum GameObjectIds