Mercurial > mm7
comparison mm7_4.cpp @ 495:90fdb47bfcba
guilds ...
author | Gloval |
---|---|
date | Thu, 28 Feb 2013 21:45:39 +0400 |
parents | af286cec8967 |
children | 0e20e886365d |
comparison
equal
deleted
inserted
replaced
494:af286cec8967 | 495:90fdb47bfcba |
---|---|
9260 | 9260 |
9261 //----- (004B1E92) -------------------------------------------------------- | 9261 //----- (004B1E92) -------------------------------------------------------- |
9262 void __fastcall HousePlaySomeSound(unsigned int uHouseID, int a2) | 9262 void __fastcall HousePlaySomeSound(unsigned int uHouseID, int a2) |
9263 { | 9263 { |
9264 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * uHouseID]].field_C) ) | 9264 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * uHouseID]].field_C) ) |
9265 if ( pAnimatedRooms[p2DEvents[uHouseID - 1].uAnimationID].field_d ) | 9265 if ( pAnimatedRooms[p2DEvents[uHouseID - 1].uAnimationID].uRoomSoundId ) |
9266 pAudioPlayer->PlaySound( | 9266 pAudioPlayer->PlaySound( |
9267 //(SoundID)(a2 + 100 * (BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * uHouseID]].field_C) + 300)), | 9267 //(SoundID)(a2 + 100 * (BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * uHouseID]].field_C) + 300)), |
9268 (SoundID)(a2 + 100 * (pAnimatedRooms[p2DEvents[uHouseID - 1].uAnimationID].field_d) + 300), | 9268 (SoundID)(a2 + 100 * (pAnimatedRooms[p2DEvents[uHouseID - 1].uAnimationID].uRoomSoundId) + 300), |
9269 806, | 9269 806, 0, -1, 0, 0, 0, 0); |
9270 0, | |
9271 -1, | |
9272 0, | |
9273 0, | |
9274 0, | |
9275 0); | |
9276 } | 9270 } |
9277 | 9271 |
9278 //----- (004B1ECE) -------------------------------------------------------- | 9272 //----- (004B1ECE) -------------------------------------------------------- |
9279 void __cdecl sub_4B1ECE() | 9273 void __cdecl sub_4B1ECE() |
9280 { | 9274 { |
12274 | 12268 |
12275 //----- (004B5D7C) -------------------------------------------------------- | 12269 //----- (004B5D7C) -------------------------------------------------------- |
12276 void GuildDialog() | 12270 void GuildDialog() |
12277 { | 12271 { |
12278 GUIWindow *v0; // ebx@1 | 12272 GUIWindow *v0; // ebx@1 |
12279 Player *v1; // edi@1 | 12273 Player *currPlayer; // edi@1 |
12280 signed int base_teach_price; // ebx@1 | 12274 signed int base_teach_price; // ebx@1 |
12281 int v3; // edi@6 | 12275 int v3; // edi@6 |
12282 int result; // eax@11 | 12276 int result; // eax@11 |
12283 unsigned int v5; // ebx@13 | 12277 unsigned int v5; // ebx@13 |
12284 int v6; // esi@13 | 12278 int v6; // esi@13 |
12341 int v63; // [sp+2E8h] [bp-4h]@1 | 12335 int v63; // [sp+2E8h] [bp-4h]@1 |
12342 | 12336 |
12343 v0 = window_SpeakInHouse; | 12337 v0 = window_SpeakInHouse; |
12344 memcpy(&working_window, window_SpeakInHouse, sizeof(GUIWindow)); | 12338 memcpy(&working_window, window_SpeakInHouse, sizeof(GUIWindow)); |
12345 v58 = pPlayers[uActiveCharacter]; | 12339 v58 = pPlayers[uActiveCharacter]; |
12346 v1 = v58; | 12340 currPlayer = v58; |
12347 working_window.uFrameX = 483; | 12341 working_window.uFrameX = 483; |
12348 v53 = 148; | 12342 v53 = 148; |
12349 v54 = 334; | 12343 v54 = 334; |
12350 main_text_color = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); | 12344 main_text_color = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); |
12351 hi_text_color = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); | 12345 hi_text_color = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); |
12352 //v2 = (signed __int64)(p2DEvents_minus1__20[13 * (unsigned int)v0->ptr_1C] * 500.0); | 12346 //v2 = (signed __int64)(p2DEvents_minus1__20[13 * (unsigned int)v0->ptr_1C] * 500.0); |
12353 base_teach_price = (signed __int64)(p2DEvents[(unsigned int)v0->ptr_1C - 1].fPriceMultiplier * 500.0); | 12347 base_teach_price = (signed __int64)(p2DEvents[(unsigned int)v0->ptr_1C - 1].fPriceMultiplier * 500.0); |
12354 v63 = base_teach_price * (100 - v1->GetMerchant()) / 100; | 12348 v63 = base_teach_price * (100 - currPlayer->GetMerchant()) / 100; |
12355 if ( v63 < base_teach_price / 3 ) | 12349 if ( v63 < base_teach_price / 3 ) |
12356 v63 = base_teach_price / 3; | 12350 v63 = base_teach_price / 3; |
12357 strcpy(Dest, ""); | 12351 strcpy(Dest, ""); |
12358 strcpy(v46, ""); | 12352 strcpy(v46, ""); |
12359 strcpy(v47, ""); | 12353 strcpy(v47, ""); |
12363 { | 12357 { |
12364 if ( dword_F8B19C != 18 ) //buy skill | 12358 if ( dword_F8B19C != 18 ) //buy skill |
12365 { | 12359 { |
12366 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 12360 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
12367 { | 12361 { |
12368 v3 = (int)(&v1->uIntelligence + dword_F8B19C); //test skill | 12362 v3 = (int)(&currPlayer->uIntelligence + dword_F8B19C); //test skill |
12369 if ( *(short *)v3 ) | 12363 if ( *(short *)v3 ) |
12370 { | 12364 { |
12371 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[403], pClassNames[dword_F8B19C + 20]); //"You already know the %s skill" | 12365 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[403], pClassNames[dword_F8B19C + 20]); //"You already know the %s skill" |
12372 ShowStatusBarString(pTmpBuf, 2u); | 12366 ShowStatusBarString(pTmpBuf, 2u); |
12373 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); | 12367 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |
12398 { | 12392 { |
12399 if ( *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v6 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)) ) | 12393 if ( *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v6 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)) ) |
12400 { | 12394 { |
12401 pRenderer->DrawTextureTransparent(v63, 0x5Au, ItemsInShopTexture[v6]); | 12395 pRenderer->DrawTextureTransparent(v63, 0x5Au, ItemsInShopTexture[v6]); |
12402 ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 230528), ItemsInShopTexture[v6], v6 + 1); | 12396 ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 230528), ItemsInShopTexture[v6], v6 + 1); |
12403 v1 = v58; | 12397 currPlayer = v58; |
12404 } | 12398 } |
12405 v63 += 70; | 12399 v63 += 70; |
12406 v62 += 280; | 12400 v62 += 280; |
12407 ++v6; | 12401 ++v6; |
12408 } | 12402 } |
12415 { | 12409 { |
12416 if ( *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v7 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)) ) | 12410 if ( *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v7 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)) ) |
12417 { | 12411 { |
12418 pRenderer->DrawTextureTransparent(v63, 0xFAu, ItemsInShopTexture[v7]); | 12412 pRenderer->DrawTextureTransparent(v63, 0xFAu, ItemsInShopTexture[v7]); |
12419 ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 638448), ItemsInShopTexture[v7], v7 + 1); | 12413 ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 638448), ItemsInShopTexture[v7], v7 + 1); |
12420 v1 = v58; | 12414 currPlayer = v58; |
12421 } | 12415 } |
12422 v63 += 70; | 12416 v63 += 70; |
12423 v62 += 280; | 12417 v62 += 280; |
12424 ++v7; | 12418 ++v7; |
12425 } | 12419 } |
12460 { | 12454 { |
12461 v14 = window_SpeakInHouse->ptr_1C; | 12455 v14 = window_SpeakInHouse->ptr_1C; |
12462 v15 = (ItemGen *)(&pParty->pPlayers[1].uExpressionTimeLength + 18 * (v13 + 12 * (int)v14)); | 12456 v15 = (ItemGen *)(&pParty->pPlayers[1].uExpressionTimeLength + 18 * (v13 + 12 * (int)v14)); |
12463 v16 = (int)window_SpeakInHouse->ptr_1C; | 12457 v16 = (int)window_SpeakInHouse->ptr_1C; |
12464 uPlayerID = uActiveCharacter - 1; | 12458 uPlayerID = uActiveCharacter - 1; |
12465 v17 = v1->_490EEE( (ItemGen *)&pParty->pPlayers[1].uExpressionTimeLength + v13 + 12 * (int)v14, 3, v16, 2); | 12459 v17 = currPlayer->_490EEE( (ItemGen *)&pParty->pPlayers[1].uExpressionTimeLength + v13 + 12 * (int)v14, 3, v16, 2); |
12466 v18 = BuilDialogueString((char *)pMerchantsBuyPhrases[v17], uPlayerID, v15, (char *)v14, 2, 0); | 12460 v18 = BuilDialogueString((char *)pMerchantsBuyPhrases[v17], uPlayerID, v15, (char *)v14, 2, 0); |
12467 v19 = pFontArrus->CalcTextHeight(v18, &working_window, 0, 0); | 12461 v19 = pFontArrus->CalcTextHeight(v18, &working_window, 0, 0); |
12468 working_window.DrawTitleText(pFontArrus, v5, (174 - v19) / 2 + 138, main_text_color, v18, 3); | 12462 working_window.DrawTitleText(pFontArrus, 0, (174 - v19) / 2 + 138, main_text_color, v18, 3); |
12469 return; | 12463 return; |
12470 } | 12464 } |
12471 } | 12465 } |
12472 return; | 12466 return; |
12473 } | 12467 } |
12474 if ( !(unsigned __int16)_449B57_test_bit( | 12468 if ( !(unsigned __int16)_449B57_test_bit( |
12475 (unsigned __int8 *)v1->_guilds_member_bits, | 12469 (unsigned __int8 *)currPlayer->_guilds_member_bits, |
12476 word_4F0704[(unsigned int)window_SpeakInHouse->ptr_1C-139]) ) | 12470 guild_mambership_flags[(unsigned int)window_SpeakInHouse->ptr_1C-139]) ) |
12477 { //you must me member | 12471 { //you must me member |
12478 v36 = pNPCTopics[121].pText; | |
12479 v37 = hi_text_color; | |
12480 v38 = pFontArrus->CalcTextHeight(pNPCTopics[121].pText, &working_window, 0, 0); | 12472 v38 = pFontArrus->CalcTextHeight(pNPCTopics[121].pText, &working_window, 0, 0); |
12481 working_window.DrawTitleText(pFontArrus, 0, (212 - v38) / 2 + 101, v37, v36, 3u); | 12473 working_window.DrawTitleText(pFontArrus, 0, (212 - v38) / 2 + 101, hi_text_color, pNPCTopics[121].pText, 3u); |
12482 pDialogueWindow->pNumPresenceButton = 0; | 12474 pDialogueWindow->pNumPresenceButton = 0; |
12483 return; | 12475 return; |
12484 } | 12476 } |
12485 | 12477 |
12486 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) | 12478 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
12606 } | 12598 } |
12607 | 12599 |
12608 | 12600 |
12609 | 12601 |
12610 //----- (004B705E) -------------------------------------------------------- | 12602 //----- (004B705E) -------------------------------------------------------- |
12611 int __cdecl TampleDialog() | 12603 void TempleDialog() |
12612 { | 12604 { |
12613 GUIWindow *v0; // ebx@1 | 12605 GUIWindow *v0; // ebx@1 |
12614 Player *v1; // esi@1 | 12606 Player *v1; // esi@1 |
12615 int v2; // edi@1 | 12607 int v2; // edi@1 |
12616 int result; // eax@4 | 12608 int result; // eax@4 |
12617 GUIWindow *v4; // edi@6 | 12609 GUIWindow *v4; // edi@6 |
12691 { | 12683 { |
12692 if ( dword_F8B19C != 10 ) | 12684 if ( dword_F8B19C != 10 ) |
12693 { | 12685 { |
12694 if ( dword_F8B19C != 11 ) | 12686 if ( dword_F8B19C != 11 ) |
12695 { | 12687 { |
12696 result = dword_F8B19C - 96; | 12688 |
12697 if ( dword_F8B19C == 96 ) | 12689 if ( dword_F8B19C == 96 ) |
12698 { | 12690 { |
12699 result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); | 12691 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
12700 if ( result ) | |
12701 { | 12692 { |
12702 v4 = pDialogueWindow; | 12693 v4 = pDialogueWindow; |
12703 v61 = pDialogueWindow; | 12694 v61 = pDialogueWindow; |
12704 v5 = window_SpeakInHouse->ptr_1C; | 12695 v5 = window_SpeakInHouse->ptr_1C; |
12705 v66 = 0; | 12696 v66 = 0; |
12789 v23 = pFontArrus->CalcTextHeight(pTmpBuf, &v57, 0, 0); | 12780 v23 = pFontArrus->CalcTextHeight(pTmpBuf, &v57, 0, 0); |
12790 result = (int)v57.DrawTitleText(pFontArrus, 0, (174 - v23) / 2 + 138, v22, pTmpBuf, 3u); | 12781 result = (int)v57.DrawTitleText(pFontArrus, 0, (174 - v23) / 2 + 138, v22, pTmpBuf, 3u); |
12791 } | 12782 } |
12792 } | 12783 } |
12793 } | 12784 } |
12794 return result; | 12785 return; |
12795 } | 12786 } |
12796 | 12787 |
12797 // DONATION | 12788 // DONATION |
12798 //v24 = p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C]; | 12789 //v24 = p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C]; |
12799 v24 = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier; | 12790 v24 = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier; |
12854 ShowStatusBarString(pGlobalTXT_LocalizationStrings[527], 2u); // "Thank You!" | 12845 ShowStatusBarString(pGlobalTXT_LocalizationStrings[527], 2u); // "Thank You!" |
12855 goto LABEL_46; | 12846 goto LABEL_46; |
12856 } | 12847 } |
12857 goto LABEL_55; | 12848 goto LABEL_55; |
12858 } | 12849 } |
12859 result = v1->_4B6FF9(); | 12850 if ( !v1->_4B6FF9() ) |
12860 if ( !result ) | 12851 return; |
12861 return result; | |
12862 v25 = 0; | 12852 v25 = 0; |
12863 if ( pParty->uNumGold < v2 ) | 12853 if ( pParty->uNumGold < v2 ) |
12864 { | 12854 { |
12865 LABEL_55: | 12855 LABEL_55: |
12866 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); | 12856 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); |
12912 LABEL_63: | 12902 LABEL_63: |
12913 pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x2), -1, 0, -1, 0, 0, 0, 0); | 12903 pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x2), -1, 0, -1, 0, 0, 0, 0); |
12914 v1->PlaySound(SPEECH_82, 0); | 12904 v1->PlaySound(SPEECH_82, 0); |
12915 pOtherOverlayList->_4418B1(20, uActiveCharacter + 99, 0, 65536); | 12905 pOtherOverlayList->_4418B1(20, uActiveCharacter + 99, 0, 65536); |
12916 LABEL_46: | 12906 LABEL_46: |
12917 /*result = pMessageQueue_50CBD0->uNumMessages; | |
12918 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | |
12919 { | |
12920 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | |
12921 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1; | |
12922 result = 3 * pMessageQueue_50CBD0->uNumMessages + 3; | |
12923 *(&pMessageQueue_50CBD0->uNumMessages + result) = v25; | |
12924 ++pMessageQueue_50CBD0->uNumMessages; | |
12925 }*/ | |
12926 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v25); | 12907 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v25); |
12927 return result; // void func | 12908 return ; // void func |
12928 } | 12909 } |
12929 v63 = 1; | 12910 v63 = 1; |
12930 v41 = pDialogueWindow->GetControl(pDialogueWindow->pStartingPosActiveItem); | 12911 v41 = pDialogueWindow->GetControl(pDialogueWindow->pStartingPosActiveItem); |
12931 strcpy(a1, ""); | 12912 strcpy(a1, ""); |
12932 v41->uHeight = 0; | 12913 v41->uHeight = 0; |
12957 } | 12938 } |
12958 v46 = v43->pNumPresenceButton - v42; | 12939 v46 = v43->pNumPresenceButton - v42; |
12959 v64 = (174 - (signed int)v66) / v46; | 12940 v64 = (174 - (signed int)v66) / v46; |
12960 if ( v64 > 32 ) | 12941 if ( v64 > 32 ) |
12961 v64 = 32; | 12942 v64 = 32; |
12962 result = v43->pStartingPosActiveItem; | |
12963 v47 = (174 - v64 * v46 - (signed int)v66) / 2 - v64 / 2 + 138; | 12943 v47 = (174 - v64 * v46 - (signed int)v66) / 2 - v64 / 2 + 138; |
12964 v65 = v42 + result; | 12944 v65 = v42 + v43->pStartingPosActiveItem; |
12965 if ( v42 + result < result + v43->pNumPresenceButton ) | 12945 if ( v42 + v43->pStartingPosActiveItem < v43->pStartingPosActiveItem + v43->pNumPresenceButton ) |
12966 { | 12946 { |
12967 v61 = (GUIWindow *)(v42 + 2); | 12947 v61 = (GUIWindow *)(v42 + 2); |
12968 v66 = (DDM_DLV_Header *)&a1[100 * v42]; | 12948 v66 = (DDM_DLV_Header *)&a1[100 * v42]; |
12969 do | 12949 do |
12970 { | 12950 { |
12983 v57.DrawTitleText(pFontArrus, 0, v52, v53, (const char *)v66, 3u); | 12963 v57.DrawTitleText(pFontArrus, 0, v52, v53, (const char *)v66, 3u); |
12984 v43 = pDialogueWindow; | 12964 v43 = pDialogueWindow; |
12985 v66 = (DDM_DLV_Header *)((char *)v66 + 100); | 12965 v66 = (DDM_DLV_Header *)((char *)v66 + 100); |
12986 v61 = (GUIWindow *)((char *)v61 + 1); | 12966 v61 = (GUIWindow *)((char *)v61 + 1); |
12987 ++v65; | 12967 ++v65; |
12988 result = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem; | 12968 } |
12989 } | 12969 while ( (signed int)v65 < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem ); |
12990 while ( (signed int)v65 < result ); | 12970 } |
12991 } | 12971 return; |
12992 return result; | |
12993 } | 12972 } |
12994 | 12973 |
12995 | 12974 |
12996 | 12975 |
12997 //----- (004B6478) -------------------------------------------------------- | 12976 //----- (004B6478) -------------------------------------------------------- |
14167 LABEL_19: | 14146 LABEL_19: |
14168 strcpy(sHouseName, v21); | 14147 strcpy(sHouseName, v21); |
14169 LABEL_20: | 14148 LABEL_20: |
14170 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)26, 0, (int)sHouseName); | 14149 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)26, 0, (int)sHouseName); |
14171 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) ) | 14150 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) ) |
14172 if ( pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].field_d ) | 14151 if ( pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].uRoomSoundId ) |
14173 HousePlaySomeSound(v9, 1); | 14152 HousePlaySomeSound(v9, 1); |
14174 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) | 14153 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) |
14175 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); | 14154 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); |
14176 result = v23; | 14155 result = v23; |
14177 if ( v23 ) | 14156 if ( v23 ) |
14217 //uExitMapID = *(__int16 *)((char *)p2DEvents_minus1_::30 + v1); | 14196 //uExitMapID = *(__int16 *)((char *)p2DEvents_minus1_::30 + v1); |
14218 uExitMapID = p2DEvents[house - 1]._quest_related; | 14197 uExitMapID = p2DEvents[house - 1]._quest_related; |
14219 if ( uExitMapID > 0 ) | 14198 if ( uExitMapID > 0 ) |
14220 { | 14199 { |
14221 //v17 = (unsigned int *)(uExitMapID - 1); | 14200 //v17 = (unsigned int *)(uExitMapID - 1); |
14222 if ( !((unsigned __int8)(0x80u >> (uExitMapID - 1) % 8) & pParty->_quest_bits[(uExitMapID - 1) >> 3]) ) | 14201 if(_449B57_test_bit(pParty->_quest_bits,uExitMapID)) |
14202 // if ( !((unsigned __int8)(0x80u >> (uExitMapID - 1) % 8) & pParty->_quest_bits[(uExitMapID - 1) >> 3]) ) | |
14223 { | 14203 { |
14224 //uExitPic = 0; | 14204 //uExitPic = 0; |
14225 uHouse_ExitPic = 0; | 14205 uHouse_ExitPic = 0; |
14226 } | 14206 } |
14227 } | 14207 } |
14397 if ( !start_event_seq_number ) | 14377 if ( !start_event_seq_number ) |
14398 pAudioPlayer->StopChannels(-1, -1); | 14378 pAudioPlayer->StopChannels(-1, -1); |
14399 | 14379 |
14400 uCurrentHouse_Animation = p2DEvents[uHouseID - 1].uAnimationID; | 14380 uCurrentHouse_Animation = p2DEvents[uHouseID - 1].uAnimationID; |
14401 in_current_building_type = pAnimatedRooms[uCurrentHouse_Animation].uBuildingType; | 14381 in_current_building_type = pAnimatedRooms[uCurrentHouse_Animation].uBuildingType; |
14402 if ( in_current_building_type == BildingType_20 && pParty->uFine ) // going 2 jail | 14382 if ( in_current_building_type == BildingType_Throne_Room && pParty->uFine ) // going 2 jail |
14403 { | 14383 { |
14404 uCurrentHouse_Animation = (signed __int16)p2DEvents[186].uAnimationID; | 14384 uCurrentHouse_Animation = (signed __int16)p2DEvents[186].uAnimationID; |
14405 uHouseID = HOUSE_JAIL; | 14385 uHouseID = HOUSE_JAIL; |
14406 pParty->uTimePlayed = pParty->uTimePlayed+ 0x7620000; | 14386 pParty->uTimePlayed = pParty->uTimePlayed+ 0x7620000; |
14407 in_current_building_type = pAnimatedRooms[p2DEvents[HOUSE_LORD_AND_JUDGE].uAnimationID].uBuildingType; | 14387 in_current_building_type = pAnimatedRooms[p2DEvents[HOUSE_LORD_AND_JUDGE].uAnimationID].uBuildingType; |
14443 return 1; | 14423 return 1; |
14444 } | 14424 } |
14445 } | 14425 } |
14446 else | 14426 else |
14447 { //guilds | 14427 { //guilds |
14448 v19 = word_4F0704[uHouseID-139] - 1; //some gild flag check | 14428 v19 = guild_mambership_flags[uHouseID-139]; //guilds flags |
14449 //v20 = uHouseID; | 14429 //v20 = uHouseID; |
14450 if ( !((unsigned __int8)(0x80u >> v19 % 8) & pPlayers[uActiveCharacter]->_guilds_member_bits[v19 /8]) ) | 14430 //if ( !((unsigned __int8)(0x80u >> v19 % 8) & pPlayers[uActiveCharacter]->_guilds_member_bits[v19 /8]) ) |
14431 if(_449B57_test_bit((unsigned char*)pPlayers[uActiveCharacter]->_guilds_member_bits,v19)) | |
14451 { | 14432 { |
14452 HousePlaySomeSound(uHouseID, 3); | 14433 HousePlaySomeSound(uHouseID, 3); |
14453 return 1; | 14434 return 1; |
14454 } | 14435 } |
14455 } | 14436 } |