From 0254ad6bf9b4512ed9ac756d4a4facbdf79e5852 Mon Sep 17 00:00:00 2001 From: Laise Date: Thu, 14 Jul 2011 12:12:29 +0300 Subject: [PATCH] [11738] make armor bonuses from certain items be unaffected by base armor mods --- src/game/Player.cpp | 15 ++++++++++++++- src/shared/revision_nr.h | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 8b9692230..8da16c6f1 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -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); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 8481f851c..c53ccf1c9 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11737" + #define REVISION_NR "11738" #endif // __REVISION_NR_H__