Core/Player: moved zone/area updating and tavern resting checks into Heartbeat and movement updates

Port From (https://github.com/TrinityCore/TrinityCore/commit/e14648eaba40bf821b2245c71a0fee3a88dfdba5)
This commit is contained in:
Hondacrx
2024-11-11 10:51:47 -05:00
parent 21eca77ad8
commit c3d7e5adb3
6 changed files with 41 additions and 43 deletions
+1 -1
View File
@@ -245,7 +245,7 @@ namespace Game
{
// set resting flag we are in the inn
if (packet.Entered)
player.GetRestMgr().SetRestFlag(RestFlag.Tavern, atEntry.Id);
player.GetRestMgr().SetInnTriggerID(atEntry.Id);
else
player.GetRestMgr().RemoveRestFlag(RestFlag.Tavern);
+4 -2
View File
@@ -209,7 +209,7 @@ namespace Game
Unit.ProcSkillsAndAuras(plrMover, null, new ProcFlagsInit(ProcFlags.Jump), new ProcFlagsInit(ProcFlags.None), ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);
}
// Whenever a player stops a movement action, an indoor/outdoor check is being performed
// Whenever a player stops a movement action, several position based checks and updates are being performed
switch (opcode)
{
case ClientOpcodes.MoveSetFly:
@@ -220,7 +220,9 @@ namespace Game
case ClientOpcodes.MoveStopSwim:
case ClientOpcodes.MoveStopPitch:
case ClientOpcodes.MoveStopAscend:
plrMover.CheckOutdoorsAuraRequirements();
plrMover.UpdateZoneAndAreaId();
plrMover.UpdateIndoorsOutdoorsAuras();
plrMover.UpdateTavernRestingState();
break;
default:
break;