Mercurial > mm7
diff Player.cpp @ 1819:1641ab7f21ec
Player::SubtractVariable moving everything to one switch
author | Grumpy7 |
---|---|
date | Tue, 08 Oct 2013 05:46:44 +0200 |
parents | 253194aba8b8 |
children | af7f08135ffb |
line wrap: on
line diff
--- a/Player.cpp Mon Oct 07 07:56:07 2013 +0200 +++ b/Player.cpp Tue Oct 08 05:46:44 2013 +0200 @@ -6619,418 +6619,192 @@ v4 = 2; else if ( this == pPlayers[4] ) v4 = 3; - - v3 = 0; - result = false; - if ( VarNum >= VAR_AutoNotes ) - { - if ( VarNum <= VAR_NumDeaths ) - { - if ( VarNum == VAR_NumDeaths ) - { + + + + + if ( VarNum >= VAR_MapPersistentVariable_0 && VarNum <= VAR_MapPersistentVariable_99 ) + { + + byte_5E4C15[VarNum] -= (char)pValue; + return false; + } + + switch (VarNum) + { + case VAR_NumDeaths: pParty->uNumDeaths -= (unsigned int)pValue; return pValue; - } - if ( VarNum == VAR_AutoNotes ) + case VAR_AutoNotes: + v11 = (char *)pParty->_autonote_bits; + v22 = (short)pValue - 1; + _449B7E_toggle_bit((unsigned char *)v11, v22, 0); + return result; + + case VAR_NPCs2: + v18 = 0; + GetNewNPCData(sDialogue_SpeakingActorNPC_ID, &v18); + result = (bool) pValue; + if ( v18 == pValue ) { - v11 = (char *)pParty->_autonote_bits; - v22 = (short)pValue - 1; + npcIdToDismissAfterDialogue = pValue; } else { - if ( VarNum != VAR_PlayerBits ) + npcIdToDismissAfterDialogue = 0; + pParty->hirelingScrollPosition = 0; + LOBYTE(pNPCStats->pNewNPCData[(int)pValue].uFlags) &= 0x7Fu; + pParty->CountHirelings(); + viewparams->bRedrawGameUI = true; + } + return result; + break; + case VAR_HiredNPCHasSpeciality: + if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) + { + v20 = (char *)&pNPCStats->pNewNPCData[0].uFlags; + for ( v19 = 0; v19 < (signed int)pNPCStats->uNumNewNPCs; ++v19 ) { - switch ( VarNum ) + if ( *((void **)v20 + 4) == (void *)pValue ) { - case VAR_NPCs2: - v18 = 0; - GetNewNPCData(sDialogue_SpeakingActorNPC_ID, &v18); - result = (bool) pValue; - if ( v18 == pValue ) - { - npcIdToDismissAfterDialogue = pValue; - } - else - { - npcIdToDismissAfterDialogue = 0; - pParty->hirelingScrollPosition = 0; - LOBYTE(pNPCStats->pNewNPCData[(int)pValue].uFlags) &= 0x7Fu; - pParty->CountHirelings(); - viewparams->bRedrawGameUI = true; - } - break; - case VAR_HiredNPCHasSpeciality: - if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) - { - v20 = (char *)&pNPCStats->pNewNPCData[0].uFlags; - for ( v19 = 0; v19 < (signed int)pNPCStats->uNumNewNPCs; ++v19 ) - { - if ( *((void **)v20 + 4) == (void *)pValue ) - { - v21 = *(int *)v20; - if ( (char)*(int *)v20 < 0 ) - { - LOBYTE(v21) = v21 & 0x7F; - *(int *)v20 = v21; - } - } - v20 += 76; - } - } - if ( pParty->pHirelings[0].uProfession == pValue ) - memset(pParty->pHirelings, 0, 0x4Cu); - if ( pParty->pHirelings[1].uProfession == pValue ) - memset(&pParty->pHirelings[1], 0, 0x4Cu); - pParty->hirelingScrollPosition = 0; - pParty->CountHirelings(); - break; - case VAR_NumSkillPoints: - v17 = (char *)&this->uSkillPoints; - result = *v17 != NULL; - if ( (unsigned int)pValue <= *(int *)v17 ) - { - *(int *)v17 -= (int)pValue; - result = (v17 != NULL); - } - else - *(int *)v17 = 0; - break; - case VAR_ReputationInCurrentLocation: - v16 = (char *)&pOutdoor->ddm; - if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor ) - v16 = (char *)&pIndoor->dlv; - *((int *)v16 + 2) -= (int)pValue; - if ( *((int *)v16 + 2) < -10000 ) - *((int *)v16 + 2) = -10000; - break; - case VAR_GoldInBank: - result = VarNum - 306; - if ( (unsigned int)pValue <= pParty->uNumGoldInBank ) - { - result = (bool)pValue; - pParty->uNumGoldInBank -= (unsigned int)pValue; - } - else -LABEL_88: - dword_5B65C4 = 1; - break; + v21 = *(int *)v20; + if ( (char)*(int *)v20 < 0 ) + { + LOBYTE(v21) = v21 & 0x7F; + *(int *)v20 = v21; + } } - return result; + v20 += 76; } - v11 = this->field_1A50; - v22 = (signed __int16)pValue; } - _449B7E_toggle_bit((unsigned char *)v11, v22, 0); + if ( pParty->pHirelings[0].uProfession == pValue ) + memset(pParty->pHirelings, 0, 0x4Cu); + if ( pParty->pHirelings[1].uProfession == pValue ) + memset(&pParty->pHirelings[1], 0, 0x4Cu); + pParty->hirelingScrollPosition = 0; + pParty->CountHirelings(); return result; - } - switch ( VarNum ) - { - case VAR_NumBounties: - result = (bool)pValue; - pParty->uNumBountiesCollected -= (unsigned int)pValue; - break; - case VAR_PrisonTerms: - result = (bool)pValue; - pParty->uNumPrisonTerms -= (int)pValue; - break; - case VAR_ArenaWinsPage: - result = (bool)pValue; - pParty->uNumArenaPageWins -= (char)pValue; - break; - case VAR_ArenaWinsSquire: - result = (bool)pValue; - pParty->uNumArenaSquireWins -= (char)pValue; - break; - case VAR_ArenaWinsKnight: - result = (bool)pValue; - pParty->uNumArenaKnightWins -= (char)pValue; - break; - case VAR_ArenaWinsLord: - result = (bool)pValue; - pParty->uNumArenaLordWins -= (char)pValue; - break; - } - Error("Function not returning any value! (%u)", VarNum); - } - else - { - if ( VarNum >= VAR_MapPersistentVariable_0 ) - { - byte_5E4C15[VarNum] -= (char)pValue; - } - else - { - switch ( VarNum ) + break; + + case VAR_NumSkillPoints: + v17 = (char *)&this->uSkillPoints; + result = *v17 != NULL; + if ( (unsigned int)pValue <= *(int *)v17 ) + { + *(int *)v17 -= (int)pValue; + result = (v17 != NULL); + } + else + *(int *)v17 = 0; + return result; + break; + case VAR_ReputationInCurrentLocation: + v16 = (char *)&pOutdoor->ddm; + if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor ) + v16 = (char *)&pIndoor->dlv; + *((int *)v16 + 2) -= (int)pValue; + if ( *((int *)v16 + 2) < -10000 ) + *((int *)v16 + 2) = -10000; + return result; + break; + case VAR_GoldInBank: + result = VarNum - 306; + if ( (unsigned int)pValue <= pParty->uNumGoldInBank ) + { + result = (bool)pValue; + pParty->uNumGoldInBank -= (unsigned int)pValue; + } + else { - case VAR_RandomGold: - v6 = rand() % (signed int)pValue + 1; - if ( v6 > pParty->uNumGold ) - v6 = pParty->uNumGold; - Party::TakeGold(v6); - sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[503], v6); - ShowStatusBarString(pTmpBuf.data(), 2); - GameUI_DrawFoodAndGold(); - return result; - case VAR_RandomFood: - v7 = rand() % (signed int)pValue + 1; - if ( v7 > pParty->uNumFoodRations ) - v7 = pParty->uNumFoodRations; - Party::TakeFood(v7); - sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[504], v7); - ShowStatusBarString(pTmpBuf.data(), 2u); - GameUI_DrawFoodAndGold(); - PlayAwardSound_Anim98(v4); - return result; - case VAR_CurrentHP: - ReceiveDamage((signed int)pValue, DMGT_PHISYCAL); - PlayAwardSound_Anim98(v4); - return result; - case VAR_CurrentSP: - this->sMana = max(this->sMana - pValue, 0); - PlayAwardSound_Anim98(v4); - return result; - case VAR_ACModifier: - this->sACModifier -= (unsigned __int8)pValue; - PlayAwardSound_Anim98(v4); - return result; - case VAR_BaseLevel: - this->uLevel -= (unsigned __int8)pValue; - PlayAwardSound_Anim98(v4); - return result; - case VAR_LevelModifier: - this->sLevelModifier -= (unsigned __int8)pValue; - PlayAwardSound_Anim98(v4); - return result; - case VAR_Age: - this->sAgeModifier -= (signed __int16)pValue; - return result; - case VAR_Award: - _449B7E_toggle_bit(this->_achieved_awards_bits, (signed __int16)pValue, 0); - return result; - case VAR_Experience: - this->uExperience -= pValue; - PlayAwardSound_Anim98(v4); - return result; - case VAR_QBits_QuestsDone: - _449B7E_toggle_bit(pParty->_quest_bits, (__int16)pValue, 0); - this->PlaySound(SPEECH_96, 0); - return true; - case VAR_PlayerItemInHands: - v15 = this->pInventoryMatrix; - break; - case VAR_FixedGold: - if ( (unsigned int)pValue > pParty->uNumGold ) - goto LABEL_88; - Party::TakeGold((unsigned int)pValue); - return result; - case VAR_MightBonus: - case VAR_ActualMight: - this->uMightBonus -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_IntellectBonus: - case VAR_ActualIntellect: - this->uIntelligenceBonus -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_PersonalityBonus: - case VAR_ActualPersonality: - this->uWillpowerBonus -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_EnduranceBonus: - case VAR_ActualEndurance: - this->uEnduranceBonus -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_SpeedBonus: - case VAR_ActualSpeed: - this->uSpeedBonus -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_AccuracyBonus: - case VAR_ActualAccuracy: - this->uAccuracyBonus -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_LuckBonus: - case VAR_ActualLuck: - this->uLuckBonus -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_BaseMight: - this->uMight -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_BaseIntellect: - this->uIntelligence -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_BasePersonality: - this->uWillpower -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_BaseEndurance: - this->uEndurance -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_BaseSpeed: - this->uSpeed -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_BaseAccuracy: - this->uAccuracy -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_BaseLuck: - this->uLuck -= (unsigned __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_FireResistance: - this->sResFireBase -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_AirResistance: - this->sResAirBase -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_WaterResistance: - this->sResWaterBase -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_EarthResistance: - this->sResEarthBase -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_SpiritResistance: - this->sResSpiritBase -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_MindResistance: - this->sResMindBase -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_BodyResistance: - this->sResBodyBase -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_LightResistance: - this->sResLightBase -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_DarkResistance: - this->sResDarkBase -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_MagicResistance: - this->sResMagicBase -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_FireResistanceBonus: - this->sResFireBonus -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_AirResistanceBonus: - this->sResAirBonus -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); - return result; - case VAR_WaterResistanceBonus: - this->sResWaterBonus -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_EarthResistanceBonus: - this->sResEarthBonus -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_SpiritResistanceBonus: - this->sResSpiritBonus -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_MindResistanceBonus: - this->sResMindBonus -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_BodyResistanceBonus: - this->sResBodyBonus -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_LightResistanceBonus: - this->sResLightBonus -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_DarkResistanceBonus: - this->sResDarkBonus -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_MagicResistanceBonus: - this->sResMagicBonus -= (signed __int16)pValue; - this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); - return result; - case VAR_FixedFood: - Party::TakeFood((unsigned int)pValue); - PlayAwardSound_Anim98(v4); - return result; - case VAR_StaffSkill: - case VAR_SwordSkill: - case VAR_DaggerSkill: - case VAR_AxeSkill: - case VAR_SpearSkill: - case VAR_BowSkill: - case VAR_MaceSkill: - case VAR_BlasterSkill: - case VAR_ShieldSkill: - case VAR_LeatherSkill: - case VAR_SkillChain: - case VAR_PlateSkill: - case VAR_FireSkill: - case VAR_AirSkill: - case VAR_WaterSkill: - case VAR_EarthSkill: - case VAR_SpiritSkill: - case VAR_MindSkill: - case VAR_BodySkill: - case VAR_LightSkill: - case VAR_DarkSkill: - case VAR_IdentifyItemSkill: - case VAR_MerchantSkill: - case VAR_RepairSkill: - case VAR_BodybuildingSkill: - case VAR_MeditationSkill: - case VAR_PerceptionSkill: - case VAR_DiplomacySkill: - case VAR_DisarmTrapSkill: - case VAR_LearningSkill: - *((short *)&this->pConditions[16] + VarNum) -= (unsigned __int8)pValue; - PlayAwardSound_Anim98(v4); - return result; - case VAR_Cursed: - case VAR_Weak: - case VAR_Asleep: - case VAR_Afraid: - case VAR_Drunk: - case VAR_Insane: - case VAR_PoisonedGreen: - case VAR_DiseasedGreen: - case VAR_PoisonedYellow: - case VAR_DiseasedYellow: - case VAR_PoisonedRed: - case VAR_DiseasedRed: - case VAR_Paralyzed: - case VAR_Unconsious: - case VAR_Dead: - case VAR_Stoned: - case VAR_Eradicated: - //*((int *)this + 2 * VarNum - 210) = 0; - //*((int *)this + 2 * result - 209) = 0; - this->pConditions[VarNum] = 0; - PlayAwardSound_Anim98(v4); - return result; - default: - return result; + dword_5B65C4 = 1; } - for (v3 = 1; v3 < 126; v3++) + return result; + break; + + + case VAR_NumBounties: + result = (bool)pValue; + pParty->uNumBountiesCollected -= (unsigned int)pValue; + break; + case VAR_PrisonTerms: + result = (bool)pValue; + pParty->uNumPrisonTerms -= (int)pValue; + break; + case VAR_ArenaWinsPage: + result = (bool)pValue; + pParty->uNumArenaPageWins -= (char)pValue; + break; + case VAR_ArenaWinsSquire: + result = (bool)pValue; + pParty->uNumArenaSquireWins -= (char)pValue; + break; + case VAR_ArenaWinsKnight: + result = (bool)pValue; + pParty->uNumArenaKnightWins -= (char)pValue; + break; + case VAR_ArenaWinsLord: + result = (bool)pValue; + pParty->uNumArenaLordWins -= (char)pValue; + break; + + + case VAR_RandomGold: + v6 = rand() % (signed int)pValue + 1; + if ( v6 > pParty->uNumGold ) + v6 = pParty->uNumGold; + Party::TakeGold(v6); + sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[503], v6); + ShowStatusBarString(pTmpBuf.data(), 2); + GameUI_DrawFoodAndGold(); + return result; + case VAR_RandomFood: + v7 = rand() % (signed int)pValue + 1; + if ( v7 > pParty->uNumFoodRations ) + v7 = pParty->uNumFoodRations; + Party::TakeFood(v7); + sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[504], v7); + ShowStatusBarString(pTmpBuf.data(), 2u); + GameUI_DrawFoodAndGold(); + PlayAwardSound_Anim98(v4); + return result; + case VAR_CurrentHP: + ReceiveDamage((signed int)pValue, DMGT_PHISYCAL); + PlayAwardSound_Anim98(v4); + return result; + case VAR_CurrentSP: + this->sMana = max(this->sMana - pValue, 0); + PlayAwardSound_Anim98(v4); + return result; + case VAR_ACModifier: + this->sACModifier -= (unsigned __int8)pValue; + PlayAwardSound_Anim98(v4); + return result; + case VAR_BaseLevel: + this->uLevel -= (unsigned __int8)pValue; + PlayAwardSound_Anim98(v4); + return result; + case VAR_LevelModifier: + this->sLevelModifier -= (unsigned __int8)pValue; + PlayAwardSound_Anim98(v4); + return result; + case VAR_Age: + this->sAgeModifier -= (signed __int16)pValue; + return result; + case VAR_Award: + _449B7E_toggle_bit(this->_achieved_awards_bits, (signed __int16)pValue, 0); + return result; + case VAR_Experience: + this->uExperience -= pValue; + PlayAwardSound_Anim98(v4); + return result; + case VAR_QBits_QuestsDone: + _449B7E_toggle_bit(pParty->_quest_bits, (__int16)pValue, 0); + this->PlaySound(SPEECH_96, 0); + return true; + case VAR_PlayerItemInHands: + for (v3 = 0; v3 < 126; v3++) { - if ( *(&this->pInventoryItemList[pInventoryMatrix[v3] - 1].uItemID) == pValue ) + if ( this->pInventoryItemList[pInventoryMatrix[v3]].uItemID == pValue ) { RemoveItemAtInventoryIndex(v3); return true; @@ -7042,10 +6816,216 @@ return true; } return false; - } - } - - //assert(false); + break; + case VAR_FixedGold: + if ( (unsigned int)pValue > pParty->uNumGold ) + { + dword_5B65C4 = 1; + return result; + } + Party::TakeGold((unsigned int)pValue); + return result; + case VAR_MightBonus: + case VAR_ActualMight: + this->uMightBonus -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_IntellectBonus: + case VAR_ActualIntellect: + this->uIntelligenceBonus -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_PersonalityBonus: + case VAR_ActualPersonality: + this->uWillpowerBonus -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_EnduranceBonus: + case VAR_ActualEndurance: + this->uEnduranceBonus -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_SpeedBonus: + case VAR_ActualSpeed: + this->uSpeedBonus -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_AccuracyBonus: + case VAR_ActualAccuracy: + this->uAccuracyBonus -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_LuckBonus: + case VAR_ActualLuck: + this->uLuckBonus -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_BaseMight: + this->uMight -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_BaseIntellect: + this->uIntelligence -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_BasePersonality: + this->uWillpower -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_BaseEndurance: + this->uEndurance -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_BaseSpeed: + this->uSpeed -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_BaseAccuracy: + this->uAccuracy -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_BaseLuck: + this->uLuck -= (unsigned __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_FireResistance: + this->sResFireBase -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_AirResistance: + this->sResAirBase -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_WaterResistance: + this->sResWaterBase -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_EarthResistance: + this->sResEarthBase -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_SpiritResistance: + this->sResSpiritBase -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_MindResistance: + this->sResMindBase -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_BodyResistance: + this->sResBodyBase -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_LightResistance: + this->sResLightBase -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_DarkResistance: + this->sResDarkBase -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_MagicResistance: + this->sResMagicBase -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_FireResistanceBonus: + this->sResFireBonus -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_AirResistanceBonus: + this->sResAirBonus -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_92); + return result; + case VAR_WaterResistanceBonus: + this->sResWaterBonus -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_EarthResistanceBonus: + this->sResEarthBonus -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_SpiritResistanceBonus: + this->sResSpiritBonus -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_MindResistanceBonus: + this->sResMindBonus -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_BodyResistanceBonus: + this->sResBodyBonus -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_LightResistanceBonus: + this->sResLightBonus -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_DarkResistanceBonus: + this->sResDarkBonus -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_MagicResistanceBonus: + this->sResMagicBonus -= (signed __int16)pValue; + this->PlayAwardSound_Anim98_Face(v4, SPEECH_91); + return result; + case VAR_FixedFood: + Party::TakeFood((unsigned int)pValue); + PlayAwardSound_Anim98(v4); + return result; + case VAR_StaffSkill: + case VAR_SwordSkill: + case VAR_DaggerSkill: + case VAR_AxeSkill: + case VAR_SpearSkill: + case VAR_BowSkill: + case VAR_MaceSkill: + case VAR_BlasterSkill: + case VAR_ShieldSkill: + case VAR_LeatherSkill: + case VAR_SkillChain: + case VAR_PlateSkill: + case VAR_FireSkill: + case VAR_AirSkill: + case VAR_WaterSkill: + case VAR_EarthSkill: + case VAR_SpiritSkill: + case VAR_MindSkill: + case VAR_BodySkill: + case VAR_LightSkill: + case VAR_DarkSkill: + case VAR_IdentifyItemSkill: + case VAR_MerchantSkill: + case VAR_RepairSkill: + case VAR_BodybuildingSkill: + case VAR_MeditationSkill: + case VAR_PerceptionSkill: + case VAR_DiplomacySkill: + case VAR_DisarmTrapSkill: + case VAR_LearningSkill: + *((short *)&this->pConditions[16] + VarNum) -= (unsigned __int8)pValue; + PlayAwardSound_Anim98(v4); + return result; + case VAR_Cursed: + case VAR_Weak: + case VAR_Asleep: + case VAR_Afraid: + case VAR_Drunk: + case VAR_Insane: + case VAR_PoisonedGreen: + case VAR_DiseasedGreen: + case VAR_PoisonedYellow: + case VAR_DiseasedYellow: + case VAR_PoisonedRed: + case VAR_DiseasedRed: + case VAR_Paralyzed: + case VAR_Unconsious: + case VAR_Dead: + case VAR_Stoned: + case VAR_Eradicated: + this->pConditions[VarNum] = 0; + PlayAwardSound_Anim98(v4); + return result; + } return false; } // 5B65C4: using guessed type int dword_5B65C4;