public void Read(MemoryStreamReader br, int size) { id = br.ReadUInt(); exp = br.ReadUInt(); //negative if losing expType = br.ReadShort(); //SP_BASEEXP, SP_JOBEXP questExp = br.ReadShort(); }
public void Read(MemoryStreamReader br, int size) { byte invType = (byte)br.ReadByte(); var count = (br.Length - br.Position) / BLOCK_SIZE; for (int i = 0; i < count; i++) { var itemInfo = new ItemInfo(); itemInfo.index = br.ReadShort(); // 2 itemInfo.ItemID = (int)br.ReadUInt(); // 4 itemInfo.itemType = br.ReadByte(); // 1 itemInfo.amount = br.ReadShort(); // 2 itemInfo.wearState = (int)br.ReadUInt(); // 4 itemInfo.slot = new ItemInfo.Slot() // 8 { card1 = (int)br.ReadUInt(), card2 = (int)br.ReadUInt(), card3 = (int)br.ReadUInt(), card4 = (int)br.ReadUInt() }; itemInfo.expireTime = br.ReadInt(); // 4 itemInfo.flag = br.ReadByte(); // 4 Inventory.Add(itemInfo); } }
public void Read(MemoryStreamReader br, int size) { GID = br.ReadUInt(); type = br.ReadByte(); value = br.ReadShort(); value2 = br.ReadShort(); }
public void Read(MemoryStreamReader br, int size) { index = br.ReadShort(); equipLocation = br.ReadInt(); ViewID = br.ReadShort(); result = br.ReadByte(); }
/// 01c8 <index>.W <name id>.W <id>.L <amount>.W <result>.B (ZC_USE_ITEM_ACK2) public void Read(MemoryStreamReader fp, int size) { this.index = fp.ReadShort(); this.id = fp.ReadShort(); this.AID = fp.ReadUInt(); this.count = fp.ReadShort(); this.result = (byte)fp.ReadByte(); }
/// 009d <id>.L <name id>.W <identified>.B <x>.W <y>.W <amount>.W <subX>.B <subY>.B public void Read(MemoryStreamReader br, int size) { mapID = (int)br.ReadUInt(); id = (int)br.ReadUInt(); identified = br.ReadByte(); x = br.ReadShort(); y = br.ReadShort(); amount = br.ReadShort(); subX = br.ReadByte(); subY = br.ReadByte(); }
public void Read(MemoryStreamReader fp, int size) { AID = fp.ReadUInt(); targetID = fp.ReadUInt(); xPos = fp.ReadShort(); yPos = fp.ReadShort(); SKID = fp.ReadUShort(); property = fp.ReadUInt(); delayTime = fp.ReadUInt(); isDisposable = (byte)fp.ReadByte(); }
public void Read(MemoryStreamReader br, int size) { mapID = (int)br.ReadUInt(); id = (int)br.ReadUInt(); itemType = br.ReadUShort(); identified = (byte)br.ReadByte(); x = br.ReadShort(); y = br.ReadShort(); subX = (byte)br.ReadByte(); subY = (byte)br.ReadByte(); amount = br.ReadShort(); showDropEffect = br.ReadByte(); dropEffectMode = br.ReadShort(); }
public void Read(MemoryStreamReader br, int size) { byte invType = (byte)br.ReadByte(); var count = (br.Length - br.Position) / BLOCK_SIZE; for (int i = 0; i < count; i++) { var itemInfo = new ItemInfo { index = br.ReadShort(), ItemID = (int)br.ReadUInt(), itemType = br.ReadByte(), location = (int)br.ReadUInt(), wearState = (int)br.ReadUInt(), refine = (byte)br.ReadByte(), slot = new ItemInfo.Slot() { card1 = (int)br.ReadUInt(), card2 = (int)br.ReadUInt(), card3 = (int)br.ReadUInt(), card4 = (int)br.ReadUInt() }, expireTime = br.ReadInt(), bindOnEquip = br.ReadUShort(), wItemSpriteNumber = br.ReadUShort(), randomOptionCount = (byte)br.ReadByte(), options = new List <ItemInfo.Option>() }; for (int j = 0; j < 5; j++) { itemInfo.options.Add(new ItemInfo.Option() { optIndex = br.ReadShort(), value = br.ReadShort(), param1 = (byte)br.ReadByte() }); } itemInfo.flag = br.ReadByte(); Inventory.Add(itemInfo); } }
public void Read(MemoryStreamReader fp, int size) { ActionRequest = new EntityActionRequest() { GID = fp.ReadUInt(), targetGID = fp.ReadUInt(), startTime = fp.ReadUInt(), sourceSpeed = (ushort)fp.ReadInt(), targetSpeed = (ushort)fp.ReadInt(), damage = fp.ReadShort(), count = fp.ReadShort(), action = (ActionRequestType)fp.ReadByte(), leftDamage = fp.ReadShort() }; }
public void Read(MemoryStreamReader br, int size) { LoginID1 = br.ReadInt(); AccountID = br.ReadInt(); LoginID2 = br.ReadInt(); br.Seek(30, SeekOrigin.Current); Sex = (byte)br.ReadByte(); br.Seek(17, SeekOrigin.Current); long serverCount = (br.Length - br.Position) / BLOCK_SIZE; Servers = new CharServerInfo[serverCount]; for (int i = 0; i < serverCount; i++) { CharServerInfo csi = new CharServerInfo(); csi.IP = new IPAddress(br.ReadUInt()); csi.Port = br.ReadUShort(); csi.Name = br.ReadBinaryString(20); csi.UserCount = br.ReadUShort(); csi.State = br.ReadShort(); csi.Property = br.ReadUShort(); Servers[i] = csi; } }
private static void ReadRgbaImage(SPR spr, MemoryStreamReader data) { for (int i = 0; i < spr.rgbaCount; i++) { var width = data.ReadShort(); var height = data.ReadShort(); spr.frames[i + spr.rgbaIndex] = new SPR.Frame() { type = SPR.TYPE_RGBA, width = width, height = height, data = data.ReadBytes(width * height * 4) }; } }
public void Read(MemoryStreamReader br, int size) { GID = br.ReadInt(); Mapname = br.ReadBinaryString(16); IP = new IPAddress(br.ReadBytes(4)); Port = br.ReadShort(); br.Seek(128, System.IO.SeekOrigin.Current); }
public void Read(MemoryStreamReader br, int Size) { var size = br.ReadShort(); var normal_slot = br.ReadByte(); //MIN_CHARS 15 var premium_slot = br.ReadByte(); //chars_vip; var billing_slot = br.ReadByte(); var producible_slot = br.ReadByte(); var valid_slot = br.ReadByte(); //MAX_CHARS 15 br.Seek(9, SeekOrigin.Current); }
public void Read(MemoryStreamReader br, int size) { var count = Math.Max(0, (br.Length - br.Position) / BLOCK_SIZE); for (int i = 0; i < count; i++) { var skill = new SkillInfo() { SkillID = br.ReadShort(), SkillType = br.ReadInt(), Level = br.ReadShort(), SpCost = br.ReadShort(), AttackRange = br.ReadShort(), SkillName = br.ReadBinaryString(24), CanUpgrade = br.ReadByte() == 1 }; skills.Add(skill); } }
/** * 0a37 * <index>.W * <amount>.W * <name id>.W * <identified>.B * <damaged>.B * <refine>.B * <card1>.W * <card2>.W * <card3>.W * <card4>.W * <equip location>.L * <item type>.B * <result>.B * <expire time>.L * <bindOnEquipType>.W * { <option id>.W <option value>.W <option param>.B }*5 * <favorite>.B * <view id>.W * (ZC_ITEM_PICKUP_ACK_V7) */ public void Read(MemoryStreamReader br, int size) { itemInfo = new ItemInfo { index = br.ReadShort(), amount = br.ReadShort(), ItemID = (int)br.ReadUInt() }; IsIdentified = br.ReadByte() == 1; itemInfo.IsDamaged = br.ReadByte() == 1; itemInfo.refine = (byte)br.ReadByte(); itemInfo.slot = new ItemInfo.Slot() { card1 = (int)br.ReadUInt(), card2 = (int)br.ReadUInt(), card3 = (int)br.ReadUInt(), card4 = (int)br.ReadUInt() }; itemInfo.location = br.ReadInt(); itemInfo.itemType = br.ReadByte(); result = br.ReadByte(); itemInfo.expireTime = br.ReadInt(); itemInfo.bindOnEquip = br.ReadUShort(); itemInfo.options = new List <ItemInfo.Option>(); for (int j = 0; j < 5; j++) { itemInfo.options.Add(new ItemInfo.Option() { optIndex = br.ReadShort(), value = br.ReadShort(), param1 = (byte)br.ReadByte() }); } IsFavorite = br.ReadByte() == 1; itemInfo.flag = IsIdentified ? 0x1 : 0; itemInfo.flag |= IsFavorite ? 0x2 : 0; itemInfo.viewID = br.ReadShort(); }
public void Read(MemoryStreamReader br, int size) { Tick = br.ReadInt(); var posDir = br.ReadPos(); PosX = posDir[0]; PosY = posDir[1]; Dir = posDir[2]; br.Seek(2, SeekOrigin.Current); Font = br.ReadShort(); Sex = br.ReadByte(); }
public void Read(MemoryStreamReader br, int size) { ActionRequest = new EntityActionRequest() { GID = br.ReadUInt(), targetGID = br.ReadUInt(), startTime = br.ReadUInt(), sourceSpeed = (ushort)br.ReadInt(), targetSpeed = (ushort)br.ReadInt(), damage = br.ReadInt() }; br.Seek(1, SeekOrigin.Current); ActionRequest.count = br.ReadShort(); ActionRequest.action = (ActionRequestType)br.ReadByte(); ActionRequest.leftDamage = br.ReadInt(); }
public void Read(MemoryStreamReader br, int size) { GID = br.ReadUInt(); Style = br.ReadShort(); Item = br.ReadByte(); }
public void Read(MemoryStreamReader br, int size) { MapName = br.ReadBinaryString(16); PosX = br.ReadShort(); PosY = br.ReadShort(); }
public void Read(MemoryStreamReader br, int size) { Index = br.ReadShort(); }
public void Read(MemoryStreamReader br, int size) { var seed = br.ReadInt(); var accountId = br.ReadInt(); var state = br.ReadShort(); }
//used to update the amount of points necessary to increase that stat public void Read(MemoryStreamReader br, int size) { status = (EntityStatus)br.ReadShort(); value = br.ReadByte(); }
public void Read(MemoryStreamReader br, int size) { var inventoryType = br.ReadShort(); var name = br.ReadBinaryString(br.Length - br.Position); }
public static CharacterData parse(MemoryStreamReader br) { CharacterData cd = new CharacterData(); cd.GID = br.ReadInt(); cd.Exp = br.ReadInt(); br.Seek(4, SeekOrigin.Current); cd.Zeny = br.ReadInt(); cd.JobExp = br.ReadInt(); br.Seek(4, SeekOrigin.Current); cd.JobLevel = br.ReadInt(); cd.BodyState = br.ReadInt(); cd.HealthState = br.ReadInt(); cd.Option = br.ReadInt(); cd.Karma = br.ReadInt(); cd.Manner = br.ReadInt(); cd.StatusPoint = br.ReadShort(); cd.HP = br.ReadInt(); cd.MaxHP = br.ReadInt(); cd.SP = br.ReadShort(); cd.MaxSP = br.ReadShort(); cd.Speed = br.ReadShort(); cd.Job = br.ReadShort(); cd.Hair = br.ReadShort(); cd.Body = br.ReadShort(); cd.Weapon = br.ReadShort(); cd.BaseLevel = br.ReadShort(); cd.SkillPoint = br.ReadShort(); cd.Accessory = br.ReadShort(); cd.Shield = br.ReadShort(); cd.Accessory2 = br.ReadShort(); cd.Accessory3 = br.ReadShort(); cd.HairColor = br.ReadShort(); cd.ClothesColor = br.ReadShort(); cd.Name = br.ReadBinaryString(24); cd.Str = (byte)br.ReadByte(); cd.Agi = (byte)br.ReadByte(); cd.Vit = (byte)br.ReadByte(); cd.Int = (byte)br.ReadByte(); cd.Dex = (byte)br.ReadByte(); cd.Luk = (byte)br.ReadByte(); cd.Slot = br.ReadShort(); cd.Rename = br.ReadShort(); cd.MapName = br.ReadBinaryString(16); cd.DeleteDate = br.ReadInt(); cd.Robe = br.ReadInt(); cd.Moves = br.ReadInt(); cd.AddOns = br.ReadInt(); cd.Sex = br.ReadByte(); return(cd); }
public void Read(MemoryStreamReader br, int size) { var type = br.ReadShort(); var flag = br.ReadInt(); }
public void Read(MemoryStreamReader br, int size) { entityData = new EntitySpawnData(); entityData.objecttype = (EntityType)br.ReadByte(); entityData.AID = br.ReadUInt(); entityData.GID = br.ReadUInt(); entityData.speed = br.ReadShort(); entityData.bodyState = br.ReadShort(); entityData.healthState = br.ReadShort(); entityData.effectState = br.ReadInt(); entityData.job = br.ReadShort(); entityData.head = br.ReadUShort(); entityData.Weapon = br.ReadUInt(); entityData.Accessory = br.ReadUShort(); entityData.moveStartTime = br.ReadUInt(); entityData.Shield = br.ReadUInt(); /** * might represent emblem/guild_id1/guild_id0 * rA clif.cpp #1102 */ entityData.Accessory2 = br.ReadUShort(); entityData.Accessory3 = br.ReadUShort(); entityData.HairColor = br.ReadShort(); entityData.ClothesColor = br.ReadShort(); entityData.headDir = br.ReadShort(); entityData.Robe = br.ReadUShort(); entityData.GUID = br.ReadUInt(); entityData.GEmblemVer = br.ReadShort(); entityData.honor = br.ReadShort(); entityData.virtue = br.ReadInt(); entityData.isPKModeON = (byte)br.ReadByte(); entityData.sex = (byte)br.ReadByte(); entityData.PosDir = br.ReadPos2(); entityData.xSize = (byte)br.ReadByte(); entityData.ySize = (byte)br.ReadByte(); entityData.state = (byte)br.ReadByte(); entityData.clevel = br.ReadShort(); entityData.font = br.ReadShort(); entityData.MaxHP = br.ReadInt(); entityData.HP = br.ReadInt(); entityData.isBoss = (byte)br.ReadByte(); entityData.body = br.ReadUShort(); entityData.name = br.ReadBinaryString(24); }
/// Character status (ZC_STATUS). /// 00bd /// <stpoint>.W /// <str>.B <need str>.B /// <agi>.B <need agi>.B /// <vit>.B <need vit>.B /// <int>.B <need int>.B /// <dex>.B <need dex>.B /// <luk>.B <need luk>.B /// <atk>.W <atk2>.W /// <matk min>.W <matk max>.W /// <def>.W <def2>.W /// <mdef>.W <mdef2>.W /// <hit>.W /// <flee>.W <flee2>.W /// <crit>.W /// <aspd>.W <aspd2>.W public void Read(MemoryStreamReader br, int size) { stpoint = br.ReadShort(); str = br.ReadByte(); needStr = br.ReadByte(); agi = br.ReadByte(); needAgi = br.ReadByte(); vit = br.ReadByte(); needVit = br.ReadByte(); inte = br.ReadByte(); needInte = br.ReadByte(); dex = br.ReadByte(); needDex = br.ReadByte(); luk = br.ReadByte(); needLuk = br.ReadByte(); atk = br.ReadShort(); atk2 = br.ReadShort(); matkMin = br.ReadShort(); matkMax = br.ReadShort(); def = br.ReadShort(); def2 = br.ReadShort(); mdef = br.ReadShort(); mdef2 = br.ReadShort(); hit = br.ReadShort(); flee = br.ReadShort(); flee2 = br.ReadShort(); crit = br.ReadShort(); aspd = br.ReadShort(); aspd2 = br.ReadShort(); }
public void Read(MemoryStreamReader br, int size) { ErrorCode = br.ReadShort(); }
public void Read(MemoryStreamReader br, int size) { AID = br.ReadUInt(); PosX = br.ReadShort(); PosY = br.ReadShort(); }