comparison Player.cpp @ 508:00ce82758c72

Слияние
author Ritor1
date Wed, 27 Feb 2013 23:24:17 +0600
parents 9b4bdf6089af 4bd56919f075
children 7c86030324a5
comparison
equal deleted inserted replaced
507:542ea7a55b17 508:00ce82758c72
754 case 0u: 754 case 0u:
755 v8 = a3; 755 v8 = a3;
756 v7 = 1; 756 v7 = 1;
757 goto LABEL_4; 757 goto LABEL_4;
758 case 1u: 758 case 1u:
759 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->field_152, 17) 759 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 17)
760 || _49327B(2u, a3) ) 760 || _49327B(2u, a3) )
761 goto LABEL_84; 761 goto LABEL_84;
762 v8 = a3; 762 v8 = a3;
763 v7 = 3; 763 v7 = 3;
764 goto LABEL_4; 764 goto LABEL_4;
771 case 4u: 771 case 4u:
772 v8 = a3; 772 v8 = a3;
773 v7 = 5; 773 v7 = 5;
774 goto LABEL_4; 774 goto LABEL_4;
775 case 5u: 775 case 5u:
776 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->field_152, 11) 776 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 11)
777 || _49327B(6u, a3) ) 777 || _49327B(6u, a3) )
778 goto LABEL_84; 778 goto LABEL_84;
779 v8 = a3; 779 v8 = a3;
780 v7 = 7; 780 v7 = 7;
781 goto LABEL_4; 781 goto LABEL_4;
792 case 8u: 792 case 8u:
793 v8 = a3; 793 v8 = a3;
794 v7 = 9; 794 v7 = 9;
795 goto LABEL_4; 795 goto LABEL_4;
796 case 9u: 796 case 9u:
797 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->field_152, 23) 797 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 23)
798 || _49327B(0xAu, a3) ) 798 || _49327B(0xAu, a3) )
799 goto LABEL_84; 799 goto LABEL_84;
800 v8 = a3; 800 v8 = a3;
801 v7 = 11; 801 v7 = 11;
802 goto LABEL_4; 802 goto LABEL_4;
813 case 0xCu: 813 case 0xCu:
814 v8 = a3; 814 v8 = a3;
815 v7 = 13; 815 v7 = 13;
816 goto LABEL_4; 816 goto LABEL_4;
817 case 0xDu: 817 case 0xDu:
818 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->field_152, 41) 818 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 41)
819 || _49327B(0xEu, a3) ) 819 || _49327B(0xEu, a3) )
820 goto LABEL_84; 820 goto LABEL_84;
821 v8 = a3; 821 v8 = a3;
822 v7 = 15; 822 v7 = 15;
823 goto LABEL_4; 823 goto LABEL_4;
834 case 0x10u: 834 case 0x10u:
835 v8 = a3; 835 v8 = a3;
836 v7 = 17; 836 v7 = 17;
837 goto LABEL_4; 837 goto LABEL_4;
838 case 0x11u: 838 case 0x11u:
839 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->field_152, 35) 839 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 35)
840 || _49327B(0x12u, a3) ) 840 || _49327B(0x12u, a3) )
841 goto LABEL_84; 841 goto LABEL_84;
842 v8 = a3; 842 v8 = a3;
843 v7 = 19; 843 v7 = 19;
844 goto LABEL_4; 844 goto LABEL_4;
853 case 0x14u: 853 case 0x14u:
854 v8 = a3; 854 v8 = a3;
855 v7 = 21; 855 v7 = 21;
856 goto LABEL_4; 856 goto LABEL_4;
857 case 0x15u: 857 case 0x15u:
858 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->field_152, 29) 858 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 29)
859 || _49327B(0x16u, a3) ) 859 || _49327B(0x16u, a3) )
860 goto LABEL_84; 860 goto LABEL_84;
861 v8 = a3; 861 v8 = a3;
862 v7 = 23; 862 v7 = 23;
863 goto LABEL_4; 863 goto LABEL_4;
875 if ( !_49327B(0x19u, a3) ) 875 if ( !_49327B(0x19u, a3) )
876 goto LABEL_56; 876 goto LABEL_56;
877 break; 877 break;
878 case 0x19u: 878 case 0x19u:
879 LABEL_56: 879 LABEL_56:
880 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)v3->field_152, 63) 880 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)v3->_guilds_member_bits, 63)
881 || _49327B(0x1Au, a3) ) 881 || _49327B(0x1Au, a3) )
882 goto LABEL_84; 882 goto LABEL_84;
883 v8 = a3; 883 v8 = a3;
884 v7 = 27; 884 v7 = 27;
885 goto LABEL_4; 885 goto LABEL_4;
896 case 0x1Cu: 896 case 0x1Cu:
897 v8 = a3; 897 v8 = a3;
898 v7 = 29; 898 v7 = 29;
899 goto LABEL_4; 899 goto LABEL_4;
900 case 0x1Du: 900 case 0x1Du:
901 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->field_152, 69) 901 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 69)
902 || _49327B(0x1Eu, a3) ) 902 || _49327B(0x1Eu, a3) )
903 goto LABEL_84; 903 goto LABEL_84;
904 v8 = a3; 904 v8 = a3;
905 v7 = 31; 905 v7 = 31;
906 goto LABEL_4; 906 goto LABEL_4;
917 case 0x20u: 917 case 0x20u:
918 v8 = a3; 918 v8 = a3;
919 v7 = 33; 919 v7 = 33;
920 goto LABEL_4; 920 goto LABEL_4;
921 case 0x21u: 921 case 0x21u:
922 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->field_152, 73) 922 if ( a3 && (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, 73)
923 || _49327B(0x22u, a3) ) 923 || _49327B(0x22u, a3) )
924 goto LABEL_84; 924 goto LABEL_84;
925 v8 = a3; 925 v8 = a3;
926 v7 = 35; 926 v7 = 35;
927 LABEL_4: 927 LABEL_4:
935 case 0x23u: 935 case 0x23u:
936 if ( a3 ) 936 if ( a3 )
937 { 937 {
938 v5 = 79; 938 v5 = 79;
939 LABEL_82: 939 LABEL_82:
940 v4 = (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->field_152, v5) == 0; 940 v4 = (unsigned __int16)_449B57_test_bit((unsigned __int8 *)this->_guilds_member_bits, v5) == 0;
941 LABEL_83: 941 LABEL_83:
942 if ( !v4 ) 942 if ( !v4 )
943 goto LABEL_84; 943 goto LABEL_84;
944 } 944 }
945 break; 945 break;
1060 // uItemID == 526) // item230 ࠢ ५, 1060 // uItemID == 526) // item230 ࠢ ५,
1061 { 1061 {
1062 LABEL_13: 1062 LABEL_13:
1063 v4 = 99; 1063 v4 = 99;
1064 LABEL_15: 1064 LABEL_15:
1065 v5 = (unsigned __int16)_449B57_test_bit(pParty->_award_bits, v4) == 0; 1065 v5 = (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, v4) == 0;
1066 LABEL_23: 1066 LABEL_23:
1067 if ( !v5 ) 1067 if ( !v5 )
1068 return 1; 1068 return 1;
1069 return 0; 1069 return 0;
1070 } 1070 }
6484 uMightBonus = 0; 6484 uMightBonus = 0;
6485 uLevel = 1; 6485 uLevel = 1;
6486 uExperience = 251 + rand() % 100; 6486 uExperience = 251 + rand() % 100;
6487 uBirthYear = 1147 - rand() % 6; 6487 uBirthYear = 1147 - rand() % 6;
6488 memset(pActiveSkills, 0, sizeof(pActiveSkills)); 6488 memset(pActiveSkills, 0, sizeof(pActiveSkills));
6489 memset(field_152, 0, 64); 6489 memset(_guilds_member_bits, 0, 64);
6490 memset(&spellbook, 0, sizeof(PlayerSpells)); 6490 memset(&spellbook, 0, sizeof(PlayerSpells));
6491 6491
6492 for (uint i = 0; i < 37; ++i) 6492 for (uint i = 0; i < 37; ++i)
6493 { 6493 {
6494 if (pSkillAvailabilityPerClass[classType / 4][i] != 2) 6494 if (pSkillAvailabilityPerClass[classType / 4][i] != 2)
7699 } 7699 }
7700 7700
7701 7701
7702 7702
7703 //----- (00449BB4) -------------------------------------------------------- 7703 //----- (00449BB4) --------------------------------------------------------
7704 char Player::CompareVariable(enum VariableType VarNum, signed int pValue) 7704 bool Player::CompareVariable( enum VariableType VarNum, signed int pValue )
7705 { 7705 {
7706 Player *v3; // esi@1 7706 Player *v3; // esi@1
7707 signed int v4; // edi@1 7707 signed int v4; // edi@1
7708 unsigned int v5; // eax@8 7708 unsigned int v5; // eax@8
7709 int v6; // eax@9 7709 int v6; // eax@9
7710 enum CHARACTER_RACE v7; // eax@11 7710 enum CHARACTER_RACE v7; // eax@11
7711 signed int v8; // eax@17 7711 signed int v8; // eax@17
7712 unsigned __int8 v9; // sf@17 7712 unsigned __int8 v9; // sf@17
7713 unsigned __int8 v10; // of@17 7713 unsigned __int8 v10; // of@17
7714 int v11; // eax@19 7714 int v11; // eax@19
7715 unsigned int v12; // eax@20 7715 unsigned int v12; // eax@20
7716 unsigned int v13; // eax@25 7716 unsigned int test_bit_value; // eax@25
7717 unsigned __int8 v14; // cl@25 7717 unsigned __int8 our_bit_value; // cl@25
7718 signed int v15; // ecx@28 7718 signed int v15; // ecx@28
7719 ItemGen *v16; // eax@28 7719 ItemGen *v16; // eax@28
7720 char v17; // zf@31 7720 char v17; // zf@31
7721 int v18; // edi@90 7721 int v18; // edi@90
7722 DDM_DLV_Header *v19; // eax@122 7722 DDM_DLV_Header *v19; // eax@122
7737 if ( VarNum > VAR_AutoNotes ) 7737 if ( VarNum > VAR_AutoNotes )
7738 { 7738 {
7739 switch ( VarNum ) 7739 switch ( VarNum )
7740 { 7740 {
7741 case VAR_Invisible: 7741 case VAR_Invisible:
7742 if ( SHIDWORD(pParty->pPartyBuffs[11].uExpireTime) >= 0 7742 if ( pParty->pPartyBuffs[11].uExpireTime >0 )
7743 && (SHIDWORD(pParty->pPartyBuffs[11].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[11].uExpireTime) > 0) )
7744 return true; 7743 return true;
7745 return v4 >= pValue; 7744 return false;
7746 case VAR_NumDeaths: 7745 case VAR_NumDeaths:
7747 v4 = pParty->uNumDeaths; 7746 v4 = pParty->uNumDeaths;
7748 return v4 >= pValue; 7747 return v4 >= pValue;
7749 case VAR_NumBounties: 7748 case VAR_NumBounties:
7750 v4 = pParty->uNumBountiesCollected; 7749 v4 = pParty->uNumBountiesCollected;
7827 case VAR_MonthEquals2: 7826 case VAR_MonthEquals2:
7828 v6 = pParty->uCurrentMonth == pValue; 7827 v6 = pParty->uCurrentMonth == pValue;
7829 return v6; 7828 return v6;
7830 case VAR_IsFlying: 7829 case VAR_IsFlying:
7831 if ( pParty->bFlying 7830 if ( pParty->bFlying
7832 && SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) >= 0 7831 && (pParty->pPartyBuffs[7].uExpireTime> 0) )
7833 && (SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[7].uExpireTime) > 0) )
7834 return true; 7832 return true;
7835 return false; 7833 return false;
7836 case VAR_HiredNPCHasSpeciality: 7834 case VAR_HiredNPCHasSpeciality:
7837 LOBYTE(v6) = CheckHiredNPCSpeciality(pValue); 7835 LOBYTE(v6) = CheckHiredNPCSpeciality(pValue);
7838 return v6; 7836 return v6;
7839 case VAR_NPCs2: 7837 case VAR_NPCs2:
7840 return pNPCStats->pNewNPCData[pValue].Hired(); 7838 return pNPCStats->pNewNPCData[pValue].Hired();
7841 case VAR_MonthEquals|VAR_CurrentSP: 7839 case VAR_MonthEquals|VAR_CurrentSP:
7842 v13 = 0x80u >> ((signed __int16)a1 - 1) % 8; 7840 test_bit_value = 0x80u >> ((signed __int16)a1 - 1) % 8;
7843 v14 = this->field_1A50[((signed __int16)a1 - 1) >> 3]; 7841 our_bit_value = this->field_1A50[((signed __int16)a1 - 1)/8];
7844 if ( !((unsigned __int8)v13 & v14) ) 7842 if ( !((unsigned __int8)test_bit_value & our_bit_value) )
7845 return v4 >= pValue; 7843 return v4 >= pValue;
7846 v4 = pValue; 7844 v4 = pValue;
7847 return v4 >= pValue; 7845 return v4 >= pValue;
7848 case VAR_ItemEquipped: 7846 case VAR_ItemEquipped:
7849 v26 = (ITEM_EQUIP_TYPE)0; 7847 v26 = (ITEM_EQUIP_TYPE)0;
7899 } 7897 }
7900 return true; 7898 return true;
7901 } 7899 }
7902 if ( VarNum == VAR_AutoNotes ) 7900 if ( VarNum == VAR_AutoNotes )
7903 { 7901 {
7904 v13 = 0x80u >> ((signed __int16)(a1 - 1) - 1) % 8; 7902 test_bit_value = 0x80u >> ((signed __int16)(a1 - 1) - 1) % 8;
7905 v14 = pParty->_autonote_bits[((signed __int16)(a1 - 1) - 1) >> 3]; 7903 our_bit_value = pParty->_autonote_bits[((signed __int16)(a1 - 1) - 1) /8];
7906 if ( !((unsigned __int8)v13 & v14) ) 7904 if ( !((unsigned __int8)test_bit_value & our_bit_value) )
7907 return v4 >= pValue; 7905 return false;
7908 v4 = pValue; 7906 return true;
7909 return v4 >= pValue;
7910 } 7907 }
7911 if ( VarNum <= VAR_BaseLuck ) 7908 if ( VarNum <= VAR_BaseLuck )
7912 { 7909 {
7913 if ( VarNum != VAR_BaseLuck ) 7910 if ( VarNum != VAR_BaseLuck )
7914 { 7911 {
7970 return v4 >= pValue; 7967 return v4 >= pValue;
7971 case VAR_Age: 7968 case VAR_Age:
7972 v12 = GetActualAge(); 7969 v12 = GetActualAge();
7973 goto _j_cmp_against_arg; 7970 goto _j_cmp_against_arg;
7974 case VAR_Award: 7971 case VAR_Award:
7975 v13 = 0x80u >> ((signed __int16)a1 - 1) % 8; 7972 test_bit_value = 0x80u >> ((signed __int16)a1 - 1) % 8;
7976 v14 = this->field_152[((signed __int16)a1 - 1) >> 3]; 7973 our_bit_value = this->_guilds_member_bits[((signed __int16)a1 - 1) /8];
7977 if ( !((unsigned __int8)v13 & v14) ) 7974 if ( !((unsigned __int8)test_bit_value & our_bit_value) )
7978 return v4 >= pValue; 7975 return true;
7979 v4 = pValue; 7976 return false;
7980 return v4 >= pValue;
7981 case VAR_Experience: 7977 case VAR_Experience:
7982 v4 = LODWORD(this->uExperience); 7978 v4 = LODWORD(this->uExperience);
7983 return v4 >= pValue; 7979 return v4 >= pValue;
7984 case VAR_QBits_QuestsDone: 7980 case VAR_QBits_QuestsDone:
7985 v13 = 0x80u >> (pValue - 1) % 8; 7981 test_bit_value = 0x80u >> (pValue - 1) % 8;
7986 v14 = pParty->_award_bits[(pValue - 1) >> 3]; 7982 our_bit_value = pParty->_quest_bits[(pValue - 1)/8];
7987 if ( v13 & v14 ) 7983 if ( test_bit_value & our_bit_value )
7988 return true; 7984 return true;
7989 return false; 7985 return false;
7990 case VAR_PlayerItemInHands: 7986 case VAR_PlayerItemInHands:
7991 v15 = 0; 7987 v15 = 0;
7992 v16 = v3->pInventoryItems; 7988 v16 = v3->pInventoryItems;
8439 goto LABEL_124; 8435 goto LABEL_124;
8440 case VAR_Age: 8436 case VAR_Age:
8441 this->sAgeModifier = a3; 8437 this->sAgeModifier = a3;
8442 return; 8438 return;
8443 case VAR_Award: 8439 case VAR_Award:
8444 if ( !((unsigned __int8)(0x80u >> ((signed __int16)a3 - 1) % 8) & pPlayers[v3 + 1]->field_152[((signed __int16)a3 - 1) >> 3]) 8440 if ( !((unsigned __int8)(0x80u >> ((signed __int16)a3 - 1) % 8) & pPlayers[v3 + 1]->_guilds_member_bits[((signed __int16)a3 - 1) >> 3])
8445 //&& dword_723E80_award_related[2 * a3] ) 8441 //&& dword_723E80_award_related[2 * a3] )
8446 && pAwards[a3-1].pText ) 8442 && pAwards[a3-1].pText )
8447 { 8443 {
8448 v12 = pPlayers[v3 + 1]; 8444 v12 = pPlayers[v3 + 1];
8449 v30 = 1; 8445 v30 = 1;
8450 v31 = 1; 8446 v31 = 1;
8451 v12->PlaySound(SPEECH_96, 0); 8447 v12->PlaySound(SPEECH_96, 0);
8452 } 8448 }
8453 v13 = v4->field_152; 8449 v13 = v4->_guilds_member_bits;
8454 goto LABEL_51; 8450 goto LABEL_51;
8455 case VAR_Experience: 8451 case VAR_Experience:
8456 this->uExperience = a3; 8452 this->uExperience = a3;
8457 goto LABEL_124; 8453 goto LABEL_124;
8458 case VAR_QBits_QuestsDone: 8454 case VAR_QBits_QuestsDone:
8459 if ( !((unsigned __int8)(0x80u >> ((signed __int16)a3 - 1) % 8) & pParty->_award_bits[((signed __int16)a3 - 1) >> 3]) 8455 if ( !((unsigned __int8)(0x80u >> ((signed __int16)a3 - 1) % 8) & pParty->_quest_bits[((signed __int16)a3 - 1) >> 3])
8460 // && (&dword_722F10)[4 * a3] ) 8456 // && (&dword_722F10)[4 * a3] )
8461 && pQuestTable[a3-1] ) 8457 && pQuestTable[a3-1] )
8462 { 8458 {
8463 v14 = pPlayers[v3 + 1]; 8459 v14 = pPlayers[v3 + 1];
8464 bFlashQuestBook = 1; 8460 bFlashQuestBook = 1;
8465 v30 = 1; 8461 v30 = 1;
8466 v31 = 1; 8462 v31 = 1;
8467 v14->PlaySound(SPEECH_93, 0); 8463 v14->PlaySound(SPEECH_93, 0);
8468 } 8464 }
8469 v13 = (char *)pParty->_award_bits; 8465 v13 = (char *)pParty->_quest_bits;
8470 LABEL_51: 8466 LABEL_51:
8471 _449B7E_toggle_bit((unsigned char *)v13, a3, 1u); 8467 _449B7E_toggle_bit((unsigned char *)v13, a3, 1u);
8472 goto LABEL_168; 8468 goto LABEL_168;
8473 case VAR_PlayerItemInHands: 8469 case VAR_PlayerItemInHands:
8474 item.Reset(); 8470 item.Reset();
8475 item.Reset(); 8471 item.Reset();
8476 item.uItemID = a3; 8472 item.uItemID = a3;
8477 item.uAttributes = 1; 8473 item.uAttributes = 1;
8478 pParty->SetHoldingItem(&item); 8474 pParty->SetHoldingItem(&item);
8479 if ( a3 >= ITEM_ARTIFACT_PUCK && a3 <= ITEM_RELIC_MEKORIGS_HAMMER ) 8475 if ( a3 >= ITEM_ARTIFACT_PUCK && a3 <= ITEM_RELIC_MEKORIGS_HAMMER )
8480 pParty->field_3C.pIsArtifactFound[a3] = 1; 8476 pParty->pIsArtifactFound[a3-500] = 1;
8481 return; 8477 return;
8482 case VAR_FixedGold: 8478 case VAR_FixedGold:
8483 Party::SetGold(a3); 8479 Party::SetGold(a3);
8484 return; 8480 return;
8485 case VAR_BaseMight: 8481 case VAR_BaseMight:
8858 Dst->sAgeModifier += val; 8854 Dst->sAgeModifier += val;
8859 return; 8855 return;
8860 case VAR_Award: 8856 case VAR_Award:
8861 v13 = pPlayers[uPlayerIdx + 1]; 8857 v13 = pPlayers[uPlayerIdx + 1];
8862 v33 = 0x80u >> ((signed __int16)val - 1) % 8; 8858 v33 = 0x80u >> ((signed __int16)val - 1) % 8;
8863 if ( !((unsigned __int8)(0x80u >> ((signed __int16)val - 1) % 8) & v13->field_152[((signed __int16)val - 1) >> 3]) 8859 if ( !((unsigned __int8)(0x80u >> ((signed __int16)val - 1) % 8) & v13->_guilds_member_bits[((signed __int16)val - 1) >> 3])
8864 //&& dword_723E80_award_related[2 * val] ) 8860 //&& dword_723E80_award_related[2 * val] )
8865 && pAwards[val-1].pText ) 8861 && pAwards[val-1].pText )
8866 { 8862 {
8867 v14 = pPlayers[uPlayerIdx + 1]; 8863 v14 = pPlayers[uPlayerIdx + 1];
8868 v34 = 1; 8864 v34 = 1;
8869 v3 = 1; 8865 v3 = 1;
8870 v14->PlaySound(SPEECH_96, 0); 8866 v14->PlaySound(SPEECH_96, 0);
8871 } 8867 }
8872 v15 = v4->field_152; 8868 v15 = v4->_guilds_member_bits;
8873 goto LABEL_44; 8869 goto LABEL_44;
8874 case VAR_Experience: 8870 case VAR_Experience:
8875 v16 = __CFADD__(val, LODWORD(Dst->uExperience)); 8871 v16 = __CFADD__(val, LODWORD(Dst->uExperience));
8876 LODWORD(Dst->uExperience) += val; 8872 LODWORD(Dst->uExperience) += val;
8877 HIDWORD(Dst->uExperience) += ((unsigned __int64)val >> 32) + v16; 8873 HIDWORD(Dst->uExperience) += ((unsigned __int64)val >> 32) + v16;
8878 if ( (signed __int64)Dst->uExperience > 4000000000i64 ) 8874 if ( (signed __int64)Dst->uExperience > 4000000000i64 )
8879 Dst->uExperience = 4000000000i64; 8875 Dst->uExperience = 4000000000i64;
8880 goto _play_anim_and_exit; 8876 goto _play_anim_and_exit;
8881 case VAR_QBits_QuestsDone: 8877 case VAR_QBits_QuestsDone:
8882 if ( !((unsigned __int8)(0x80u >> ((signed __int16)val - 1) % 8) & pParty->_award_bits[((signed __int16)val - 1) >> 3]) 8878 if ( !((unsigned __int8)(0x80u >> ((signed __int16)val - 1) % 8) & pParty->_quest_bits[((signed __int16)val - 1) >> 3])
8883 //&& (&dword_722F10)[4 * val] ) 8879 //&& (&dword_722F10)[4 * val] )
8884 && pQuestTable[val-1] ) 8880 && pQuestTable[val-1] )
8885 { 8881 {
8886 v17 = pPlayers[uPlayerIdx + 1]; 8882 v17 = pPlayers[uPlayerIdx + 1];
8887 bFlashQuestBook = 1; 8883 bFlashQuestBook = 1;
8888 v34 = 1; 8884 v34 = 1;
8889 v3 = 1; 8885 v3 = 1;
8890 v17->PlaySound(SPEECH_93, 0); 8886 v17->PlaySound(SPEECH_93, 0);
8891 } 8887 }
8892 v15 = (char *)pParty->_award_bits; 8888 v15 = (char *)pParty->_quest_bits;
8893 LABEL_44: 8889 LABEL_44:
8894 _449B7E_toggle_bit((unsigned char *)v15, val, 1u); 8890 _449B7E_toggle_bit((unsigned char *)v15, val, 1u);
8895 goto LABEL_173; 8891 goto LABEL_173;
8896 case VAR_PlayerItemInHands: 8892 case VAR_PlayerItemInHands:
8897 item.Reset(); 8893 item.Reset();
8898 item.Reset(); 8894 item.Reset();
8899 item.uAttributes = 1; 8895 item.uAttributes = 1;
8900 item.uItemID = val; 8896 item.uItemID = val;
8901 if ( val >= ITEM_ARTIFACT_PUCK && val <= ITEM_RELIC_MEKORIGS_HAMMER ) 8897 if ( val >= ITEM_ARTIFACT_PUCK && val <= ITEM_RELIC_MEKORIGS_HAMMER )
8902 pParty->field_3C.pIsArtifactFound[val] = 1; 8898 pParty->pIsArtifactFound[val-500] = 1;
8903 if ( val >= ITEM_WAND_FIRE && val <= ITEM_WAND_INCENERATION ) 8899 if ( val >= ITEM_WAND_FIRE && val <= ITEM_WAND_INCENERATION )
8904 { 8900 {
8905 item.uNumCharges = rand() % 6 + pItemsTable->pItems[item.uItemID].uDamageMod + 1; 8901 item.uNumCharges = rand() % 6 + pItemsTable->pItems[item.uItemID].uDamageMod + 1;
8906 item.uMaxCharges = LOBYTE(item.uNumCharges); 8902 item.uMaxCharges = LOBYTE(item.uNumCharges);
8907 } 8903 }
9485 goto LABEL_17; 9481 goto LABEL_17;
9486 case VAR_Age: 9482 case VAR_Age:
9487 this->sAgeModifier -= (signed __int16)a3; 9483 this->sAgeModifier -= (signed __int16)a3;
9488 return; 9484 return;
9489 case VAR_Award: 9485 case VAR_Award:
9490 v11 = this->field_152; 9486 v11 = this->_guilds_member_bits;
9491 goto LABEL_112; 9487 goto LABEL_112;
9492 case VAR_Experience: 9488 case VAR_Experience:
9493 v12 = (char *)&this->uExperience; 9489 v12 = (char *)&this->uExperience;
9494 v13 = (signed int)a3; 9490 v13 = (signed int)a3;
9495 v14 = *(int *)v12 < (unsigned int)a3; 9491 v14 = *(int *)v12 < (unsigned int)a3;
9496 *(int *)v12 -= (int)a3; 9492 *(int *)v12 -= (int)a3;
9497 *((int *)v12 + 1) -= v14 + HIDWORD(v13); 9493 *((int *)v12 + 1) -= v14 + HIDWORD(v13);
9498 goto LABEL_17; 9494 goto LABEL_17;
9499 case VAR_QBits_QuestsDone: 9495 case VAR_QBits_QuestsDone:
9500 _449B7E_toggle_bit(pParty->_award_bits, (__int16)a3, 0); 9496 _449B7E_toggle_bit(pParty->_quest_bits, (__int16)a3, 0);
9501 pPlayers[v4 + 1]->PlaySound(SPEECH_96, 0); 9497 pPlayers[v4 + 1]->PlaySound(SPEECH_96, 0);
9502 return; 9498 return;
9503 case VAR_PlayerItemInHands: 9499 case VAR_PlayerItemInHands:
9504 v15 = (char *)this->pInventoryIndices; 9500 v15 = (char *)this->pInventoryIndices;
9505 break; 9501 break;