comparison mm7_4.cpp @ 659:c10163a6d946

NPC hiring fixed
author zipi
date Tue, 12 Mar 2013 23:11:11 +0000
parents 6abf5b610585
children ecfb1b3c9a39
comparison
equal deleted inserted replaced
658:cec42951eda0 659:c10163a6d946
9588 Party::TakeGold(pPrice); 9588 Party::TakeGold(pPrice);
9589 } 9589 }
9590 //LOBYTE(v2->uFlags) |= 0x80u; 9590 //LOBYTE(v2->uFlags) |= 0x80u;
9591 pCurrentNPCInfo->uFlags |= 128; 9591 pCurrentNPCInfo->uFlags |= 128;
9592 pParty->field_709 = 0; 9592 pParty->field_709 = 0;
9593 sub_44A56A(); 9593 Party__CountHirelings();
9594 if ( pParty->pHirelings[0].pName ) 9594 if ( pParty->pHirelings[0].pName )
9595 { 9595 {
9596 memcpy(&pParty->pHirelings[1], pCurrentNPCInfo, sizeof(pParty->pHirelings[1])); 9596 memcpy(&pParty->pHirelings[1], pCurrentNPCInfo, sizeof(pParty->pHirelings[1]));
9597 v24 = pCurrentNPCInfo->pName; 9597 v24 = pCurrentNPCInfo->pName;
9598 v22 = pParty->pHireling2Name; 9598 v22 = pParty->pHireling2Name;
9603 v24 = pCurrentNPCInfo->pName; 9603 v24 = pCurrentNPCInfo->pName;
9604 v22 = pParty->pHireling1Name; 9604 v22 = pParty->pHireling1Name;
9605 } 9605 }
9606 strcpy(v22, v24); 9606 strcpy(v22, v24);
9607 pParty->field_709 = 0; 9607 pParty->field_709 = 0;
9608 sub_44A56A(); 9608 Party__CountHirelings();
9609 PrepareHouse((HOUSE_ID)(int)window_SpeakInHouse->ptr_1C); 9609 PrepareHouse((HOUSE_ID)(int)window_SpeakInHouse->ptr_1C);
9610 dialog_menu_id = 1; 9610 dialog_menu_id = 1;
9611 9611
9612 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); 9612 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
9613 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 9613 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
10868 { 10868 {
10869 v11 = &pParty->pHirelings[1]; 10869 v11 = &pParty->pHirelings[1];
10870 memset(v11, 0, sizeof(NPCData)); 10870 memset(v11, 0, sizeof(NPCData));
10871 } 10871 }
10872 pParty->field_709 = 0; 10872 pParty->field_709 = 0;
10873 sub_44A56A(); 10873 Party__CountHirelings();
10874 dword_591084 = 0; 10874 dword_591084 = 0;
10875 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); 10875 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
10876 dword_7241C8 = 0; 10876 dword_7241C8 = 0;
10877 return; 10877 return;
10878 } 10878 }
10916 v15 = speakingNPC->pName; 10916 v15 = speakingNPC->pName;
10917 v13 = pParty->pHireling1Name; 10917 v13 = pParty->pHireling1Name;
10918 } 10918 }
10919 strcpy(v13, v15); 10919 strcpy(v13, v15);
10920 pParty->field_709 = 0; 10920 pParty->field_709 = 0;
10921 sub_44A56A(); 10921 Party__CountHirelings();
10922 10922
10923 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); 10923 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
10924 10924
10925 if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) 10925 if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
10926 pDialogue_SpeakingActor->uAIState = Removed; 10926 pDialogue_SpeakingActor->uAIState = Removed;
10979 { 10979 {
10980 v11 = &pParty->pHirelings[1]; 10980 v11 = &pParty->pHirelings[1];
10981 memset(v11, 0, sizeof(NPCData)); 10981 memset(v11, 0, sizeof(NPCData));
10982 } 10982 }
10983 pParty->field_709 = 0; 10983 pParty->field_709 = 0;
10984 sub_44A56A(); 10984 Party__CountHirelings();
10985 dword_591084 = 0; 10985 dword_591084 = 0;
10986 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); 10986 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
10987 dword_7241C8 = 0; 10987 dword_7241C8 = 0;
10988 return; 10988 return;
10989 } 10989 }