protected override void Read(NReader rdr) { Time = rdr.ReadInt32(); BulletId = rdr.ReadByte(); ObjectId = rdr.ReadInt32(); TargetId = rdr.ReadInt32(); }
protected override void Read(ClientProcessor psr, NReader rdr) { AccountListId = rdr.ReadInt32(); AccountIds = new int[rdr.ReadInt16()]; for (int i = 0; i < AccountIds.Length; i++) AccountIds[i] = rdr.ReadInt32(); }
protected override void Read(Client psr, NReader rdr) { Time = rdr.ReadInt32(); BulletId = rdr.ReadByte(); TargetId = rdr.ReadInt32(); Killed = rdr.ReadBoolean(); }
public static byte[] Convert(string json) { var obj = JsonConvert.DeserializeObject<json_dat>(json); var dat = ZlibStream.UncompressBuffer(obj.data); Dictionary<short, TerrainTile> tileDict = new Dictionary<short, TerrainTile>(); for (int i = 0; i < obj.dict.Length; i++) { var o = obj.dict[i]; tileDict[(short)i] = new TerrainTile() { TileId = o.ground == null ? (short)0xff : XmlDatas.IdToType[o.ground], TileObj = o.objs == null ? null : o.objs[0].id, Name = o.objs == null ? "" : o.objs[0].name ?? "", Terrain = TerrainType.None, Region = o.regions == null ? TileRegion.None : (TileRegion)Enum.Parse(typeof(TileRegion), o.regions[0].id.Replace(' ', '_')) }; } var tiles = new TerrainTile[obj.width, obj.height]; using (NReader rdr = new NReader(new MemoryStream(dat))) for (int y = 0; y < obj.height; y++) for (int x = 0; x < obj.width; x++) { tiles[x, y] = tileDict[rdr.ReadInt16()]; } return Export(tiles); }
protected override void Read(ClientProcessor psr, NReader rdr) { Time = rdr.ReadInt32(); BulletId = rdr.ReadByte(); ObjectId = rdr.ReadInt32(); TargetId = rdr.ReadInt32(); }
protected override void Read(NReader rdr) { Damage = rdr.ReadInt32(); EnemyId = rdr.ReadInt32(); BulletId = rdr.ReadByte(); ArmorPiercing = rdr.ReadBoolean(); }
protected override void Read(Client psr, NReader rdr) { Time = rdr.ReadInt32(); SlotObject = ObjectSlot.Read(psr, rdr); ItemUsePos = Position.Read(psr, rdr); UseType = rdr.ReadByte(); }
protected override void Read(NReader rdr) { AccountListId = rdr.ReadInt32(); AccountIds = new int[rdr.ReadInt16()]; for (var i = 0; i < AccountIds.Length; i++) AccountIds[i] = rdr.ReadInt32(); }
protected override void Read(NReader rdr) { BulletId = rdr.ReadByte(); OwnerId = rdr.ReadInt32(); ContainerType = rdr.ReadUInt16(); Angle = rdr.ReadSingle(); }
protected override void Read(NReader rdr) { Time = rdr.ReadInt32(); Position = Position.Read(rdr); Obj1 = ObjectSlot.Read(rdr); Obj2 = ObjectSlot.Read(rdr); }
public void FromJson(string json) { var obj = JsonConvert.DeserializeObject<json_dat>(json); byte[] dat = ZlibStream.UncompressBuffer(obj.data); Init(obj.width, obj.height); using (var rdr = new NReader(new MemoryStream(dat))) for (int y = 0; y < obj.height; y++) for (int x = 0; x < obj.width; x++) { loc loc = obj.dict[rdr.ReadInt16()]; if (loc.ground != null) Tiles[x][y] = (Tile) this.dat.IdToTileType[loc.ground]; else Tiles[x][y] = (Tile) 0xff; if (loc.objs != null) { //Entities[x][y] = new Entity[loc.objs.Length]; //int i = 0; //foreach (var z in loc.objs) //{ // Entities[x][y][i] = new Entity() { ObjectType = Objects.id2type[z.id], X = x, Y = y }; //} } } }
private static void ServePolicyFile(IAsyncResult ar) { try { TcpClient cli = (ar.AsyncState as TcpListener).EndAcceptTcpClient(ar); (ar.AsyncState as TcpListener).BeginAcceptTcpClient(ServePolicyFile, ar.AsyncState); NetworkStream s = cli.GetStream(); NReader rdr = new NReader(s); NWriter wtr = new NWriter(s); if (rdr.ReadNullTerminatedString() == "<policy-file-request/>") { wtr.WriteNullTerminatedString(@"<cross-domain-policy> <allow-access-from domain=""*"" to-ports=""*"" /> </cross-domain-policy>"); wtr.Write((byte)'\r'); wtr.Write((byte)'\n'); } cli.Close(); } catch (ObjectDisposedException) { } catch (Exception ex) { logger.Error(ex); } }
protected override void Read(ClientProcessor psr, NReader rdr) { BulletId = rdr.ReadByte(); OwnerId = rdr.ReadInt32(); ContainerType = rdr.ReadInt16(); Angle = rdr.ReadSingle(); }
protected override void Read(Client psr, NReader rdr) { Time = rdr.ReadInt32(); Position = Position.Read(psr, rdr); SlotObject1 = ObjectSlot.Read(psr, rdr); SlotObject2 = ObjectSlot.Read(psr, rdr); }
protected override void Read(Client client, NReader rdr) { Tier = rdr.ReadInt32(); Goal = rdr.ReadUTF(); Description = rdr.ReadUTF(); Image = rdr.ReadUTF(); }
protected override void Read(ClientProcessor psr, NReader rdr) { Time = rdr.ReadInt32(); Position = Position.Read(rdr); Obj1 = ObjectSlot.Read(rdr); Obj2 = ObjectSlot.Read(rdr); }
protected override void Read(Client psr, NReader rdr) { AccountListId = rdr.ReadInt32(); AccountIds = new string[rdr.ReadInt16()]; for (int i = 0; i < AccountIds.Length; i++) AccountIds[i] = rdr.ReadUTF(); LockAction = rdr.ReadInt32(); }
protected override void Read(NReader rdr) { Title = rdr.ReadUTF(); Message = rdr.ReadUTF(); Button1 = rdr.ReadUTF(); Button2 = rdr.ReadUTF(); Type = rdr.ReadUTF(); }
protected override void Read(NReader rdr) { EffectType = (EffectType)rdr.ReadByte(); TargetId = rdr.ReadInt32(); PosA = Position.Read(rdr); PosB = Position.Read(rdr); Color = ARGB.Read(rdr); }
protected override void Read(ClientProcessor psr, NReader rdr) { Title = rdr.ReadUTF(); Message = rdr.ReadUTF(); Button1 = rdr.ReadUTF(); Button2 = rdr.ReadUTF(); Type = rdr.ReadUTF(); }
protected override void Read(Client psr, NReader rdr) { AccountId = rdr.ReadUTF(); CharId = rdr.ReadInt32(); Killer = rdr.ReadUTF(); obf0 = rdr.ReadInt32(); obf1 = rdr.ReadInt32(); }
protected override void Read(ClientProcessor psr, NReader rdr) { Time = rdr.ReadInt32(); BulletId = rdr.ReadByte(); ContainerType = rdr.ReadInt16(); Position = Position.Read(rdr); Angle = rdr.ReadSingle(); }
protected override void Read(Client client, NReader rdr) { CommandId = rdr.ReadByte(); PetId1 = rdr.ReadInt32(); PetId2 = rdr.ReadInt32(); ObjectId = rdr.ReadInt32(); ObjectSlot = ObjectSlot.Read(client, rdr); Currency = (CurrencyType)rdr.ReadByte(); }
protected override void Read(NReader rdr) { TickId = rdr.ReadInt32(); TickTime = rdr.ReadInt32(); UpdateStatuses = new ObjectStats[rdr.ReadInt16()]; for (int i = 0; i < UpdateStatuses.Length; i++) UpdateStatuses[i] = ObjectStats.Read(rdr); }
protected override void Read(ClientProcessor psr, NReader rdr) { Name = rdr.ReadUTF(); Host = rdr.ReadUTF(); Port = rdr.ReadInt32(); GameId = rdr.ReadInt32(); KeyTime = rdr.ReadInt32(); Key = rdr.ReadBytes(rdr.ReadInt16()); }
protected override void Read(NReader rdr) { BulletId = rdr.ReadByte(); OwnerId = rdr.ReadInt32(); ContainerType = rdr.ReadInt16(); Position = Position.Read(rdr); Angle = rdr.ReadSingle(); Damage = rdr.ReadInt16(); }
protected override void Read(NReader rdr) { Position = Position.Read(rdr); Radius = rdr.ReadSingle(); Damage = rdr.ReadUInt16(); Effects = (ConditionEffectIndex)rdr.ReadByte(); EffectDuration = rdr.ReadSingle(); OriginType = rdr.ReadUInt16(); }
protected override void Read(Client psr, NReader rdr) { BulletId = rdr.ReadByte(); OwnerId = rdr.ReadInt32(); ContainerType = rdr.ReadInt32(); StartingPos = Position.Read(psr, rdr); Angle = rdr.ReadSingle(); Damage = rdr.ReadInt16(); }
protected override void Read(NReader rdr) { TickId = rdr.ReadInt32(); Time = rdr.ReadInt32(); Position = Position.Read(rdr); Records = new TimedPosition[rdr.ReadInt16()]; for (var i = 0; i < Records.Length; i++) Records[i] = TimedPosition.Read(rdr); }
protected override void Read(ClientProcessor psr, NReader rdr) { TickId = rdr.ReadInt32(); TickTime = rdr.ReadInt32(); UpdateStatuses = new ObjectStats[rdr.ReadInt16()]; for (var i = 0; i < UpdateStatuses.Length; i++) UpdateStatuses[i] = ObjectStats.Read(rdr); }
protected override void Read(Client client, NReader rdr) { Result = rdr.ReadInt32(); }
protected override void Read(NReader rdr) { Serial = rdr.ReadInt32(); }
protected override void Read(ClientProcessor psr, NReader rdr) { ObjectId = rdr.ReadInt32(); Position = Position.Read(rdr); }
protected override void Read(NReader rdr) { CurrentRuntime = rdr.ReadInt32(); Wave = rdr.ReadInt32(); }
protected override void Read(Client client, NReader rdr) { PetId = rdr.ReadInt32(); }
protected override void Read(NReader rdr) { Name = rdr.ReadUTF(); Bytes = new byte[rdr.ReadInt32()]; Bytes = rdr.ReadBytes(Bytes.Length); }
protected override void Read(NReader rdr) { ObjectID = rdr.ReadInt32(); CharacterID = rdr.ReadInt32(); }
protected override void Read(NReader rdr) { Result = rdr.ReadInt32(); }
protected override void Read(Client client, NReader rdr) { Slot = ObjectSlot.Read(rdr); }
protected override void Read(ClientProcessor psr, NReader rdr) { Time = rdr.ReadInt32(); }
protected override void Read(NReader rdr) { Music = rdr.ReadUTF(); }
protected override void Read(ClientProcessor psr, NReader rdr) { GuildName = rdr.ReadUTF(); }
protected override void Read(NReader rdr) { Text = rdr.ReadUTF(); }
protected override void Read(Client client, NReader rdr) { Message = rdr.ReadUTF(); }
protected override void Read(ClientProcessor psr, NReader rdr) { Result = rdr.ReadInt32(); Message = rdr.ReadUTF(); }
protected override void Read(NReader rdr) { Type = rdr.ReadInt32(); }
protected override void Read(Client psr, NReader rdr) { ObjectId = rdr.ReadInt32(); }
protected override void Read(Client psr, NReader rdr) { BulletId = rdr.ReadByte(); ObjectId = rdr.ReadInt32(); }
protected override void Read(NReader rdr) { Name = rdr.ReadUTF(); Value = rdr.ReadInt32(); }
protected override void Read(NReader rdr) { Time = rdr.ReadInt32(); Position = Position.Read(rdr); }
protected override void Read(NReader rdr) { CleanPasswordStatus = rdr.ReadInt32(); }
protected override void Read(Client psr, NReader rdr) { Time = rdr.ReadInt32(); Position = Position.Read(psr, rdr); }
protected override void Read(NReader rdr) { Result = rdr.ReadInt32(); Message = rdr.ReadUTF(); }
protected override void Read(ClientProcessor psr, NReader rdr) { ObjectType = rdr.ReadInt16(); }
protected override void Read(NReader rdr) { Name = rdr.ReadUTF(); }
protected override void Read(NReader rdr) { Effect = rdr.ReadUInt32(); Duration = rdr.ReadSingle(); }
protected override void Read(NReader rdr) { SorSlot = ObjectSlot.Read(rdr); ShardSlot = ObjectSlot.Read(rdr); }
protected override void Read(Client psr, NReader rdr) { Success = rdr.ReadBoolean(); ErrorText = rdr.ReadUTF(); }
protected override void Read(NReader rdr) { }
protected override void Read(Client psr, NReader rdr) { Name = rdr.ReadUTF(); }