Mercurial > mm7
comparison Player.cpp @ 1775:0abc0db1ea56
Player::SetVariable removing LABEL_124
author | Grumpy7 |
---|---|
date | Tue, 01 Oct 2013 09:51:33 +0200 |
parents | 097d72afd20f |
children | 0f273c459f78 |
comparison
equal
deleted
inserted
replaced
1774:097d72afd20f | 1775:0abc0db1ea56 |
---|---|
5619 v7 = rand() % var_value + 1; | 5619 v7 = rand() % var_value + 1; |
5620 Party::SetFood(v7); | 5620 Party::SetFood(v7); |
5621 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[501], v7);// You have %lu food | 5621 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[501], v7);// You have %lu food |
5622 ShowStatusBarString(pTmpBuf.data(), 2u); | 5622 ShowStatusBarString(pTmpBuf.data(), 2u); |
5623 GameUI_DrawFoodAndGold(); | 5623 GameUI_DrawFoodAndGold(); |
5624 goto LABEL_124; | 5624 v31 = 1; |
5625 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | |
5626 if ( v31 != 1 ) | |
5627 return; | |
5628 v5 = 0; | |
5629 v25 = 8 * currPlayerId + 400; | |
5630 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | |
5631 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | |
5632 return; | |
5625 case VAR_Sex: | 5633 case VAR_Sex: |
5626 this->uSex = (PLAYER_SEX)var_value; | 5634 this->uSex = (PLAYER_SEX)var_value; |
5627 goto LABEL_124; | 5635 v31 = 1; |
5636 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | |
5637 if ( v31 != 1 ) | |
5638 return; | |
5639 v5 = 0; | |
5640 v25 = 8 * currPlayerId + 400; | |
5641 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | |
5642 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | |
5643 return; | |
5628 case VAR_Class: | 5644 case VAR_Class: |
5629 this->classType = (PLAYER_CLASS_TYPE)var_value; | 5645 this->classType = (PLAYER_CLASS_TYPE)var_value; |
5630 if ( (char)var_value != 35 ) | 5646 if ( (char)var_value != 35 ) |
5631 goto LABEL_124; | 5647 { |
5648 v31 = 1; | |
5649 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | |
5650 if ( v31 != 1 ) | |
5651 return; | |
5652 v5 = 0; | |
5653 v25 = 8 * currPlayerId + 400; | |
5654 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | |
5655 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | |
5656 return; | |
5657 } | |
5632 v8 = 0; | 5658 v8 = 0; |
5633 v9 = this->pInventoryItemList; | 5659 v9 = this->pInventoryItemList; |
5634 break; | 5660 break; |
5635 case VAR_CurrentHP: | 5661 case VAR_CurrentHP: |
5636 this->sHealth = var_value; | 5662 this->sHealth = var_value; |
5637 goto LABEL_124; | 5663 v31 = 1; |
5664 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | |
5665 if ( v31 != 1 ) | |
5666 return; | |
5667 v5 = 0; | |
5668 v25 = 8 * currPlayerId + 400; | |
5669 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | |
5670 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | |
5671 return; | |
5638 case VAR_MaxHP: | 5672 case VAR_MaxHP: |
5639 this->sHealth = GetMaxHealth(); | 5673 this->sHealth = GetMaxHealth(); |
5640 return; | 5674 return; |
5641 case VAR_CurrentSP: | 5675 case VAR_CurrentSP: |
5642 this->sMana = var_value; | 5676 this->sMana = var_value; |
5643 goto LABEL_124; | 5677 v31 = 1; |
5678 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | |
5679 if ( v31 != 1 ) | |
5680 return; | |
5681 v5 = 0; | |
5682 v25 = 8 * currPlayerId + 400; | |
5683 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | |
5684 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | |
5685 return; | |
5644 case VAR_MaxSP: | 5686 case VAR_MaxSP: |
5645 this->sMana = GetMaxMana(); | 5687 this->sMana = GetMaxMana(); |
5646 return; | 5688 return; |
5647 case VAR_ACModifier: | 5689 case VAR_ACModifier: |
5648 this->sACModifier = (unsigned __int8)var_value; | 5690 this->sACModifier = (unsigned __int8)var_value; |
5649 goto LABEL_124; | 5691 v31 = 1; |
5692 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | |
5693 if ( v31 != 1 ) | |
5694 return; | |
5695 v5 = 0; | |
5696 v25 = 8 * currPlayerId + 400; | |
5697 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | |
5698 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | |
5699 return; | |
5650 case VAR_BaseLevel: | 5700 case VAR_BaseLevel: |
5651 this->uLevel = (unsigned __int8)var_value; | 5701 this->uLevel = (unsigned __int8)var_value; |
5652 goto LABEL_124; | 5702 v31 = 1; |
5703 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | |
5704 if ( v31 != 1 ) | |
5705 return; | |
5706 v5 = 0; | |
5707 v25 = 8 * currPlayerId + 400; | |
5708 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | |
5709 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | |
5710 return; | |
5653 case VAR_LevelModifier: | 5711 case VAR_LevelModifier: |
5654 this->sLevelModifier = (unsigned __int8)var_value; | 5712 this->sLevelModifier = (unsigned __int8)var_value; |
5655 goto LABEL_124; | 5713 v31 = 1; |
5714 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | |
5715 if ( v31 != 1 ) | |
5716 return; | |
5717 v5 = 0; | |
5718 v25 = 8 * currPlayerId + 400; | |
5719 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | |
5720 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | |
5721 return; | |
5656 case VAR_Age: | 5722 case VAR_Age: |
5657 this->sAgeModifier = var_value; | 5723 this->sAgeModifier = var_value; |
5658 return; | 5724 return; |
5659 case VAR_Award: | 5725 case VAR_Award: |
5660 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & | 5726 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & |
5687 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | 5753 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); |
5688 } | 5754 } |
5689 return; | 5755 return; |
5690 case VAR_Experience: | 5756 case VAR_Experience: |
5691 this->uExperience = var_value; | 5757 this->uExperience = var_value; |
5692 goto LABEL_124; | 5758 v31 = 1; |
5759 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | |
5760 if ( v31 != 1 ) | |
5761 return; | |
5762 v5 = 0; | |
5763 v25 = 8 * currPlayerId + 400; | |
5764 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | |
5765 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | |
5766 return; | |
5693 case VAR_QBits_QuestsDone: | 5767 case VAR_QBits_QuestsDone: |
5694 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & pParty->_quest_bits[((signed __int16)var_value - 1) >> 3]) | 5768 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & pParty->_quest_bits[((signed __int16)var_value - 1) >> 3]) |
5695 // && (&dword_722F10)[4 * a3] ) | 5769 // && (&dword_722F10)[4 * a3] ) |
5696 && pQuestTable[var_value-1] ) | 5770 && pQuestTable[var_value-1] ) |
5697 { | 5771 { |
5839 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | 5913 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); |
5840 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | 5914 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); |
5841 return; | 5915 return; |
5842 case VAR_FixedFood: | 5916 case VAR_FixedFood: |
5843 Party::SetFood(var_value); | 5917 Party::SetFood(var_value); |
5844 goto LABEL_124; | 5918 v31 = 1; |
5919 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | |
5920 if ( v31 != 1 ) | |
5921 return; | |
5922 v5 = 0; | |
5923 v25 = 8 * currPlayerId + 400; | |
5924 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | |
5925 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | |
5926 return; | |
5845 case VAR_MightBonus: | 5927 case VAR_MightBonus: |
5846 goto LABEL_64; | 5928 goto LABEL_64; |
5847 case VAR_IntellectBonus: | 5929 case VAR_IntellectBonus: |
5848 goto LABEL_68; | 5930 goto LABEL_68; |
5849 case VAR_PersonalityBonus: | 5931 case VAR_PersonalityBonus: |
5892 { | 5974 { |
5893 v4->uCurrentFace = 20; | 5975 v4->uCurrentFace = 20; |
5894 v4->uVoiceID = 20; | 5976 v4->uVoiceID = 20; |
5895 } | 5977 } |
5896 ReloadPlayerPortraits(currPlayerId, v4->uCurrentFace); | 5978 ReloadPlayerPortraits(currPlayerId, v4->uCurrentFace); |
5897 goto LABEL_124; | 5979 v31 = 1; |
5980 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | |
5981 if ( v31 != 1 ) | |
5982 return; | |
5983 v5 = 0; | |
5984 v25 = 8 * currPlayerId + 400; | |
5985 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | |
5986 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | |
5987 return; | |
5898 } | 5988 } |
5899 LABEL_64: | 5989 LABEL_64: |
5900 this->uMightBonus = (unsigned __int8)var_value; | 5990 this->uMightBonus = (unsigned __int8)var_value; |
5901 v28 = 0; | 5991 v28 = 0; |
5902 v26 = SPEECH_91; | 5992 v26 = SPEECH_91; |
6203 byte_5E4C15[var_type] = var_value; | 6293 byte_5E4C15[var_type] = var_value; |
6204 return; | 6294 return; |
6205 } | 6295 } |
6206 memset(v4, 0, 0xA0u); | 6296 memset(v4, 0, 0xA0u); |
6207 } | 6297 } |
6208 LABEL_124: | |
6209 v31 = 1; | 6298 v31 = 1; |
6210 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | 6299 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); |
6211 if ( v31 != 1 ) | 6300 if ( v31 != 1 ) |
6212 return; | 6301 return; |
6213 v5 = 0; | 6302 v5 = 0; |
6227 else | 6316 else |
6228 { | 6317 { |
6229 LOWORD(v18) = (unsigned __int8)(var_value | v17 & 0xC0); | 6318 LOWORD(v18) = (unsigned __int8)(var_value | v17 & 0xC0); |
6230 } | 6319 } |
6231 *(short *)v16 = v18; | 6320 *(short *)v16 = v18; |
6232 goto LABEL_124; | 6321 v31 = 1; |
6322 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); | |
6323 if ( v31 != 1 ) | |
6324 return; | |
6325 v5 = 0; | |
6326 v25 = 8 * currPlayerId + 400; | |
6327 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); | |
6328 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); | |
6329 return; | |
6233 } | 6330 } |
6234 if ( var_type == VAR_DisarmTrapSkill ) | 6331 if ( var_type == VAR_DisarmTrapSkill ) |
6235 if ( v30 != 1 ) | 6332 if ( v30 != 1 ) |
6236 { | 6333 { |
6237 if ( v31 != 1 ) | 6334 if ( v31 != 1 ) |