Mercurial > mm7
comparison Player.cpp @ 605:a8dec6a3fc9e
SubtractVariables little fix
author | Ritor1 |
---|---|
date | Thu, 07 Mar 2013 14:45:43 +0600 |
parents | 628694cd5744 |
children | cfca6297e4ae |
comparison
equal
deleted
inserted
replaced
604:8724a4b3ca45 | 605:a8dec6a3fc9e |
---|---|
9343 int v23; // [sp-8h] [bp-14h]@45 | 9343 int v23; // [sp-8h] [bp-14h]@45 |
9344 signed int v24; // [sp-4h] [bp-10h]@4 | 9344 signed int v24; // [sp-4h] [bp-10h]@4 |
9345 int v25; // [sp-4h] [bp-10h]@45 | 9345 int v25; // [sp-4h] [bp-10h]@45 |
9346 | 9346 |
9347 v3 = 0; | 9347 v3 = 0; |
9348 v4 = 0; | 9348 v4 = uActiveCharacter - 1; |
9349 if ( this == pPlayers[2] ) | |
9350 { | |
9351 v4 = 1; | |
9352 goto LABEL_8; | |
9353 } | |
9354 if ( this == pPlayers[3] ) | |
9355 { | |
9356 v24 = 2; | |
9357 } | |
9358 else | |
9359 { | |
9360 if ( this != pPlayers[4] ) | |
9361 goto LABEL_8; | |
9362 v24 = 3; | |
9363 } | |
9364 v4 = v24; | |
9365 LABEL_8: | |
9366 result = false; | 9349 result = false; |
9367 if ( (signed int)VarNum > 222 ) | 9350 if ( (signed int)VarNum > 222 ) |
9368 { | 9351 { |
9369 if ( (signed int)VarNum <= 307 ) | 9352 if ( (signed int)VarNum <= 307 ) |
9370 { | 9353 { |
9400 sub_44A56A(); | 9383 sub_44A56A(); |
9401 viewparams->bRedrawGameUI = 1; | 9384 viewparams->bRedrawGameUI = 1; |
9402 } | 9385 } |
9403 break; | 9386 break; |
9404 case 241: | 9387 case 241: |
9405 v18 = pValue; | |
9406 v19 = 0; | |
9407 if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) | 9388 if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) |
9408 { | 9389 { |
9409 v20 = (char *)&pNPCStats->pNewNPCData[0].uFlags; | 9390 v20 = (char *)&pNPCStats->pNewNPCData[0].uFlags; |
9410 do | 9391 for ( v19 = 0; v19 < (signed int)pNPCStats->uNumNewNPCs; ++v19 ) |
9411 { | 9392 { |
9412 if ( *((void **)v20 + 4) == (void *)v18 ) | 9393 if ( *((void **)v20 + 4) == (void *)pValue ) |
9413 { | 9394 { |
9414 v21 = *(int *)v20; | 9395 v21 = *(int *)v20; |
9415 if ( (char)*(int *)v20 < 0 ) | 9396 if ( (char)*(int *)v20 < 0 ) |
9416 { | 9397 { |
9417 LOBYTE(v21) = v21 & 0x7F; | 9398 LOBYTE(v21) = v21 & 0x7F; |
9418 *(int *)v20 = v21; | 9399 *(int *)v20 = v21; |
9419 } | 9400 } |
9420 } | 9401 } |
9421 ++v19; | |
9422 v20 += 76; | 9402 v20 += 76; |
9423 } | 9403 } |
9424 while ( v19 < (signed int)pNPCStats->uNumNewNPCs ); | |
9425 } | 9404 } |
9426 if ( pParty->pHirelings[0].uProfession == v18 ) | 9405 if ( pParty->pHirelings[0].uProfession == pValue ) |
9427 memset(pParty->pHirelings, 0, 0x4Cu); | 9406 memset(pParty->pHirelings, 0, 0x4Cu); |
9428 if ( pParty->pHirelings[1].uProfession == v18 ) | 9407 if ( pParty->pHirelings[1].uProfession == pValue ) |
9429 memset(&pParty->pHirelings[1], 0, 0x4Cu); | 9408 memset(&pParty->pHirelings[1], 0, 0x4Cu); |
9430 pParty->field_709 = 0; | 9409 pParty->field_709 = 0; |
9431 sub_44A56A(); | 9410 sub_44A56A(); |
9432 break; | 9411 break; |
9433 case 243: | 9412 case 243: |
9453 result = VarNum - 306; | 9432 result = VarNum - 306; |
9454 if ( (unsigned int)pValue <= pParty->uNumGoldInBank ) | 9433 if ( (unsigned int)pValue <= pParty->uNumGoldInBank ) |
9455 { | 9434 { |
9456 result = (bool)pValue; | 9435 result = (bool)pValue; |
9457 pParty->uNumGoldInBank -= (unsigned int)pValue; | 9436 pParty->uNumGoldInBank -= (unsigned int)pValue; |
9458 } | 9437 } |
9459 else | 9438 else |
9460 LABEL_88: | 9439 LABEL_88: |
9461 dword_5B65C4 = 1; | 9440 dword_5B65C4 = 1; |
9462 break; | 9441 break; |
9463 } | 9442 } |
9464 return result; | 9443 return result; |
9465 } | 9444 } |
9466 v11 = this->field_1A50; | 9445 v11 = this->field_1A50; |
9467 LABEL_112: | |
9468 v22 = (signed __int16)pValue; | 9446 v22 = (signed __int16)pValue; |
9469 } | 9447 } |
9470 _449B7E_toggle_bit((unsigned char *)v11, v22, 0); | 9448 _449B7E_toggle_bit((unsigned char *)v11, v22, 0); |
9471 return result; | 9449 return result; |
9472 } | 9450 } |
9512 v6 = rand() % (signed int)pValue + 1; | 9490 v6 = rand() % (signed int)pValue + 1; |
9513 if ( v6 > pParty->uNumGold ) | 9491 if ( v6 > pParty->uNumGold ) |
9514 v6 = pParty->uNumGold; | 9492 v6 = pParty->uNumGold; |
9515 Party::TakeGold(v6); | 9493 Party::TakeGold(v6); |
9516 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[503], v6); | 9494 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[503], v6); |
9517 ShowStatusBarString(pTmpBuf, 2u); | 9495 ShowStatusBarString(pTmpBuf, 2); |
9518 GameUI_DrawFoodAndGold(); | 9496 GameUI_DrawFoodAndGold(); |
9519 return result; | 9497 return result; |
9520 case VAR_RandomFood: | 9498 case VAR_RandomFood: |
9521 v7 = rand() % (signed int)pValue + 1; | 9499 v7 = rand() % (signed int)pValue + 1; |
9522 if ( v7 > pParty->uNumFoodRations ) | 9500 if ( v7 > pParty->uNumFoodRations ) |
9523 v7 = pParty->uNumFoodRations; | 9501 v7 = pParty->uNumFoodRations; |
9524 Party::TakeFood(v7); | 9502 Party::TakeFood(v7); |
9525 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[504], v7); | 9503 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[504], v7); |
9526 ShowStatusBarString(pTmpBuf, 2u); | 9504 ShowStatusBarString(pTmpBuf, 2u); |
9527 GameUI_DrawFoodAndGold(); | 9505 GameUI_DrawFoodAndGold(); |
9528 goto LABEL_17; | 9506 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); |
9529 default: | 9507 v8 = 8 * v4 + 400; |
9508 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9509 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9530 return result; | 9510 return result; |
9531 case VAR_CurrentHP: | 9511 case VAR_CurrentHP: |
9532 ReceiveDamage((signed int)pValue, 4); | 9512 ReceiveDamage((signed int)pValue, 4); |
9533 goto LABEL_17; | 9513 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); |
9514 v8 = 8 * v4 + 400; | |
9515 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9516 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9517 return result; | |
9534 case VAR_CurrentSP: | 9518 case VAR_CurrentSP: |
9535 v9 = (char *)&this->sMana; | 9519 v9 = (char *)&this->sMana; |
9536 v10 = this->sMana - (signed int)pValue < 0; | 9520 v10 = this->sMana - (signed int)pValue < 0; |
9537 *(int *)v9 -= (int)pValue; | 9521 *(int *)v9 -= (int)pValue; |
9538 if ( v10 ) | 9522 if ( v10 ) |
9539 *(int *)v9 = 0; | 9523 *(int *)v9 = 0; |
9540 goto LABEL_17; | 9524 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); |
9525 v8 = 8 * v4 + 400; | |
9526 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9527 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9528 return result; | |
9541 case VAR_ACModifier: | 9529 case VAR_ACModifier: |
9542 this->sACModifier -= (unsigned __int8)pValue; | 9530 this->sACModifier -= (unsigned __int8)pValue; |
9543 goto LABEL_17; | 9531 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); |
9532 v8 = 8 * v4 + 400; | |
9533 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9534 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9535 return result; | |
9544 case VAR_BaseLevel: | 9536 case VAR_BaseLevel: |
9545 this->uLevel -= (unsigned __int8)pValue; | 9537 this->uLevel -= (unsigned __int8)pValue; |
9546 goto LABEL_17; | 9538 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); |
9539 v8 = 8 * v4 + 400; | |
9540 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9541 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9542 return result; | |
9547 case VAR_LevelModifier: | 9543 case VAR_LevelModifier: |
9548 this->sLevelModifier -= (unsigned __int8)pValue; | 9544 this->sLevelModifier -= (unsigned __int8)pValue; |
9549 goto LABEL_17; | 9545 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); |
9546 v8 = 8 * v4 + 400; | |
9547 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9548 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9549 return result; | |
9550 case VAR_Age: | 9550 case VAR_Age: |
9551 this->sAgeModifier -= (signed __int16)pValue; | 9551 this->sAgeModifier -= (signed __int16)pValue; |
9552 return result; | 9552 return result; |
9553 case VAR_Award: | 9553 case VAR_Award: |
9554 v11 = this->_guilds_member_bits; | 9554 _449B7E_toggle_bit((unsigned char *)this->_guilds_member_bits, (signed __int16)pValue, 0); |
9555 goto LABEL_112; | 9555 return result; |
9556 case VAR_Experience: | 9556 case VAR_Experience: |
9557 v12 = (char *)&this->uExperience; | 9557 v12 = (char *)&this->uExperience; |
9558 v13 = (signed int)pValue; | 9558 v13 = (signed int)pValue; |
9559 v14 = *(int *)v12 < (unsigned int)pValue; | 9559 v14 = *(int *)v12 < (unsigned int)pValue; |
9560 *(int *)v12 -= (int)pValue; | 9560 *(int *)v12 -= (int)pValue; |
9561 *((int *)v12 + 1) -= v14 + HIDWORD(v13); | 9561 *((int *)v12 + 1) -= v14 + HIDWORD(v13); |
9562 goto LABEL_17; | 9562 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); |
9563 v8 = 8 * v4 + 400; | |
9564 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9565 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9566 return result; | |
9563 case VAR_QBits_QuestsDone: | 9567 case VAR_QBits_QuestsDone: |
9564 _449B7E_toggle_bit(pParty->_quest_bits, (__int16)pValue, 0); | 9568 _449B7E_toggle_bit(pParty->_quest_bits, (__int16)pValue, 0); |
9565 pPlayers[v4 + 1]->PlaySound(SPEECH_96, 0); | 9569 pPlayers[v4 + 1]->PlaySound(SPEECH_96, 0); |
9566 return true; | 9570 return true; |
9567 case VAR_PlayerItemInHands: | 9571 case VAR_PlayerItemInHands: |
9573 Party::TakeGold((unsigned int)pValue); | 9577 Party::TakeGold((unsigned int)pValue); |
9574 return result; | 9578 return result; |
9575 case VAR_MightBonus: | 9579 case VAR_MightBonus: |
9576 case VAR_ActualMight: | 9580 case VAR_ActualMight: |
9577 this->uMightBonus -= (unsigned __int16)pValue; | 9581 this->uMightBonus -= (unsigned __int16)pValue; |
9578 goto LABEL_72; | 9582 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9583 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9584 v8 = 8 * v4 + 400; | |
9585 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9586 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9587 return result; | |
9579 case VAR_IntellectBonus: | 9588 case VAR_IntellectBonus: |
9580 case VAR_ActualIntellect: | 9589 case VAR_ActualIntellect: |
9581 this->uIntelligenceBonus -= (unsigned __int16)pValue; | 9590 this->uIntelligenceBonus -= (unsigned __int16)pValue; |
9582 goto LABEL_72; | 9591 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9592 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9593 v8 = 8 * v4 + 400; | |
9594 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9595 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9596 return result; | |
9583 case VAR_PersonalityBonus: | 9597 case VAR_PersonalityBonus: |
9584 case VAR_ActualPersonality: | 9598 case VAR_ActualPersonality: |
9585 this->uWillpowerBonus -= (unsigned __int16)pValue; | 9599 this->uWillpowerBonus -= (unsigned __int16)pValue; |
9586 goto LABEL_72; | 9600 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9601 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9602 v8 = 8 * v4 + 400; | |
9603 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9604 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9605 return result; | |
9587 case VAR_EnduranceBonus: | 9606 case VAR_EnduranceBonus: |
9588 case VAR_ActualEndurance: | 9607 case VAR_ActualEndurance: |
9589 this->uEnduranceBonus -= (unsigned __int16)pValue; | 9608 this->uEnduranceBonus -= (unsigned __int16)pValue; |
9590 goto LABEL_72; | 9609 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9610 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9611 v8 = 8 * v4 + 400; | |
9612 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9613 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9614 return result; | |
9591 case VAR_SpeedBonus: | 9615 case VAR_SpeedBonus: |
9592 case VAR_ActualSpeed: | 9616 case VAR_ActualSpeed: |
9593 this->uSpeedBonus -= (unsigned __int16)pValue; | 9617 this->uSpeedBonus -= (unsigned __int16)pValue; |
9594 goto LABEL_72; | 9618 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9619 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9620 v8 = 8 * v4 + 400; | |
9621 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9622 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9623 return result; | |
9595 case VAR_AccuracyBonus: | 9624 case VAR_AccuracyBonus: |
9596 case VAR_ActualAccuracy: | 9625 case VAR_ActualAccuracy: |
9597 this->uAccuracyBonus -= (unsigned __int16)pValue; | 9626 this->uAccuracyBonus -= (unsigned __int16)pValue; |
9598 goto LABEL_72; | 9627 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9628 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9629 v8 = 8 * v4 + 400; | |
9630 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9631 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9632 return result; | |
9599 case VAR_LuckBonus: | 9633 case VAR_LuckBonus: |
9600 case VAR_ActualLuck: | 9634 case VAR_ActualLuck: |
9601 this->uLuckBonus -= (unsigned __int16)pValue; | 9635 this->uLuckBonus -= (unsigned __int16)pValue; |
9602 goto LABEL_72; | 9636 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9637 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9638 v8 = 8 * v4 + 400; | |
9639 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9640 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9641 return result; | |
9603 case VAR_BaseMight: | 9642 case VAR_BaseMight: |
9604 this->uMight -= (unsigned __int16)pValue; | 9643 this->uMight -= (unsigned __int16)pValue; |
9605 goto LABEL_45; | 9644 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9645 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9646 v8 = 8 * v4 + 400; | |
9647 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9648 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9649 return result; | |
9606 case VAR_BaseIntellect: | 9650 case VAR_BaseIntellect: |
9607 this->uIntelligence -= (unsigned __int16)pValue; | 9651 this->uIntelligence -= (unsigned __int16)pValue; |
9608 goto LABEL_45; | 9652 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9653 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9654 v8 = 8 * v4 + 400; | |
9655 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9656 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9657 return result; | |
9609 case VAR_BasePersonality: | 9658 case VAR_BasePersonality: |
9610 this->uWillpower -= (unsigned __int16)pValue; | 9659 this->uWillpower -= (unsigned __int16)pValue; |
9611 goto LABEL_45; | 9660 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9661 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9662 v8 = 8 * v4 + 400; | |
9663 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9664 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9665 return result; | |
9612 case VAR_BaseEndurance: | 9666 case VAR_BaseEndurance: |
9613 this->uEndurance -= (unsigned __int16)pValue; | 9667 this->uEndurance -= (unsigned __int16)pValue; |
9614 goto LABEL_45; | 9668 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9669 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9670 v8 = 8 * v4 + 400; | |
9671 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9672 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9673 return result; | |
9615 case VAR_BaseSpeed: | 9674 case VAR_BaseSpeed: |
9616 this->uSpeed -= (unsigned __int16)pValue; | 9675 this->uSpeed -= (unsigned __int16)pValue; |
9617 goto LABEL_45; | 9676 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9677 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9678 v8 = 8 * v4 + 400; | |
9679 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9680 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9681 return result; | |
9618 case VAR_BaseAccuracy: | 9682 case VAR_BaseAccuracy: |
9619 this->uAccuracy -= (unsigned __int16)pValue; | 9683 this->uAccuracy -= (unsigned __int16)pValue; |
9620 goto LABEL_45; | 9684 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9685 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9686 v8 = 8 * v4 + 400; | |
9687 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9688 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9689 return result; | |
9621 case VAR_BaseLuck: | 9690 case VAR_BaseLuck: |
9622 this->uLuck -= (unsigned __int16)pValue; | 9691 this->uLuck -= (unsigned __int16)pValue; |
9623 goto LABEL_45; | 9692 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9693 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9694 v8 = 8 * v4 + 400; | |
9695 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9696 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9697 return result; | |
9624 case VAR_FireResistance: | 9698 case VAR_FireResistance: |
9625 this->sResFireBase -= (signed __int16)pValue; | 9699 this->sResFireBase -= (signed __int16)pValue; |
9626 goto LABEL_45; | 9700 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9701 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9702 v8 = 8 * v4 + 400; | |
9703 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9704 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9705 return result; | |
9627 case VAR_AirResistance: | 9706 case VAR_AirResistance: |
9628 this->sResAirBase -= (signed __int16)pValue; | 9707 this->sResAirBase -= (signed __int16)pValue; |
9629 goto LABEL_45; | 9708 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9709 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9710 v8 = 8 * v4 + 400; | |
9711 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9712 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9713 return result; | |
9630 case VAR_WaterResistance: | 9714 case VAR_WaterResistance: |
9631 this->sResWaterBase -= (signed __int16)pValue; | 9715 this->sResWaterBase -= (signed __int16)pValue; |
9632 goto LABEL_45; | 9716 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9717 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9718 v8 = 8 * v4 + 400; | |
9719 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9720 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9721 return result; | |
9633 case VAR_EarthResistance: | 9722 case VAR_EarthResistance: |
9634 this->sResEarthBase -= (signed __int16)pValue; | 9723 this->sResEarthBase -= (signed __int16)pValue; |
9635 goto LABEL_45; | 9724 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9725 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9726 v8 = 8 * v4 + 400; | |
9727 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9728 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9729 return result; | |
9636 case VAR_SpiritResistance: | 9730 case VAR_SpiritResistance: |
9637 this->sResSpiritBase -= (signed __int16)pValue; | 9731 this->sResSpiritBase -= (signed __int16)pValue; |
9638 goto LABEL_45; | 9732 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9733 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9734 v8 = 8 * v4 + 400; | |
9735 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9736 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9737 return result; | |
9639 case VAR_MindResistance: | 9738 case VAR_MindResistance: |
9640 this->sResMindBase -= (signed __int16)pValue; | 9739 this->sResMindBase -= (signed __int16)pValue; |
9641 goto LABEL_45; | 9740 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9741 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9742 v8 = 8 * v4 + 400; | |
9743 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9744 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9745 return result; | |
9642 case VAR_BodyResistance: | 9746 case VAR_BodyResistance: |
9643 this->sResBodyBase -= (signed __int16)pValue; | 9747 this->sResBodyBase -= (signed __int16)pValue; |
9644 goto LABEL_45; | 9748 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9749 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9750 v8 = 8 * v4 + 400; | |
9751 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9752 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9753 return result; | |
9645 case VAR_LightResistance: | 9754 case VAR_LightResistance: |
9646 this->sResLightBase -= (signed __int16)pValue; | 9755 this->sResLightBase -= (signed __int16)pValue; |
9647 goto LABEL_45; | 9756 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9757 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9758 v8 = 8 * v4 + 400; | |
9759 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9760 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9761 return result; | |
9648 case VAR_DarkResistance: | 9762 case VAR_DarkResistance: |
9649 this->sResDarkBase -= (signed __int16)pValue; | 9763 this->sResDarkBase -= (signed __int16)pValue; |
9650 goto LABEL_45; | 9764 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9765 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9766 v8 = 8 * v4 + 400; | |
9767 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9768 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9769 return result; | |
9651 case VAR_MagicResistance: | 9770 case VAR_MagicResistance: |
9652 this->sResMagicBase -= (signed __int16)pValue; | 9771 this->sResMagicBase -= (signed __int16)pValue; |
9653 goto LABEL_45; | 9772 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9773 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9774 v8 = 8 * v4 + 400; | |
9775 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9776 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9777 return result; | |
9654 case VAR_FireResistanceBonus: | 9778 case VAR_FireResistanceBonus: |
9655 this->sResFireBonus -= (signed __int16)pValue; | 9779 this->sResFireBonus -= (signed __int16)pValue; |
9656 goto LABEL_45; | 9780 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9781 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9782 v8 = 8 * v4 + 400; | |
9783 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9784 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9785 return result; | |
9657 case VAR_AirResistanceBonus: | 9786 case VAR_AirResistanceBonus: |
9658 this->sResAirBonus -= (signed __int16)pValue; | 9787 this->sResAirBonus -= (signed __int16)pValue; |
9659 LABEL_45: | 9788 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)92, 0); |
9660 v25 = 0; | 9789 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); |
9661 v23 = 92; | 9790 v8 = 8 * v4 + 400; |
9662 goto LABEL_73; | 9791 LOBYTE(v8) = (8 * v4 - 112) | 4; |
9792 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9793 return result; | |
9663 case VAR_WaterResistanceBonus: | 9794 case VAR_WaterResistanceBonus: |
9664 this->sResWaterBonus -= (signed __int16)pValue; | 9795 this->sResWaterBonus -= (signed __int16)pValue; |
9665 goto LABEL_72; | 9796 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9797 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9798 v8 = 8 * v4 + 400; | |
9799 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9800 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9801 return result; | |
9666 case VAR_EarthResistanceBonus: | 9802 case VAR_EarthResistanceBonus: |
9667 this->sResEarthBonus -= (signed __int16)pValue; | 9803 this->sResEarthBonus -= (signed __int16)pValue; |
9668 goto LABEL_72; | 9804 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9805 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9806 v8 = 8 * v4 + 400; | |
9807 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9808 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9809 return result; | |
9669 case VAR_SpiritResistanceBonus: | 9810 case VAR_SpiritResistanceBonus: |
9670 this->sResSpiritBonus -= (signed __int16)pValue; | 9811 this->sResSpiritBonus -= (signed __int16)pValue; |
9671 goto LABEL_72; | 9812 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9813 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9814 v8 = 8 * v4 + 400; | |
9815 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9816 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9817 return result; | |
9672 case VAR_MindResistanceBonus: | 9818 case VAR_MindResistanceBonus: |
9673 this->sResMindBonus -= (signed __int16)pValue; | 9819 this->sResMindBonus -= (signed __int16)pValue; |
9674 goto LABEL_72; | 9820 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9821 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9822 v8 = 8 * v4 + 400; | |
9823 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9824 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9825 return result; | |
9675 case VAR_BodyResistanceBonus: | 9826 case VAR_BodyResistanceBonus: |
9676 this->sResBodyBonus -= (signed __int16)pValue; | 9827 this->sResBodyBonus -= (signed __int16)pValue; |
9677 goto LABEL_72; | 9828 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9829 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9830 v8 = 8 * v4 + 400; | |
9831 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9832 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9833 return result; | |
9678 case VAR_LightResistanceBonus: | 9834 case VAR_LightResistanceBonus: |
9679 this->sResLightBonus -= (signed __int16)pValue; | 9835 this->sResLightBonus -= (signed __int16)pValue; |
9680 goto LABEL_72; | 9836 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9837 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9838 v8 = 8 * v4 + 400; | |
9839 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9840 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9841 return result; | |
9681 case VAR_DarkResistanceBonus: | 9842 case VAR_DarkResistanceBonus: |
9682 this->sResDarkBonus -= (signed __int16)pValue; | 9843 this->sResDarkBonus -= (signed __int16)pValue; |
9683 goto LABEL_72; | 9844 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)SPEECH_91, 0); |
9845 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | |
9846 v8 = 8 * v4 + 400; | |
9847 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9848 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9849 return result; | |
9684 case VAR_MagicResistanceBonus: | 9850 case VAR_MagicResistanceBonus: |
9685 this->sResMagicBonus -= (signed __int16)pValue; | 9851 this->sResMagicBonus -= (signed __int16)pValue; |
9686 LABEL_72: | |
9687 v25 = 0; | 9852 v25 = 0; |
9688 v23 = SPEECH_91; | 9853 v23 = SPEECH_91; |
9689 LABEL_73: | |
9690 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)v23, v25); | 9854 pPlayers[v4 + 1]->PlaySound((PlayerSpeech)v23, v25); |
9691 goto LABEL_17; | 9855 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); |
9856 v8 = 8 * v4 + 400; | |
9857 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9858 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9859 return result; | |
9692 case VAR_FixedFood: | 9860 case VAR_FixedFood: |
9693 Party::TakeFood((unsigned int)pValue); | 9861 Party::TakeFood((unsigned int)pValue); |
9694 goto LABEL_17; | 9862 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); |
9863 v8 = 8 * v4 + 400; | |
9864 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9865 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9866 return result; | |
9695 case VAR_StaffSkill: | 9867 case VAR_StaffSkill: |
9696 case VAR_SwordSkill: | 9868 case VAR_SwordSkill: |
9697 case VAR_DaggerSkill: | 9869 case VAR_DaggerSkill: |
9698 case VAR_AxeSkill: | 9870 case VAR_AxeSkill: |
9699 case VAR_SpearSkill: | 9871 case VAR_SpearSkill: |
9721 case VAR_PerceptionSkill: | 9893 case VAR_PerceptionSkill: |
9722 case VAR_DiplomacySkill: | 9894 case VAR_DiplomacySkill: |
9723 case VAR_DisarmTrapSkill: | 9895 case VAR_DisarmTrapSkill: |
9724 case VAR_LearningSkill: | 9896 case VAR_LearningSkill: |
9725 *((short *)&this->pConditions[16] + VarNum) -= (unsigned __int8)pValue; | 9897 *((short *)&this->pConditions[16] + VarNum) -= (unsigned __int8)pValue; |
9726 goto LABEL_17; | 9898 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); |
9899 v8 = 8 * v4 + 400; | |
9900 LOBYTE(v8) = (8 * v4 - 112) | 4; | |
9901 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | |
9902 return result; | |
9727 case VAR_Cursed: | 9903 case VAR_Cursed: |
9728 case VAR_Weak: | 9904 case VAR_Weak: |
9729 case VAR_Asleep: | 9905 case VAR_Asleep: |
9730 case VAR_Afraid: | 9906 case VAR_Afraid: |
9731 case VAR_Drunk: | 9907 case VAR_Drunk: |
9741 case VAR_Dead: | 9917 case VAR_Dead: |
9742 case VAR_Stoned: | 9918 case VAR_Stoned: |
9743 case VAR_Eradicated: | 9919 case VAR_Eradicated: |
9744 *((int *)this + 2 * VarNum - 210) = 0; | 9920 *((int *)this + 2 * VarNum - 210) = 0; |
9745 *((int *)this + 2 * result - 209) = 0; | 9921 *((int *)this + 2 * result - 209) = 0; |
9746 LABEL_17: | |
9747 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); | 9922 pGame->pStru6Instance->SetPlayerBuffAnim(0x98u, v4); |
9748 v8 = 8 * v4 + 400; | 9923 v8 = 8 * v4 + 400; |
9749 LOBYTE(v8) = (8 * v4 - 112) | 4; | 9924 LOBYTE(v8) = (8 * v4 - 112) | 4; |
9750 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); | 9925 pAudioPlayer->PlaySound(SOUND_20001, v8, 0, -1, 0, 0, 0, 0); |
9751 return result; | 9926 return result; |
9752 } | 9927 default: |
9753 //do | 9928 return result; |
9754 for (v3 = 1; v3 < 126; v3++) | 9929 } |
9755 { | 9930 for (v3 = 1; v3 < 126; v3++) |
9756 if ( *(&this->pInventoryItems[pInventoryIndices[v3] - 1].uItemID) == pValue )//pValue = ItemID, pInventoryItems[3] = 222 | 9931 { |
9932 if ( *(&this->pInventoryItems[pInventoryIndices[v3] - 1].uItemID) == pValue ) | |
9757 { | 9933 { |
9758 RemoveItemAtInventoryIndex(v3);// &this->pInventoryIndices[puSlot], pInventoryIndices[1] = 4 | 9934 RemoveItemAtInventoryIndex(v3); |
9759 return true; | 9935 return true; |
9760 } | 9936 } |
9761 //++v3; | 9937 } |
9762 //v15 ++; | |
9763 } | |
9764 //while ( (signed int)v3 < 126 ); | |
9765 if ( pParty->pPickedItem.uItemID == pValue ) | 9938 if ( pParty->pPickedItem.uItemID == pValue ) |
9766 { | 9939 { |
9767 pMouse->RemoveHoldingItem(); | 9940 pMouse->RemoveHoldingItem(); |
9768 return true; | 9941 return true; |
9769 } | 9942 } |
9770 return false; | 9943 return false; |
9771 } | 9944 } |
9772 } | 9945 } |
9773 } | 9946 } |
9774 // 5B65C4: using guessed type int dword_5B65C4; | 9947 // 5B65C4: using guessed type int dword_5B65C4; |
9775 // 5B65CC: using guessed type int dword_5B65CC; | 9948 // 5B65CC: using guessed type int dword_5B65CC; |