private void Init(STULootBox lootBox) { Name = GetName(lootBox.m_lootboxType); LootBoxType = lootBox.m_lootboxType; HidePucks = lootBox.m_hidePucks == 1; if (lootBox.m_shopCards != null) { ShopCards = new LootBoxShopCard[lootBox.m_shopCards.Length]; for (int i = 0; i < lootBox.m_shopCards.Length; i++) { ShopCards[i] = new LootBoxShopCard(lootBox.m_shopCards[i]); } } }
public void SpecialHelper(ICLIFlags toolFlags) { var guids = ExtractDebugNewEntities.GetGUIDs(@"D:\ow\resources\verdata\52926.guids"); const Enum_BABC4175 lootboxType = Enum_BABC4175.Winter; HashSet <ulong> addedUnlocks = new HashSet <ulong>(); foreach (var progressionGuid in TrackedFiles[0x58]) { STUProgressionUnlocks progressionUnlocks = GetInstance <STUProgressionUnlocks>(progressionGuid); if (progressionUnlocks?.m_lootBoxesUnlocks == null) { continue; } foreach (STULootBoxUnlocks lootBoxUnlocks in progressionUnlocks.m_lootBoxesUnlocks) { ProcessLootBoxUnlocks(lootBoxUnlocks, guids, lootboxType, addedUnlocks); } } foreach (ulong genericSettingsGuid in TrackedFiles[0x54]) { STUGenericSettings_PlayerProgression playerProgression = GetInstance <STUGenericSettings_PlayerProgression>(genericSettingsGuid); if (playerProgression == null) { continue; } foreach (STULootBoxUnlocks lootBoxUnlocks in playerProgression.m_lootBoxesUnlocks) { ProcessLootBoxUnlocks(lootBoxUnlocks, guids, lootboxType, addedUnlocks); } break; } Console.Out.WriteLine("new ulong[] {"); foreach (ulong addedUnlock in addedUnlocks) { Console.Out.WriteLine($" 0x{addedUnlock:X16},"); } Console.Out.WriteLine("};"); }
public void SpecialHelper(ICLIFlags toolFlags) { ExtractDebugNewEntities.VersionInfo versionInfo = ExtractDebugNewEntities.GetGUIDVersionInfo(@"D:\ow\resources\verdata\49154.guids"); const Enum_BABC4175 lootboxType = Enum_BABC4175.SummerGames; HashSet <ulong> addedUnlocks = new HashSet <ulong>(); foreach (var progressionGuid in TrackedFiles[0x58]) { STUProgressionUnlocks progressionUnlocks = GetInstance <STUProgressionUnlocks>(progressionGuid); if (progressionUnlocks?.m_lootBoxesUnlocks == null) { continue; } foreach (STULootBoxUnlocks lootBoxUnlocks in progressionUnlocks.m_lootBoxesUnlocks) { ProcessLootBoxUnlocks(lootBoxUnlocks, versionInfo, lootboxType, addedUnlocks); } } foreach (ulong genericSettingsGuid in TrackedFiles[0x54]) { STUGenericSettings_PlayerProgression playerProgression = GetInstance <STUGenericSettings_PlayerProgression>(genericSettingsGuid); if (playerProgression == null) { continue; } foreach (STULootBoxUnlocks lootBoxUnlocks in playerProgression.m_lootBoxesUnlocks) { ProcessLootBoxUnlocks(lootBoxUnlocks, versionInfo, lootboxType, addedUnlocks); } break; } Console.Out.WriteLine("public static readonly ulong[] SummerGames2018 = new ulong[] {"); foreach (ulong addedUnlock in addedUnlocks) { Console.Out.WriteLine($" 0x{addedUnlock:X8},"); } Console.Out.WriteLine("};"); }
public static void ProcessLootBoxUnlocks(STULootBoxUnlocks lootBoxUnlocks, HashSet <ulong> guids, Enum_BABC4175 lootboxType, HashSet <ulong> addedUnlocks) { if (lootBoxUnlocks?.m_unlocks?.m_unlocks == null) { return; } if (lootBoxUnlocks.m_lootboxType != lootboxType) { return; } foreach (teStructuredDataAssetRef <ulong> unlock in lootBoxUnlocks.m_unlocks.m_unlocks) { //Unlock unlockModel = new Unlock(unlock); //if (unlockModel.Type != "Skin") continue; if (!guids.Contains(unlock)) { addedUnlocks.Add(unlock); } } }
public LootBoxUnlocks(STULootBoxUnlocks lootBoxUnlocks) { LootBoxType = lootBoxUnlocks.m_lootboxType; Unlocks = Unlock.GetArray(lootBoxUnlocks.m_unlocks); }
public static string GetBasicName(Enum_BABC4175 lootBoxType) { return(GetBasicName((uint)lootBoxType)); }
public static void ProcessLootBoxUnlocks(STULootBoxUnlocks lootBoxUnlocks, ExtractDebugNewEntities.VersionInfo versionInfo, Enum_BABC4175 lootboxType, HashSet <ulong> addedUnlocks) { if (lootBoxUnlocks?.m_unlocks?.m_unlocks == null) { return; } if (lootBoxUnlocks.m_lootboxType != lootboxType) { return; } foreach (teStructuredDataAssetRef <STUUnlock> unlock in lootBoxUnlocks.m_unlocks.m_unlocks) { //Unlock unlockModel = new Unlock(unlock); //if (unlockModel.Type != "Skin") continue; if (!versionInfo.GUIDs.Contains(unlock)) { addedUnlocks.Add(unlock); } } }