Misc: some corrections after recent merges
Port From (https://github.com/TrinityCore/TrinityCore/commit/cadbf42ea4489933f28caf356f8c8d09ca243083)
This commit is contained in:
@@ -150,7 +150,7 @@ namespace Game.AI
|
||||
me.GetMotionMaster().MoveDistract(5 * Time.InMilliseconds, me.GetAbsoluteAngle(who));
|
||||
}
|
||||
|
||||
// adapted from logic in Spell:EFfectSummonType before commit 8499434
|
||||
// adapted from logic in Spell:EffectSummonType
|
||||
public static bool ShouldFollowOnSpawn(SummonPropertiesRecord properties)
|
||||
{
|
||||
// Summons without SummonProperties are generally scripted summons that don't belong to any owner
|
||||
|
||||
@@ -1661,8 +1661,7 @@ namespace Game.Entities
|
||||
SetUnitMovementFlags(GetUnitMovementFlags() & MovementFlag.MaskHasPlayerStatusOpcode);
|
||||
m_movementInfo.ResetJump();
|
||||
DisableSpline();
|
||||
if (!IsInFlight())
|
||||
GetMotionMaster().Clear();
|
||||
GetMotionMaster().Remove(MovementGeneratorType.Effect);
|
||||
|
||||
Transport transport = GetTransport();
|
||||
if (transport)
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace Game
|
||||
|
||||
void HandleMovementOpcode(ClientOpcodes opcode, MovementInfo movementInfo)
|
||||
{
|
||||
Unit mover = GetPlayer().m_unitMovedByMe;
|
||||
Unit mover = GetPlayer().GetUnitBeingMoved();
|
||||
Player plrMover = mover.ToPlayer();
|
||||
|
||||
if (plrMover && plrMover.IsBeingTeleported())
|
||||
@@ -423,7 +423,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.MoveTeleportAck, Processing = PacketProcessing.ThreadSafe)]
|
||||
void HandleMoveTeleportAck(MoveTeleportAck packet)
|
||||
{
|
||||
Player plMover = GetPlayer().m_unitMovedByMe.ToPlayer();
|
||||
Player plMover = GetPlayer().GetUnitBeingMoved().ToPlayer();
|
||||
|
||||
if (!plMover || !plMover.IsBeingTeleportedNear())
|
||||
return;
|
||||
@@ -551,8 +551,8 @@ namespace Game
|
||||
{
|
||||
if (GetPlayer().IsInWorld)
|
||||
{
|
||||
if (_player.m_unitMovedByMe.GetGUID() != packet.ActiveMover)
|
||||
Log.outError(LogFilter.Network, "HandleSetActiveMover: incorrect mover guid: mover is {0} and should be {1},", packet.ActiveMover.ToString(), _player.m_unitMovedByMe.GetGUID().ToString());
|
||||
if (_player.GetUnitBeingMoved().GetGUID() != packet.ActiveMover)
|
||||
Log.outError(LogFilter.Network, "HandleSetActiveMover: incorrect mover guid: mover is {0} and should be {1},", packet.ActiveMover.ToString(), _player.GetUnitBeingMoved().GetGUID().ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ namespace Game
|
||||
{
|
||||
GetPlayer().ValidateMovementInfo(movementAck.Ack.Status);
|
||||
|
||||
if (GetPlayer().m_unitMovedByMe.GetGUID() != movementAck.Ack.Status.Guid)
|
||||
if (GetPlayer().GetUnitBeingMoved().GetGUID() != movementAck.Ack.Status.Guid)
|
||||
return;
|
||||
|
||||
GetPlayer().m_movementInfo = movementAck.Ack.Status;
|
||||
@@ -606,7 +606,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.MoveApplyMovementForceAck, Processing = PacketProcessing.ThreadSafe)]
|
||||
void HandleMoveApplyMovementForceAck(MoveApplyMovementForceAck moveApplyMovementForceAck)
|
||||
{
|
||||
Unit mover = _player.m_unitMovedByMe;
|
||||
Unit mover = _player.GetUnitBeingMoved();
|
||||
Cypher.Assert(mover != null);
|
||||
_player.ValidateMovementInfo(moveApplyMovementForceAck.Ack.Status);
|
||||
|
||||
@@ -628,7 +628,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.MoveRemoveMovementForceAck, Processing = PacketProcessing.ThreadSafe)]
|
||||
void HandleMoveRemoveMovementForceAck(MoveRemoveMovementForceAck moveRemoveMovementForceAck)
|
||||
{
|
||||
Unit mover = _player.m_unitMovedByMe;
|
||||
Unit mover = _player.GetUnitBeingMoved();
|
||||
Cypher.Assert(mover != null);
|
||||
_player.ValidateMovementInfo(moveRemoveMovementForceAck.Ack.Status);
|
||||
|
||||
@@ -650,7 +650,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.MoveSetModMovementForceMagnitudeAck, Processing = PacketProcessing.ThreadSafe)]
|
||||
void HandleMoveSetModMovementForceMagnitudeAck(MovementSpeedAck setModMovementForceMagnitudeAck)
|
||||
{
|
||||
Unit mover = _player.m_unitMovedByMe;
|
||||
Unit mover = _player.GetUnitBeingMoved();
|
||||
Cypher.Assert(mover != null); // there must always be a mover
|
||||
_player.ValidateMovementInfo(setModMovementForceMagnitudeAck.Ack.Status);
|
||||
|
||||
@@ -692,7 +692,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.MoveTimeSkipped, Processing = PacketProcessing.Inplace)]
|
||||
void HandleMoveTimeSkipped(MoveTimeSkipped moveTimeSkipped)
|
||||
{
|
||||
Unit mover = GetPlayer().m_unitMovedByMe;
|
||||
Unit mover = GetPlayer().GetUnitBeingMoved();
|
||||
if (mover == null)
|
||||
{
|
||||
Log.outWarn(LogFilter.Player, $"WorldSession.HandleMoveTimeSkipped wrong mover state from the unit moved by {GetPlayer().GetGUID()}");
|
||||
|
||||
@@ -935,7 +935,6 @@ namespace Game.Spells
|
||||
case 2584: // Waiting to Resurrect
|
||||
case 22011: // Spirit Heal Channel
|
||||
case 22012: // Spirit Heal
|
||||
case 24171: // Resurrection Impact Visual
|
||||
case 42792: // Recently Dropped Flag
|
||||
case 43681: // Inactive
|
||||
case 44535: // Spirit Heal (mana)
|
||||
|
||||
@@ -3268,7 +3268,9 @@ namespace Game.Entities
|
||||
45907, // Torch Target Picker
|
||||
52953, // Torch
|
||||
58121, // Torch
|
||||
43109 // Throw Torch
|
||||
43109, // Throw Torch
|
||||
58552, // Return to Orgrimmar
|
||||
58533 // Return to Stormwind
|
||||
}, spellInfo =>
|
||||
{
|
||||
spellInfo.MaxAffectedTargets = 1;
|
||||
|
||||
@@ -1804,6 +1804,11 @@ namespace Scripts.Spells.Items
|
||||
[Script] // 36941 - Ultrasafe Transporter: Toshley's Station
|
||||
class spell_item_ultrasafe_transporter : SpellScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.TransporterMalfunctionSmaller, SpellIds.TransporterMalfunctionBigger, SpellIds.SoulSplitEvil, SpellIds.SoulSplitGood, SpellIds.TransformHorde, SpellIds.TransformAlliance, SpellIds.TransporterMalfunctionChicken, SpellIds.EvilTwin);
|
||||
}
|
||||
|
||||
public override bool Load()
|
||||
{
|
||||
return GetCaster().IsPlayer();
|
||||
@@ -1857,6 +1862,11 @@ namespace Scripts.Spells.Items
|
||||
[Script] // 36890 - Dimensional Ripper - Area 52
|
||||
class spell_item_dimensional_ripper_area52 : SpellScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.TransporterMalfunctionBigger, SpellIds.SoulSplitEvil, SpellIds.SoulSplitGood, SpellIds.TransformHorde, SpellIds.TransformAlliance);
|
||||
}
|
||||
|
||||
public override bool Load()
|
||||
{
|
||||
return GetCaster().IsPlayer();
|
||||
|
||||
Reference in New Issue
Block a user