comparison Player.cpp @ 1778:4e881879e259

Player::SetVariable SetPlayerBuffAnim and pAudioPlayer->PlaySound(SOUND_20001,...) condition vars removal
author Grumpy7
date Wed, 02 Oct 2013 07:42:43 +0200
parents 47606ed5ffba
children 50e91a820f6f
comparison
equal deleted inserted replaced
1777:47606ed5ffba 1778:4e881879e259
5538 break; 5538 break;
5539 } 5539 }
5540 return; 5540 return;
5541 } 5541 }
5542 pParty->uNumDeaths = var_value; 5542 pParty->uNumDeaths = var_value;
5543 if ( v30 != 1 )
5544 {
5545 if ( v31 != 1 )
5546 return;
5547 v25 = 8 * currPlayerId + 400;
5548 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5549 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5550 return;
5551 }
5552 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5553 if ( v31 != 1 )
5554 return;
5555 v25 = 8 * currPlayerId + 400;
5556 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5557 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5558 return; 5543 return;
5559 } 5544 }
5560 if ( var_type == VAR_AutoNotes ) 5545 if ( var_type == VAR_AutoNotes )
5561 { 5546 {
5562 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & pParty->_autonote_bits[((signed __int16)var_value - 1) >> 3]) 5547 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & pParty->_autonote_bits[((signed __int16)var_value - 1) >> 3])
5563 //&& (&dword_723718_autonote_related)[8 * a3] ) 5548 //&& (&dword_723718_autonote_related)[8 * a3] )
5564 && pAutonoteTxt[var_value-1].pText ) 5549 && pAutonoteTxt[var_value-1].pText )
5565 { 5550 {
5566 v30 = 1; 5551 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5567 this->PlaySound(SPEECH_96, 0); 5552 this->PlaySound(SPEECH_96, 0);
5568 v21 = pAutonoteTxt[var_value-1].eType;// dword_72371C[2 * a3]; 5553 v21 = pAutonoteTxt[var_value-1].eType;// dword_72371C[2 * a3];
5569 bFlashAutonotesBook = 1; 5554 bFlashAutonotesBook = 1;
5570 _506568_autonote_type = v21; 5555 _506568_autonote_type = v21;
5571 } 5556 }
5572 _449B7E_toggle_bit(pParty->_autonote_bits, var_value, 1u); 5557 _449B7E_toggle_bit(pParty->_autonote_bits, var_value, 1u);
5573 v31 = 1;
5574 if ( v30 != 1 )
5575 {
5576 if ( v31 != 1 )
5577 return;
5578 v25 = 8 * currPlayerId + 400;
5579 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5580 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5581 return;
5582 }
5583 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5584 if ( v31 != 1 )
5585 return;
5586 v25 = 8 * currPlayerId + 400; 5558 v25 = 8 * currPlayerId + 400;
5587 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5559 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5588 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5560 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5589 return; 5561 return;
5590 } 5562 }
5605 v7 = rand() % var_value + 1; 5577 v7 = rand() % var_value + 1;
5606 Party::SetFood(v7); 5578 Party::SetFood(v7);
5607 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[501], v7);// You have %lu food 5579 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[501], v7);// You have %lu food
5608 ShowStatusBarString(pTmpBuf.data(), 2u); 5580 ShowStatusBarString(pTmpBuf.data(), 2u);
5609 GameUI_DrawFoodAndGold(); 5581 GameUI_DrawFoodAndGold();
5610 v31 = 1;
5611 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5582 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5612 if ( v31 != 1 )
5613 return;
5614 v25 = 8 * currPlayerId + 400; 5583 v25 = 8 * currPlayerId + 400;
5615 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5584 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5616 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5585 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5617 return; 5586 return;
5618 case VAR_Sex: 5587 case VAR_Sex:
5619 this->uSex = (PLAYER_SEX)var_value; 5588 this->uSex = (PLAYER_SEX)var_value;
5620 v31 = 1;
5621 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5589 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5622 if ( v31 != 1 )
5623 return;
5624 v25 = 8 * currPlayerId + 400; 5590 v25 = 8 * currPlayerId + 400;
5625 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5591 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5626 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5592 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5627 return; 5593 return;
5628 case VAR_Class: 5594 case VAR_Class:
5629 this->classType = (PLAYER_CLASS_TYPE)var_value; 5595 this->classType = (PLAYER_CLASS_TYPE)var_value;
5630 if ( (char)var_value != 35 ) 5596 if ( (char)var_value != 35 )
5631 { 5597 {
5632 v31 = 1;
5633 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5598 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5634 if ( v31 != 1 )
5635 return;
5636 v25 = 8 * currPlayerId + 400; 5599 v25 = 8 * currPlayerId + 400;
5637 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5600 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5638 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5601 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5639 return; 5602 return;
5640 } 5603 }
5641 v8 = 0; 5604 v8 = 0;
5642 v9 = this->pInventoryItemList; 5605 v9 = this->pInventoryItemList;
5643 break; 5606 break;
5644 case VAR_CurrentHP: 5607 case VAR_CurrentHP:
5645 this->sHealth = var_value; 5608 this->sHealth = var_value;
5646 v31 = 1;
5647 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5609 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5648 if ( v31 != 1 )
5649 return;
5650 v25 = 8 * currPlayerId + 400; 5610 v25 = 8 * currPlayerId + 400;
5651 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5611 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5652 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5612 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5653 return; 5613 return;
5654 case VAR_MaxHP: 5614 case VAR_MaxHP:
5655 this->sHealth = GetMaxHealth(); 5615 this->sHealth = GetMaxHealth();
5656 return; 5616 return;
5657 case VAR_CurrentSP: 5617 case VAR_CurrentSP:
5658 this->sMana = var_value; 5618 this->sMana = var_value;
5659 v31 = 1;
5660 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5619 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5661 if ( v31 != 1 )
5662 return;
5663 v25 = 8 * currPlayerId + 400; 5620 v25 = 8 * currPlayerId + 400;
5664 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5621 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5665 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5622 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5666 return; 5623 return;
5667 case VAR_MaxSP: 5624 case VAR_MaxSP:
5668 this->sMana = GetMaxMana(); 5625 this->sMana = GetMaxMana();
5669 return; 5626 return;
5670 case VAR_ACModifier: 5627 case VAR_ACModifier:
5671 this->sACModifier = (unsigned __int8)var_value; 5628 this->sACModifier = (unsigned __int8)var_value;
5672 v31 = 1;
5673 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5629 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5674 if ( v31 != 1 )
5675 return;
5676 v25 = 8 * currPlayerId + 400; 5630 v25 = 8 * currPlayerId + 400;
5677 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5631 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5678 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5632 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5679 return; 5633 return;
5680 case VAR_BaseLevel: 5634 case VAR_BaseLevel:
5681 this->uLevel = (unsigned __int8)var_value; 5635 this->uLevel = (unsigned __int8)var_value;
5682 v31 = 1;
5683 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5636 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5684 if ( v31 != 1 )
5685 return;
5686 v25 = 8 * currPlayerId + 400; 5637 v25 = 8 * currPlayerId + 400;
5687 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5638 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5688 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5639 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5689 return; 5640 return;
5690 case VAR_LevelModifier: 5641 case VAR_LevelModifier:
5691 this->sLevelModifier = (unsigned __int8)var_value; 5642 this->sLevelModifier = (unsigned __int8)var_value;
5692 v31 = 1;
5693 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5643 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5694 if ( v31 != 1 )
5695 return;
5696 v25 = 8 * currPlayerId + 400; 5644 v25 = 8 * currPlayerId + 400;
5697 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5645 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5698 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5646 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5699 return; 5647 return;
5700 case VAR_Age: 5648 case VAR_Age:
5704 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & 5652 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) &
5705 this->_achieved_awards_bits[((signed __int16)var_value - 1)/ 8]) 5653 this->_achieved_awards_bits[((signed __int16)var_value - 1)/ 8])
5706 //&& dword_723E80_award_related[2 * a3] ) 5654 //&& dword_723E80_award_related[2 * a3] )
5707 && pAwards[var_value].pText ) 5655 && pAwards[var_value].pText )
5708 { 5656 {
5709 v30 = 1; 5657 v25 = 8 * currPlayerId + 400;
5710 v31 = 1; 5658 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5659 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5660 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5711 this->PlaySound(SPEECH_96, 0); 5661 this->PlaySound(SPEECH_96, 0);
5712 } 5662 }
5713 _449B7E_toggle_bit((unsigned char *)this->_achieved_awards_bits, var_value, 1u); 5663 _449B7E_toggle_bit((unsigned char *)this->_achieved_awards_bits, var_value, 1u);
5714 if ( v30 != 1 )
5715 {
5716 if ( v31 == 1 )
5717 {
5718 v25 = 8 * currPlayerId + 400;
5719 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5720 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5721 return;
5722 }
5723 return;
5724 }
5725 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5726 if ( v31 == 1 )
5727 {
5728 v25 = 8 * currPlayerId + 400;
5729 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5730 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5731 return;
5732 }
5733 return; 5664 return;
5734 case VAR_Experience: 5665 case VAR_Experience:
5735 this->uExperience = var_value; 5666 this->uExperience = var_value;
5736 v31 = 1;
5737 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5667 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5738 if ( v31 != 1 )
5739 return;
5740 v25 = 8 * currPlayerId + 400; 5668 v25 = 8 * currPlayerId + 400;
5741 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5669 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5742 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5670 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5743 return; 5671 return;
5744 case VAR_QBits_QuestsDone: 5672 case VAR_QBits_QuestsDone:
5745 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & pParty->_quest_bits[((signed __int16)var_value - 1) >> 3]) 5673 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & pParty->_quest_bits[((signed __int16)var_value - 1) >> 3])
5746 // && (&dword_722F10)[4 * a3] ) 5674 // && (&dword_722F10)[4 * a3] )
5747 && pQuestTable[var_value-1] ) 5675 && pQuestTable[var_value-1] )
5748 { 5676 {
5749 bFlashQuestBook = 1; 5677 bFlashQuestBook = 1;
5750 v30 = 1; 5678 v25 = 8 * currPlayerId + 400;
5751 v31 = 1; 5679 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5680 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5681 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5752 this->PlaySound(SPEECH_93, 0); 5682 this->PlaySound(SPEECH_93, 0);
5753 } 5683 }
5754 _449B7E_toggle_bit((unsigned char *)pParty->_quest_bits, var_value, 1u); 5684 _449B7E_toggle_bit((unsigned char *)pParty->_quest_bits, var_value, 1u);
5755 if ( v30 != 1 )
5756 {
5757 if ( v31 == 1 )
5758 {
5759 v25 = 8 * currPlayerId + 400;
5760 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5761 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5762 return;
5763 }
5764 return;
5765 }
5766 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5767 if ( v31 == 1 )
5768 {
5769 v25 = 8 * currPlayerId + 400;
5770 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5771 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5772 }
5773 return; 5685 return;
5774 case VAR_PlayerItemInHands: 5686 case VAR_PlayerItemInHands:
5775 item.Reset(); 5687 item.Reset();
5776 item.Reset(); 5688 item.Reset();
5777 item.uItemID = var_value; 5689 item.uItemID = var_value;
5783 case VAR_FixedGold: 5695 case VAR_FixedGold:
5784 Party::SetGold(var_value); 5696 Party::SetGold(var_value);
5785 return; 5697 return;
5786 case VAR_BaseMight: 5698 case VAR_BaseMight:
5787 this->uMight = (unsigned __int8)var_value; 5699 this->uMight = (unsigned __int8)var_value;
5788 v31 = 1;
5789 this->PlaySound(SPEECH_92, 0); 5700 this->PlaySound(SPEECH_92, 0);
5790 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5701 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5791 if ( v31 != 1 )
5792 return;
5793 v25 = 8 * currPlayerId + 400; 5702 v25 = 8 * currPlayerId + 400;
5794 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5703 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5795 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5704 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5796 return; 5705 return;
5797 case VAR_BaseIntellect: 5706 case VAR_BaseIntellect:
5798 this->uIntelligence = (unsigned __int8)var_value; 5707 this->uIntelligence = (unsigned __int8)var_value;
5799 v31 = 1;
5800 this->PlaySound(SPEECH_92, 0); 5708 this->PlaySound(SPEECH_92, 0);
5801 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5709 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5802 if ( v31 != 1 )
5803 return;
5804 v25 = 8 * currPlayerId + 400; 5710 v25 = 8 * currPlayerId + 400;
5805 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5711 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5806 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5712 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5807 return; 5713 return;
5808 case VAR_BasePersonality: 5714 case VAR_BasePersonality:
5809 this->uWillpower = (unsigned __int8)var_value; 5715 this->uWillpower = (unsigned __int8)var_value;
5810 v31 = 1;
5811 this->PlaySound(SPEECH_92, 0); 5716 this->PlaySound(SPEECH_92, 0);
5812 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5717 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5813 if ( v31 != 1 )
5814 return;
5815 v25 = 8 * currPlayerId + 400; 5718 v25 = 8 * currPlayerId + 400;
5816 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5719 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5817 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5720 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5818 return; 5721 return;
5819 case VAR_BaseEndurance: 5722 case VAR_BaseEndurance:
5820 this->uEndurance = (unsigned __int8)var_value; 5723 this->uEndurance = (unsigned __int8)var_value;
5821 v31 = 1;
5822 this->PlaySound(SPEECH_92, 0); 5724 this->PlaySound(SPEECH_92, 0);
5823 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5725 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5824 if ( v31 != 1 )
5825 return;
5826 v25 = 8 * currPlayerId + 400; 5726 v25 = 8 * currPlayerId + 400;
5827 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5727 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5828 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5728 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5829 return; 5729 return;
5830 case VAR_BaseSpeed: 5730 case VAR_BaseSpeed:
5831 this->uSpeed = (unsigned __int8)var_value; 5731 this->uSpeed = (unsigned __int8)var_value;
5832 v31 = 1;
5833 this->PlaySound(SPEECH_92, 0); 5732 this->PlaySound(SPEECH_92, 0);
5834 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5733 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5835 if ( v31 != 1 )
5836 return;
5837 v25 = 8 * currPlayerId + 400; 5734 v25 = 8 * currPlayerId + 400;
5838 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5735 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5839 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5736 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5840 return; 5737 return;
5841 case VAR_BaseAccuracy: 5738 case VAR_BaseAccuracy:
5842 this->uAccuracy = (unsigned __int8)var_value; 5739 this->uAccuracy = (unsigned __int8)var_value;
5843 v31 = 1;
5844 this->PlaySound(SPEECH_92, 0); 5740 this->PlaySound(SPEECH_92, 0);
5845 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5741 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5846 if ( v31 != 1 )
5847 return;
5848 v25 = 8 * currPlayerId + 400; 5742 v25 = 8 * currPlayerId + 400;
5849 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5743 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5850 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5744 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5851 return; 5745 return;
5852 case VAR_BaseLuck: 5746 case VAR_BaseLuck:
5853 this->uLuck = (unsigned __int8)var_value; 5747 this->uLuck = (unsigned __int8)var_value;
5854 v31 = 1;
5855 this->PlaySound(SPEECH_92, 0); 5748 this->PlaySound(SPEECH_92, 0);
5856 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5749 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5857 if ( v31 != 1 )
5858 return;
5859 v25 = 8 * currPlayerId + 400; 5750 v25 = 8 * currPlayerId + 400;
5860 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5751 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5861 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5752 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5862 return; 5753 return;
5863 case VAR_FixedFood: 5754 case VAR_FixedFood:
5864 Party::SetFood(var_value); 5755 Party::SetFood(var_value);
5865 v31 = 1;
5866 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5756 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5867 if ( v31 != 1 )
5868 return;
5869 v25 = 8 * currPlayerId + 400; 5757 v25 = 8 * currPlayerId + 400;
5870 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5758 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5871 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5759 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5872 return; 5760 return;
5873 case VAR_MightBonus: 5761 case VAR_MightBonus:
5920 { 5808 {
5921 this->uCurrentFace = 20; 5809 this->uCurrentFace = 20;
5922 this->uVoiceID = 20; 5810 this->uVoiceID = 20;
5923 } 5811 }
5924 ReloadPlayerPortraits(currPlayerId, this->uCurrentFace); 5812 ReloadPlayerPortraits(currPlayerId, this->uCurrentFace);
5925 v31 = 1;
5926 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5813 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5927 if ( v31 != 1 )
5928 return;
5929 v25 = 8 * currPlayerId + 400; 5814 v25 = 8 * currPlayerId + 400;
5930 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5815 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5931 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5816 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5932 return; 5817 return;
5933 } 5818 }
5934 LABEL_64: 5819 LABEL_64:
5935 this->uMightBonus = (unsigned __int8)var_value; 5820 this->uMightBonus = (unsigned __int8)var_value;
5936 v31 = 1;
5937 this->PlaySound(SPEECH_91, 0); 5821 this->PlaySound(SPEECH_91, 0);
5938 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5822 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5939 if ( v31 != 1 )
5940 return;
5941 v25 = 8 * currPlayerId + 400; 5823 v25 = 8 * currPlayerId + 400;
5942 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5824 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5943 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5825 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5944 return; 5826 return;
5945 } 5827 }
5946 if ( var_type <= VAR_FireResistanceBonus ) 5828 if ( var_type <= VAR_FireResistanceBonus )
5947 { 5829 {
5948 if ( var_type == VAR_FireResistanceBonus ) 5830 if ( var_type == VAR_FireResistanceBonus )
5949 { 5831 {
5950 this->sResFireBonus = (unsigned __int8)var_value; 5832 this->sResFireBonus = (unsigned __int8)var_value;
5951 v31 = 1;
5952 this->PlaySound(SPEECH_91, 0); 5833 this->PlaySound(SPEECH_91, 0);
5953 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5834 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5954 if ( v31 != 1 )
5955 return;
5956 v25 = 8 * currPlayerId + 400; 5835 v25 = 8 * currPlayerId + 400;
5957 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5836 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5958 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5837 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5959 return; 5838 return;
5960 } 5839 }
5961 switch ( var_type ) 5840 switch ( var_type )
5962 { 5841 {
5963 case VAR_ActualIntellect: 5842 case VAR_ActualIntellect:
5964 LABEL_68: 5843 LABEL_68:
5965 this->uIntelligenceBonus = (unsigned __int8)var_value; 5844 this->uIntelligenceBonus = (unsigned __int8)var_value;
5966 v31 = 1;
5967 this->PlaySound(SPEECH_91, 0); 5845 this->PlaySound(SPEECH_91, 0);
5968 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5846 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5969 if ( v31 != 1 )
5970 return;
5971 v25 = 8 * currPlayerId + 400; 5847 v25 = 8 * currPlayerId + 400;
5972 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5848 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5973 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5849 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5974 return; 5850 return;
5975 case VAR_ActualPersonality: 5851 case VAR_ActualPersonality:
5976 LABEL_69: 5852 LABEL_69:
5977 this->uWillpowerBonus = (unsigned __int8)var_value; 5853 this->uWillpowerBonus = (unsigned __int8)var_value;
5978 v31 = 1;
5979 this->PlaySound(SPEECH_91, 0); 5854 this->PlaySound(SPEECH_91, 0);
5980 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5855 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5981 if ( v31 != 1 )
5982 return;
5983 v25 = 8 * currPlayerId + 400; 5856 v25 = 8 * currPlayerId + 400;
5984 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5857 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5985 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5858 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5986 return; 5859 return;
5987 case VAR_ActualEndurance: 5860 case VAR_ActualEndurance:
5988 LABEL_70: 5861 LABEL_70:
5989 this->uEnduranceBonus = (unsigned __int8)var_value; 5862 this->uEnduranceBonus = (unsigned __int8)var_value;
5990 v31 = 1;
5991 this->PlaySound(SPEECH_91, 0); 5863 this->PlaySound(SPEECH_91, 0);
5992 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5864 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5993 if ( v31 != 1 )
5994 return;
5995 v25 = 8 * currPlayerId + 400; 5865 v25 = 8 * currPlayerId + 400;
5996 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5866 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5997 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5867 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
5998 return; 5868 return;
5999 case VAR_ActualSpeed: 5869 case VAR_ActualSpeed:
6000 LABEL_71: 5870 LABEL_71:
6001 this->uSpeedBonus = (unsigned __int8)var_value; 5871 this->uSpeedBonus = (unsigned __int8)var_value;
6002 v31 = 1;
6003 this->PlaySound(SPEECH_91, 0); 5872 this->PlaySound(SPEECH_91, 0);
6004 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5873 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6005 if ( v31 != 1 )
6006 return;
6007 v25 = 8 * currPlayerId + 400; 5874 v25 = 8 * currPlayerId + 400;
6008 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5875 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6009 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5876 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6010 return; 5877 return;
6011 case VAR_ActualAccuracy: 5878 case VAR_ActualAccuracy:
6012 LABEL_72: 5879 LABEL_72:
6013 this->uAccuracyBonus = (unsigned __int8)var_value; 5880 this->uAccuracyBonus = (unsigned __int8)var_value;
6014 v31 = 1;
6015 this->PlaySound(SPEECH_92, 0); 5881 this->PlaySound(SPEECH_92, 0);
6016 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5882 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6017 if ( v31 != 1 )
6018 return;
6019 v25 = 8 * currPlayerId + 400; 5883 v25 = 8 * currPlayerId + 400;
6020 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5884 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6021 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5885 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6022 return; 5886 return;
6023 case VAR_ActualLuck: 5887 case VAR_ActualLuck:
6024 LABEL_73: 5888 LABEL_73:
6025 this->uLuckBonus = (unsigned __int8)var_value; 5889 this->uLuckBonus = (unsigned __int8)var_value;
6026 v31 = 1;
6027 this->PlaySound(SPEECH_92, 0); 5890 this->PlaySound(SPEECH_92, 0);
6028 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5891 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6029 if ( v31 != 1 )
6030 return;
6031 v25 = 8 * currPlayerId + 400; 5892 v25 = 8 * currPlayerId + 400;
6032 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5893 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6033 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5894 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6034 return; 5895 return;
6035 case VAR_FireResistance: 5896 case VAR_FireResistance:
6036 this->sResFireBase = (unsigned __int8)var_value; 5897 this->sResFireBase = (unsigned __int8)var_value;
6037 v31 = 1;
6038 this->PlaySound(SPEECH_92, 0); 5898 this->PlaySound(SPEECH_92, 0);
6039 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5899 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6040 if ( v31 != 1 )
6041 return;
6042 v25 = 8 * currPlayerId + 400; 5900 v25 = 8 * currPlayerId + 400;
6043 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5901 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6044 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5902 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6045 return; 5903 return;
6046 case VAR_AirResistance: 5904 case VAR_AirResistance:
6047 this->sResAirBase = (unsigned __int8)var_value; 5905 this->sResAirBase = (unsigned __int8)var_value;
6048 v31 = 1;
6049 this->PlaySound(SPEECH_92, 0); 5906 this->PlaySound(SPEECH_92, 0);
6050 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5907 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6051 if ( v31 != 1 )
6052 return;
6053 v25 = 8 * currPlayerId + 400; 5908 v25 = 8 * currPlayerId + 400;
6054 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5909 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6055 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5910 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6056 return; 5911 return;
6057 case VAR_WaterResistance: 5912 case VAR_WaterResistance:
6058 this->sResWaterBase = (unsigned __int8)var_value; 5913 this->sResWaterBase = (unsigned __int8)var_value;
6059 v31 = 1;
6060 this->PlaySound(SPEECH_92, 0); 5914 this->PlaySound(SPEECH_92, 0);
6061 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5915 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6062 if ( v31 != 1 )
6063 return;
6064 v25 = 8 * currPlayerId + 400; 5916 v25 = 8 * currPlayerId + 400;
6065 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5917 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6066 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5918 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6067 return; 5919 return;
6068 case VAR_EarthResistance: 5920 case VAR_EarthResistance:
6069 this->sResEarthBase = (unsigned __int8)var_value; 5921 this->sResEarthBase = (unsigned __int8)var_value;
6070 v31 = 1;
6071 this->PlaySound(SPEECH_92, 0); 5922 this->PlaySound(SPEECH_92, 0);
6072 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5923 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6073 if ( v31 != 1 )
6074 return;
6075 v25 = 8 * currPlayerId + 400; 5924 v25 = 8 * currPlayerId + 400;
6076 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5925 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6077 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5926 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6078 return; 5927 return;
6079 case VAR_SpiritResistance: 5928 case VAR_SpiritResistance:
6080 this->sResSpiritBase = (unsigned __int8)var_value; 5929 this->sResSpiritBase = (unsigned __int8)var_value;
6081 v31 = 1;
6082 this->PlaySound(SPEECH_92, 0); 5930 this->PlaySound(SPEECH_92, 0);
6083 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5931 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6084 if ( v31 != 1 )
6085 return;
6086 v25 = 8 * currPlayerId + 400; 5932 v25 = 8 * currPlayerId + 400;
6087 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5933 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6088 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5934 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6089 return; 5935 return;
6090 case VAR_MindResistance: 5936 case VAR_MindResistance:
6091 this->sResMindBase = (unsigned __int8)var_value; 5937 this->sResMindBase = (unsigned __int8)var_value;
6092 v31 = 1;
6093 this->PlaySound(SPEECH_92, 0); 5938 this->PlaySound(SPEECH_92, 0);
6094 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5939 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6095 if ( v31 != 1 )
6096 return;
6097 v25 = 8 * currPlayerId + 400; 5940 v25 = 8 * currPlayerId + 400;
6098 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5941 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6099 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5942 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6100 return; 5943 return;
6101 case VAR_BodyResistance: 5944 case VAR_BodyResistance:
6102 this->sResBodyBase = (unsigned __int8)var_value; 5945 this->sResBodyBase = (unsigned __int8)var_value;
6103 v31 = 1;
6104 this->PlaySound(SPEECH_92, 0); 5946 this->PlaySound(SPEECH_92, 0);
6105 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5947 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6106 if ( v31 != 1 )
6107 return;
6108 v25 = 8 * currPlayerId + 400; 5948 v25 = 8 * currPlayerId + 400;
6109 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5949 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6110 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5950 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6111 return; 5951 return;
6112 case VAR_LightResistance: 5952 case VAR_LightResistance:
6113 this->sResLightBase = (unsigned __int8)var_value; 5953 this->sResLightBase = (unsigned __int8)var_value;
6114 v31 = 1;
6115 this->PlaySound(SPEECH_92, 0); 5954 this->PlaySound(SPEECH_92, 0);
6116 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5955 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6117 if ( v31 != 1 )
6118 return;
6119 v25 = 8 * currPlayerId + 400; 5956 v25 = 8 * currPlayerId + 400;
6120 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5957 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6121 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5958 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6122 return; 5959 return;
6123 case VAR_DarkResistance: 5960 case VAR_DarkResistance:
6124 this->sResDarkBase = (unsigned __int8)var_value; 5961 this->sResDarkBase = (unsigned __int8)var_value;
6125 v31 = 1;
6126 this->PlaySound(SPEECH_92, 0); 5962 this->PlaySound(SPEECH_92, 0);
6127 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5963 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6128 if ( v31 != 1 )
6129 return;
6130 v25 = 8 * currPlayerId + 400; 5964 v25 = 8 * currPlayerId + 400;
6131 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5965 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6132 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5966 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6133 return; 5967 return;
6134 case VAR_MagicResistance: 5968 case VAR_MagicResistance:
6135 this->sResMagicBase = (unsigned __int8)var_value; 5969 this->sResMagicBase = (unsigned __int8)var_value;
6136 v31 = 1;
6137 this->PlaySound(SPEECH_92, 0); 5970 this->PlaySound(SPEECH_92, 0);
6138 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5971 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6139 if ( v31 != 1 )
6140 return;
6141 v25 = 8 * currPlayerId + 400; 5972 v25 = 8 * currPlayerId + 400;
6142 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5973 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6143 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5974 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6144 return; 5975 return;
6145 default: 5976 default:
6166 byte_5E4C15[var_type] = var_value; 5997 byte_5E4C15[var_type] = var_value;
6167 return; 5998 return;
6168 } 5999 }
6169 memset(this, 0, 0xA0u); 6000 memset(this, 0, 0xA0u);
6170 } 6001 }
6171 v31 = 1;
6172 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 6002 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6173 if ( v31 != 1 )
6174 return;
6175 v25 = 8 * currPlayerId + 400; 6003 v25 = 8 * currPlayerId + 400;
6176 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 6004 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6177 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 6005 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6178 return; 6006 return;
6179 } 6007 }
6205 if ( var_type != 62 ) 6033 if ( var_type != 62 )
6206 return; 6034 return;
6207 this->sResMindBonus = (unsigned __int8)var_value; 6035 this->sResMindBonus = (unsigned __int8)var_value;
6208 break; 6036 break;
6209 } 6037 }
6210 v31 = 1;
6211 this->PlaySound(SPEECH_91, 0); 6038 this->PlaySound(SPEECH_91, 0);
6212 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 6039 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6213 if ( v31 != 1 )
6214 return;
6215 v25 = 8 * currPlayerId + 400; 6040 v25 = 8 * currPlayerId + 400;
6216 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 6041 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6217 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 6042 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6218 return; 6043 return;
6219 } 6044 }
6220 if ( var_type == VAR_LightResistanceBonus ) 6045 if ( var_type == VAR_LightResistanceBonus )
6221 { 6046 {
6222 this->sResLightBonus = (unsigned __int8)var_value; 6047 this->sResLightBonus = (unsigned __int8)var_value;
6223 v31 = 1;
6224 this->PlaySound(SPEECH_91, 0); 6048 this->PlaySound(SPEECH_91, 0);
6225 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 6049 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6226 if ( v31 != 1 )
6227 return;
6228 v25 = 8 * currPlayerId + 400; 6050 v25 = 8 * currPlayerId + 400;
6229 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 6051 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6230 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 6052 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6231 return; 6053 return;
6232 } 6054 }
6233 if ( var_type == VAR_DarkResistanceBonus ) 6055 if ( var_type == VAR_DarkResistanceBonus )
6234 { 6056 {
6235 this->sResDarkBonus = (unsigned __int8)var_value; 6057 this->sResDarkBonus = (unsigned __int8)var_value;
6236 v31 = 1;
6237 this->PlaySound(SPEECH_91, 0); 6058 this->PlaySound(SPEECH_91, 0);
6238 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 6059 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6239 if ( v31 != 1 )
6240 return;
6241 v25 = 8 * currPlayerId + 400; 6060 v25 = 8 * currPlayerId + 400;
6242 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 6061 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6243 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 6062 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6244 return; 6063 return;
6245 } 6064 }
6246 if ( var_type == VAR_MagicResistanceBonus ) 6065 if ( var_type == VAR_MagicResistanceBonus )
6247 { 6066 {
6248 this->sResMagicBonus = (unsigned __int8)var_value; 6067 this->sResMagicBonus = (unsigned __int8)var_value;
6249 v31 = 1;
6250 this->PlaySound(SPEECH_91, 0); 6068 this->PlaySound(SPEECH_91, 0);
6251 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 6069 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6252 if ( v31 != 1 )
6253 return;
6254 v25 = 8 * currPlayerId + 400; 6070 v25 = 8 * currPlayerId + 400;
6255 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 6071 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6256 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 6072 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6257 return; 6073 return;
6258 } 6074 }
6271 else 6087 else
6272 { 6088 {
6273 LOWORD(v18) = (unsigned __int8)(var_value | v17 & 0xC0); 6089 LOWORD(v18) = (unsigned __int8)(var_value | v17 & 0xC0);
6274 } 6090 }
6275 *(short *)v16 = v18; 6091 *(short *)v16 = v18;
6276 v31 = 1;
6277 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 6092 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
6278 if ( v31 != 1 )
6279 return;
6280 v25 = 8 * currPlayerId + 400; 6093 v25 = 8 * currPlayerId + 400;
6281 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 6094 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
6282 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 6095 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0);
6283 return; 6096 return;
6284 } 6097 }