public void DeserializeFromText(string text) { m_items.Clear(); MyEquips.Singleton.myEquips.Clear(); StringStreamReader reader = new StringStreamReader(text); //byte version = reader.ReadByte(); int count = reader.ReadInt(); CSItemSegmentDefine segmentDef = CSItemSegmentDefine.Singleton; for (int index = 0; index < count; ++index) { CSItem item = new CSItem(); item.m_guid.m_lowPart = reader.ReadInt(); item.m_guid.m_highPart = reader.ReadInt(); item.m_id = reader.ReadShort(); item.m_flag = reader.ReadShort(); for (int seg = 0; seg <= segmentDef.MaxSegmentType; seg++) { if ((item.m_flag & (0x1 << seg)) > 0) { segmentDef.ReadSegmentFromText(item, seg, reader.ReadString()); } } } }
public override void ReadFromString(string value) { StringStreamReader reader = new StringStreamReader(value); int length = reader.ReadInt(); for (int index = 0; index < length; ++index) { int id = reader.ReadInt(); if (0 == id) { continue; } TeamItem inst = new TeamItem(); // inst.m_memberList[(int)Team.EDITTYPE.enMain] = reader.ReadInt(); // inst.m_memberList[(int)Team.EDITTYPE.enDeputy] = reader.ReadInt(); // inst.m_memberList[(int)Team.EDITTYPE.enSupport] = reader.ReadInt(); if (m_teamList.Length < index) { m_teamList[index] = inst; } } }
public override void ReadFromString(string value) { StringStreamReader reader = new StringStreamReader(value); int length = reader.ReadInt(); for (int index = 0; index < length; ++index) { int id = reader.ReadInt(); if (0 == id) { continue; } MissionInst inst = new MissionInst(); inst.m_id = id; inst.m_isFinished = reader.ReadBool(); inst.m_questRequire1 = reader.ReadShort(); inst.m_questRequire2 = reader.ReadShort(); inst.m_questRequire3 = reader.ReadShort(); inst.m_questRequire4 = reader.ReadShort(); if (myMissions.Length < index) { myMissions[index] = inst; } } }
public override void ReadFromString(string value) { StringStreamReader reader = new StringStreamReader(value); int length = reader.ReadInt(); for (int index = 0; index < length; ++index) { int id = reader.ReadInt(); if (m_list.Length < index) { m_list[index] = id; } } }
public override void ReadFromString(string value) { StringStreamReader reader = new StringStreamReader(value); int length = reader.ReadInt(); for (int index = 0; index < length; ++index) { int lowPart = reader.ReadInt(); int highPart = reader.ReadInt(); if (dress.Length < index) { //dress[index] = new CSItemGuid(); dress[index].m_lowPart = lowPart; dress[index].m_highPart = highPart; } } }
public void DeserializeFromText(string text) { StringStreamReader reader = new StringStreamReader(text); int count = reader.ReadInt(); for (int index = 0; index < count; ++index) { int propertyID = reader.ReadInt(); int innerIndex = 0; PropertyValue prop = GetPropertyByID(propertyID, ref innerIndex); if (prop == null) { continue; } switch (prop.m_type) { case (int)PropertySetValueType.enBitArray: case (int)PropertySetValueType.enBuffer: prop.m_customObject.ReadFromString(reader.ReadString()); break; case (int)PropertySetValueType.enString: prop.m_string = reader.ReadString(); break; case (int)PropertySetValueType.enInt32: prop.m_int32 = reader.ReadInt(); break; case (int)PropertySetValueType.enFloat: prop.m_float = reader.ReadFloat(); break; case (int)PropertySetValueType.enFloat3: prop.m_float3.x = reader.ReadFloat(); prop.m_float3.y = reader.ReadFloat(); prop.m_float3.z = reader.ReadFloat(); break; } } }
public override void ReadFromString(string value) { StringStreamReader reader = new StringStreamReader(value); int length = reader.ReadInt(); for (int index = 0; index < length; ++index) { int id = reader.ReadInt(); SkillInfo info = GameTable.SkillTableAsset.Lookup(id); if (null == info) { continue; } SkillInst inst = new SkillInst(); inst.SkillInfo = info; inst.SkillLevel = reader.ReadInt(); inst.SkillAddLevel = reader.ReadInt(); m_item[index] = inst; MySkill.Singleton.m_skillInst[index] = inst; } }
public override void ReadFromString(string value) { StringStreamReader reader = new StringStreamReader(value); int length = reader.ReadInt(); for (int index = 0; index < length; ++index) { byte item = reader.ReadByte(); if (m_finishedList.Length < index) { m_finishedList[index] = item; } } }