Fix issue with two hander for NPCs dual wielding

Cleaned up some other 2hander logic as well
This commit is contained in:
Michael Cook (mackal)
2015-07-05 03:11:25 -04:00
parent d083262555
commit dcd1a07553
5 changed files with 16 additions and 27 deletions
+5 -1
View File
@@ -141,6 +141,7 @@ void Client::CalcItemBonuses(StatBonuses* newbon) {
ClearItemFactionBonuses();
SetShieldEquiped(false);
SetTwoHandBluntEquiped(false);
SetTwoHanderEquipped(false);
unsigned int i;
//should not include 21 (SLOT_AMMO)
@@ -154,8 +155,11 @@ void Client::CalcItemBonuses(StatBonuses* newbon) {
const Item_Struct *item = inst->GetItem();
if (i == MainSecondary && (item && item->ItemType == ItemTypeShield))
SetShieldEquiped(true);
else if (i == MainPrimary && (item && item->ItemType == ItemType2HBlunt))
else if (i == MainPrimary && (item && item->ItemType == ItemType2HBlunt)) {
SetTwoHandBluntEquiped(true);
SetTwoHanderEquipped(true);
} else if (i == MainPrimary && (item && (item->ItemType == ItemType2HSlash || item->ItemType == ItemType2HPiercing)))
SetTwoHanderEquipped(true);
}
//Power Source Slot