mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +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);
|
armor += uint32(proto->ArmorDamageModifier);
|
||||||
|
|
||||||
if (armor)
|
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)
|
if (proto->Block)
|
||||||
HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(proto->Block), apply);
|
HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(proto->Block), apply);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11737"
|
#define REVISION_NR "11738"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue