Mercurial > mm7
comparison UI/UIHouses.cpp @ 2402:8cee51ce4382
included directx 11
author | Ritor1 |
---|---|
date | Mon, 14 Jul 2014 10:03:44 +0600 |
parents | 6a7309a847ea |
children | f4af3b203f65 |
comparison
equal
deleted
inserted
replaced
2400:ecd1dd95ec49 | 2402:8cee51ce4382 |
---|---|
1289 dialog_menu_id = (HOUSE_DIALOGUE_MENU)uMessageParam; | 1289 dialog_menu_id = (HOUSE_DIALOGUE_MENU)uMessageParam; |
1290 break; | 1290 break; |
1291 } | 1291 } |
1292 case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_RESULT: | 1292 case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_RESULT: |
1293 { | 1293 { |
1294 pMessageQueue_50CBD0->AddMessage(UIMSG_PlayArcomage, 0, 0); | 1294 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_PlayArcomage, 0, 0); |
1295 dialog_menu_id = HOUSE_DIALOGUE_TAVERN_ARCOMAGE_RESULT; | 1295 dialog_menu_id = HOUSE_DIALOGUE_TAVERN_ARCOMAGE_RESULT; |
1296 break; | 1296 break; |
1297 } | 1297 } |
1298 case HOUSE_DIALOGUE_SHOP_BUY_STANDARD: | 1298 case HOUSE_DIALOGUE_SHOP_BUY_STANDARD: |
1299 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: | 1299 case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: |
1534 { | 1534 { |
1535 if ( pParty->uNumGold < pPrice ) | 1535 if ( pParty->uNumGold < pPrice ) |
1536 { | 1536 { |
1537 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);//"У вас не хватает золота" | 1537 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);//"У вас не хватает золота" |
1538 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Greeting_2); | 1538 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Greeting_2); |
1539 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 1539 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
1540 return; | 1540 return; |
1541 } | 1541 } |
1542 | 1542 |
1543 Party::TakeGold(pPrice); | 1543 Party::TakeGold(pPrice); |
1544 | 1544 |
1604 v15 = v14; | 1604 v15 = v14; |
1605 while ( GetTickCount() < v15 ) | 1605 while ( GetTickCount() < v15 ) |
1606 sqrt(3.1415926); | 1606 sqrt(3.1415926); |
1607 while ( HouseDialogPressCloseBtn() ) | 1607 while ( HouseDialogPressCloseBtn() ) |
1608 ; | 1608 ; |
1609 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | 1609 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 0, 0); |
1610 return; | 1610 return; |
1611 } | 1611 } |
1612 else | 1612 else |
1613 { | 1613 { |
1614 dialog_menu_id = HOUSE_DIALOGUE_MAIN; | 1614 dialog_menu_id = HOUSE_DIALOGUE_MAIN; |
1729 { | 1729 { |
1730 v1 = atoi(pKeyActionMap->pPressedKeysBuffer); | 1730 v1 = atoi(pKeyActionMap->pPressedKeysBuffer); |
1731 v2 = atoi(pKeyActionMap->pPressedKeysBuffer); | 1731 v2 = atoi(pKeyActionMap->pPressedKeysBuffer); |
1732 if ( v1 <= 0 ) | 1732 if ( v1 <= 0 ) |
1733 { | 1733 { |
1734 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 1734 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
1735 return; | 1735 return; |
1736 } | 1736 } |
1737 if ( v1 > pParty->uNumGold ) | 1737 if ( v1 > pParty->uNumGold ) |
1738 { | 1738 { |
1739 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney_TrainingSuccessful); | 1739 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney_TrainingSuccessful); |
1749 pPlayers[uActiveCharacter]->PlaySound(SPEECH_81, 0); | 1749 pPlayers[uActiveCharacter]->PlaySound(SPEECH_81, 0); |
1750 } | 1750 } |
1751 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CANCELLED) | 1751 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CANCELLED) |
1752 { | 1752 { |
1753 window_SpeakInHouse->receives_keyboard_input_2 = WINDOW_INPUT_NONE; | 1753 window_SpeakInHouse->receives_keyboard_input_2 = WINDOW_INPUT_NONE; |
1754 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 1754 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
1755 } | 1755 } |
1756 break; | 1756 break; |
1757 } | 1757 } |
1758 default: | 1758 default: |
1759 break; | 1759 break; |
1803 { | 1803 { |
1804 entered_sum = atoi(pKeyActionMap->pPressedKeysBuffer); | 1804 entered_sum = atoi(pKeyActionMap->pPressedKeysBuffer); |
1805 takes_sum = entered_sum; | 1805 takes_sum = entered_sum; |
1806 if ( !entered_sum ) | 1806 if ( !entered_sum ) |
1807 { | 1807 { |
1808 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 1808 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
1809 return; | 1809 return; |
1810 } | 1810 } |
1811 if ( entered_sum > pParty->uNumGold ) | 1811 if ( entered_sum > pParty->uNumGold ) |
1812 { | 1812 { |
1813 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney_TrainingSuccessful); | 1813 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney_TrainingSuccessful); |
1819 pParty->uNumGoldInBank += takes_sum; | 1819 pParty->uNumGoldInBank += takes_sum; |
1820 if ( uActiveCharacter ) | 1820 if ( uActiveCharacter ) |
1821 pPlayers[uActiveCharacter]->PlaySound(SPEECH_81, 0); | 1821 pPlayers[uActiveCharacter]->PlaySound(SPEECH_81, 0); |
1822 } | 1822 } |
1823 window_SpeakInHouse->receives_keyboard_input_2 = WINDOW_INPUT_NONE; | 1823 window_SpeakInHouse->receives_keyboard_input_2 = WINDOW_INPUT_NONE; |
1824 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 1824 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
1825 return; | 1825 return; |
1826 } | 1826 } |
1827 if (window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CANCELLED) | 1827 if (window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CANCELLED) |
1828 { | 1828 { |
1829 window_SpeakInHouse->receives_keyboard_input_2 = WINDOW_INPUT_NONE; | 1829 window_SpeakInHouse->receives_keyboard_input_2 = WINDOW_INPUT_NONE; |
1830 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 1830 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
1831 } | 1831 } |
1832 return; | 1832 return; |
1833 } | 1833 } |
1834 case HOUSE_DIALOGUE_BANK_GET_GOLD: | 1834 case HOUSE_DIALOGUE_BANK_GET_GOLD: |
1835 { | 1835 { |
1858 Party::SetGold(pParty->uNumGold + takes_sum); | 1858 Party::SetGold(pParty->uNumGold + takes_sum); |
1859 pParty->uNumGoldInBank -= takes_sum; | 1859 pParty->uNumGoldInBank -= takes_sum; |
1860 } | 1860 } |
1861 } | 1861 } |
1862 window_SpeakInHouse->receives_keyboard_input_2 = WINDOW_INPUT_NONE; | 1862 window_SpeakInHouse->receives_keyboard_input_2 = WINDOW_INPUT_NONE; |
1863 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 1863 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
1864 return; | 1864 return; |
1865 } | 1865 } |
1866 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CANCELLED) | 1866 if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CANCELLED) |
1867 { | 1867 { |
1868 window_SpeakInHouse->receives_keyboard_input_2 = WINDOW_INPUT_NONE; | 1868 window_SpeakInHouse->receives_keyboard_input_2 = WINDOW_INPUT_NONE; |
1869 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 1869 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
1870 } | 1870 } |
1871 return; | 1871 return; |
1872 } | 1872 } |
1873 default: | 1873 default: |
1874 { | 1874 { |
2060 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 2060 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2061 pMessageQueue_50CBD0->pMessages[0].eType = UIMSG_RentRoom; | 2061 pMessageQueue_50CBD0->pMessages[0].eType = UIMSG_RentRoom; |
2062 pMessageQueue_50CBD0->pMessages[0].param = (int)window_SpeakInHouse->ptr_1C;//107 | 2062 pMessageQueue_50CBD0->pMessages[0].param = (int)window_SpeakInHouse->ptr_1C;//107 |
2063 pMessageQueue_50CBD0->pMessages[0].field_8 = 1; | 2063 pMessageQueue_50CBD0->pMessages[0].field_8 = 1; |
2064 ++pMessageQueue_50CBD0->uNumMessages;*/ | 2064 ++pMessageQueue_50CBD0->uNumMessages;*/ |
2065 pMessageQueue_50CBD0->AddMessage(UIMSG_RentRoom, (int)window_SpeakInHouse->ptr_1C, 1); | 2065 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_RentRoom, (int)window_SpeakInHouse->ptr_1C, 1); |
2066 window_SpeakInHouse->Release(); | 2066 window_SpeakInHouse->Release(); |
2067 window_SpeakInHouse = 0; | 2067 window_SpeakInHouse = 0; |
2068 return; | 2068 return; |
2069 } | 2069 } |
2070 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);//У вас не хватает золота | 2070 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);//У вас не хватает золота |
2071 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Goodbye); | 2071 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Goodbye); |
2072 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2072 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2073 break; | 2073 break; |
2074 } | 2074 } |
2075 | 2075 |
2076 case HOUSE_DIALOGUE_LEARN_SKILLS: | 2076 case HOUSE_DIALOGUE_LEARN_SKILLS: |
2077 { | 2077 { |
2141 if ( (double)pParty->uNumFoodRations >= p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier ) | 2141 if ( (double)pParty->uNumFoodRations >= p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier ) |
2142 { | 2142 { |
2143 ShowStatusBarString(pGlobalTXT_LocalizationStrings[140], 2);//Вы уже купили еду! | 2143 ShowStatusBarString(pGlobalTXT_LocalizationStrings[140], 2);//Вы уже купили еду! |
2144 if ( uActiveCharacter ) | 2144 if ( uActiveCharacter ) |
2145 pPlayers[uActiveCharacter]->PlaySound(SPEECH_67, 0); | 2145 pPlayers[uActiveCharacter]->PlaySound(SPEECH_67, 0); |
2146 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2146 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2147 return; | 2147 return; |
2148 } | 2148 } |
2149 if ( pParty->uNumGold >= pPriceFood ) | 2149 if ( pParty->uNumGold >= pPriceFood ) |
2150 { | 2150 { |
2151 Party::TakeGold(pPriceFood); | 2151 Party::TakeGold(pPriceFood); |
2152 pParty->uNumFoodRations = (signed __int64)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier; | 2152 pParty->uNumFoodRations = (signed __int64)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier; |
2153 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Greeting_2); | 2153 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Greeting_2); |
2154 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2154 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2155 return; | 2155 return; |
2156 } | 2156 } |
2157 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2); // "You don't have enough gold" | 2157 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2); // "You don't have enough gold" |
2158 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Goodbye); | 2158 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Goodbye); |
2159 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2159 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2160 break; | 2160 break; |
2161 } | 2161 } |
2162 | 2162 |
2163 case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN: | 2163 case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN: |
2164 { | 2164 { |
2282 return; | 2282 return; |
2283 if ( pParty->uNumGold < pPrice ) | 2283 if ( pParty->uNumGold < pPrice ) |
2284 { | 2284 { |
2285 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);//"У вас не хватает золота" | 2285 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);//"У вас не хватает золота" |
2286 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney_TrainingSuccessful); | 2286 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney_TrainingSuccessful); |
2287 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2287 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2288 return; | 2288 return; |
2289 } | 2289 } |
2290 Party::TakeGold(pPrice); | 2290 Party::TakeGold(pPrice); |
2291 v35 = LODWORD(pPlayers[uActiveCharacter]->pConditions[Condition_Zombie]); | 2291 v35 = LODWORD(pPlayers[uActiveCharacter]->pConditions[Condition_Zombie]); |
2292 memset(pPlayers[uActiveCharacter], 0, 0xA0u); | 2292 memset(pPlayers[uActiveCharacter], 0, 0xA0u); |
2301 ReloadPlayerPortraits(uActiveCharacter - 1, pPlayers[uActiveCharacter]->uPrevFace); | 2301 ReloadPlayerPortraits(uActiveCharacter - 1, pPlayers[uActiveCharacter]->uPrevFace); |
2302 } | 2302 } |
2303 pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x2), -1, 0, -1, 0, 0, 0, 0); | 2303 pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x2), -1, 0, -1, 0, 0, 0, 0); |
2304 pPlayers[uActiveCharacter]->PlaySound(SPEECH_82, 0); | 2304 pPlayers[uActiveCharacter]->PlaySound(SPEECH_82, 0); |
2305 pOtherOverlayList->_4418B1(20, uActiveCharacter + 99, 0, 65536); | 2305 pOtherOverlayList->_4418B1(20, uActiveCharacter + 99, 0, 65536); |
2306 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2306 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2307 return; | 2307 return; |
2308 } | 2308 } |
2309 if ( (unsigned int)pPlayers[uActiveCharacter]->pConditions[Condition_Zombie] | v35 ) | 2309 if ( (unsigned int)pPlayers[uActiveCharacter]->pConditions[Condition_Zombie] | v35 ) |
2310 LODWORD(pPlayers[uActiveCharacter]->pConditions[Condition_Zombie]) = v35; | 2310 LODWORD(pPlayers[uActiveCharacter]->pConditions[Condition_Zombie]) = v35; |
2311 else | 2311 else |
2314 && !pPlayers[uActiveCharacter]->pConditions[Condition_Pertified] && !pPlayers[uActiveCharacter]->pConditions[Condition_Dead] ) | 2314 && !pPlayers[uActiveCharacter]->pConditions[Condition_Pertified] && !pPlayers[uActiveCharacter]->pConditions[Condition_Dead] ) |
2315 { | 2315 { |
2316 pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x2), -1, 0, -1, 0, 0, 0, 0); | 2316 pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x2), -1, 0, -1, 0, 0, 0, 0); |
2317 pPlayers[uActiveCharacter]->PlaySound(SPEECH_82, 0); | 2317 pPlayers[uActiveCharacter]->PlaySound(SPEECH_82, 0); |
2318 pOtherOverlayList->_4418B1(20, uActiveCharacter + 99, 0, 65536); | 2318 pOtherOverlayList->_4418B1(20, uActiveCharacter + 99, 0, 65536); |
2319 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2319 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2320 return; | 2320 return; |
2321 } | 2321 } |
2322 pPlayers[uActiveCharacter]->uPrevFace = pPlayers[uActiveCharacter]->uCurrentFace; | 2322 pPlayers[uActiveCharacter]->uPrevFace = pPlayers[uActiveCharacter]->uCurrentFace; |
2323 pPlayers[uActiveCharacter]->uPrevVoiceID = pPlayers[uActiveCharacter]->uVoiceID; | 2323 pPlayers[uActiveCharacter]->uPrevVoiceID = pPlayers[uActiveCharacter]->uVoiceID; |
2324 pPlayers[uActiveCharacter]->SetCondition(Condition_Zombie, 1); | 2324 pPlayers[uActiveCharacter]->SetCondition(Condition_Zombie, 1); |
2331 //HIDWORD(pPlayers[uActiveCharacter]->pConditions[Condition_Zombie]) = (int)v39; | 2331 //HIDWORD(pPlayers[uActiveCharacter]->pConditions[Condition_Zombie]) = (int)v39; |
2332 pPlayers[uActiveCharacter]->pConditions[Condition_Zombie] = pParty->uTimePlayed; | 2332 pPlayers[uActiveCharacter]->pConditions[Condition_Zombie] = pParty->uTimePlayed; |
2333 pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x2), -1, 0, -1, 0, 0, 0, 0); | 2333 pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x2), -1, 0, -1, 0, 0, 0, 0); |
2334 pPlayers[uActiveCharacter]->PlaySound(SPEECH_82, 0); | 2334 pPlayers[uActiveCharacter]->PlaySound(SPEECH_82, 0); |
2335 pOtherOverlayList->_4418B1(20, uActiveCharacter + 99, 0, 65536); | 2335 pOtherOverlayList->_4418B1(20, uActiveCharacter + 99, 0, 65536); |
2336 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2336 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2337 return; | 2337 return; |
2338 } | 2338 } |
2339 //--------------------------------------------------- | 2339 //--------------------------------------------------- |
2340 if ( dialog_menu_id == HOUSE_DIALOGUE_TEMPLE_DONATE ) | 2340 if ( dialog_menu_id == HOUSE_DIALOGUE_TEMPLE_DONATE ) |
2341 { | 2341 { |
2386 } | 2386 } |
2387 } | 2387 } |
2388 ++byte_F8B1EF[uActiveCharacter]; | 2388 ++byte_F8B1EF[uActiveCharacter]; |
2389 pPlayers[uActiveCharacter]->PlaySound(SPEECH_83, 0); | 2389 pPlayers[uActiveCharacter]->PlaySound(SPEECH_83, 0); |
2390 ShowStatusBarString(pGlobalTXT_LocalizationStrings[527], 2); // "Thank You!" | 2390 ShowStatusBarString(pGlobalTXT_LocalizationStrings[527], 2); // "Thank You!" |
2391 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2391 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2392 return; | 2392 return; |
2393 } | 2393 } |
2394 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);//"У вас не хватает золота" | 2394 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);//"У вас не хватает золота" |
2395 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney_TrainingSuccessful); | 2395 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney_TrainingSuccessful); |
2396 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2396 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2397 return; | 2397 return; |
2398 } | 2398 } |
2399 //------------------------------------------------ | 2399 //------------------------------------------------ |
2400 if ( dialog_menu_id == HOUSE_DIALOGUE_LEARN_SKILLS ) | 2400 if ( dialog_menu_id == HOUSE_DIALOGUE_LEARN_SKILLS ) |
2401 { | 2401 { |
2605 } | 2605 } |
2606 pPlayers[uActiveCharacter]->PlaySound(SPEECH_87, 0); | 2606 pPlayers[uActiveCharacter]->PlaySound(SPEECH_87, 0); |
2607 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[430], pPlayers[uActiveCharacter]->pName, pPlayers[uActiveCharacter]->uLevel, pPlayers[uActiveCharacter]->uLevel / 10 + 5);// | 2607 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[430], pPlayers[uActiveCharacter]->pName, pPlayers[uActiveCharacter]->uLevel, pPlayers[uActiveCharacter]->uLevel / 10 + 5);// |
2608 // "%s is now Level %lu and has earned %lu Skill Points!" | 2608 // "%s is now Level %lu and has earned %lu Skill Points!" |
2609 ShowStatusBarString(pTmpBuf.data(), 2); | 2609 ShowStatusBarString(pTmpBuf.data(), 2); |
2610 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2610 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2611 return; | 2611 return; |
2612 } | 2612 } |
2613 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);// "You don't have enough gold" | 2613 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);// "You don't have enough gold" |
2614 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)4); | 2614 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)4); |
2615 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2615 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2616 return; | 2616 return; |
2617 } | 2617 } |
2618 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[538], (unsigned int)(v5 - pPlayers[uActiveCharacter]->uExperience), pPlayers[uActiveCharacter]->uLevel + 1);// | 2618 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[538], (unsigned int)(v5 - pPlayers[uActiveCharacter]->uExperience), pPlayers[uActiveCharacter]->uLevel + 1);// |
2619 // "You need %d more experience to train to level %d" | 2619 // "You need %d more experience to train to level %d" |
2620 v36 = (212 - pFontArrus->CalcTextHeight(pTmpBuf.data(), &training_dialog_window, 0, 0)) / 2 + 88; | 2620 v36 = (212 - pFontArrus->CalcTextHeight(pTmpBuf.data(), &training_dialog_window, 0, 0)) / 2 + 88; |
2626 // ""Sorry, but we are unable to train you."" | 2626 // ""Sorry, but we are unable to train you."" |
2627 v36 = (212 - pFontArrus->CalcTextHeight(pTmpBuf.data(), &training_dialog_window, 0, 0)) / 2 + 101; | 2627 v36 = (212 - pFontArrus->CalcTextHeight(pTmpBuf.data(), &training_dialog_window, 0, 0)) / 2 + 101; |
2628 } | 2628 } |
2629 training_dialog_window.DrawTitleText(pFontArrus, 0, v36, Color16(0xE1u, 0xCDu, 0x23u), pTmpBuf.data(), 3); | 2629 training_dialog_window.DrawTitleText(pFontArrus, 0, v36, Color16(0xE1u, 0xCDu, 0x23u), pTmpBuf.data(), 3); |
2630 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)3); | 2630 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)3); |
2631 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2631 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, 0); |
2632 return; | 2632 return; |
2633 } | 2633 } |
2634 } | 2634 } |
2635 //------------------------------------------------------------- | 2635 //------------------------------------------------------------- |
2636 if ( dialog_menu_id == HOUSE_DIALOGUE_LEARN_SKILLS ) | 2636 if ( dialog_menu_id == HOUSE_DIALOGUE_LEARN_SKILLS ) |
2834 } | 2834 } |
2835 else | 2835 else |
2836 { | 2836 { |
2837 v5 = 0; | 2837 v5 = 0; |
2838 } | 2838 } |
2839 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v5); | 2839 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 1, v5); |
2840 return; // void func | 2840 return; // void func |
2841 } | 2841 } |
2842 | 2842 |
2843 //----- (004B2A74) -------------------------------------------------------- | 2843 //----- (004B2A74) -------------------------------------------------------- |
2844 void SimpleHouseDialog() | 2844 void SimpleHouseDialog() |