Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Core/Pets: moved recently added distance check and active setter into…
Browse files Browse the repository at this point in the history
… post summon actions
  • Loading branch information
Ovahlord committed Sep 30, 2023
1 parent e02ff64 commit 8d7a7f1
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,6 @@ bool NewTemporarySummon::HandlePreSummonActions(Unit const* summoner, uint8 crea
break;
}

// If a summon is suposed to follow its summoner, make sure that it stays within its distance
if (ShouldJoinSummonerSpawnGroupAfterCreation() || ShouldFollowSummonerAfterCreation())
_summonDistanceCheckTimer = 1s;

// Mark all temporary summons as active to keep updating duration and distance checks
// @todo: research possible exploits or performance issues because of that
setActive(true);

return true;
}

Expand Down Expand Up @@ -250,6 +242,14 @@ void NewTemporarySummon::HandlePostSummonActions()
}
}
}

// If a summon is suposed to follow its summoner, make sure that it stays within its distance
if (ShouldJoinSummonerSpawnGroupAfterCreation() || ShouldFollowSummonerAfterCreation())
_summonDistanceCheckTimer = 1s;

// Mark all temporary summons as active to keep updating duration and distance checks
// @todo: research possible exploits or performance issues because of that
setActive(true);
}

void NewTemporarySummon::Unsummon(Milliseconds timeUntilDespawn /*= 0ms*/)
Expand Down

0 comments on commit 8d7a7f1

Please sign in to comment.