public static void Action(Client pClient, Packet pPacket)
        {
            int uniqueIdentifier;
            short moveIdentifier;
            bool isUsingAbility;
            byte usingAbility;
            Coordinates projectileTarget;

            if (!pPacket.ReadInt(out uniqueIdentifier) ||
                !pPacket.ReadShort(out moveIdentifier) ||
                !pPacket.ReadBool(out isUsingAbility) ||
                !pPacket.ReadByte(out usingAbility) ||
                !pPacket.ReadCoordinates(out projectileTarget) ||
                !pPacket.ReadSkip(5))
            {
                pClient.Disconnect();
                return;
            }
            Mob mob = pClient.Player.Map.GetMob(uniqueIdentifier);
            if (mob == null || mob.Controller != pClient.Player) return;
            int rewindOffset = pPacket.Cursor;
            Coordinates unknownPosition;
            if (!pPacket.ReadCoordinates(out unknownPosition) ||
                !pClient.Player.Map.ReadMovement(mob, pPacket))
            {
                pClient.Disconnect();
                return;
            }

            Packet packet = new Packet(EOpcode.SMSG_MOB_ACTION_CONFIRM);
            packet.WriteInt(uniqueIdentifier);
            packet.WriteShort(moveIdentifier);
            packet.WriteBool(isUsingAbility);
            packet.WriteUShort((ushort)mob.Mana);
            packet.WriteByte(0x00); // Ability Identifier
            packet.WriteByte(0x00); // Ability Level
            pClient.SendPacket(packet);

            pPacket.Rewind(rewindOffset);

            packet = new Packet(EOpcode.SMSG_MOB_ACTION);
            packet.WriteInt(uniqueIdentifier);
            packet.WriteBool(isUsingAbility);
            packet.WriteByte(usingAbility);
            packet.WriteCoordinates(projectileTarget);
            packet.WriteBytes(pPacket.InnerBuffer, pPacket.Cursor, pPacket.Remaining);
            pClient.Player.Map.SendPacketToAllExcept(packet, pClient.Player);

            pClient.Player.Map.UpdateMobControllers(true);
        }
 public static void Action(Client pClient, Packet pPacket)
 {
     int firstUnknown;
     short secondUnknown;
     if (!pPacket.ReadInt(out firstUnknown) ||
         !pPacket.ReadShort(out secondUnknown))
     {
         pClient.Disconnect();
         return;
     }
     Packet packet = new Packet(EOpcode.SMSG_NPC_ACTION);
     byte thirdUnknown;
     if (!pPacket.ReadByte(out thirdUnknown))
     {
         packet.WriteInt(firstUnknown);
         packet.WriteShort(secondUnknown);
     }
     else packet.WriteBytes(pPacket.InnerBuffer, pPacket.Cursor, pPacket.Remaining);
     pClient.SendPacket(packet);
 }