feat(combat): Phase L.1c add outbound combat actions
This commit is contained in:
parent
29afc94b94
commit
25b9616703
5 changed files with 176 additions and 5 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System.Buffers.Binary;
|
||||
using System.Net;
|
||||
using System.Threading.Channels;
|
||||
using AcDream.Core.Combat;
|
||||
using AcDream.Core.Net.Cryptography;
|
||||
using AcDream.Core.Net.Messages;
|
||||
using AcDream.Core.Net.Packets;
|
||||
|
|
@ -909,6 +910,48 @@ public sealed class WorldSession : IDisposable
|
|||
SendGameAction(body);
|
||||
}
|
||||
|
||||
/// <summary>Send retail ChangeCombatMode (0x0053).</summary>
|
||||
public void SendChangeCombatMode(CombatMode mode)
|
||||
{
|
||||
uint seq = NextGameActionSequence();
|
||||
byte[] body = CharacterActions.BuildChangeCombatMode(
|
||||
seq,
|
||||
(CharacterActions.CombatMode)(uint)mode);
|
||||
SendGameAction(body);
|
||||
}
|
||||
|
||||
/// <summary>Send retail TargetedMeleeAttack (0x0008).</summary>
|
||||
public void SendMeleeAttack(uint targetGuid, AttackHeight attackHeight, float powerLevel)
|
||||
{
|
||||
uint seq = NextGameActionSequence();
|
||||
byte[] body = AttackTargetRequest.BuildMelee(
|
||||
seq,
|
||||
targetGuid,
|
||||
(uint)attackHeight,
|
||||
powerLevel);
|
||||
SendGameAction(body);
|
||||
}
|
||||
|
||||
/// <summary>Send retail TargetedMissileAttack (0x000A).</summary>
|
||||
public void SendMissileAttack(uint targetGuid, AttackHeight attackHeight, float accuracyLevel)
|
||||
{
|
||||
uint seq = NextGameActionSequence();
|
||||
byte[] body = AttackTargetRequest.BuildMissile(
|
||||
seq,
|
||||
targetGuid,
|
||||
(uint)attackHeight,
|
||||
accuracyLevel);
|
||||
SendGameAction(body);
|
||||
}
|
||||
|
||||
/// <summary>Send retail CancelAttack (0x01B7).</summary>
|
||||
public void SendCancelAttack()
|
||||
{
|
||||
uint seq = NextGameActionSequence();
|
||||
byte[] body = AttackTargetRequest.BuildCancel(seq);
|
||||
SendGameAction(body);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Phase I.6: send a TurbineChat <c>RequestSendToRoomById</c> to a
|
||||
/// global community room (General / Trade / LFG / Roleplay /
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue