mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* Enum ToSentence improvements * Network.EnqueueSend improvements * Improve SerializePhysicsData * GameMessage improvements * GameEventMessage updates * more initial sizes * Few more GameMessages * few more
22 lines
921 B
C#
22 lines
921 B
C#
using System;
|
|
using ACE.Entity.Enum;
|
|
using ACE.Server.Network.Enum;
|
|
|
|
namespace ACE.Server.Network.GameEvent.Events
|
|
{
|
|
public class GameEventDefenderNotification : GameEventMessage
|
|
{
|
|
public GameEventDefenderNotification(Session session, string attackerName, DamageType damageType, float percent, uint damage, DamageLocation damageLocation, bool criticalHit, AttackConditions attackConditions)
|
|
: base(GameEventType.DefenderNotification, GameMessageGroup.UIQueue, session, 80) // 80 is the max seen in retail pcaps
|
|
{
|
|
Writer.WriteString16L(attackerName);
|
|
Writer.Write((uint)damageType);
|
|
Writer.Write((double)percent);
|
|
Writer.Write(damage);
|
|
Writer.Write((uint)damageLocation);
|
|
Writer.Write(Convert.ToUInt32(criticalHit));
|
|
Writer.Write((ulong)attackConditions);
|
|
Writer.Align();
|
|
}
|
|
}
|
|
}
|