Mercurial > mm7
comparison mm7_6.cpp @ 1384:b51332ab228f
changed a few member variables in Player to slightly less confusing names
author | Grumpy7 |
---|---|
date | Tue, 16 Jul 2013 20:51:29 +0200 |
parents | 22cb507446a4 |
children | cc9a3a24d61d |
comparison
equal
deleted
inserted
replaced
1383:0a4254e80036 | 1384:b51332ab228f |
---|---|
2071 if (pParty->Invisible()) | 2071 if (pParty->Invisible()) |
2072 pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Reset(); | 2072 pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Reset(); |
2073 | 2073 |
2074 //v31 = player->pEquipment.uBow; | 2074 //v31 = player->pEquipment.uBow; |
2075 int bow_idx = player->pEquipment.uBow; | 2075 int bow_idx = player->pEquipment.uBow; |
2076 if (bow_idx && player->pInventoryItems[bow_idx - 1].Broken()) | 2076 if (bow_idx && player->pInventoryItemList[bow_idx - 1].Broken()) |
2077 bow_idx = 0; | 2077 bow_idx = 0; |
2078 | 2078 |
2079 //v32 = 0; | 2079 //v32 = 0; |
2080 int wand_item_id = 0; | 2080 int wand_item_id = 0; |
2081 //v33 = 0; | 2081 //v33 = 0; |
2083 int laser_weapon_item_id = 0; | 2083 int laser_weapon_item_id = 0; |
2084 | 2084 |
2085 int main_hand_idx = player->pEquipment.uMainHand; | 2085 int main_hand_idx = player->pEquipment.uMainHand; |
2086 if (main_hand_idx) | 2086 if (main_hand_idx) |
2087 { | 2087 { |
2088 auto item = &player->pInventoryItems[main_hand_idx - 1]; | 2088 auto item = &player->pInventoryItemList[main_hand_idx - 1]; |
2089 //v5 = (char *)v1 + 36 * v4; | 2089 //v5 = (char *)v1 + 36 * v4; |
2090 if (!item->Broken()) | 2090 if (!item->Broken()) |
2091 { | 2091 { |
2092 //v28b = &v1->pInventoryItems[v4].uItemID; | 2092 //v28b = &v1->pInventoryItems[v4].uItemID; |
2093 //v6 = v1->pInventoryItems[v4].uItemID;//*((int *)v5 + 124); | 2093 //v6 = v1->pInventoryItems[v4].uItemID;//*((int *)v5 + 124); |
2142 else if (wand_item_id) | 2142 else if (wand_item_id) |
2143 { | 2143 { |
2144 shooting_wand = true; | 2144 shooting_wand = true; |
2145 | 2145 |
2146 int main_hand_idx = player->pEquipment.uMainHand; | 2146 int main_hand_idx = player->pEquipment.uMainHand; |
2147 _42777D_CastSpell_UseWand_ShootArrow(wand_spell_ids[player->pInventoryItems[main_hand_idx - 1].uItemID - ITEM_WAND_FIRE], uActiveCharacter - 1, 8, 0, uActiveCharacter + 8); | 2147 _42777D_CastSpell_UseWand_ShootArrow(wand_spell_ids[player->pInventoryItemList[main_hand_idx - 1].uItemID - ITEM_WAND_FIRE], uActiveCharacter - 1, 8, 0, uActiveCharacter + 8); |
2148 | 2148 |
2149 if (!--player->pInventoryItems[main_hand_idx - 1].uNumCharges) | 2149 if (!--player->pInventoryItemList[main_hand_idx - 1].uNumCharges) |
2150 player->pEquipment.uMainHand = 0; | 2150 player->pEquipment.uMainHand = 0; |
2151 } | 2151 } |
2152 else if (target_type == OBJECT_Actor && actor_distance <= 407.2) | 2152 else if (target_type == OBJECT_Actor && actor_distance <= 407.2) |
2153 { | 2153 { |
2154 melee_attack = true; | 2154 melee_attack = true; |
2199 v34 = 7; | 2199 v34 = 7; |
2200 else | 2200 else |
2201 { | 2201 { |
2202 int main_hand_idx = player->pEquipment.uMainHand; | 2202 int main_hand_idx = player->pEquipment.uMainHand; |
2203 if (player->HasItemEquipped(EQUIP_MAIN_HAND)) | 2203 if (player->HasItemEquipped(EQUIP_MAIN_HAND)) |
2204 v34 = pItemsTable->pItems[*(int *)&player->pInventoryItems[main_hand_idx - 1]].uSkillType; | 2204 v34 = pItemsTable->pItems[*(int *)&player->pInventoryItemList[main_hand_idx - 1]].uSkillType; |
2205 pTurnEngine->_40471C(); | 2205 pTurnEngine->_40471C(); |
2206 } | 2206 } |
2207 | 2207 |
2208 switch (v34) | 2208 switch (v34) |
2209 { | 2209 { |