mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
@@ -708,9 +708,6 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale)
|
||||
{
|
||||
ASSERT(appearanceMod->ItemID <= 0xFFFFFF);
|
||||
_itemModifiedAppearancesByItem[appearanceMod->ItemID | (appearanceMod->AppearanceModID << 24)] = appearanceMod;
|
||||
auto defaultAppearance = _itemDefaultAppearancesByItem.find(appearanceMod->ItemID);
|
||||
if (defaultAppearance == _itemDefaultAppearancesByItem.end() || defaultAppearance->second->Index > appearanceMod->Index)
|
||||
_itemDefaultAppearancesByItem[appearanceMod->ItemID] = appearanceMod;
|
||||
}
|
||||
|
||||
for (ItemSetSpellEntry const* itemSetSpell : sItemSetSpellStore)
|
||||
@@ -1404,17 +1401,20 @@ ItemModifiedAppearanceEntry const* DB2Manager::GetItemModifiedAppearance(uint32
|
||||
return itr->second;
|
||||
|
||||
// Fall back to unmodified appearance
|
||||
itr = _itemDefaultAppearancesByItem.find(itemId);
|
||||
if (itr != _itemDefaultAppearancesByItem.end())
|
||||
return itr->second;
|
||||
if (appearanceModId)
|
||||
{
|
||||
itr = _itemModifiedAppearancesByItem.find(itemId);
|
||||
if (itr != _itemModifiedAppearancesByItem.end())
|
||||
return itr->second;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ItemModifiedAppearanceEntry const* DB2Manager::GetDefaultItemModifiedAppearance(uint32 itemId) const
|
||||
{
|
||||
auto itr = _itemDefaultAppearancesByItem.find(itemId);
|
||||
if (itr != _itemDefaultAppearancesByItem.end())
|
||||
auto itr = _itemModifiedAppearancesByItem.find(itemId);
|
||||
if (itr != _itemModifiedAppearancesByItem.end())
|
||||
return itr->second;
|
||||
|
||||
return nullptr;
|
||||
|
||||
@@ -382,7 +382,6 @@ private:
|
||||
ItemClassByOldEnumContainer _itemClassByOldEnum;
|
||||
std::unordered_set<uint32> _itemsWithCurrencyCost;
|
||||
ItemModifiedAppearanceByItemContainer _itemModifiedAppearancesByItem;
|
||||
ItemModifiedAppearanceByItemContainer _itemDefaultAppearancesByItem;
|
||||
ItemToBonusTreeContainer _itemToBonusTree;
|
||||
ItemSetSpellContainer _itemSetSpells;
|
||||
ItemSpecOverridesContainer _itemSpecOverrides;
|
||||
|
||||
@@ -2469,9 +2469,6 @@ void BonusData::Initialize(ItemTemplate const* proto)
|
||||
}
|
||||
|
||||
AppearanceModID = 0;
|
||||
if (ItemModifiedAppearanceEntry const* defaultAppearance = sDB2Manager.GetDefaultItemModifiedAppearance(proto->GetId()))
|
||||
AppearanceModID = defaultAppearance->AppearanceModID;
|
||||
|
||||
RepairCostMultiplier = 1.0f;
|
||||
ScalingStatDistribution = proto->GetScalingStatDistribution();
|
||||
ItemLevelOverride = 0;
|
||||
|
||||
@@ -556,7 +556,6 @@ uint32 const PlayerClassByArmorSubclass[MAX_ITEM_SUBCLASS_ARMOR] =
|
||||
(1 << (CLASS_PALADIN - 1)) | (1 << (CLASS_DEATH_KNIGHT - 1)) | (1 << (CLASS_SHAMAN - 1)) | (1 << (CLASS_DRUID - 1)), //ITEM_SUBCLASS_ARMOR_RELIC
|
||||
};
|
||||
|
||||
|
||||
void CollectionMgr::AddItemAppearance(Item* item)
|
||||
{
|
||||
if (!item->IsSoulBound())
|
||||
|
||||
Reference in New Issue
Block a user