From dc12d0456dbac10202acc3c773c6e53be976aeb7 Mon Sep 17 00:00:00 2001 From: planqi Date: Mon, 12 Jun 2017 13:08:19 -0800 Subject: [PATCH] add some new conditions to ItemDisplay FCR, FHR, FBR, MANA, ARPER, MFIND, GFIND, STR, DEX, FRW, MAXDMG, AR, DTM, REPLIFE, REPQUANT, REPAIR --- BH/Modules/Item/ItemDisplay.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/BH/Modules/Item/ItemDisplay.cpp b/BH/Modules/Item/ItemDisplay.cpp index 2e6bdb8e..78f3810d 100644 --- a/BH/Modules/Item/ItemDisplay.cpp +++ b/BH/Modules/Item/ItemDisplay.cpp @@ -554,9 +554,42 @@ void Condition::BuildConditions(vector &conditions, string token) { Condition::AddOperand(conditions, new ResistAllCondition(operation, value)); } else if (key.compare(0, 3, "IAS") == 0) { Condition::AddOperand(conditions, new ItemStatCondition(STAT_IAS, 0, operation, value)); + } else if (key.compare(0, 3, "FCR") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_FASTERCAST, 0, operation, value)); + } else if (key.compare(0, 3, "FHR") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_FASTERHITRECOVERY, 0, operation, value)); + } else if (key.compare(0, 3, "FBR") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_FASTERBLOCK, 0, operation, value)); } else if (key.compare(0, 4, "LIFE") == 0) { // For unknown reasons, the game's internal HP stat is 256 for every 1 displayed on item Condition::AddOperand(conditions, new ItemStatCondition(STAT_MAXHP, 0, operation, value * 256)); + } else if (key.compare(0, 4, "MANA") == 0) { + // For unknown reasons, the game's internal Mana stat is 256 for every 1 displayed on item + Condition::AddOperand(conditions, new ItemStatCondition(STAT_MAXMANA, 0, operation, value * 256)); + } else if (key.compare(0, 5, "ARPER") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_TOHITPERCENT, 0, operation, value)); + } else if (key.compare(0, 5, "MFIND") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_MAGICFIND, 0, operation, value)); + } else if (key.compare(0, 5, "GFIND") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_GOLDFIND, 0, operation, value)); + } else if (key.compare(0, 3, "STR") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_STRENGTH, 0, operation, value)); + } else if (key.compare(0, 3, "DEX") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_DEXTERITY, 0, operation, value)); + } else if (key.compare(0, 3, "FRW") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_FASTERRUNWALK, 0, operation, value)); + } else if (key.compare(0, 6, "MAXDMG") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_MAXIMUMDAMAGE, 0, operation, value)); + } else if (key.compare(0, 2, "AR") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_ATTACKRATING, 0, operation, value)); + } else if (key.compare(0, 3, "DTM") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_DAMAGETOMANA, 0, operation, value)); + } else if (key.compare(0, 7, "REPLIFE") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_REPLENISHLIFE, 0, operation, value)); + } else if (key.compare(0, 8, "REPQUANT") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_REPLENISHESQUANTITY, 0, operation, value)); + } else if (key.compare(0, 6, "REPAIR") == 0) { + Condition::AddOperand(conditions, new ItemStatCondition(STAT_REPAIRSDURABILITY, 0, operation, value)); } else if (key.compare(0, 5, "ARMOR") == 0) { Condition::AddOperand(conditions, new ItemGroupCondition(ITEM_GROUP_ALLARMOR)); } else if (key.compare(0, 2, "EQ") == 0 && keylen == 3) {