comparison mm7_4.cpp @ 267:ac44e716d051

DrawDialogueUI logic restored
author Nomad
date Mon, 18 Feb 2013 10:55:38 +0200
parents fb890fb66cad
children 4776715a964b 640a176c030f ada52edca264
comparison
equal deleted inserted replaced
266:006188b68143 267:ac44e716d051
9505 { 9505 {
9506 if ( a1 == 79 ) 9506 if ( a1 == 79 )
9507 { 9507 {
9508 if ( dword_F8B1A8 ) 9508 if ( dword_F8B1A8 )
9509 { 9509 {
9510 Party::TakeGold(dword_F8B1B4); 9510 Party::TakeGold(gold_transaction_amount);
9511 if ( uActiveCharacter ) 9511 if ( uActiveCharacter )
9512 { 9512 {
9513 v12 = (char *)&pPlayers[uActiveCharacter]->pActiveSkills[dword_F8B1AC_something_todo_with_awards]; 9513 v12 = (char *)&pPlayers[uActiveCharacter]->pActiveSkills[dword_F8B1AC_something_todo_with_awards];
9514 *(short *)v12 &= 0x3Fu; 9514 *(short *)v12 &= 0x3Fu;
9515 switch ( dword_F8B1B0 ) 9515 switch ( dword_F8B1B0 )
9540 } 9540 }
9541 else 9541 else
9542 { 9542 {
9543 if ( a1 == 82 && dword_F8B1A8 ) 9543 if ( a1 == 82 && dword_F8B1A8 )
9544 { 9544 {
9545 Party::TakeGold(dword_F8B1B4); 9545 Party::TakeGold(gold_transaction_amount);
9546 v4 = pParty->pPlayers; 9546 v4 = pParty->pPlayers;
9547 do 9547 do
9548 { 9548 {
9549 v4->SetVariable(VAR_Award, dword_F8B1AC_something_todo_with_awards); 9549 v4->SetVariable(VAR_Award, dword_F8B1AC_something_todo_with_awards);
9550 ++v4; 9550 ++v4;
9719 dword_F8B1AC_something_todo_with_awards = v3; 9719 dword_F8B1AC_something_todo_with_awards = v3;
9720 if ( v2 ) 9720 if ( v2 )
9721 { 9721 {
9722 if ( v2 == 1 ) 9722 if ( v2 == 1 )
9723 { 9723 {
9724 dword_F8B1B4 = 5000; 9724 gold_transaction_amount = 5000;
9725 dword_F8B1B0 = 3; 9725 dword_F8B1B0 = 3;
9726 } 9726 }
9727 else 9727 else
9728 { 9728 {
9729 if ( v2 == 2 ) 9729 if ( v2 == 2 )
9730 { 9730 {
9731 dword_F8B1B4 = 8000; 9731 gold_transaction_amount = 8000;
9732 dword_F8B1B0 = 4; 9732 dword_F8B1B0 = 4;
9733 } 9733 }
9734 } 9734 }
9735 } 9735 }
9736 else 9736 else
9737 { 9737 {
9738 dword_F8B1B4 = 2000; 9738 gold_transaction_amount = 2000;
9739 dword_F8B1B0 = 2; 9739 dword_F8B1B0 = 2;
9740 } 9740 }
9741 v5 = v1->classType; 9741 v5 = v1->classType;
9742 v33 = v5; 9742 v33 = v5;
9743 v6 = byte_4ED970_skill_learn_ability_by_class_table[v5][v3]; 9743 v6 = byte_4ED970_skill_learn_ability_by_class_table[v5][v3];
9822 case 14: 9822 case 14:
9823 case 15: 9823 case 15:
9824 case 16: 9824 case 16:
9825 case 17: 9825 case 17:
9826 case 18: 9826 case 18:
9827 dword_F8B1B4 = 4000; 9827 gold_transaction_amount = 4000;
9828 goto LABEL_42; 9828 goto LABEL_42;
9829 case 19: 9829 case 19:
9830 v19 = 114; 9830 v19 = 114;
9831 goto LABEL_57; 9831 goto LABEL_57;
9832 case 20: 9832 case 20:
9837 goto LABEL_40; 9837 goto LABEL_40;
9838 case 22: 9838 case 22:
9839 v20 = v1->GetBaseWillpower(); 9839 v20 = v1->GetBaseWillpower();
9840 goto LABEL_61; 9840 goto LABEL_61;
9841 case 24: 9841 case 24:
9842 dword_F8B1B4 = 2500; 9842 gold_transaction_amount = 2500;
9843 v20 = v1->GetBaseEndurance(); 9843 v20 = v1->GetBaseEndurance();
9844 goto LABEL_61; 9844 goto LABEL_61;
9845 case 36: 9845 case 36:
9846 v20 = v1->GetBaseIntelligence(); 9846 v20 = v1->GetBaseIntelligence();
9847 LABEL_61: 9847 LABEL_61:
9854 case 26: 9854 case 26:
9855 case 29: 9855 case 29:
9856 case 32: 9856 case 32:
9857 case 34: 9857 case 34:
9858 case 35: 9858 case 35:
9859 dword_F8B1B4 = 2500; 9859 gold_transaction_amount = 2500;
9860 goto LABEL_42; 9860 goto LABEL_42;
9861 case 8: 9861 case 8:
9862 case 9: 9862 case 9:
9863 case 10: 9863 case 10:
9864 case 11: 9864 case 11:
9865 dword_F8B1B4 = 3000; 9865 gold_transaction_amount = 3000;
9866 goto LABEL_42; 9866 goto LABEL_42;
9867 case 7: 9867 case 7:
9868 goto LABEL_67; 9868 goto LABEL_67;
9869 } 9869 }
9870 goto LABEL_67; 9870 goto LABEL_67;
9916 case 26: 9916 case 26:
9917 case 29: 9917 case 29:
9918 case 32: 9918 case 32:
9919 case 34: 9919 case 34:
9920 case 35: 9920 case 35:
9921 dword_F8B1B4 = 6000; 9921 gold_transaction_amount = 6000;
9922 goto LABEL_42; 9922 goto LABEL_42;
9923 case 8: 9923 case 8:
9924 case 9: 9924 case 9:
9925 case 10: 9925 case 10:
9926 case 11: 9926 case 11:
9927 dword_F8B1B4 = 7000; 9927 gold_transaction_amount = 7000;
9928 goto LABEL_42; 9928 goto LABEL_42;
9929 case 7: 9929 case 7:
9930 break; 9930 break;
9931 } 9931 }
9932 LABEL_67: 9932 LABEL_67:
9933 dword_F8B1B4 = 0; 9933 gold_transaction_amount = 0;
9934 goto LABEL_41; 9934 goto LABEL_41;
9935 } 9935 }
9936 } 9936 }
9937 return v35; 9937 return v35;
9938 } 9938 }
9944 if ( dword_F8B1AC_something_todo_with_awards != 29 9944 if ( dword_F8B1AC_something_todo_with_awards != 29
9945 && dword_F8B1AC_something_todo_with_awards != 32 9945 && dword_F8B1AC_something_todo_with_awards != 32
9946 && (dword_F8B1AC_something_todo_with_awards <= 33 || dword_F8B1AC_something_todo_with_awards > 35) ) 9946 && (dword_F8B1AC_something_todo_with_awards <= 33 || dword_F8B1AC_something_todo_with_awards > 35) )
9947 { 9947 {
9948 LABEL_41: 9948 LABEL_41:
9949 if ( !dword_F8B1B4 ) 9949 if ( !gold_transaction_amount )
9950 goto LABEL_79; 9950 goto LABEL_79;
9951 goto LABEL_42; 9951 goto LABEL_42;
9952 } 9952 }
9953 LABEL_87: 9953 LABEL_87:
9954 dword_F8B1B4 = 500; 9954 gold_transaction_amount = 500;
9955 goto LABEL_41; 9955 goto LABEL_41;
9956 } 9956 }
9957 if ( dword_F8B1AC_something_todo_with_awards >= 23 ) 9957 if ( dword_F8B1AC_something_todo_with_awards >= 23 )
9958 goto LABEL_87; 9958 goto LABEL_87;
9959 if ( dword_F8B1AC_something_todo_with_awards == 7 ) 9959 if ( dword_F8B1AC_something_todo_with_awards == 7 )
9960 { 9960 {
9961 dword_F8B1B4 = 0; 9961 gold_transaction_amount = 0;
9962 goto LABEL_79; 9962 goto LABEL_79;
9963 } 9963 }
9964 if ( dword_F8B1AC_something_todo_with_awards <= 7 ) 9964 if ( dword_F8B1AC_something_todo_with_awards <= 7 )
9965 goto LABEL_41; 9965 goto LABEL_41;
9966 if ( dword_F8B1AC_something_todo_with_awards > 18 ) 9966 if ( dword_F8B1AC_something_todo_with_awards > 18 )
9967 { 9967 {
9968 if ( dword_F8B1AC_something_todo_with_awards != 21 ) 9968 if ( dword_F8B1AC_something_todo_with_awards != 21 )
9969 goto LABEL_41; 9969 goto LABEL_41;
9970 goto LABEL_87; 9970 goto LABEL_87;
9971 } 9971 }
9972 dword_F8B1B4 = 1000; 9972 gold_transaction_amount = 1000;
9973 LABEL_42: 9973 LABEL_42:
9974 if ( dword_F8B1B4 > pParty->uNumGold ) 9974 if ( gold_transaction_amount > pParty->uNumGold )
9975 return (char *)pNPCTopics[124].pText; 9975 return (char *)pNPCTopics[124].pText;
9976 LABEL_79: 9976 LABEL_79:
9977 dword_F8B1A8 = 1; 9977 dword_F8B1A8 = 1;
9978 if ( v34 == 2 ) 9978 if ( v34 == 2 )
9979 { 9979 {
9980 v27 = dword_F8B1B4; 9980 v27 = gold_transaction_amount;
9981 v24 = pSkillNames[v17]; 9981 v24 = pSkillNames[v17];
9982 v21 = pGlobalTXT_LocalizationStrings[433]; 9982 v21 = pGlobalTXT_LocalizationStrings[433];
9983 goto LABEL_90; 9983 goto LABEL_90;
9984 } 9984 }
9985 if ( v34 == 3 ) 9985 if ( v34 == 3 )
9986 { 9986 {
9987 v27 = dword_F8B1B4; 9987 v27 = gold_transaction_amount;
9988 v24 = pSkillNames[v17]; 9988 v24 = pSkillNames[v17];
9989 v21 = pGlobalTXT_LocalizationStrings[432]; 9989 v21 = pGlobalTXT_LocalizationStrings[432];
9990 goto LABEL_90; 9990 goto LABEL_90;
9991 } 9991 }
9992 if ( v34 == 4 ) 9992 if ( v34 == 4 )
9993 { 9993 {
9994 v27 = dword_F8B1B4; 9994 v27 = gold_transaction_amount;
9995 v24 = pSkillNames[v17]; 9995 v24 = pSkillNames[v17];
9996 v21 = pGlobalTXT_LocalizationStrings[225]; 9996 v21 = pGlobalTXT_LocalizationStrings[225];
9997 LABEL_90: 9997 LABEL_90:
9998 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[534], v21, v24, v27); 9998 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[534], v21, v24, v27);
9999 } 9999 }
10014 dword_F8B1A8 = 0; 10014 dword_F8B1A8 = 0;
10015 v2 = pPlayers[uActiveCharacter]; 10015 v2 = pPlayers[uActiveCharacter];
10016 v3 = a1 + 50; 10016 v3 = a1 + 50;
10017 v4 = pPlayers[uActiveCharacter]; 10017 v4 = pPlayers[uActiveCharacter];
10018 dword_F8B1AC_something_todo_with_awards = v3; 10018 dword_F8B1AC_something_todo_with_awards = v3;
10019 dword_F8B1B4 = dword_4F08EC[v1]; 10019 gold_transaction_amount = dword_4F08EC[v1];
10020 if ( v4->CanAct() ) 10020 if ( v4->CanAct() )
10021 { 10021 {
10022 if ( (unsigned __int16)_449B57_test_bit((unsigned __int8 *)v2->field_152, dword_F8B1AC_something_todo_with_awards) ) 10022 if ( (unsigned __int16)_449B57_test_bit((unsigned __int8 *)v2->field_152, dword_F8B1AC_something_todo_with_awards) )
10023 { 10023 {
10024 return pNPCTopics[123].pText; 10024 return pNPCTopics[123].pText;
10025 } 10025 }
10026 else 10026 else
10027 { 10027 {
10028 if ( dword_F8B1B4 <= pParty->uNumGold ) 10028 if ( gold_transaction_amount <= pParty->uNumGold )
10029 { 10029 {
10030 dword_F8B1A8 = 1; 10030 dword_F8B1A8 = 1;
10031 return pNPCTopics[v1 + 110].pText; 10031 return pNPCTopics[v1 + 110].pText;
10032 } 10032 }
10033 else 10033 else