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); }
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); }
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); } }
public void SendWorldServer(WorldPacket pkg) { m_worldServer.Send(pkg); }