public override void Parse(BinaryReader reader) { _uid = reader.ReadInt32(); _nickname = NetResponse.ReadString(reader); _role = (EnumRole)reader.ReadByte(); byte propNum = reader.ReadByte(); for (int key = 0; key < propNum; ++key) { int value = reader.ReadInt32(); float floatvalue = value / (FCConst.PropFactor((PlayerPropKey)key) * 1.0f); _props.Add((PlayerPropKey)key, floatvalue); } byte propBattleNum = reader.ReadByte(); for (int key = 32; key < 32 + propBattleNum; ++key) { int value = reader.ReadInt32(); float floatValue = value / (FCConst.PropFactor((PlayerPropKey)key) * 1.0f); _props.Add((PlayerPropKey)key, floatValue); } _equippedInventory = new PlayerInventory(); _equippedInventory.Parse(reader); }
public override void Decode(BinaryReader reader) { errorCode = reader.ReadInt16(); if (Succeeded) { itemId = NetResponse.ReadString(reader); updateData = UpdateInforResponseHandler.Instance.UpdateOperation(reader); } }
public override void Parse(System.IO.BinaryReader reader) { _item_GUID = reader.ReadInt64(); _itemID = NetResponse.ReadString(reader); _count = reader.ReadInt16(); byte itemPropNum = reader.ReadByte(); for (int i = 0; i < itemPropNum; i++) { FC_EQUIP_EXTEND_ATTRIBUTE attKey = (FC_EQUIP_EXTEND_ATTRIBUTE)reader.ReadInt32(); int attValue = reader.ReadInt32(); if (_extendAttributes.ContainsKey(attKey)) { _extendAttributes[attKey] = attValue; } else { _extendAttributes.Add(attKey, attValue); } } }