ace/Source/ACE.Server/Network/GameEvent/Events/GameEventAttackerNotification.cs
Mag-nus bb8e6a9ac3
Improvements to help garbage collection (#4104)
* Enum ToSentence improvements

* Network.EnqueueSend improvements

* Improve SerializePhysicsData

* GameMessage improvements

* GameEventMessage updates

* more initial sizes

* Few more GameMessages

* few more
2024-03-13 02:37:40 +00:00

19 lines
783 B
C#

using System;
using ACE.Entity.Enum;
namespace ACE.Server.Network.GameEvent.Events
{
public class GameEventAttackerNotification : GameEventMessage
{
public GameEventAttackerNotification(Session session, string defenderName, DamageType damageType, float percent, uint damage, bool criticalHit, AttackConditions attackConditions)
: base(GameEventType.AttackerNotification, GameMessageGroup.UIQueue, session, 76) // 76 is the max seen in retail pcaps
{
Writer.WriteString16L(defenderName);
Writer.Write((uint)damageType);
Writer.Write((double)percent);
Writer.Write(damage);
Writer.Write(Convert.ToUInt32(criticalHit));
Writer.Write((ulong)attackConditions);
}
}
}