Пример #1
0
        static void OnAcquireGuids(WorldConnection connection, WORLDMSG msgID, BinReader data)
        {
            WorldPacket pkg = new WorldPacket(WORLDMSG.ACQUIRE_GUIDS_REPLY);

            pkg.Write(current_guid);
            current_guid += 200000;
            pkg.Write(current_guid++);
            connection.Send(pkg);
        }
Пример #2
0
        static void InitGuids(WorldConnection connection)
        {
            WorldPacket pkg = new WorldPacket(WORLDMSG.INIT_GUIDS);

            pkg.Write(current_guid);
            current_guid += 200000;
            pkg.Write(current_guid);
            pkg.Write(++current_guid);
            current_guid += 200000;
            pkg.Write(current_guid++);
            connection.Send(pkg);
        }
Пример #3
0
 static void OnCreateDBObject(WorldConnection connection, WORLDMSG msgID, BinReader data)
 {
     try
     {
         int      requestID = data.ReadInt32();
         string   str       = data.ReadString();
         Type     type      = dbTypes.GetType(str, true);
         DBObject obj       = (DBObject)Activator.CreateInstance(type);
         DataServer.Database.AddNewObject(obj);
         WorldPacket pkg = new WorldPacket(WORLDMSG.CREATE_DBOBJECT_REPLY);
         pkg.Write(requestID);
         pkg.Write(str);
         pkg.Write(obj.ObjectId);
         connection.Send(pkg);
     }
     catch (Exception e)
     {
         Console.WriteLine("Error in OnCreateDBObject!");
         Console.WriteLine(e);
     }
 }
Пример #4
0
 public void SendWorldServer(WorldPacket pkg)
 {
     m_worldServer.Send(pkg);
 }