Mercurial > mm7
changeset 1346:1434b36f4bdb
Player::_43EEF3 renamed to NothingOrJustBlastersEquipped
author | Grumpy7 |
---|---|
date | Fri, 12 Jul 2013 23:07:14 +0200 |
parents | 27a699abee51 |
children | 84db43e7db93 |
files | Player.cpp Player.h |
diffstat | 2 files changed, 26 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/Player.cpp Tue Jul 02 14:08:40 2013 +0600 +++ b/Player.cpp Fri Jul 12 23:07:14 2013 +0200 @@ -235,22 +235,22 @@ //----- (0043EEF3) -------------------------------------------------------- -bool Player::_43EEF3() +bool Player::NothingOrJustBlastersEquipped() { signed int item_idx; // esi@1 signed int item_id; // esi@1 - for (int i=0; i<16;++i) - { - item_idx=pEquipment.pIndices[i]; - if (item_idx) - { - item_id=pOwnItems[item_idx-1].uItemID; - if (item_id!=64 && item_id!= 65 ) //blaster& blaster rifle - return false; - } - } - return true; - } + for (int i = 0; i < 16; ++i) + { + item_idx = pEquipment.pIndices[i]; + if (item_idx) + { + item_id = pOwnItems[item_idx - 1].uItemID; + if ( item_id != 64 && item_id != 65 ) //blaster& blaster rifle + return false; + } + } + return true; +} @@ -424,14 +424,21 @@ { return 1; } + else if (GetMajorConditionIdx() == Condition_Zombie) + { + if ((v2 == 78 || v2 == 81 || v2 == 82)) + { + return 1; + } + else + { + return 0; + } + } else if (GetMajorConditionIdx() == Condition_Good) { return 0; } - else if (GetMajorConditionIdx() == Condition_Zombie && (v2 == 78 || v2 == 81 || v2 == 82)) - { - return 0; - } else { return 1; @@ -984,7 +991,7 @@ if ( uItemID != 604 ) // // if (uItemID == 532) // item073 Эльфийская Кольчуга артефакт, эльф return 1; - v5 = _43EEF3() == 0; + v5 = NothingOrJustBlastersEquipped() == 0; goto LABEL_23; } v2 = GetRace() == 3; //
--- a/Player.h Tue Jul 02 14:08:40 2013 +0600 +++ b/Player.h Fri Jul 12 23:07:14 2013 +0200 @@ -587,7 +587,7 @@ int GetPriceSell(int uRealValue, float price_multiplier); int GetTempleHealCostModifier(float a2); int GetConditionDayOfWeek(unsigned int uCondition); - bool _43EEF3(); + bool NothingOrJustBlastersEquipped(); void SalesProcess(unsigned int inventory_idnx, int item_index, int _2devent_idx);//0x4BE2DD bool Recover(signed int a2); bool CanCastSpell(unsigned int uRequiredMana);