comparison mm7_2.cpp @ 947:99aa9c8464cf

Improved conditions handling.
author Nomad
date Wed, 01 May 2013 14:30:02 +0200
parents eb3bb0f2e1b9
children 5a2dbb00c399
comparison
equal deleted inserted replaced
946:eb3bb0f2e1b9 947:99aa9c8464cf
6821 6821
6822 case WM_COMMAND: 6822 case WM_COMMAND:
6823 { 6823 {
6824 switch (wParam) 6824 switch (wParam)
6825 { 6825 {
6826 case 101: 6826 case 103: pRenderer->SavePCXScreenshot(); return 0;
6827
6828 case 101: // Quit game
6827 case 40001: 6829 case 40001:
6828 { 6830 {
6829 v38 = 0; 6831 v38 = 0;
6830 v37 = 0; 6832 v37 = 0;
6831 v36 = 2; 6833 v36 = 2;
6832 v35 = ::hWnd; 6834 v35 = ::hWnd;
6833 SendMessageA(::hWnd, WM_DESTROY, v37, v38); 6835 SendMessageA(::hWnd, WM_DESTROY, v37, v38);
6834 } 6836 }
6835 return 0; 6837 return 0;
6836 6838
6837 case 103:
6838 pRenderer->SavePCXScreenshot();
6839 return 0;
6840 6839
6841 case 104: 6840 case 104:
6842 pRenderer->ChangeBetweenWinFullscreenModes(); 6841 pRenderer->ChangeBetweenWinFullscreenModes();
6843 if ( pArcomageGame->bGameInProgress ) 6842 if ( pArcomageGame->bGameInProgress )
6844 pArcomageGame->field_F6 = 1; 6843 pArcomageGame->field_F6 = 1;
6845 return 0; 6844 return 0;
6846 6845
6847 case 40007: 6846 case 40007: pParty->SetGold(pParty->uNumGold + 10000); return 0;
6848 pParty->SetGold(pParty->uNumGold + 10000); 6847 case 40008: GivePartyExp(20000); return 0;
6849 return 0; 6848 case 40013: pParty->SetGold(0); return 0;
6850
6851 case 40008:
6852 GivePartyExp(20000);
6853 return 0;
6854
6855 case 40013:
6856 pParty->SetGold(0);
6857 return 0;
6858 6849
6859 case 40059: 6850 case 40059:
6860 for (uint i = 0; i < 4; ++i) 6851 for (uint i = 0; i < 4; ++i)
6861 pParty->pPlayers[i].uSkillPoints = 50; 6852 pParty->pPlayers[i].uSkillPoints = 50;
6862 return 0; 6853 return 0;
6863 6854
6864 case 40044://condition Afraid/fear 6855 case 40029: pPlayers[uActiveCharacter]->SetPertified(true); return 0;
6865 pPlayers[uActiveCharacter]->pConditions[3] = 1; 6856 case 40030: pPlayers[uActiveCharacter]->SetWeak(true); return 0;
6866 return 0; 6857 case 40031: pPlayers[uActiveCharacter]->SetPoison3(true); return 0;
6867 6858 case 40032: pPlayers[uActiveCharacter]->SetPoison2(true); return 0;
6868 case 40043://condition Asleep 6859 case 40033: pPlayers[uActiveCharacter]->SetPoison1(true); return 0;
6869 pPlayers[uActiveCharacter]->pConditions[2] = 1; 6860 case 40034: pPlayers[uActiveCharacter]->SetDisease3(true); return 0;
6870 return 0; 6861 case 40035: pPlayers[uActiveCharacter]->SetDisease2(true); return 0;
6871 6862 case 40036: pPlayers[uActiveCharacter]->SetDisease1(true); return 0;
6872 case 40037://condition Curse 6863 case 40037: pPlayers[uActiveCharacter]->SetCursed(true); return 0;
6873 pPlayers[uActiveCharacter]->pConditions[0] = 1; 6864 case 40038: pPlayers[uActiveCharacter]->SetInsane(true); return 0;
6874 return 0; 6865 case 40039: pPlayers[uActiveCharacter]->SetDrunk(true); return 0;
6875 6866 case 40040: pPlayers[uActiveCharacter]->SetUnconcious(true); return 0;
6876 case 40036://condition Disease1 6867 case 40041: pPlayers[uActiveCharacter]->SetDead(true); return 0;
6877 pPlayers[uActiveCharacter]->pConditions[7] = 1; 6868 case 40042: pPlayers[uActiveCharacter]->SetEradicated(true); return 0;
6878 return 0; 6869 case 40043: pPlayers[uActiveCharacter]->SetAsleep(true); return 0;
6879 6870 case 40044: pPlayers[uActiveCharacter]->SetAfraid(true); return 0;
6880 case 40035://condition Disease2 6871 case 40045: pPlayers[uActiveCharacter]->SetParalyzed(true); return 0;
6881 pPlayers[uActiveCharacter]->pConditions[9] = 1; 6872 case 40073: pPlayers[uActiveCharacter]->SetZombie(true); return 0;
6882 return 0;
6883
6884 case 40034://condition Disease3
6885 pPlayers[uActiveCharacter]->pConditions[11] = 1;
6886 return 0;
6887
6888 case 40041://condition Dead
6889 pPlayers[uActiveCharacter]->pConditions[14] = 1;
6890 return 0;
6891
6892 case 40039://condition Drunk
6893 pPlayers[uActiveCharacter]->pConditions[4] = 1;
6894 return 0;
6895
6896 case 40042://condition Eradicated
6897 pPlayers[uActiveCharacter]->pConditions[16] = 1;
6898 return 0;
6899
6900 case 40038://condition Isane
6901 pPlayers[uActiveCharacter]->pConditions[5] = 1;
6902 return 0;
6903
6904 case 40045://condition Paralized
6905 pPlayers[uActiveCharacter]->pConditions[12] = 1;
6906 return 0;
6907
6908 case 40033://condition Poison1
6909 pPlayers[uActiveCharacter]->pConditions[6] = 1;
6910 return 0;
6911
6912 case 40032://condition Poison2
6913 pPlayers[uActiveCharacter]->pConditions[8] = 1;
6914 return 0;
6915
6916 case 40031://condition Poison3
6917 pPlayers[uActiveCharacter]->pConditions[10] = 1;
6918 return 0;
6919
6920 case 40029://condition Stone
6921 pPlayers[uActiveCharacter]->pConditions[15] = 1;
6922 return 0;
6923
6924 case 40040://condition Unconscious
6925 pPlayers[uActiveCharacter]->pConditions[13] = 1;
6926 return 0;
6927
6928 case 40030://condition Weak
6929 pPlayers[uActiveCharacter]->pConditions[1] = 1;
6930 return 0;
6931
6932 case 40073://condition Zombie
6933 pPlayers[uActiveCharacter]->pConditions[17] = 1;
6934 return 0;
6935
6936 } 6873 }
6937 } 6874 }
6938 return DefWindowProcA(hWnd, Msg, wParam, lParam); 6875 return DefWindowProcA(hWnd, Msg, wParam, lParam);
6939 }; 6876 };
6940 6877