Scripted/Misc: Fix random stuff
This commit is contained in:
1 parent
8b0cea7a5e
commit
08c1a81096
13 files changed
+49
-52
No files matched your search
+7
-9
@@ -318,7 +318,7 @@ class boss_lich_king_toc : public CreatureScript
|
||||
_instance->SetData(TYPE_EVENT, 5080);
|
||||
break;
|
||||
case 5080:
|
||||
if (GameObject* go = _instance->instance->GetGameObject(_instance->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, _instance->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
|
||||
{
|
||||
go->SetDisplayId(DISPLAYID_DESTROYED_FLOOR);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_NODESPAWN);
|
||||
@@ -328,15 +328,13 @@ class boss_lich_king_toc : public CreatureScript
|
||||
me->CastSpell(me, SPELL_CORPSE_TELEPORT, false);
|
||||
me->CastSpell(me, SPELL_DESTROY_FLOOR_KNOCKUP, false);
|
||||
|
||||
if (_instance)
|
||||
{
|
||||
_instance->SetBossState(BOSS_LICH_KING, DONE);
|
||||
Creature* temp = Unit::GetCreature(*me, _instance->GetData64(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);
|
||||
_instance->SetBossState(BOSS_LICH_KING, DONE);
|
||||
Creature* temp = Unit::GetCreature(*me, _instance->GetData64(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);
|
||||
|
||||
_instance->SetData(TYPE_EVENT, 0);
|
||||
|
||||
_instance->SetData(TYPE_EVENT, 0);
|
||||
}
|
||||
me->DespawnOrUnsummon();
|
||||
_updateTimer = 20*IN_MILLISECONDS;
|
||||
break;
|
||||
|
||||
@@ -354,9 +354,7 @@ public:
|
||||
void MovementInform(uint32 type, uint32 id) OVERRIDE
|
||||
{
|
||||
if (type == POINT_MOTION_TYPE && id == 0)
|
||||
{
|
||||
me->SetDisableGravity(false); // Needed this for proper animation after spawn, the summon in air fall to ground bug leave no other option for now, if this isn't used the drake will only walk on move.
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -388,9 +386,7 @@ public:
|
||||
}
|
||||
else WelcomeSequelTimer -= diff;
|
||||
}
|
||||
}
|
||||
if (me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE))
|
||||
{
|
||||
|
||||
if (instance->GetBossState(DATA_UROM_EVENT) == DONE)
|
||||
{
|
||||
if (!(SpecialOff))
|
||||
@@ -403,9 +399,7 @@ public:
|
||||
else SpecialTimer -= diff;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE))
|
||||
{
|
||||
|
||||
if (!(HealthWarningOff))
|
||||
{
|
||||
if (me->GetHealthPct() <= 40.0f)
|
||||
@@ -414,9 +408,7 @@ public:
|
||||
HealthWarningOff = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE))
|
||||
{
|
||||
|
||||
if (HealthWarningOff)
|
||||
{
|
||||
if (WarningTimer <= diff)
|
||||
@@ -427,6 +419,7 @@ public:
|
||||
else WarningTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE)))
|
||||
{
|
||||
if (!(DisableTakeOff))
|
||||
|
||||
@@ -234,7 +234,9 @@ public:
|
||||
{
|
||||
if (currentPhase == PHASE_NONE)
|
||||
{
|
||||
instance->SetData(DATA_GORTOK_PALEHOOF_EVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_GORTOK_PALEHOOF_EVENT, IN_PROGRESS);
|
||||
|
||||
me->SummonCreature(NPC_STASIS_CONTROLLER, moveLocs[5].x, moveLocs[5].y, moveLocs[5].z, 0, TEMPSUMMON_CORPSE_DESPAWN);
|
||||
}
|
||||
Phase move = PHASE_NONE;
|
||||
|
||||
Reference in new issue
Block a user