mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Scripts/Pit of Saron: Fixed Rimefang getting stuck in combat with players after Scourgelord Tyrannus dies
Scripts/Forge of Souls: Added faction-specific spawn scripts for creatures near instance entrance
This commit is contained in:
@@ -544,17 +544,6 @@ inline bool CreatureAI::UpdateVictim()
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
inline bool CreatureAI::UpdateVictim()
|
||||
{
|
||||
if (!me->isInCombat())
|
||||
return false;
|
||||
if (Unit *victim = me->SelectVictim())
|
||||
AttackStart(victim);
|
||||
return me->getVictim();
|
||||
}
|
||||
*/
|
||||
|
||||
inline bool CreatureAI::_EnterEvadeMode()
|
||||
{
|
||||
if (!me->isAlive())
|
||||
|
||||
@@ -216,7 +216,7 @@ class boss_devourer_of_souls : public CreatureScript
|
||||
instance->DoCompleteAchievement(ACHIEV_THREE_FACED);
|
||||
|
||||
int32 entryIndex;
|
||||
if (instance->GetData(DATA_TEAM_IN_INSTANCE) == TEAM_ALLIANCE)
|
||||
if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
|
||||
entryIndex = 0;
|
||||
else
|
||||
entryIndex = 1;
|
||||
|
||||
@@ -46,7 +46,7 @@ class instance_forge_of_souls : public InstanceMapScript
|
||||
Map::PlayerList const &players = instance->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (Player* player = players.begin()->getSource())
|
||||
teamInInstance = player->GetTeamId();
|
||||
teamInInstance = player->GetTeam();
|
||||
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
@@ -56,6 +56,18 @@ class instance_forge_of_souls : public InstanceMapScript
|
||||
case CREATURE_DEVOURER:
|
||||
devourerOfSouls = creature->GetGUID();
|
||||
break;
|
||||
case NPC_SYLVANAS_PART1:
|
||||
if (teamInInstance == ALLIANCE)
|
||||
creature->UpdateEntry(NPC_JAINA_PART1, ALLIANCE);
|
||||
break;
|
||||
case NPC_LORALEN:
|
||||
if (teamInInstance == ALLIANCE)
|
||||
creature->UpdateEntry(NPC_ELANDRA, ALLIANCE);
|
||||
break;
|
||||
case NPC_KALIRA:
|
||||
if (teamInInstance == ALLIANCE)
|
||||
creature->UpdateEntry(NPC_KORELN, ALLIANCE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ enum Actions
|
||||
ACTION_START_INTRO = 1,
|
||||
ACTION_START_RIMEFANG = 2,
|
||||
ACTION_START_OUTRO = 3,
|
||||
ACTION_END_COMBAT = 4,
|
||||
};
|
||||
|
||||
#define GUID_HOARFROST 1
|
||||
@@ -128,8 +129,10 @@ class boss_tyrannus : public CreatureScript
|
||||
{
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != GetScriptId(PoSScriptName))
|
||||
me->IsAIEnabled = false;
|
||||
else if (!me->isDead())
|
||||
else if (instance->GetBossState(DATA_TYRANNUS) != DONE)
|
||||
Reset();
|
||||
else
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
@@ -183,6 +186,10 @@ class boss_tyrannus : public CreatureScript
|
||||
// Prevent corpse despawning
|
||||
if (TempSummon* summ = me->ToTempSummon())
|
||||
summ->SetTempSummonType(TEMPSUMMON_DEAD_DESPAWN);
|
||||
|
||||
// Stop combat for Rimefang
|
||||
if (Creature* rimefang = GetRimefang())
|
||||
rimefang->AI()->DoAction(ACTION_END_COMBAT);
|
||||
}
|
||||
|
||||
void DoAction(const int32 actionId)
|
||||
@@ -306,6 +313,8 @@ class boss_rimefang : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_MOVE_NEXT, 500, 0, PHASE_COMBAT);
|
||||
_events.ScheduleEvent(EVENT_ICY_BLAST, 15000, 0, PHASE_COMBAT);
|
||||
}
|
||||
else if (actionId == ACTION_END_COMBAT)
|
||||
_EnterEvadeMode();
|
||||
}
|
||||
|
||||
void SetGUID(const uint64& guid, int32 type)
|
||||
|
||||
Reference in New Issue
Block a user