diff Player.cpp @ 2072:2737276390ff

Merge
author Nomad
date Tue, 03 Dec 2013 21:30:40 +0200
parents a290d9fbdc95
children a94c5bee0225
line wrap: on
line diff
--- a/Player.cpp	Tue Dec 03 21:29:12 2013 +0200
+++ b/Player.cpp	Tue Dec 03 21:30:40 2013 +0200
@@ -3675,17 +3675,21 @@
     {
       if ( this->HasItemEquipped((ITEM_EQUIP_TYPE)i) )
       {
-        PLAYER_SKILL_TYPE currentItemSkillType = (PLAYER_SKILL_TYPE)GetNthEquippedIndexItem(i)->GetPlayerSkillType();
-        int currentItemSkillLevel = this->GetActualSkillLevel(currentItemSkillType);
-        if ( currentItemSkillType == PLAYER_SKILL_BOW )
+        ItemGen* currItemPtr = GetNthEquippedIndexItem(i);
+        if ( currItemPtr->GetItemEquipType() == EQUIP_TWO_HANDED || currItemPtr->GetItemEquipType() == EQUIP_SINGLE_HANDED )
         {
-          int multiplier = GetMultiplierForSkillLevel(currentItemSkillLevel, 1, 1, 1, 1);
-          return multiplier * (currentItemSkillLevel & 0x3F);
-        }
-        else if ( currentItemSkillType == PLAYER_SKILL_BLASTER )
-        {      
-          int multiplier = GetMultiplierForSkillLevel(currentItemSkillLevel, 1, 2, 3, 5);
-          return multiplier * (currentItemSkillLevel & 0x3F);
+          PLAYER_SKILL_TYPE currentItemSkillType = (PLAYER_SKILL_TYPE)GetNthEquippedIndexItem(i)->GetPlayerSkillType();
+          int currentItemSkillLevel = this->GetActualSkillLevel(currentItemSkillType);
+          if ( currentItemSkillType == PLAYER_SKILL_BOW )
+          {
+            int multiplier = GetMultiplierForSkillLevel(currentItemSkillLevel, 1, 1, 1, 1);
+            return multiplier * (currentItemSkillLevel & 0x3F);
+          }
+          else if ( currentItemSkillType == PLAYER_SKILL_BLASTER )
+          {
+            int multiplier = GetMultiplierForSkillLevel(currentItemSkillLevel, 1, 2, 3, 5);
+            return multiplier * (currentItemSkillLevel & 0x3F);
+          }
         }
       }
     }