public static DoubleUIntKeyTable <T> CreateDoubleUIntKeyTableFromBinary <T>(MemoryStream stream) where T : IDoubleUIntKeyBinaryTableData, new() { DoubleUIntKeyTable <T> doubleUIntKeyTable = new DoubleUIntKeyTable <T>(); BinaryTableReader binaryTableReader = new BinaryTableReader(stream); while (binaryTableReader.MoveNext()) { uint key = binaryTableReader.ReadUInt32(0u); uint key2 = binaryTableReader.ReadUInt32(0u); T value = new T(); value.LoadFromBinary(binaryTableReader, ref key, ref key2); doubleUIntKeyTable.Add(key, key2, value); } return(doubleUIntKeyTable); }
public static DoubleUIntKeyTable <GrowEquipItemNeedItemData> CreateNeedTableBinary(byte[] bytes) { DoubleUIntKeyTable <GrowEquipItemNeedItemData> doubleUIntKeyTable = new DoubleUIntKeyTable <GrowEquipItemNeedItemData>(); BinaryTableReader binaryTableReader = new BinaryTableReader(bytes); while (binaryTableReader.MoveNext()) { uint key = binaryTableReader.ReadUInt32(0u); uint key2 = binaryTableReader.ReadUInt32(0u); GrowEquipItemNeedItemData growEquipItemNeedItemData = new GrowEquipItemNeedItemData(); growEquipItemNeedItemData.LoadFromBinary(binaryTableReader, ref key, ref key2); doubleUIntKeyTable.Add(key, key2, growEquipItemNeedItemData); } return(doubleUIntKeyTable); }
public void LoadFromBinary(BinaryTableReader reader, ref uint key) { questID = key; questType = (QUEST_TYPE)reader.ReadInt32(0); questStyle = (QUEST_STYLE)reader.ReadInt32(0); rarity = (RARITY_TYPE)reader.ReadInt32(0); getType = (GET_TYPE)reader.ReadInt32(0); eventId = reader.ReadInt32(0); grade = reader.ReadInt32(0); difficulty = (DIFFICULTY_TYPE)reader.ReadInt32(0); sortPriority = reader.ReadInt32(0); locationNumber = reader.ReadString(string.Empty); questNumber = reader.ReadString(string.Empty); questText = reader.ReadString(string.Empty); appearQuestId = reader.ReadUInt32(0u); appearDeliveryId = reader.ReadUInt32(0u); rushId = reader.ReadUInt32(0u); mapId = reader.ReadUInt32(0u); for (int i = 0; i < 1; i++) { stageName[i] = reader.ReadString(string.Empty); } for (int j = 0; j < 1; j++) { enemyID[j] = reader.ReadInt32(0); enemyLv[j] = reader.ReadInt32(0); } for (int k = 0; k < 1; k++) { bgmID[k] = reader.ReadInt32(0); } limitTime = reader.ReadSingle(0f); missionID[0] = reader.ReadUInt32(0u); missionID[1] = reader.ReadUInt32(0u); missionID[2] = reader.ReadUInt32(0u); cantSale = reader.ReadBoolean(false); forceDefeat = reader.ReadBoolean(false); storyId = reader.ReadInt32(0); if (sortPriority == 0) { sortPriority = (int)key; } if (string.IsNullOrEmpty(locationNumber)) { locationNumber = (questID / 100u % 1000u).ToString(); } if (string.IsNullOrEmpty(questNumber)) { questNumber = (questID % 100u).ToString(); } seriesNum = 0; for (int l = 0; l < 1 && enemyID[l] != 0; l++) { seriesNum++; } }
public static UIntKeyTable <T> CreateUIntKeyTableFromBinary <T>(MemoryStream stream) where T : IUIntKeyBinaryTableData, new() { UIntKeyTable <T> uIntKeyTable = new UIntKeyTable <T>(); BinaryTableReader binaryTableReader = new BinaryTableReader(stream); while (binaryTableReader.MoveNext()) { uint key = binaryTableReader.ReadUInt32(0u); T value = new T(); value.LoadFromBinary(binaryTableReader, ref key); uIntKeyTable.Add(key, value); } return(uIntKeyTable); }
public void LoadFromBinary(BinaryTableReader reader, ref uint key1, ref uint key2) { id = key1; lv = key2; need_material.Clear(); for (int i = 0; i < NEED_MATERIAL_LENGTH_MAX; i++) { uint num = reader.ReadUInt32(0u); int num2 = reader.ReadInt32(0); if (num != 0 && num2 != 0) { need_material.Add(new NeedMaterial(num, num2)); } } needMaterial = need_material.ToArray(); needMoney = reader.ReadInt32(0); }
public static DoubleUIntKeyTable <AbilityData> CreateTableBinary(byte[] bytes) { DoubleUIntKeyTable <AbilityData> doubleUIntKeyTable = new DoubleUIntKeyTable <AbilityData>(); BinaryTableReader binaryTableReader = new BinaryTableReader(bytes); while (binaryTableReader.MoveNext()) { uint key = binaryTableReader.ReadUInt32(0u); uint key2 = 0u; UIntKeyTable <AbilityData> uIntKeyTable = doubleUIntKeyTable.Get(key); if (uIntKeyTable != null) { key2 = (uint)uIntKeyTable.GetCount(); } AbilityData abilityData = new AbilityData(); abilityData.LoadFromBinary(binaryTableReader, ref key, ref key2); doubleUIntKeyTable.Add(key, key2, abilityData); } return(doubleUIntKeyTable); }
public void LoadFromBinary(BinaryTableReader reader, ref uint key) { id = key; locationNumber = reader.ReadString(string.Empty); deliveryNumber = reader.ReadString(string.Empty); name = reader.ReadString(string.Empty); type = (DELIVERY_TYPE)reader.ReadUInt32(0u); subType = (DELIVERY_SUB_TYPE)reader.ReadUInt32(0u); textType = (DELIVERY_TYPE)reader.ReadUInt32(0u); eventID = reader.ReadInt32(0); fieldMode = (DIFFICULTY_MODE)reader.ReadUInt32(0u); difficulty = (DIFFICULTY_MODE)reader.ReadUInt32(0u); npcID = reader.ReadUInt32(0u); npcComment = reader.ReadString(string.Empty); npcClearComment = reader.ReadString(string.Empty); clearEventID = reader.ReadUInt32(0u); clearEventTitle = reader.ReadString(string.Empty); jumpType = reader.ReadInt32(0); jumpMapID = reader.ReadInt32(0); targetPortalID[0] = reader.ReadInt32(0); targetPortalID[1] = reader.ReadInt32(0); targetPortalID[2] = reader.ReadInt32(0); placeName = reader.ReadString(string.Empty); enemyName = reader.ReadString(string.Empty); appearQuestId = reader.ReadUInt32(0u); appearDeliveryId = reader.ReadUInt32(0u); List <NeedData> list = new List <NeedData>(); int i = 0; for (int num = 5; i < num; i++) { DELIVERY_CONDITION_TYPE dELIVERY_CONDITION_TYPE = DELIVERY_CONDITION_TYPE.NONE; uint num2 = 0u; uint num3 = 0u; uint questId = 0u; DELIVERY_RATE_TYPE dELIVERY_RATE_TYPE = DELIVERY_RATE_TYPE.RATE_10000; string empty = string.Empty; uint num4 = 0u; uint num5 = 0u; dELIVERY_CONDITION_TYPE = (DELIVERY_CONDITION_TYPE)reader.ReadUInt32(0u); num2 = reader.ReadUInt32(0u); num3 = reader.ReadUInt32(0u); if (i == 0) { questId = reader.ReadUInt32(0u); } dELIVERY_RATE_TYPE = (DELIVERY_RATE_TYPE)reader.ReadUInt32(0u); empty = reader.ReadString(string.Empty); num4 = reader.ReadUInt32(0u); num5 = reader.ReadUInt32(0u); NeedData needData = new NeedData(dELIVERY_CONDITION_TYPE, num2, num3, questId, dELIVERY_RATE_TYPE, empty, num4, num5); if (needData.IsValid()) { list.Add(needData); } } needs = list.ToArray(); if (string.IsNullOrEmpty(locationNumber)) { locationNumber = (id / 100u % 1000u).ToString(); } if (string.IsNullOrEmpty(deliveryNumber)) { deliveryNumber = (id % 100u).ToString(); } }
public void LoadFromBinary(BinaryTableReader reader, ref uint key1, ref uint key2) { itemId = key1; this.key2 = key2; questId = reader.ReadUInt32(0u); }