public void On_CMSG_WORLD_TELEPORT(ref Packets.PacketClass packet, ref WS_Network.ClientClass client)
 {
     WorldServiceLocator._WorldServer.Log.WriteLine(LogType.DEBUG, "[{0}:{1}] CMSG_WORLD_TELEPORT", client.IP, client.Port);
     if (client.Access >= AccessLevel.GameMaster)
     {
         packet.GetInt16();
         int   Time = packet.GetInt32();
         uint  Map  = packet.GetUInt32();
         float X    = packet.GetFloat();
         float Y    = packet.GetFloat();
         float Z    = packet.GetFloat();
         float O    = packet.GetFloat();
         client.Character.Teleport(X, Y, Z, O, checked ((int)Map));
     }
 }
Esempio n. 2
0
    public static void On_SMSG_CHAR_ENUM(ref Packets.PacketClass Packet)
    {
        Console.WriteLine("[{0}][World] Received Character List.", Strings.Format(DateAndTime.TimeOfDay, "HH:mm:ss"));
        var NumChars = Packet.GetInt8();

        if (NumChars > 0)
        {
            for (byte i = 1, loopTo = NumChars; i <= loopTo; i++)
            {
                var GUID        = Packet.GetUInt64();
                var Name        = Packet.GetString();
                var Race        = Packet.GetInt8();
                var Classe      = Packet.GetInt8();
                var Gender      = Packet.GetInt8();
                var Skin        = Packet.GetInt8();
                var Face        = Packet.GetInt8();
                var HairStyle   = Packet.GetInt8();
                var HairColor   = Packet.GetInt8();
                var FacialHair  = Packet.GetInt8();
                var Level       = Packet.GetInt8();
                var Zone        = Packet.GetInt32();
                var Map         = Packet.GetInt32();
                var PosX        = Packet.GetFloat();
                var PosY        = Packet.GetFloat();
                var PosZ        = Packet.GetFloat();
                var GuildID     = Packet.GetUInt32();
                var PlayerState = Packet.GetUInt32();
                var RestState   = Packet.GetInt8();
                var PetInfoID   = Packet.GetUInt32();
                var PetLevel    = Packet.GetUInt32();
                var PetFamilyID = Packet.GetUInt32();
                Console.WriteLine("[{0}][World] Logging in with character [{1}].", Strings.Format(DateAndTime.TimeOfDay, "HH:mm:ss"), Name);
                Worldserver.CharacterGUID = GUID;
                Packets.PacketClass Response = new(OPCODES.CMSG_PLAYER_LOGIN);
                Response.AddUInt64(GUID);
                Worldserver.Send(Response);
                Response.Dispose();
                break;

                // Skip the equipment
                Packet.Offset += 20 * 9;
            }
        }
        else
        {
            Console.WriteLine("[{0}][World] No characters found.", Strings.Format(DateAndTime.TimeOfDay, "HH:mm:ss"));
        }
    }