Example #1
0
 public SSessionBase SendAsync(CharacterToggleWeaponRequest request) =>
 SendAsync(ClientOpcode.CharacterToggleWeapon, (PacketWriter writer) =>
 {
     writer.Write(request.Character);
     writer.WriteVector3(request.Position);
     writer.Write(request.Rotation);
     writer.Write(request.Toggle);
     writer.Write(request.Unknown1);
 });
 public void BroadcastAsync(CharacterToggleWeaponRequest request) =>
 Dimension.BroadcastAsync(ClientOpcode.ChatMessage, (PacketWriter writer) =>
 {
     writer.Write(request.Character);
     writer.WriteVector3(request.Position);
     writer.Write(request.Rotation);
     writer.Write(request.Toggle);
     writer.Write(request.Unknown1);
 });
Example #3
0
        // #region Broadcast Storage Packet

        //public void BroadcastItemUpgradeResponse(BaseItem item)
        //{ }

        //public void BroadcastItemMove(params BaseItem[] slots)
        //{
        //    // var size
        //    //     = sizeof(uint) /* Count */
        //    //     + (SystemDefinition.ItemSize * slots.Length) /* Items */
        //    //     + sizeof(byte) /* Unknown */;
        //    //
        //    // using PacketWriter writer = new(size, ClientOpcode.StorageItemMoveBroadcast);
        //    //
        //    // writer.Write(slots.Length);
        //    // foreach (var item in slots)
        //    // {
        //    //     writer.Write(item);
        //    // }
        //    //
        //    // writer.Write((byte)0);
        //    //
        //    // SendExceptAsync(session, writer);
        //}

        // #endregion Broadcast Storage Packet

        #region Broadcast Movement Packet

        public void BroadcastDeferred(CharacterToggleWeaponRequest request) =>
        Channel.BroadcastDeferred(SCCategory.Move, SCMove.BattleBt, (SPacketWriter writer) =>
        {
            writer.Write(request.Character);
            writer.Write(request.Position);
            writer.Write(request.Rotation);
            writer.Write(request.Toggle);
            writer.Write(request.Unknown1);
        });
Example #4
0
 public static void ToggleWeapon(Session session, CharacterToggleWeaponRequest request) => session
 .SendAsync(request);
Example #5
0
 public static void ToggleWeapon(SyncSession session, CharacterToggleWeaponRequest request) => session.Channel
 !.BroadcastDeferred(request);