Core/Items: Implemented corruption and corruption resistance stats

Port From (https://github.com/TrinityCore/TrinityCore/commit/6533de31005fc9680d9f2b61a4d8ea4958fc8edc)
This commit is contained in:
hondacrx
2020-06-18 15:39:41 -04:00
parent d686aef6d3
commit 15192d6a38
12 changed files with 84 additions and 34 deletions
+9
View File
@@ -1810,6 +1810,15 @@ namespace Game.Entities
public int GetItemStatValue(uint index, Player owner)
{
Cypher.Assert(index < ItemConst.MaxStats);
switch ((ItemModType)GetItemStatType(index))
{
case ItemModType.Corruption:
case ItemModType.CorruptionResistance:
return _bonusData.ItemStatAllocation[index];
default:
break;
}
uint itemLevel = GetItemLevel(owner);
uint randomPropPoints = ItemEnchantmentManager.GetRandomPropertyPoints(itemLevel, GetQuality(), GetTemplate().GetInventoryType(), GetTemplate().GetSubClass());
if (randomPropPoints != 0)