diff Actor.cpp @ 1817:0f1543750bf8

Changing itemlist accesses to helper functions + getting rid of some pPlayers array accesses
author Grumpy7
date Mon, 07 Oct 2013 06:37:49 +0200
parents 2051dfa0a00c
children 0c75c3e7e436
line wrap: on
line diff
--- a/Actor.cpp	Sun Oct 06 09:21:09 2013 +0200
+++ b/Actor.cpp	Mon Oct 07 06:37:49 2013 +0200
@@ -5001,7 +5001,7 @@
     v59 = 1;
     if ( player->HasItemEquipped(EQUIP_MAIN_HAND) )
     {
-      auto main_hand_skill = player->pInventoryItemList[main_hand_idx - 1].GetPlayerSkillType();
+      auto main_hand_skill = player->GetMainHandItem()->GetPlayerSkillType();
       //v55 = pItemsTable->pItems[player->pInventoryItems[main_hand_idx - 1].uItemID].uSkillType;
       //v28 = SkillToMastery(player->pActiveSkills[v55]);
       auto main_hand_mastery = SkillToMastery(player->pActiveSkills[main_hand_skill]);