Skip to content

Commit

Permalink
Cleanup creatures after each round.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnchyDev committed Nov 3, 2023
1 parent bf1cc4b commit 881dffd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/scripts/ToSInstanceScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ void ToSInstanceScript::CheckWaveCompletion()
{
NotifyPlayers();
PopulateRewardChest();
CleanupCreatures();

if (sConfigMgr->GetOption<bool>("TrialOfStrength.ResetCooldowns", true))
{
Expand Down Expand Up @@ -877,7 +878,9 @@ void ToSInstanceScript::CleanupCreatures()
{
auto creature = *it;

if (!creature || !creature->IsInWorld())
if (!creature ||
!creature->IsInWorld() ||
creature->GetMapId() != TOS_MAP_ID)
{
continue;
}
Expand Down

0 comments on commit 881dffd

Please sign in to comment.