mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11738] make armor bonuses from certain items be unaffected by base armor mods
This commit is contained in:
parent
07cc0aa13e
commit
0254ad6bf9
2 changed files with 15 additions and 2 deletions
|
|
@ -7257,7 +7257,20 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl
|
|||
armor += uint32(proto->ArmorDamageModifier);
|
||||
|
||||
if (armor)
|
||||
HandleStatModifier(UNIT_MOD_ARMOR, BASE_VALUE, float(armor), apply);
|
||||
{
|
||||
switch(proto->InventoryType)
|
||||
{
|
||||
case INVTYPE_TRINKET:
|
||||
case INVTYPE_NECK:
|
||||
case INVTYPE_CLOAK:
|
||||
case INVTYPE_FINGER:
|
||||
HandleStatModifier(UNIT_MOD_ARMOR, TOTAL_VALUE, float(armor), apply);
|
||||
break;
|
||||
default:
|
||||
HandleStatModifier(UNIT_MOD_ARMOR, BASE_VALUE, float(armor), apply);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (proto->Block)
|
||||
HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(proto->Block), apply);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue