comparison Player.cpp @ 1828:35c1e4ff6ba7

party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
author Grumpy7
date Fri, 11 Oct 2013 07:04:19 +0200
parents 0c75c3e7e436
children e4e27261d84e
comparison
equal deleted inserted replaced
1827:0c75c3e7e436 1828:35c1e4ff6ba7
2128 { 2128 {
2129 *enchTypePtr -= enchBonusSum; 2129 *enchTypePtr -= enchBonusSum;
2130 } 2130 }
2131 if ( enchBonusSum ) 2131 if ( enchBonusSum )
2132 { 2132 {
2133 party_finds_gold(enchBonusSum, 2); 2133 pParty->PartyFindsGold(enchBonusSum, 2);
2134 sprintf(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[302], this->pName, enchBonusSum); //%stole %d gold 2134 sprintf(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[302], this->pName, enchBonusSum); //%stole %d gold
2135 } 2135 }
2136 else 2136 else
2137 { 2137 {
2138 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[377], this->pName); //%s failed to steal anything 2138 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[377], this->pName); //%s failed to steal anything
4874 case 6: 4874 case 6:
4875 playerAffected->uLuck += thisa; 4875 playerAffected->uLuck += thisa;
4876 sprintf(pTmpBuf.data(), "+%u %s %s", thisa, v74, pGlobalTXT_LocalizationStrings[121]);//"Permanent" 4876 sprintf(pTmpBuf.data(), "+%u %s %s", thisa, v74, pGlobalTXT_LocalizationStrings[121]);//"Permanent"
4877 break; 4877 break;
4878 case 7: 4878 case 7:
4879 party_finds_gold(1000 * thisa, 0); 4879 pParty->PartyFindsGold(1000 * thisa, 0);
4880 sprintf(pTmpBuf.data(), "+%u %s", 1000 * thisa, pGlobalTXT_LocalizationStrings[97]);//"Gold" 4880 sprintf(pTmpBuf.data(), "+%u %s", 1000 * thisa, pGlobalTXT_LocalizationStrings[97]);//"Gold"
4881 break; 4881 break;
4882 case 8: 4882 case 8:
4883 Party::GiveFood(5 * thisa); 4883 Party::GiveFood(5 * thisa);
4884 sprintf(pTmpBuf.data(), "+%u %s",5 * thisa , pGlobalTXT_LocalizationStrings[653]);//"Food" 4884 sprintf(pTmpBuf.data(), "+%u %s",5 * thisa , pGlobalTXT_LocalizationStrings[653]);//"Food"
6076 { 6076 {
6077 case VAR_RandomGold: 6077 case VAR_RandomGold:
6078 if ( val == 0 ) 6078 if ( val == 0 )
6079 val = 1; 6079 val = 1;
6080 v6 = rand(); 6080 v6 = rand();
6081 party_finds_gold(v6 % val + 1, 1); 6081 pParty->PartyFindsGold(v6 % val + 1, 1);
6082 GameUI_DrawFoodAndGold(); 6082 GameUI_DrawFoodAndGold();
6083 return; 6083 return;
6084 case VAR_RandomFood: 6084 case VAR_RandomFood:
6085 if ( val == 0 ) 6085 if ( val == 0 )
6086 val = 1; 6086 val = 1;
6163 item.uMaxCharges = LOBYTE(item.uNumCharges); 6163 item.uMaxCharges = LOBYTE(item.uNumCharges);
6164 } 6164 }
6165 pParty->SetHoldingItem(&item); 6165 pParty->SetHoldingItem(&item);
6166 return; 6166 return;
6167 case VAR_FixedGold: 6167 case VAR_FixedGold:
6168 party_finds_gold(val, 1); 6168 pParty->PartyFindsGold(val, 1);
6169 return; 6169 return;
6170 case VAR_BaseMight: 6170 case VAR_BaseMight:
6171 this->uMight = min(this->uMight + val, 255); 6171 this->uMight = min(this->uMight + val, 255);
6172 PlayAwardSound_Anim97_Face(SPEECH_92); 6172 PlayAwardSound_Anim97_Face(SPEECH_92);
6173 return; 6173 return;