|
| 1 | +///---------------------------------------------------------------------------------------------------- |
| 2 | +/// Copyright (c) Raidcore.GG - All rights reserved. |
| 3 | +/// |
| 4 | +/// Name : KillproofInfo.h |
| 5 | +/// Description : KillproofInfo struct definition. |
| 6 | +/// Authors : K. Bieniek |
| 7 | +///---------------------------------------------------------------------------------------------------- |
| 8 | + |
| 9 | +#ifndef KILLPROOFINFO_H |
| 10 | +#define KILLPROOFINFO_H |
| 11 | + |
| 12 | +#include <string> |
| 13 | + |
| 14 | +///---------------------------------------------------------------------------------------------------- |
| 15 | +/// KPMEInfo_t Struct |
| 16 | +///---------------------------------------------------------------------------------------------------- |
| 17 | +struct KPMEInfo_t |
| 18 | +{ |
| 19 | + struct RaidKP_t |
| 20 | + { |
| 21 | + int LI; // including LD |
| 22 | + |
| 23 | + int W1_ValeGuardian; |
| 24 | + int W1_Gorseval; |
| 25 | + int W1_Sabetha; |
| 26 | + bool W1_TheEternal; |
| 27 | + |
| 28 | + int W2_Slothasor; |
| 29 | + int W2_Matthias; |
| 30 | + bool W2_SlipperySlubling; |
| 31 | + |
| 32 | + int W3_Escort; |
| 33 | + int W3_KeepConstruct; |
| 34 | + int W3_Xera; |
| 35 | + |
| 36 | + int W4_Cairn; |
| 37 | + int W4_MursaatOverseer; |
| 38 | + int W4_Samarog; |
| 39 | + int W4_Deimos; |
| 40 | + bool W4_Committed; |
| 41 | + bool W4_SilentSavior; |
| 42 | + bool W4_DemonsDemise; |
| 43 | + |
| 44 | + int W5_SoullessHorror; |
| 45 | + int W5_Dhuum; |
| 46 | + bool W5_VoiceInTheVoid; |
| 47 | + |
| 48 | + int W6_ConjuredAmalgamate; |
| 49 | + int W6_LargosTwins; |
| 50 | + int W6_Qadim; |
| 51 | + bool W6_ChampionOfZomorros; |
| 52 | + |
| 53 | + int W7_CardinalAdina; |
| 54 | + int W7_CardinalSabir; |
| 55 | + int W7_QadimThePeerless; |
| 56 | + bool W7_EverlastingAllyOfAhdashim; |
| 57 | + |
| 58 | + int W8_Greer; |
| 59 | + int W8_GreerCM; |
| 60 | + int W8_Decima; |
| 61 | + int W8_DecimaCM; |
| 62 | + int W8_Ura; |
| 63 | + int W8_UraCM; |
| 64 | + bool W8_TheEternal; |
| 65 | + bool W8_RaidExpert; |
| 66 | + bool W8_Godsbane; |
| 67 | + bool W8_LegendaryConquerorOfUra; |
| 68 | + |
| 69 | + } Raids; |
| 70 | + |
| 71 | + struct StrikeKP_t |
| 72 | + { |
| 73 | + int IBS_BoneskinnerVial; |
| 74 | + |
| 75 | + int EOD_AH; |
| 76 | + int EOD_AHCM; |
| 77 | + bool EOD_PeerlessGeometer; |
| 78 | + |
| 79 | + int EOD_Ankka; |
| 80 | + int EOD_AnkkaCM; |
| 81 | + bool EOD_GazedIntoTheVoid; |
| 82 | + |
| 83 | + int EOD_KO; |
| 84 | + int EOD_KOCM; |
| 85 | + bool EOD_TheGreatEqualizer; |
| 86 | + |
| 87 | + int EOD_HT; |
| 88 | + int EOD_HTCM; |
| 89 | + bool EOD_TheVoidwalker; |
| 90 | + |
| 91 | + int EOD_OLC; |
| 92 | + int EOD_OLCCM; |
| 93 | + bool EOD_DefenderOfLionsCourt; |
| 94 | + |
| 95 | + int EOD_Dagda; |
| 96 | + int EOD_DagdaCM; |
| 97 | + bool EOD_MindFlayer; |
| 98 | + |
| 99 | + int EOD_Cerus; |
| 100 | + int EOD_CerusCM; |
| 101 | + bool EOD_EmbodimentOfSin; |
| 102 | + bool EOD_LegendaryConquerorOfCerus; |
| 103 | + } Strikes; |
| 104 | + |
| 105 | + struct FractalKP_t |
| 106 | + { |
| 107 | + int UFE; // including UCE |
| 108 | + |
| 109 | + bool TheUnclean; |
| 110 | + bool LNHB; |
| 111 | + bool DoD; |
| 112 | + bool DwD; |
| 113 | + bool NightmareAspect; |
| 114 | + bool KryptisExorcist; |
| 115 | + |
| 116 | + bool FractalSavant; |
| 117 | + bool FractalProdigy; |
| 118 | + bool FractalChampion; |
| 119 | + bool FractalGod; |
| 120 | + |
| 121 | + } Fractals; |
| 122 | +}; |
| 123 | + |
| 124 | +inline std::string CheckRequirements(const KPMEInfo_t& aValue, const KPMEInfo_t& aRequired, bool aIsTooltip = false) |
| 125 | +{ |
| 126 | + std::string missing; |
| 127 | + |
| 128 | + // Helper function for integer requirements |
| 129 | + auto checkInt = [&](auto& aValue, auto& aRequired, const std::string& aName) |
| 130 | + { |
| 131 | + if (aRequired) |
| 132 | + { |
| 133 | + if (aIsTooltip) |
| 134 | + { |
| 135 | + missing += "\t" + std::to_string(aRequired) + " " + aName + "\n"; |
| 136 | + } |
| 137 | + else if (aValue < aRequired) |
| 138 | + { |
| 139 | + missing += std::to_string(aValue) + " " + aName + "\n"; |
| 140 | + } |
| 141 | + } |
| 142 | + }; |
| 143 | + |
| 144 | + // Helper function for boolean requirements |
| 145 | + auto checkBool = [&](bool aValue, bool aRequired, const std::string& aName) |
| 146 | + { |
| 147 | + if (aRequired) |
| 148 | + { |
| 149 | + if (aIsTooltip) |
| 150 | + { |
| 151 | + missing += "\t" + aName + "\n"; |
| 152 | + } |
| 153 | + else if (!aValue) |
| 154 | + { |
| 155 | + missing += "Missing " + aName + "\n"; |
| 156 | + } |
| 157 | + } |
| 158 | + }; |
| 159 | + |
| 160 | + // Raids |
| 161 | + checkInt(aValue.Raids.LI, aRequired.Raids.LI, "Legendary Insights"); |
| 162 | + checkInt(aValue.Raids.W1_ValeGuardian, aRequired.Raids.W1_ValeGuardian, "Vale Guardian"); |
| 163 | + checkInt(aValue.Raids.W1_Gorseval, aRequired.Raids.W1_Gorseval, "Gorseval"); |
| 164 | + checkInt(aValue.Raids.W1_Sabetha, aRequired.Raids.W1_Sabetha, "Sabetha"); |
| 165 | + checkBool(aValue.Raids.W1_TheEternal, aRequired.Raids.W1_TheEternal, "The Eternal"); |
| 166 | + |
| 167 | + checkInt(aValue.Raids.W2_Slothasor, aRequired.Raids.W2_Slothasor, "Slothasor"); |
| 168 | + checkInt(aValue.Raids.W2_Matthias, aRequired.Raids.W2_Matthias, "Matthias"); |
| 169 | + checkBool(aValue.Raids.W2_SlipperySlubling, aRequired.Raids.W2_SlipperySlubling, "Slippery Slubling"); |
| 170 | + |
| 171 | + checkInt(aValue.Raids.W3_Escort, aRequired.Raids.W3_Escort, "Escort clears"); |
| 172 | + checkInt(aValue.Raids.W3_KeepConstruct, aRequired.Raids.W3_KeepConstruct, "Keep Construct"); |
| 173 | + checkInt(aValue.Raids.W3_Xera, aRequired.Raids.W3_Xera, "Xera"); |
| 174 | + |
| 175 | + checkInt(aValue.Raids.W4_Cairn, aRequired.Raids.W4_Cairn, "Cairn"); |
| 176 | + checkInt(aValue.Raids.W4_MursaatOverseer, aRequired.Raids.W4_MursaatOverseer, "Mursaat Overseer"); |
| 177 | + checkInt(aValue.Raids.W4_Samarog, aRequired.Raids.W4_Samarog, "Samarog"); |
| 178 | + checkInt(aValue.Raids.W4_Deimos, aRequired.Raids.W4_Deimos, "Deimos"); |
| 179 | + checkBool(aValue.Raids.W4_Committed, aRequired.Raids.W4_Committed, "Committed"); |
| 180 | + checkBool(aValue.Raids.W4_SilentSavior, aRequired.Raids.W4_SilentSavior, "Silent Savior"); |
| 181 | + checkBool(aValue.Raids.W4_DemonsDemise, aRequired.Raids.W4_DemonsDemise, "Demon's Demise"); |
| 182 | + |
| 183 | + checkInt(aValue.Raids.W5_SoullessHorror, aRequired.Raids.W5_SoullessHorror, "Soulless Horror"); |
| 184 | + checkInt(aValue.Raids.W5_Dhuum, aRequired.Raids.W5_Dhuum, "Dhuum"); |
| 185 | + checkBool(aValue.Raids.W5_VoiceInTheVoid, aRequired.Raids.W5_VoiceInTheVoid, "Voice in the Void"); |
| 186 | + |
| 187 | + checkInt(aValue.Raids.W6_ConjuredAmalgamate, aRequired.Raids.W6_ConjuredAmalgamate, "Conjured Amalgamate"); |
| 188 | + checkInt(aValue.Raids.W6_LargosTwins, aRequired.Raids.W6_LargosTwins, "Largos Twins"); |
| 189 | + checkInt(aValue.Raids.W6_Qadim, aRequired.Raids.W6_Qadim, "Qadim"); |
| 190 | + checkBool(aValue.Raids.W6_ChampionOfZomorros, aRequired.Raids.W6_ChampionOfZomorros, "Champion of Zomorros"); |
| 191 | + |
| 192 | + checkInt(aValue.Raids.W7_CardinalAdina, aRequired.Raids.W7_CardinalAdina, "Cardinal Adina"); |
| 193 | + checkInt(aValue.Raids.W7_CardinalSabir, aRequired.Raids.W7_CardinalSabir, "Cardinal Sabir"); |
| 194 | + checkInt(aValue.Raids.W7_QadimThePeerless, aRequired.Raids.W7_QadimThePeerless, "Qadim the Peerless"); |
| 195 | + checkBool(aValue.Raids.W7_EverlastingAllyOfAhdashim, aRequired.Raids.W7_EverlastingAllyOfAhdashim, "Everlasting Ally of Ahdashim"); |
| 196 | + |
| 197 | + checkInt(aValue.Raids.W8_Greer, aRequired.Raids.W8_Greer, "Greer"); |
| 198 | + checkInt(aValue.Raids.W8_GreerCM, aRequired.Raids.W8_GreerCM, "Greer CM"); |
| 199 | + checkInt(aValue.Raids.W8_Decima, aRequired.Raids.W8_Decima, "Decima"); |
| 200 | + checkInt(aValue.Raids.W8_DecimaCM, aRequired.Raids.W8_DecimaCM, "Decima CM"); |
| 201 | + checkInt(aValue.Raids.W8_Ura, aRequired.Raids.W8_Ura, "Ura"); |
| 202 | + checkInt(aValue.Raids.W8_UraCM, aRequired.Raids.W8_UraCM, "Ura CM"); |
| 203 | + checkBool(aValue.Raids.W8_TheEternal, aRequired.Raids.W8_TheEternal, "The Eternal"); |
| 204 | + checkBool(aValue.Raids.W8_RaidExpert, aRequired.Raids.W8_RaidExpert, "Raid Expert"); |
| 205 | + checkBool(aValue.Raids.W8_Godsbane, aRequired.Raids.W8_Godsbane, "Godsbane"); |
| 206 | + checkBool(aValue.Raids.W8_LegendaryConquerorOfUra, aRequired.Raids.W8_LegendaryConquerorOfUra, "Legendary Conqueror of Ura"); |
| 207 | + |
| 208 | + // Strikes |
| 209 | + checkInt(aValue.Strikes.IBS_BoneskinnerVial, aRequired.Strikes.IBS_BoneskinnerVial, "Boneskinner Vials"); |
| 210 | + |
| 211 | + checkInt(aValue.Strikes.EOD_AH, aRequired.Strikes.EOD_AH, "Aetherblade clears"); |
| 212 | + checkInt(aValue.Strikes.EOD_AHCM, aRequired.Strikes.EOD_AHCM, "Aetherblade CM clears"); |
| 213 | + checkBool(aValue.Strikes.EOD_PeerlessGeometer, aRequired.Strikes.EOD_PeerlessGeometer, "Peerless Geometer"); |
| 214 | + |
| 215 | + checkInt(aValue.Strikes.EOD_KO, aRequired.Strikes.EOD_KO, "Kaineng Overlook clears"); |
| 216 | + checkInt(aValue.Strikes.EOD_KOCM, aRequired.Strikes.EOD_KOCM, "Kaineng Overlook CM clears"); |
| 217 | + checkBool(aValue.Strikes.EOD_TheGreatEqualizer, aRequired.Strikes.EOD_TheGreatEqualizer, "The Great Equalizer"); |
| 218 | + |
| 219 | + checkInt(aValue.Strikes.EOD_Ankka, aRequired.Strikes.EOD_Ankka, "Ankka clears"); |
| 220 | + checkInt(aValue.Strikes.EOD_AnkkaCM, aRequired.Strikes.EOD_AnkkaCM, "Ankka CM clears"); |
| 221 | + checkBool(aValue.Strikes.EOD_GazedIntoTheVoid, aRequired.Strikes.EOD_GazedIntoTheVoid, "Gazed Into the Void"); |
| 222 | + |
| 223 | + checkInt(aValue.Strikes.EOD_HT, aRequired.Strikes.EOD_HT, "Harvest Temple clears"); |
| 224 | + checkInt(aValue.Strikes.EOD_HTCM, aRequired.Strikes.EOD_HTCM, "Harvest Temple CM clears"); |
| 225 | + checkBool(aValue.Strikes.EOD_TheVoidwalker, aRequired.Strikes.EOD_TheVoidwalker, "The Voidwalker"); |
| 226 | + |
| 227 | + checkInt(aValue.Strikes.EOD_OLC, aRequired.Strikes.EOD_OLC, "Old Lion's Court clears"); |
| 228 | + checkInt(aValue.Strikes.EOD_OLCCM, aRequired.Strikes.EOD_OLCCM, "Old Lion's Court CM clears"); |
| 229 | + checkBool(aValue.Strikes.EOD_DefenderOfLionsCourt, aRequired.Strikes.EOD_DefenderOfLionsCourt, "Defender of Lion's Court"); |
| 230 | + |
| 231 | + checkInt(aValue.Strikes.EOD_Dagda, aRequired.Strikes.EOD_Dagda, "Dagda clears"); |
| 232 | + checkInt(aValue.Strikes.EOD_DagdaCM, aRequired.Strikes.EOD_DagdaCM, "Dagda CM clears"); |
| 233 | + checkBool(aValue.Strikes.EOD_MindFlayer, aRequired.Strikes.EOD_MindFlayer, "Mind Flayer"); |
| 234 | + |
| 235 | + checkInt(aValue.Strikes.EOD_Cerus, aRequired.Strikes.EOD_Cerus, "Cerus clears"); |
| 236 | + checkInt(aValue.Strikes.EOD_CerusCM, aRequired.Strikes.EOD_CerusCM, "Cerus CM clears"); |
| 237 | + checkBool(aValue.Strikes.EOD_EmbodimentOfSin, aRequired.Strikes.EOD_EmbodimentOfSin, "Embodiment of Sin"); |
| 238 | + checkBool(aValue.Strikes.EOD_LegendaryConquerorOfCerus, aRequired.Strikes.EOD_LegendaryConquerorOfCerus, "Legendary Conqueror of Cerus"); |
| 239 | + |
| 240 | + // Fractals |
| 241 | + checkInt(aValue.Fractals.UFE, aRequired.Fractals.UFE, "UFE Fractal clears"); |
| 242 | + |
| 243 | + checkBool(aValue.Fractals.TheUnclean, aRequired.Fractals.TheUnclean, "The Unclean"); |
| 244 | + checkBool(aValue.Fractals.LNHB, aRequired.Fractals.LNHB, "LNHB"); |
| 245 | + checkBool(aValue.Fractals.DoD, aRequired.Fractals.DoD, "DoD"); |
| 246 | + checkBool(aValue.Fractals.DwD, aRequired.Fractals.DwD, "DwD"); |
| 247 | + checkBool(aValue.Fractals.NightmareAspect, aRequired.Fractals.NightmareAspect, "Nightmare Aspect"); |
| 248 | + checkBool(aValue.Fractals.KryptisExorcist, aRequired.Fractals.KryptisExorcist, "Kryptis Exorcist"); |
| 249 | + |
| 250 | + checkBool(aValue.Fractals.FractalSavant, aRequired.Fractals.FractalSavant, "Fractal Savant"); |
| 251 | + checkBool(aValue.Fractals.FractalProdigy, aRequired.Fractals.FractalProdigy, "Fractal Prodigy"); |
| 252 | + checkBool(aValue.Fractals.FractalChampion, aRequired.Fractals.FractalChampion, "Fractal Champion"); |
| 253 | + checkBool(aValue.Fractals.FractalGod, aRequired.Fractals.FractalGod, "Fractal God"); |
| 254 | + |
| 255 | + return missing; |
| 256 | +} |
| 257 | + |
| 258 | +#endif |
0 commit comments