diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Chat/ChatLink.cpp | 2 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCStores.cpp | 16 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCStores.h | 2 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCStructure.h | 126 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCfmt.h | 7 | ||||
-rw-r--r-- | src/server/game/Entities/Item/Item.cpp | 41 | ||||
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 26 | ||||
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 10 | ||||
-rw-r--r-- | src/server/game/Handlers/ItemHandler.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Loot/LootMgr.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 4 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_lookup.cpp | 2 |
13 files changed, 129 insertions, 115 deletions
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index e853ce1671f..e5b9079f019 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -599,13 +599,13 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player { const ItemRandomSuffixEntry* itemRandSuffix = sItemRandomSuffixStore.LookupEntry(-propRefID); if (itemRandSuffix) - suffix = itemRandSuffix->nameSuffix; + suffix = itemRandSuffix->Name_lang; } else { const ItemRandomPropertiesEntry* itemRandProp = sItemRandomPropertiesStore.LookupEntry(propRefID); if (itemRandProp) - suffix = itemRandProp->nameSuffix; + suffix = itemRandProp->Name_lang; } // dbc local name diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index 4077c875511..ea6df4c984c 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -183,7 +183,7 @@ bool ItemChatLink::ValidateName(char* buffer, const char* context) { ChatLink::ValidateName(buffer, context); - char* suffixStrings = _suffix ? _suffix->nameSuffix : (_property ? _property->nameSuffix : NULL); + char* suffixStrings = _suffix ? _suffix->Name_lang : (_property ? _property->Name_lang : NULL); bool res = (FormatName(LOCALE_enUS, NULL, suffixStrings) == buffer); if (!res) diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 1ce2252e310..1baa3441226 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -140,11 +140,13 @@ DBCStorage <ItemDamageEntry> sItemDamageTwoHandStore(ItemDamagefmt) DBCStorage <ItemDamageEntry> sItemDamageTwoHandCasterStore(ItemDamagefmt); DBCStorage <ItemDamageEntry> sItemDamageWandStore(ItemDamagefmt); DBCStorage <ItemDisenchantLootEntry> sItemDisenchantLootStore(ItemDisenchantLootfmt); -//DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore(ItemDisplayTemplateEntryfmt); -- not used currently -DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore(ItemLimitCategoryEntryfmt); -DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore(ItemRandomPropertiesfmt); -DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore(ItemRandomSuffixfmt); -DBCStorage <ItemSetEntry> sItemSetStore(ItemSetEntryfmt); +//DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore(ItemDisplayTemplateEntryfmt); -- not used currently +DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore(ItemLimitCategoryEntryfmt); +DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore(ItemRandomPropertiesfmt); +DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore(ItemRandomSuffixfmt); +DBCStorage <ItemSetEntry> sItemSetStore(ItemSetEntryfmt); +DBCStorage <ItemSetSpellEntry> sItemSetSpellStore(ItemSetSpellEntryfmt); +ItemSetSpellsStore sItemSetSpellsStore; DBCStorage <LFGDungeonEntry> sLFGDungeonStore(LFGDungeonEntryfmt); DBCStorage <LightEntry> sLightStore(LightEntryfmt); @@ -454,6 +456,10 @@ void LoadDBCStores(const std::string& dataPath) LoadDBC(availableDbcLocales, bad_dbc_files, sItemRandomPropertiesStore, dbcPath, "ItemRandomProperties.dbc");//15595 LoadDBC(availableDbcLocales, bad_dbc_files, sItemRandomSuffixStore, dbcPath, "ItemRandomSuffix.dbc");//15595 LoadDBC(availableDbcLocales, bad_dbc_files, sItemSetStore, dbcPath, "ItemSet.dbc");//15595 + LoadDBC(availableDbcLocales, bad_dbc_files, sItemSetSpellStore, dbcPath, "ItemSetSpell.dbc");//15595 + for (uint32 i = 0; i < sItemSetSpellStore.GetNumRows(); ++i) + if (ItemSetSpellEntry const* entry = sItemSetSpellStore.LookupEntry(i)) + sItemSetSpellsStore[entry->ItemSetID].push_back(entry); LoadDBC(availableDbcLocales, bad_dbc_files, sItemArmorQualityStore, dbcPath, "ItemArmorQuality.dbc");//15595 LoadDBC(availableDbcLocales, bad_dbc_files, sItemArmorShieldStore, dbcPath, "ItemArmorShield.dbc");//15595 diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 3fc688d23ff..bc514374157 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -170,6 +170,8 @@ extern DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore; extern DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore; extern DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore; extern DBCStorage <ItemSetEntry> sItemSetStore; +extern DBCStorage <ItemSetSpellEntry> sItemSetSpellStore; +extern ItemSetSpellsStore sItemSetSpellsStore; extern DBCStorage <LFGDungeonEntry> sLFGDungeonStore; extern DBCStorage <LiquidTypeEntry> sLiquidTypeStore; extern DBCStorage <LockEntry> sLockStore; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index cd462e5f5ee..125a74b3190 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1306,117 +1306,123 @@ struct ItemReforgeEntry // ItemDamageWand.dbc struct ItemDamageEntry { - uint32 Id; // 0 item level - float DPS[7]; // 1-7 multiplier for item quality - uint32 Id2; // 8 item level + uint32 ID; // 0 item level + float DPS[7]; // 1-7 multiplier for item quality + uint32 ItemLevel; // 8 item level }; struct ItemArmorQualityEntry { - uint32 Id; // 0 item level - float Value[7]; // 1-7 multiplier for item quality - uint32 Id2; // 8 item level + uint32 ID; // 0 item level + float QualityMod[7]; // 1-7 multiplier for item quality + uint32 ItemLevel; // 8 item level }; struct ItemArmorShieldEntry { - uint32 Id; // 0 item level - uint32 Id2; // 1 item level - float Value[7]; // 2-8 multiplier for item quality + uint32 ID; // 0 item level + uint32 ItemLevel; // 1 item level + float Quality[7]; // 2-8 quality }; struct ItemArmorTotalEntry { - uint32 Id; // 0 item level - uint32 Id2; // 1 item level - float Value[4]; // 2-5 multiplier for armor types (cloth...plate) + uint32 ID; // 0 item level + uint32 ItemLevel; // 1 item level + float Value[4]; // 2-5 multiplier for armor types (cloth...plate) }; // ItemClass.dbc struct ItemClassEntry { - uint32 Class; // 1 item class id - //uint32 Unk; // 2 unk - //uint32 IsWeapon; // 3 1 for weapon, 0 for everything else - float PriceFactor; // 4 used to calculate certain prices - //char* Name; // class name + uint32 ID; // 0 item class id + //uint32 Flags; // 1 Weapon - 1, others - 0 + float PriceMod; // 2 used to calculate certain prices + //char* Name_lang; // 3 class name }; struct ItemBagFamilyEntry { - uint32 ID; // 0 - //char* name; // 1 m_name_lang + uint32 ID; // 0 + //char* Name_lang; // 1 m_name_lang }; struct ItemDisplayInfoEntry { - uint32 ID; // 0 m_ID - // 1 m_modelName[2] - // 2 m_modelTexture[2] - // 3 m_inventoryIcon - // 4 m_geosetGroup[3] - // 5 m_flags - // 6 m_spellVisualID - // 7 m_groupSoundIndex - // 8 m_helmetGeosetVis[2] - // 9 m_texture[2] - // 10 m_itemVisual[8] - // 11 m_particleColorID + uint32 ID; // 0 + //char* ModelName[2]; // 1-2 + //char* ModelTexture[2]; // 3-4 + //uint32 GeoSetGroup[3]; // 5-7 + //uint32 Flags; // 8 + //uint32 SpellVisualID; // 9 + //uint32 HelmetGeosetVis[2]; // 10-11 + //char* Texture[9]; // 12-20 + //uint32 ItemVisual; // 21 + //uint32 ParticleColorID; // 22 }; struct ItemDisenchantLootEntry { - uint32 Id; - uint32 ItemClass; - int32 ItemSubClass; - uint32 ItemQuality; - uint32 MinItemLevel; - uint32 MaxItemLevel; - uint32 RequiredDisenchantSkill; + uint32 ID; // 0 + uint32 ItemClass; // 1 + int32 ItemSubClass; // 2 + uint32 ItemQuality; // 3 + uint32 MinItemLevel; // 4 + uint32 MaxItemLevel; // 5 + uint32 RequiredDisenchantSkill; // 6 }; struct ItemLimitCategoryEntry { uint32 ID; // 0 Id - //char* name; // 1 m_name_lang - uint32 maxCount; // 2, m_quantity max allowed equipped as item or in gem slot - uint32 mode; // 3, m_flags 0 = have, 1 = equip (enum ItemLimitCategoryMode) + //char* Name_lang; // 1 m_name_lang + uint32 Quantity; // 2, m_quantity max allowed equipped as item or in gem slot + uint32 Flags; // 3, m_flags 0 = have, 1 = equip (enum ItemLimitCategoryMode) }; -#define MAX_ITEM_ENCHANTMENT_EFFECTS 3 +#define MAX_ITEM_ENCHANTMENT_EFFECTS 5 struct ItemRandomPropertiesEntry { - uint32 ID; // 0 m_ID - //char* internalName // 1 m_Name - uint32 enchant_id[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 2-4 m_Enchantment - // 5-6 unused - char* nameSuffix; // 7 m_name_lang + uint32 ID; // 0 + //char* Name; // 1 + uint32 Enchantment[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 2-6 + char* Name_lang; // 7 }; struct ItemRandomSuffixEntry { - uint32 ID; // 0 m_ID - char* nameSuffix; // 1 m_name_lang - // 2 m_internalName - uint32 enchant_id[5]; // 3-7 m_enchantment - uint32 prefix[5]; // 8-12 m_allocationPct + uint32 ID; // 0 + char* Name_lang; // 1 + //char* InternalName; // 2 + uint32 Enchantment[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 3-7 + uint32 AllocationPct[MAX_ITEM_ENCHANTMENT_EFFECTS];// 8-12 }; -#define MAX_ITEM_SET_ITEMS 10 +#define MAX_ITEM_SET_ITEMS 17 #define MAX_ITEM_SET_SPELLS 8 struct ItemSetEntry { - //uint32 id // 0 m_ID - char* name; // 1 m_name_lang - uint32 itemId[MAX_ITEM_SET_ITEMS]; // 2-18 m_itemID - uint32 spells[MAX_ITEM_SET_SPELLS]; // 19-26 m_setSpellID - uint32 items_to_triggerspell[MAX_ITEM_SET_SPELLS]; // 27-34 m_setThreshold - uint32 required_skill_id; // 35 m_requiredSkill - uint32 required_skill_value; // 36 m_requiredSkillRank + uint32 ID; // 0 + char* Name_lang; // 1 + uint32 ItemID[MAX_ITEM_SET_ITEMS]; // 2-18 + uint32 RequiredSkill; // 19 + uint32 RequiredSkillRank; // 20 +}; + +struct ItemSetSpellEntry +{ + uint32 ID; // 0 + uint32 ItemSetID; // 1 + uint32 SpellID; // 2 + uint32 Threshold; // 3 + uint32 ChrSpecID; // 4 }; +typedef std::vector<ItemSetSpellEntry const*> ItemSetSpells; +typedef std::unordered_map<uint32, ItemSetSpells> ItemSetSpellsStore; + struct LFGDungeonEntry { uint32 ID; // 0 diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 327acec4982..75cf0c4b2e5 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -88,14 +88,15 @@ char const ItemBagFamilyfmt[] = "nx"; char const ItemArmorQualityfmt[] = "nfffffffi"; char const ItemArmorShieldfmt[] = "nifffffff"; char const ItemArmorTotalfmt[] = "niffff"; -char const ItemClassfmt[] = "dixxfx"; +char const ItemClassfmt[] = "nxfx"; char const ItemDamagefmt[] = "nfffffffi"; char const ItemDisenchantLootfmt[] = "niiiiii"; //char const ItemDisplayTemplateEntryfmt[] = "nxxxxxxxxxxixxxxxxxxxxx"; char const ItemLimitCategoryEntryfmt[] = "nxii"; -char const ItemRandomPropertiesfmt[] = "nxiiixxs"; +char const ItemRandomPropertiesfmt[] = "nxiiiiis"; char const ItemRandomSuffixfmt[] = "nsxiiiiiiiiii"; -char const ItemSetEntryfmt[] = "dsiiiiiiiiiixxxxxxxiiiiiiiiiiiiiiiiii"; +char const ItemSetEntryfmt[] = "nsiiiiiiiiiiiiiiiiiii"; +char const ItemSetSpellEntryfmt[] = "niiii"; char const LFGDungeonEntryfmt[] = "nsiiiiiiiiixxixixixxx"; char const LightEntryfmt[] = "nifffxxxxxxxxxx"; char const LiquidTypefmt[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index 0fd97b41f00..c98ea4b2911 100644 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -43,7 +43,7 @@ void AddItemsSetItem(Player* player, Item* item) return; } - if (set->required_skill_id && player->GetSkillValue(set->required_skill_id) < set->required_skill_value) + if (set->RequiredSkill && player->GetSkillValue(set->RequiredSkill) < set->RequiredSkillRank) return; ItemSetEffect* eff = NULL; @@ -74,18 +74,18 @@ void AddItemsSetItem(Player* player, Item* item) } ++eff->item_count; + + ItemSetSpells& spells = sItemSetSpellsStore[setid]; - for (uint32 x = 0; x < MAX_ITEM_SET_SPELLS; ++x) + for (uint32 x = 0; x < spells.size(); ++x) { - if (!set->spells [x]) - continue; //not enough for spell - if (set->items_to_triggerspell[x] > eff->item_count) + if (spells[x]->Threshold > eff->item_count) continue; uint32 z = 0; for (; z < MAX_ITEM_SET_SPELLS; ++z) - if (eff->spells[z] && eff->spells[z]->Id == set->spells[x]) + if (eff->spells[z] && eff->spells[z]->Id == spells[x]->SpellID) break; if (z < MAX_ITEM_SET_SPELLS) @@ -96,10 +96,10 @@ void AddItemsSetItem(Player* player, Item* item) { if (!eff->spells[y]) // free slot { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(set->spells[x]); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spells[x]->SpellID); if (!spellInfo) { - TC_LOG_ERROR("entities.player.items", "WORLD: unknown spell id %u in items set %u effects", set->spells[x], setid); + TC_LOG_ERROR("entities.player.items", "WORLD: unknown spell id %u in items set %u effects", spells[x]->SpellID, setid); break; } @@ -140,19 +140,18 @@ void RemoveItemsSetItem(Player*player, ItemTemplate const* proto) return; --eff->item_count; + + ItemSetSpells& spells = sItemSetSpellsStore[setid]; - for (uint32 x = 0; x < MAX_ITEM_SET_SPELLS; x++) + for (uint32 x = 0; x < spells.size(); x++) { - if (!set->spells[x]) - continue; - // enough for spell - if (set->items_to_triggerspell[x] <= eff->item_count) + if (spells[x]->Threshold <= eff->item_count) continue; for (uint32 z = 0; z < MAX_ITEM_SET_SPELLS; z++) { - if (eff->spells[z] && eff->spells[z]->Id == set->spells[x]) + if (eff->spells[z] && eff->spells[z]->Id == spells[x]->SpellID) { // spell can be not active if not fit form requirement player->ApplyEquipSpell(eff->spells[z], NULL, false); @@ -626,7 +625,7 @@ void Item::SetItemRandomProperties(int32 randomPropId) SetState(ITEM_CHANGED, GetOwner()); } for (uint32 i = PROP_ENCHANTMENT_SLOT_1; i < PROP_ENCHANTMENT_SLOT_1 + 3; ++i) - SetEnchantment(EnchantmentSlot(i), item_rand->enchant_id[i - PROP_ENCHANTMENT_SLOT_1], 0, 0); + SetEnchantment(EnchantmentSlot(i), item_rand->Enchantment[i - PROP_ENCHANTMENT_SLOT_1], 0, 0); } } else @@ -643,7 +642,7 @@ void Item::SetItemRandomProperties(int32 randomPropId) } for (uint32 i = PROP_ENCHANTMENT_SLOT_0; i <= PROP_ENCHANTMENT_SLOT_4; ++i) - SetEnchantment(EnchantmentSlot(i), item_rand->enchant_id[i - PROP_ENCHANTMENT_SLOT_0], 0, 0); + SetEnchantment(EnchantmentSlot(i), item_rand->Enchantment[i - PROP_ENCHANTMENT_SLOT_0], 0, 0); } } } @@ -1459,7 +1458,7 @@ uint32 Item::GetSpecialPrice(ItemTemplate const* proto, uint32 minimumPrice /*= { ItemClassEntry const* classEntry = sItemClassStore.LookupEntry(proto->Class); if (classEntry) - cost *= classEntry->PriceFactor; + cost *= classEntry->PriceMod; else cost = 0; } @@ -1497,9 +1496,9 @@ int32 Item::GetReforgableStat(ItemModType statType) const if (SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(GetEnchantmentId(EnchantmentSlot(e)))) for (uint32 f = 0; f < MAX_ITEM_ENCHANTMENT_EFFECTS; ++f) if (enchant->type[f] == ITEM_ENCHANTMENT_TYPE_STAT && ItemModType(enchant->spellid[f]) == statType) - for (int k = 0; k < 5; ++k) - if (randomSuffix->enchant_id[k] == enchant->ID) - return int32((randomSuffix->prefix[k] * GetItemSuffixFactor()) / 10000); + for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k) + if (randomSuffix->Enchantment[k] == enchant->ID) + return int32((randomSuffix->AllocationPct[k] * GetItemSuffixFactor()) / 10000); } else { @@ -1512,7 +1511,7 @@ int32 Item::GetReforgableStat(ItemModType statType) const for (uint32 f = 0; f < MAX_ITEM_ENCHANTMENT_EFFECTS; ++f) if (enchant->type[f] == ITEM_ENCHANTMENT_TYPE_STAT && ItemModType(enchant->spellid[f]) == statType) for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k) - if (randomProp->enchant_id[k] == enchant->ID) + if (randomProp->Enchantment[k] == enchant->ID) return int32(enchant->amount[k]); } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 711b4030465..47f6906ef78 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -10496,13 +10496,13 @@ InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item return EQUIP_ERR_NOT_EQUIPPABLE; } - if (limitEntry->mode == ITEM_LIMIT_CATEGORY_MODE_HAVE) + if (limitEntry->Flags == ITEM_LIMIT_CATEGORY_MODE_HAVE) { uint32 curcount = GetItemCountWithLimitCategory(pProto->ItemLimitCategory, pItem); - if (curcount + count > uint32(limitEntry->maxCount)) + if (curcount + count > uint32(limitEntry->Quantity)) { if (no_space_count) - *no_space_count = count + curcount - limitEntry->maxCount; + *no_space_count = count + curcount - limitEntry->Quantity; if (itemLimitCategory) *itemLimitCategory = pProto->ItemLimitCategory; return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS; @@ -13761,11 +13761,11 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool if (item_rand) { // Search enchant_amount - for (int k = 0; k < 5; ++k) + for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k) { - if (item_rand->enchant_id[k] == enchant_id) + if (item_rand->Enchantment[k] == enchant_id) { - basepoints = int32((item_rand->prefix[k] * item->GetItemSuffixFactor()) / 10000); + basepoints = int32((item_rand->AllocationPct[k] * item->GetItemSuffixFactor()) / 10000); break; } } @@ -13789,9 +13789,9 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool { for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k) { - if (item_rand->enchant_id[k] == enchant_id) + if (item_rand->Enchantment[k] == enchant_id) { - enchant_amount = uint32((item_rand->prefix[k] * item->GetItemSuffixFactor()) / 10000); + enchant_amount = uint32((item_rand->AllocationPct[k] * item->GetItemSuffixFactor()) / 10000); break; } } @@ -13807,11 +13807,11 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool ItemRandomSuffixEntry const* item_rand_suffix = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId())); if (item_rand_suffix) { - for (int k = 0; k < 5; ++k) + for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k) { - if (item_rand_suffix->enchant_id[k] == enchant_id) + if (item_rand_suffix->Enchantment[k] == enchant_id) { - enchant_amount = uint32((item_rand_suffix->prefix[k] * item->GetItemSuffixFactor()) / 10000); + enchant_amount = uint32((item_rand_suffix->AllocationPct[k] * item->GetItemSuffixFactor()) / 10000); break; } } @@ -25521,11 +25521,11 @@ InventoryResult Player::CanEquipUniqueItem(ItemTemplate const* itemProto, uint8 // NOTE: limitEntry->mode not checked because if item have have-limit then it applied and to equip case - if (limit_count > limitEntry->maxCount) + if (limit_count > limitEntry->Quantity) return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS; // there is an equip limit on this item - if (HasItemOrGemWithLimitCategoryEquipped(itemProto->ItemLimitCategory, limitEntry->maxCount - limit_count + 1, except_slot)) + if (HasItemOrGemWithLimitCategoryEquipped(itemProto->ItemLimitCategory, limitEntry->Quantity - limit_count + 1, except_slot)) return EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED; } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 91f9a686eb4..0e5c82510b4 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -2373,7 +2373,7 @@ uint32 FillItemArmor(uint32 itemlevel, uint32 itemClass, uint32 itemSubclass, ui if (itemSubclass < ITEM_SUBCLASS_ARMOR_CLOTH || itemSubclass > ITEM_SUBCLASS_ARMOR_PLATE) return 0; - return uint32(armorQuality->Value[quality] * armorTotal->Value[itemSubclass - 1] * location->Modifier[itemSubclass - 1] + 0.5f); + return uint32(armorQuality->QualityMod[quality] * armorTotal->Value[itemSubclass - 1] * location->Modifier[itemSubclass - 1] + 0.5f); } // shields @@ -2381,7 +2381,7 @@ uint32 FillItemArmor(uint32 itemlevel, uint32 itemClass, uint32 itemSubclass, ui if (!shield) return 0; - return uint32(shield->Value[quality] + 0.5f); + return uint32(shield->Quality[quality] + 0.5f); } uint32 FillMaxDurability(uint32 itemClass, uint32 itemSubClass, uint32 inventoryType, uint32 quality, uint32 itemLevel) @@ -2490,18 +2490,18 @@ void FillDisenchantFields(uint32* disenchantID, uint32* requiredDisenchantSkill, disenchant->MinItemLevel <= itemTemplate.ItemLevel && disenchant->MaxItemLevel >= itemTemplate.ItemLevel) { - if (disenchant->Id == 60 || disenchant->Id == 61) // epic item disenchant ilvl range 66-99 (classic) + if (disenchant->ID == 60 || disenchant->ID == 61) // epic item disenchant ilvl range 66-99 (classic) { if (itemTemplate.RequiredLevel > 60 || itemTemplate.RequiredSkillRank > 300) continue; // skip to epic item disenchant ilvl range 90-199 (TBC) } - else if (disenchant->Id == 66 || disenchant->Id == 67) // epic item disenchant ilvl range 90-199 (TBC) + else if (disenchant->ID == 66 || disenchant->ID == 67) // epic item disenchant ilvl range 90-199 (TBC) { if (itemTemplate.RequiredLevel <= 60 || (itemTemplate.RequiredSkill && itemTemplate.RequiredSkillRank <= 300)) continue; } - *disenchantID = disenchant->Id; + *disenchantID = disenchant->ID; *requiredDisenchantSkill = disenchant->RequiredDisenchantSkill; return; } diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index 69c8ffb143c..87d17a8fc7c 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -1211,7 +1211,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData) } } - if (limit_newcount > 0 && uint32(limit_newcount) > limitEntry->maxCount) + if (limit_newcount > 0 && uint32(limit_newcount) > limitEntry->Quantity) { _player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, NULL); return; diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 6d41d669dcf..bde2f17b132 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -1568,7 +1568,7 @@ void LoadLootTemplates_Disenchant() if (!disenchant) continue; - uint32 lootid = disenchant->Id; + uint32 lootid = disenchant->ID; if (lootIdSet.find(lootid) == lootIdSet.end()) LootTemplates_Disenchant.ReportNonExistingId(lootid); else diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 64a0c92d107..1142240a3af 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -498,13 +498,13 @@ int32 AuraEffect::CalculateAmount(Unit* caster) { for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; k++) { - SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(item_rand_suffix->enchant_id[k]); + SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(item_rand_suffix->Enchantment[k]); if (pEnchant) { for (int t = 0; t < MAX_ITEM_ENCHANTMENT_EFFECTS; t++) if (pEnchant->spellid[t] == m_spellInfo->Id) { - amount = uint32((item_rand_suffix->prefix[k] * castItem->GetItemSuffixFactor()) / 10000); + amount = uint32((item_rand_suffix->AllocationPct[k] * castItem->GetItemSuffixFactor()) / 10000); break; } } diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 96806bc3d70..67505e713de 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -461,7 +461,7 @@ public: ItemSetEntry const* set = sItemSetStore.LookupEntry(id); if (set) { - std::string name = set->name; + std::string name = set->Name_lang; if (name.empty()) continue; |