From 1e9dde73ca06044406d91a612f6d5d9b2d707f58 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 20 Dec 2014 23:16:35 +0100 Subject: Core/Items: Missed reforging code --- src/server/game/Entities/Item/Item.cpp | 43 ---------------------------------- src/server/game/Entities/Item/Item.h | 2 -- 2 files changed, 45 deletions(-) (limited to 'src/server') diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index f42b93f07eb..7af87c20935 100644 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -1476,49 +1476,6 @@ uint32 Item::GetSpecialPrice(ItemTemplate const* proto, uint32 minimumPrice /*= return cost; } -int32 Item::GetReforgableStat(ItemModType statType) const -{ - ItemTemplate const* proto = GetTemplate(); - for (uint32 i = 0; i < MAX_ITEM_PROTO_STATS; ++i) - if (ItemModType(proto->ItemStat[i].ItemStatType) == statType) - return proto->ItemStat[i].ItemStatValue; - - int32 randomPropId = GetItemRandomPropertyId(); - if (!randomPropId) - return 0; - - if (randomPropId < 0) - { - ItemRandomSuffixEntry const* randomSuffix = sItemRandomSuffixStore.LookupEntry(-randomPropId); - if (!randomSuffix) - return 0; - - for (uint32 e = PROP_ENCHANTMENT_SLOT_0; e <= PROP_ENCHANTMENT_SLOT_4; ++e) - if (SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(GetEnchantmentId(EnchantmentSlot(e)))) - for (uint32 f = 0; f < MAX_ITEM_ENCHANTMENT_EFFECTS; ++f) - if (enchant->Effect[f] == ITEM_ENCHANTMENT_TYPE_STAT && ItemModType(enchant->EffectSpellID[f]) == statType) - for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k) - if (randomSuffix->Enchantment[k] == enchant->ID) - return int32((randomSuffix->AllocationPct[k] * GetItemSuffixFactor()) / 10000); - } - else - { - ItemRandomPropertiesEntry const* randomProp = sItemRandomPropertiesStore.LookupEntry(randomPropId); - if (!randomProp) - return 0; - - for (uint32 e = PROP_ENCHANTMENT_SLOT_0; e <= PROP_ENCHANTMENT_SLOT_4; ++e) - if (SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(GetEnchantmentId(EnchantmentSlot(e)))) - for (uint32 f = 0; f < MAX_ITEM_ENCHANTMENT_EFFECTS; ++f) - if (enchant->Effect[f] == ITEM_ENCHANTMENT_TYPE_STAT && ItemModType(enchant->EffectSpellID[f]) == statType) - for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k) - if (randomProp->Enchantment[k] == enchant->ID) - return int32(enchant->EffectPointsMin[k]); - } - - return 0; -} - void Item::ItemContainerSaveLootToDB() { // Saves the money and item loot associated with an openable item to the DB diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h index cff557cedcb..8c91c24b943 100644 --- a/src/server/game/Entities/Item/Item.h +++ b/src/server/game/Entities/Item/Item.h @@ -376,8 +376,6 @@ class Item : public Object static uint32 GetSellPrice(ItemTemplate const* proto, bool& success); - int32 GetReforgableStat(ItemModType statType) const; - private: std::string m_text; uint8 m_slot; -- cgit v1.2.3