Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts/The Black Morass: Bug fixing #29957

Open
wants to merge 3 commits into
base: 3.3.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ struct boss_aeonus : public BossAI
void JustDied(Unit* /*killer*/) override
{
Talk(SAY_DEATH);

if (Creature* creature = me->FindNearestCreature(NPC_TIME_RIFT, 250.0f))
creature->DespawnOrUnsummon();
instance->SetData(TYPE_RIFT, DONE);
instance->SetData(TYPE_MEDIVH, DONE); // FIXME: later should be removed
}

void KilledUnit(Unit* who) override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ enum Misc

inline uint32 RandRiftBoss() { return ((rand32() % 2) ? NPC_RIFT_KEEPER : NPC_RIFT_LORD); }

float PortalLocation[4][4]=
static const Position PortalLocation[4] =
{
{-2041.06f, 7042.08f, 29.99f, 1.30f},
{-1968.18f, 7042.11f, 21.93f, 2.12f},
Expand All @@ -59,7 +59,7 @@ static Wave RiftWaves[]=
{ RIFT_BOSS, 0s },
{ NPC_CRONO_LORD_DEJA, 0s },
{ RIFT_BOSS, 120s },
{ NPC_TEMPORUS, 140s },
{ NPC_TEMPORUS, 0s },
{ RIFT_BOSS, 120s },
{ NPC_AEONUS, 0s }
};
Expand Down Expand Up @@ -184,6 +184,8 @@ class instance_the_black_morass : public InstanceMapScript
medivh->KillSelf();
m_auiEncounter[0] = FAIL;
m_auiEncounter[1] = NOT_STARTED;
Clear();
InitWorldState(false);
}
}
}
Expand All @@ -202,6 +204,7 @@ class instance_the_black_morass : public InstanceMapScript
{
//this may be completed further out in the post-event
TC_LOG_DEBUG("scripts", "Instance The Black Morass: Event completed.");
InitWorldState(false);
Map::PlayerList const& players = instance->GetPlayers();

if (!players.isEmpty())
Expand All @@ -226,8 +229,10 @@ class instance_the_black_morass : public InstanceMapScript
case TYPE_RIFT:
if (data == SPECIAL)
{
if (mRiftPortalCount < 7)
if (mRiftPortalCount != 6 && mRiftPortalCount != 12)
ScheduleEventNextPortal(5s);
else
ScheduleEventNextPortal(RiftWaves[GetRiftWaveId() + 1].NextPortalTime);
}
else
m_auiEncounter[1] = data;
Expand Down Expand Up @@ -293,9 +298,7 @@ class instance_the_black_morass : public InstanceMapScript

_currentRiftId = tmp;

Creature* temp = medivh->SummonCreature(NPC_TIME_RIFT,
PortalLocation[tmp][0], PortalLocation[tmp][1], PortalLocation[tmp][2], PortalLocation[tmp][3],
TEMPSUMMON_CORPSE_DESPAWN);
Creature* temp = medivh->SummonCreature(NPC_TIME_RIFT, PortalLocation[tmp], TEMPSUMMON_CORPSE_DESPAWN);
if (temp)
{
if (Creature* boss = SummonedPortalBoss(temp))
Expand Down