Mercurial > mm7
comparison Player.cpp @ 1460:ff2118028c71
renaming _guilds_member_bits to _achieved_awards_bits
author | Gloval |
---|---|
date | Wed, 21 Aug 2013 20:58:36 +0400 |
parents | bfe342ae0c1f |
children | 845907a747d3 |
comparison
equal
deleted
inserted
replaced
1457:9dc33590f93e | 1460:ff2118028c71 |
---|---|
639 return false; | 639 return false; |
640 } | 640 } |
641 switch ( uClass ) | 641 switch ( uClass ) |
642 { | 642 { |
643 case 0x1Au: | 643 case 0x1Au: |
644 return(_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 65)); | 644 return(_449B57_test_bit((unsigned __int8 *)this->_achieved_awards_bits, 65)); |
645 case 0x1Bu: | 645 case 0x1Bu: |
646 return(_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 67)); | 646 return(_449B57_test_bit((unsigned __int8 *)this->_achieved_awards_bits, 67)); |
647 case 0x22u: | 647 case 0x22u: |
648 return(_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 77)); | 648 return(_449B57_test_bit((unsigned __int8 *)this->_achieved_awards_bits, 77)); |
649 case 0x23u: | 649 case 0x23u: |
650 return(_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 79)); | 650 return(_449B57_test_bit((unsigned __int8 *)this->_achieved_awards_bits, 79)); |
651 break; | 651 break; |
652 default: | 652 default: |
653 assert("Should not be able to get here" && false); | 653 assert("Should not be able to get here" && false); |
654 break; | 654 break; |
655 } | 655 } |
5404 uMightBonus = 0; | 5404 uMightBonus = 0; |
5405 uLevel = 1; | 5405 uLevel = 1; |
5406 uExperience = 251 + rand() % 100; | 5406 uExperience = 251 + rand() % 100; |
5407 uBirthYear = 1147 - rand() % 6; | 5407 uBirthYear = 1147 - rand() % 6; |
5408 memset(pActiveSkills, 0, sizeof(pActiveSkills)); | 5408 memset(pActiveSkills, 0, sizeof(pActiveSkills)); |
5409 memset(_guilds_member_bits, 0, 64); | 5409 memset(_achieved_awards_bits, 0, 64); |
5410 memset(&spellbook, 0, sizeof(PlayerSpells)); | 5410 memset(&spellbook, 0, sizeof(PlayerSpells)); |
5411 | 5411 |
5412 for (uint i = 0; i < 37; ++i) | 5412 for (uint i = 0; i < 37; ++i) |
5413 { | 5413 { |
5414 if (pSkillAvailabilityPerClass[classType / 4][i] != 2) | 5414 if (pSkillAvailabilityPerClass[classType / 4][i] != 2) |
6713 case VAR_Age: | 6713 case VAR_Age: |
6714 v12 = GetActualAge(); | 6714 v12 = GetActualAge(); |
6715 goto _j_cmp_against_arg; | 6715 goto _j_cmp_against_arg; |
6716 case VAR_Award: | 6716 case VAR_Award: |
6717 test_bit_value = 0x80u >> ((signed __int16)pValue - 1) % 8; | 6717 test_bit_value = 0x80u >> ((signed __int16)pValue - 1) % 8; |
6718 our_bit_value = this->_guilds_member_bits[((signed __int16)pValue - 1) /8]; | 6718 our_bit_value = this->_achieved_awards_bits[((signed __int16)pValue - 1) /8]; |
6719 if ( !((unsigned __int8)test_bit_value & our_bit_value) ) | 6719 if ( !((unsigned __int8)test_bit_value & our_bit_value) ) |
6720 return true; | 6720 return true; |
6721 return false; | 6721 return false; |
6722 case VAR_Experience: | 6722 case VAR_Experience: |
6723 v4 = LODWORD(this->uExperience); | 6723 v4 = LODWORD(this->uExperience); |
7175 case VAR_Age: | 7175 case VAR_Age: |
7176 this->sAgeModifier = var_value; | 7176 this->sAgeModifier = var_value; |
7177 return; | 7177 return; |
7178 case VAR_Award: | 7178 case VAR_Award: |
7179 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & | 7179 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & |
7180 pPlayers[currPlayerId + 1]->_guilds_member_bits[((signed __int16)var_value - 1)/ 8]) | 7180 pPlayers[currPlayerId + 1]->_achieved_awards_bits[((signed __int16)var_value - 1)/ 8]) |
7181 //&& dword_723E80_award_related[2 * a3] ) | 7181 //&& dword_723E80_award_related[2 * a3] ) |
7182 && pAwards[var_value].pText ) | 7182 && pAwards[var_value].pText ) |
7183 { | 7183 { |
7184 pPlayers[currPlayerId + 1]->PlaySound(SPEECH_96, 0); | 7184 pPlayers[currPlayerId + 1]->PlaySound(SPEECH_96, 0); |
7185 DrawPlayerBuffAnimBasedOnCondition(currPlayerId); | 7185 DrawPlayerBuffAnimBasedOnCondition(currPlayerId); |
7186 PlaySoundBasedOnCondition(currPlayerId); | 7186 PlaySoundBasedOnCondition(currPlayerId); |
7187 } | 7187 } |
7188 _449B7E_toggle_bit((unsigned char *)this->_guilds_member_bits, var_value, 1u); | 7188 _449B7E_toggle_bit((unsigned char *)this->_achieved_awards_bits, var_value, 1u); |
7189 return; | 7189 return; |
7190 case VAR_Experience: | 7190 case VAR_Experience: |
7191 this->uExperience = var_value; | 7191 this->uExperience = var_value; |
7192 goto LABEL_124; | 7192 goto LABEL_124; |
7193 case VAR_QBits_QuestsDone: | 7193 case VAR_QBits_QuestsDone: |
7597 case VAR_Age: | 7597 case VAR_Age: |
7598 Dst->sAgeModifier += val; | 7598 Dst->sAgeModifier += val; |
7599 return; | 7599 return; |
7600 case VAR_Award: | 7600 case VAR_Award: |
7601 v13 = pPlayers[uPlayerIdx + 1]; | 7601 v13 = pPlayers[uPlayerIdx + 1]; |
7602 if (_449B57_test_bit((unsigned __int8 *)pPlayers[uPlayerIdx + 1]->_guilds_member_bits, val) | 7602 if (_449B57_test_bit((unsigned __int8 *)pPlayers[uPlayerIdx + 1]->_achieved_awards_bits, val) |
7603 | 7603 |
7604 && pAwards[val].pText ) | 7604 && pAwards[val].pText ) |
7605 { | 7605 { |
7606 v14 = pPlayers[uPlayerIdx + 1]; | 7606 v14 = pPlayers[uPlayerIdx + 1]; |
7607 v34 = 1; | 7607 v34 = 1; |
7608 v3 = 1; | 7608 v3 = 1; |
7609 v14->PlaySound(SPEECH_96, 0); | 7609 v14->PlaySound(SPEECH_96, 0); |
7610 } | 7610 } |
7611 v15 = (char *)v4->_guilds_member_bits; | 7611 v15 = (char *)v4->_achieved_awards_bits; |
7612 goto LABEL_44; | 7612 goto LABEL_44; |
7613 case VAR_Experience: | 7613 case VAR_Experience: |
7614 v16 = __CFADD__(val, LODWORD(Dst->uExperience)); | 7614 v16 = __CFADD__(val, LODWORD(Dst->uExperience)); |
7615 LODWORD(Dst->uExperience) += val; | 7615 LODWORD(Dst->uExperience) += val; |
7616 HIDWORD(Dst->uExperience) += ((unsigned __int64)val >> 32) + v16; | 7616 HIDWORD(Dst->uExperience) += ((unsigned __int64)val >> 32) + v16; |
8232 return result; | 8232 return result; |
8233 case VAR_Age: | 8233 case VAR_Age: |
8234 this->sAgeModifier -= (signed __int16)pValue; | 8234 this->sAgeModifier -= (signed __int16)pValue; |
8235 return result; | 8235 return result; |
8236 case VAR_Award: | 8236 case VAR_Award: |
8237 _449B7E_toggle_bit((unsigned char *)this->_guilds_member_bits, (signed __int16)pValue, 0); | 8237 _449B7E_toggle_bit((unsigned char *)this->_achieved_awards_bits, (signed __int16)pValue, 0); |
8238 return result; | 8238 return result; |
8239 case VAR_Experience: | 8239 case VAR_Experience: |
8240 v12 = (char *)&this->uExperience; | 8240 v12 = (char *)&this->uExperience; |
8241 v13 = (signed int)pValue; | 8241 v13 = (signed int)pValue; |
8242 v14 = *(int *)v12 < (unsigned int)pValue; | 8242 v14 = *(int *)v12 < (unsigned int)pValue; |