Core/Player: moved indoors/outdoors aura interrupting mechanic into heartbeat and movement handling
Port From (https://github.com/TrinityCore/TrinityCore/commit/5a169f6eae45a7578d6e312cdba9825f6fc24fa5)
This commit is contained in:
@@ -567,6 +567,9 @@ namespace Game.Entities
|
||||
|
||||
// Group update
|
||||
SendUpdateToOutOfRangeGroupMembers();
|
||||
|
||||
// Indoor/Outdoor aura requirements
|
||||
CheckOutdoorsAuraRequirements();
|
||||
}
|
||||
|
||||
public override void SetDeathState(DeathState s)
|
||||
@@ -6266,7 +6269,7 @@ namespace Game.Entities
|
||||
if (GetTrader() != null && !IsWithinDistInMap(GetTrader(), SharedConst.InteractionDistance))
|
||||
GetSession().SendCancelTrade();
|
||||
|
||||
CheckAreaExploreAndOutdoor();
|
||||
CheckAreaExplore();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -6343,7 +6346,7 @@ namespace Game.Entities
|
||||
SendPacket(new ResetWeeklyCurrency());
|
||||
}
|
||||
|
||||
void CheckAreaExploreAndOutdoor()
|
||||
void CheckAreaExplore()
|
||||
{
|
||||
if (!IsAlive())
|
||||
return;
|
||||
@@ -6351,9 +6354,6 @@ namespace Game.Entities
|
||||
if (IsInFlight())
|
||||
return;
|
||||
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.VmapIndoorCheck))
|
||||
RemoveAurasWithAttribute(IsOutdoors() ? SpellAttr0.OnlyIndoors : SpellAttr0.OnlyOutdoors);
|
||||
|
||||
uint areaId = GetAreaId();
|
||||
if (areaId == 0)
|
||||
return;
|
||||
@@ -6451,6 +6451,12 @@ namespace Game.Entities
|
||||
SendPacket(new ExplorationExperience(Experience, Area));
|
||||
}
|
||||
|
||||
public void CheckOutdoorsAuraRequirements()
|
||||
{
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.VmapIndoorCheck))
|
||||
RemoveAurasWithAttribute(IsOutdoors() ? SpellAttr0.OnlyIndoors : SpellAttr0.OnlyOutdoors);
|
||||
}
|
||||
|
||||
public void SendSysMessage(CypherStrings str, params object[] args)
|
||||
{
|
||||
string input = ObjectMgr.GetCypherString(str);
|
||||
|
||||
@@ -208,6 +208,23 @@ namespace Game
|
||||
plrMover.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.Jump); // Mind Control
|
||||
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
|
||||
switch (opcode)
|
||||
{
|
||||
case ClientOpcodes.MoveSetFly:
|
||||
case ClientOpcodes.MoveFallLand:
|
||||
case ClientOpcodes.MoveStop:
|
||||
case ClientOpcodes.MoveStopStrafe:
|
||||
case ClientOpcodes.MoveStopTurn:
|
||||
case ClientOpcodes.MoveStopSwim:
|
||||
case ClientOpcodes.MoveStopPitch:
|
||||
case ClientOpcodes.MoveStopAscend:
|
||||
plrMover.CheckOutdoorsAuraRequirements();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user