comparison Player.cpp @ 1772:c0b32e8a82c8

Player::SetVariable restoring and fixing LABEL_51
author Grumpy7
date Tue, 01 Oct 2013 09:45:32 +0200
parents 6c1823e19c2e
children 8e16cf2c7b1b
comparison
equal deleted inserted replaced
1771:6c1823e19c2e 1772:c0b32e8a82c8
5667 pPlayers[currPlayerId + 1]->PlaySound(SPEECH_96, 0); 5667 pPlayers[currPlayerId + 1]->PlaySound(SPEECH_96, 0);
5668 } 5668 }
5669 _449B7E_toggle_bit((unsigned char *)v4->_achieved_awards_bits, var_value, 1u); 5669 _449B7E_toggle_bit((unsigned char *)v4->_achieved_awards_bits, var_value, 1u);
5670 if ( v30 != 1 ) 5670 if ( v30 != 1 )
5671 { 5671 {
5672 if ( v31 != 1 ) 5672 if ( v31 == 1 )
5673 {
5674 v5 = 0;
5675 v25 = 8 * currPlayerId + 400;
5676 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5677 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5);
5673 return; 5678 return;
5679 }
5680 }
5681 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5682 if ( v31 == 1 )
5683 {
5674 v5 = 0; 5684 v5 = 0;
5675 v25 = 8 * currPlayerId + 400; 5685 v25 = 8 * currPlayerId + 400;
5676 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5686 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5677 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); 5687 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5);
5678 return;
5679 } 5688 }
5680 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5681 if ( v31 != 1 )
5682 return;
5683 v5 = 0;
5684 v25 = 8 * currPlayerId + 400;
5685 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5686 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5);
5687 return; 5689 return;
5688 case VAR_Experience: 5690 case VAR_Experience:
5689 this->uExperience = var_value; 5691 this->uExperience = var_value;
5690 goto LABEL_124; 5692 goto LABEL_124;
5691 case VAR_QBits_QuestsDone: 5693 case VAR_QBits_QuestsDone:
5697 bFlashQuestBook = 1; 5699 bFlashQuestBook = 1;
5698 v30 = 1; 5700 v30 = 1;
5699 v31 = 1; 5701 v31 = 1;
5700 v14->PlaySound(SPEECH_93, 0); 5702 v14->PlaySound(SPEECH_93, 0);
5701 } 5703 }
5702 v13 = (char *)pParty->_quest_bits; 5704 _449B7E_toggle_bit((unsigned char *)pParty->_quest_bits, var_value, 1u);
5703 LABEL_51: 5705 if ( v30 != 1 )
5704 _449B7E_toggle_bit((unsigned char *)v13, var_value, 1u); 5706 {
5705 if (( v30 != 1 )&&( v31 != 1 )) 5707 if ( v31 == 1 )
5706 return; 5708 {
5707 else 5709 v5 = 0;
5708 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); 5710 v25 = 8 * currPlayerId + 400;
5709 if ( v31 != 1 ) 5711 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5710 return; 5712 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5);
5711 v25 = 8 * currPlayerId + 400; 5713 return;
5712 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); 5714 }
5713 pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); 5715 }
5714 return; 5716 pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId);
5717 if ( v31 == 1 )
5718 {
5719 v5 = 0;
5720 v25 = 8 * currPlayerId + 400;
5721 LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112);
5722 pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5);
5723 }
5724 return;
5715 case VAR_PlayerItemInHands: 5725 case VAR_PlayerItemInHands:
5716 item.Reset(); 5726 item.Reset();
5717 item.Reset(); 5727 item.Reset();
5718 item.uItemID = var_value; 5728 item.uItemID = var_value;
5719 item.uAttributes = 1; 5729 item.uAttributes = 1;