Core/PacketIO: Implement CMSG_CANCEL_MOD_SPEED_NO_CONTROL_AURAS
Port From (https://github.com/TrinityCore/TrinityCore/commit/5e8534767c66ca492bab929d91f2d86d18dd9aba)
This commit is contained in:
@@ -457,6 +457,20 @@ namespace Game
|
||||
pet.RemoveOwnedAura(packet.SpellID, ObjectGuid.Empty, 0, AuraRemoveMode.Cancel);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.CancelAutoRepeatSpell, Processing = PacketProcessing.Inplace)]
|
||||
void HandleCancelModSpeedNoControlAuras(CancelModSpeedNoControlAuras cancelModSpeedNoControlAuras)
|
||||
{
|
||||
Unit mover = _player.GetUnitBeingMoved();
|
||||
if (mover == null || mover.GetGUID() != cancelModSpeedNoControlAuras.TargetGUID)
|
||||
return;
|
||||
|
||||
_player.RemoveAurasByType(AuraType.ModSpeedNoControl, aurApp =>
|
||||
{
|
||||
SpellInfo spellInfo = aurApp.GetBase().GetSpellInfo();
|
||||
return !spellInfo.HasAttribute(SpellAttr0.NoAuraCancel) && spellInfo.IsPositive() && !spellInfo.IsPassive();
|
||||
});
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.CancelAutoRepeatSpell, Processing = PacketProcessing.Inplace)]
|
||||
void HandleCancelAutoRepeatSpell(CancelAutoRepeatSpell packet)
|
||||
{
|
||||
|
||||
@@ -300,6 +300,18 @@ namespace Game.Networking.Packets
|
||||
public uint Action;
|
||||
}
|
||||
|
||||
class CancelModSpeedNoControlAuras : ClientPacket
|
||||
{
|
||||
public ObjectGuid TargetGUID;
|
||||
|
||||
public CancelModSpeedNoControlAuras(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
TargetGUID = _worldPacket.ReadPackedGuid();
|
||||
}
|
||||
}
|
||||
|
||||
class PetCancelAura : ClientPacket
|
||||
{
|
||||
public PetCancelAura(WorldPacket packet) : base(packet) { }
|
||||
|
||||
Reference in New Issue
Block a user