World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл NPC.cpp

См. исходные тексты.

Функции

void InitializeAwards ()
 
void InitializeScrolls ()
 
void InitializeMerchants ()
 
void InitializeTransitions ()
 
void InitializeAutonotes ()
 
void InitializeQuests ()
 
bool CheckPortretAgainstSex (int portret_num, int sex)
 
NPCDataGetNPCData (signed int npcid)
 
struct NPCDataGetNewNPCData (signed int npcid, int *npc_indx)
 
bool PartyHasDragon ()
 
bool CheckHiredNPCSpeciality (unsigned int uProfession)
 
const char * ContractSelectText (int pEventCode)
 
void NPCHireableDialogPrepare ()
 
void _4B4224_UpdateNPCTopics (int _this)
 
int NPC_EventProcessor (int npc_event_id, int entry_line)
 
int GetGreetType (signed int SpeakingNPC_ID)
 
const char * GetProfessionActionText (int a1)
 
int UseNPCSkill (NPCProf profession)
 

Переменные

int pDialogueNPCCount
 
std::array< class Image *, 6 > pDialogueNPCPortraits
 
int uNumDialogueNPCPortraits
 
struct NPCStatspNPCStats = nullptr
 

Функции

◆ InitializeAwards()

void InitializeAwards ( )

См. определение в файле NPC.cpp строка 771

771  {
772  int i;
773  char *test_string;
774  unsigned char c;
775  bool break_loop;
776  unsigned int temp_str_len;
777  char *tmp_pos;
778  int decode_step;
779 
780  free(pAwardsTXT_Raw);
781  pAwardsTXT_Raw = (char *)pEvents_LOD->LoadCompressedTexture("awards.txt");
782  strtok(pAwardsTXT_Raw, "\r");
783 
784  for (i = 1; i < 105; ++i) {
785  test_string = strtok(NULL, "\r") + 1;
786  break_loop = false;
787  decode_step = 0;
788  do {
789  c = *(unsigned char *)test_string;
790  temp_str_len = 0;
791  while ((c != '\t') && (c > 0)) {
792  ++temp_str_len;
793  c = test_string[temp_str_len];
794  }
795  tmp_pos = test_string + temp_str_len;
796  if (*tmp_pos == 0) break_loop = true;
797  *tmp_pos = 0;
798  if (temp_str_len) {
799  if (decode_step == 1)
800  pAwards[i].pText = RemoveQuotes(test_string);
801  else if (decode_step == 2)
802  pAwards[i].uPriority = atoi(test_string);
803  } else {
804  break_loop = true;
805  }
806  ++decode_step;
807  test_string = tmp_pos + 1;
808  } while ((decode_step < 3) && !break_loop);
809  }
810 }

Перекрестные ссылки LOD::File::LoadCompressedTexture(), pAwards, pAwardsTXT_Raw, pEvents_LOD и RemoveQuotes().

Используется в NPCStats::Initialize().

+ Граф вызовов:
+ Граф вызова функции:

◆ InitializeScrolls()

void InitializeScrolls ( )

См. определение в файле NPC.cpp строка 814

814  {
815  int i;
816  char *test_string;
817  unsigned char c;
818  bool break_loop;
819  unsigned int temp_str_len;
820  char *tmp_pos;
821  int decode_step;
822 
823  free(pScrollsTXT_Raw);
824  pScrollsTXT_Raw = (char *)pEvents_LOD->LoadCompressedTexture("scroll.txt");
825  strtok(pScrollsTXT_Raw, "\r");
826  for (i = 0; i < 82; ++i) {
827  test_string = strtok(NULL, "\r") + 1;
828  break_loop = false;
829  decode_step = 0;
830  do {
831  c = *(unsigned char *)test_string;
832  temp_str_len = 0;
833  while ((c != '\t') && (c > 0)) {
834  ++temp_str_len;
835  c = test_string[temp_str_len];
836  }
837  tmp_pos = test_string + temp_str_len;
838  if (*tmp_pos == 0) break_loop = true;
839  *tmp_pos = 0;
840  if (temp_str_len) {
841  if (decode_step == 1) pScrolls[i] = RemoveQuotes(test_string);
842  } else {
843  break_loop = true;
844  }
845  ++decode_step;
846  test_string = tmp_pos + 1;
847  } while ((decode_step < 2) && !break_loop);
848  }
849 }

Перекрестные ссылки LOD::File::LoadCompressedTexture(), pEvents_LOD, pScrolls, pScrollsTXT_Raw и RemoveQuotes().

Используется в NPCStats::Initialize().

+ Граф вызовов:
+ Граф вызова функции:

◆ InitializeMerchants()

void InitializeMerchants ( )

См. определение в файле NPC.cpp строка 852

852  {
853  int i;
854  char *test_string;
855  unsigned char c;
856  bool break_loop;
857  unsigned int temp_str_len;
858  char *tmp_pos;
859  int decode_step;
860 
861  free(pMerchantsTXT_Raw);
862  pMerchantsTXT_Raw = (char *)pEvents_LOD->LoadCompressedTexture("merchant.txt");
863  strtok(pMerchantsTXT_Raw, "\r");
864 
865  for (i = 0; i < 7; ++i) {
866  test_string = strtok(NULL, "\r") + 1;
867  break_loop = false;
868  decode_step = 0;
869  do {
870  c = *(unsigned char *)test_string;
871  temp_str_len = 0;
872  while ((c != '\t') && (c > 0)) {
873  ++temp_str_len;
874  c = test_string[temp_str_len];
875  }
876  tmp_pos = test_string + temp_str_len;
877  if (*tmp_pos == 0) break_loop = true;
878  *tmp_pos = 0;
879  if (temp_str_len) {
880  switch (decode_step) {
881  case 1:
882  pMerchantsBuyPhrases[i] = RemoveQuotes(test_string);
883  break;
884  case 2:
885  pMerchantsSellPhrases[i] = RemoveQuotes(test_string);
886  break;
887  case 3:
888  pMerchantsRepairPhrases[i] = RemoveQuotes(test_string);
889  break;
890  case 4:
892  RemoveQuotes(test_string);
893  break;
894  }
895  } else {
896  break_loop = true;
897  }
898  ++decode_step;
899  test_string = tmp_pos + 1;
900  } while ((decode_step < 5) && !break_loop);
901  }
902 }

Перекрестные ссылки LOD::File::LoadCompressedTexture(), pEvents_LOD, pMerchantsBuyPhrases, pMerchantsIdentifyPhrases, pMerchantsRepairPhrases, pMerchantsSellPhrases, pMerchantsTXT_Raw и RemoveQuotes().

Используется в NPCStats::Initialize().

+ Граф вызовов:
+ Граф вызова функции:

◆ InitializeTransitions()

void InitializeTransitions ( )

См. определение в файле NPC.cpp строка 905

905  {
906  int i;
907  char *test_string;
908  unsigned char c;
909  bool break_loop;
910  unsigned int temp_str_len;
911  char *tmp_pos;
912  int decode_step;
913 
914  free(pTransitionsTXT_Raw);
915  pTransitionsTXT_Raw = (char *)pEvents_LOD->LoadCompressedTexture("trans.txt");
916  strtok(pTransitionsTXT_Raw, "\r");
917 
918  for (i = 0; i < 464; ++i) {
919  test_string = strtok(NULL, "\r") + 1;
920  break_loop = false;
921  decode_step = 0;
922  do {
923  c = *(unsigned char *)test_string;
924  temp_str_len = 0;
925  while ((c != '\t') && (c > 0)) {
926  ++temp_str_len;
927  c = test_string[temp_str_len];
928  }
929  tmp_pos = test_string + temp_str_len;
930  if (*tmp_pos == 0) break_loop = true;
931  *tmp_pos = 0;
932  if (temp_str_len) {
933  if (decode_step == 1)
934  pTransitionStrings[i + 1] = RemoveQuotes(test_string);
935  } else {
936  break_loop = true;
937  }
938  ++decode_step;
939  test_string = tmp_pos + 1;
940  } while ((decode_step < 2) && !break_loop);
941  }
942 }

Перекрестные ссылки LOD::File::LoadCompressedTexture(), pEvents_LOD, pTransitionStrings, pTransitionsTXT_Raw и RemoveQuotes().

Используется в NPCStats::Initialize().

+ Граф вызовов:
+ Граф вызова функции:

◆ InitializeAutonotes()

void InitializeAutonotes ( )

См. определение в файле NPC.cpp строка 945

945  {
946  int i;
947  char *test_string;
948  unsigned char c;
949  bool break_loop;
950  unsigned int temp_str_len;
951  char *tmp_pos;
952  int decode_step;
953 
954  free(pAutonoteTXT_Raw);
955  pAutonoteTXT_Raw = (char *)pEvents_LOD->LoadCompressedTexture("autonote.txt");
956  strtok(pAutonoteTXT_Raw, "\r");
957 
958  for (i = 0; i < 195; ++i) {
959  test_string = strtok(NULL, "\r") + 1;
960  break_loop = false;
961  decode_step = 0;
962  do {
963  c = *(unsigned char *)test_string;
964  temp_str_len = 0;
965  while ((c != '\t') && (c > 0)) {
966  ++temp_str_len;
967  c = test_string[temp_str_len];
968  }
969  tmp_pos = test_string + temp_str_len;
970  if (*tmp_pos == 0) break_loop = true;
971  *tmp_pos = 0;
972  if (temp_str_len) {
973  switch (decode_step) {
974  case 1:
975  pAutonoteTxt[i + 1].pText = RemoveQuotes(test_string);
976  break;
977  case 2: {
978  if (!_stricmp(test_string, "potion")) {
979  pAutonoteTxt[i + 1].eType = AUTONOTE_POTION_RECEPIE;
980  break;
981  }
982  if (!_stricmp(test_string, "stat")) {
983  pAutonoteTxt[i + 1].eType = AUTONOTE_STAT_HINT;
984  break;
985  }
986  if (!_stricmp(test_string, "seer")) {
987  pAutonoteTxt[i + 1].eType = AUTONOTE_SEER;
988  break;
989  }
990  if (!_stricmp(test_string, "obelisk")) {
991  pAutonoteTxt[i + 1].eType = AUTONOTE_OBELISK;
992  break;
993  }
994  if (!_stricmp(test_string, "teacher")) {
995  pAutonoteTxt[i + 1].eType = AUTONOTE_TEACHER;
996  break;
997  }
998  pAutonoteTxt[i + 1].eType = AUTONOTE_MISC;
999  break;
1000  }
1001  }
1002  } else {
1003  break_loop = true;
1004  }
1005  ++decode_step;
1006  test_string = tmp_pos + 1;
1007  } while ((decode_step < 3) && !break_loop);
1008  }
1009 }

Перекрестные ссылки AUTONOTE_MISC, AUTONOTE_OBELISK, AUTONOTE_POTION_RECEPIE, AUTONOTE_SEER, AUTONOTE_STAT_HINT, AUTONOTE_TEACHER, LOD::File::LoadCompressedTexture(), pAutonoteTxt, pAutonoteTXT_Raw, pEvents_LOD и RemoveQuotes().

Используется в NPCStats::Initialize().

+ Граф вызовов:
+ Граф вызова функции:

◆ InitializeQuests()

void InitializeQuests ( )

См. определение в файле NPC.cpp строка 1012

1012  {
1013  int i;
1014  char *test_string;
1015  unsigned char c;
1016  bool break_loop;
1017  unsigned int temp_str_len;
1018  char *tmp_pos;
1019  int decode_step;
1020 
1021  free(pQuestsTXT_Raw);
1022  pQuestsTXT_Raw = (char *)pEvents_LOD->LoadCompressedTexture("quests.txt");
1023  strtok(pQuestsTXT_Raw, "\r");
1024  memset(pQuestTable.data(), 0, sizeof(pQuestTable));
1025  for (i = 0; i < 512; ++i) {
1026  test_string = strtok(NULL, "\r") + 1;
1027  break_loop = false;
1028  decode_step = 0;
1029  do {
1030  c = *(unsigned char *)test_string;
1031  temp_str_len = 0;
1032  while ((c != '\t') && (c > 0)) {
1033  ++temp_str_len;
1034  c = test_string[temp_str_len];
1035  }
1036  tmp_pos = test_string + temp_str_len;
1037  if (*tmp_pos == 0) break_loop = true;
1038  *tmp_pos = 0;
1039  if (temp_str_len) {
1040  if (decode_step == 1)
1041  pQuestTable[i + 1] = RemoveQuotes(test_string);
1042  } else {
1043  break_loop = true;
1044  }
1045  ++decode_step;
1046  test_string = tmp_pos + 1;
1047  } while ((decode_step < 2) && !break_loop);
1048  }
1049 }

Перекрестные ссылки LOD::File::LoadCompressedTexture(), pEvents_LOD, pQuestsTXT_Raw, pQuestTable и RemoveQuotes().

Используется в NPCStats::Initialize().

+ Граф вызовов:
+ Граф вызова функции:

◆ CheckPortretAgainstSex()

bool CheckPortretAgainstSex ( int  portret_num,
int  sex 
)

См. определение в файле NPC.cpp строка 578

578 { return true; }

Используется в NPCStats::InitializeAdditionalNPCs().

+ Граф вызова функции:

◆ GetNPCData()

NPCData* GetNPCData ( signed int  npcid)

См. определение в файле NPC.cpp строка 43

43  {
44  unsigned int v1; // esi@1
45  NPCData *result; // eax@5
46  int v3; // esi@9
47  int v4; // ecx@9
48  char v9; // al@22
49  int i;
50 
51  v1 = npcid;
52  if (npcid >= 0) {
53  if (npcid < 5000) {
54  if (npcid >= 501) {
55  logger->Warning(L"NPC id exceeds MAX_DATA!");
56  }
57  return &pNPCStats->pNewNPCData[v1]; // - 1];
58  }
59  return &pNPCStats->pAdditionalNPC[npcid - 5000];
60  }
61 
62  if (npcid >= 5000) return &pNPCStats->pAdditionalNPC[npcid - 5000];
64  result = 0;
65  } else {
67  v4 = 0;
68  char buf[1024];
69 
70  for (i = 0; i < 2; ++i) {
71  if (pParty->pHirelings[i].pName) buf[v4++] = i;
72  }
73 
74  if (pNPCStats->uNumNewNPCs > 0) {
75  for (i = 0; i < pNPCStats->uNumNewNPCs; ++i) {
76  if (pNPCStats->pNewNPCData[i].Hired()) {
77  if (!pParty->pHirelings[0].pName ||
78  strcmp((char *)pNPCStats->pNewNPCData[i].pName,
79  (char *)pParty->pHirelings[0].pName)) {
80  if (!pParty->pHirelings[1].pName ||
81  strcmp((char *)pNPCStats->pNewNPCData[i].pName,
82  (char *)pParty->pHirelings[1].pName))
83  buf[v4++] = i + 2;
84  }
85  }
86  }
87  }
88 
89  v9 = buf[v3];
90  if (v9 >= 2)
91  result = &pNPCStats->pNPCData[499 + v9];
92  else
93  result = &pParty->pHirelings[v9];
94  }
95  return result;
96 }

Перекрестные ссылки NPCData::Hired(), logger, NPCStats::pAdditionalNPC, Party::pHirelings, NPCData::pName, NPCStats::pNewNPCData, NPCStats::pNPCData, pNPCStats, pParty, sDialogue_SpeakingActorNPC_ID, NPCStats::uNumNewNPCs и Log::Warning().

Используется в BuildDialogueString(), GameUI_InitializeDialogue(), MonsterPopup_Draw(), OnSelectNPCDialogueOption(), sub_4B3E1E(), GUIWindow_Dialogue::Update() и UseNPCSkill().

+ Граф вызовов:
+ Граф вызова функции:

◆ GetNewNPCData()

struct NPCData* GetNewNPCData ( signed int  npcid,
int *  npc_indx 
)

См. определение в файле NPC.cpp строка 99

99  {
100  int *v3; // edi@1
101  NPCData *result; // eax@5
102  int v5; // esi@9
103  int v6; // ecx@9
104  char v11; // al@23
105 
106  v3 = npc_indx;
107  if (npcid >= 0) {
108  if (npcid < 5000) {
109  if (npcid >= 501) {
110  logger->Warning(L"NPC id exceeds MAX_DATA!");
111  }
112  *v3 = npcid;
113  return &pNPCStats->pNewNPCData[npcid];
114  }
115  *npc_indx = npcid - 5000;
116  return &pNPCStats->pAdditionalNPC[npcid - 5000];
117  }
118  if (npcid >= 5000) {
119  *npc_indx = npcid - 5000;
120  return &pNPCStats->pAdditionalNPC[npcid - 5000];
121  }
123  *npc_indx = 0;
124  result = nullptr;
125  } else {
126  v5 = abs(sDialogue_SpeakingActorNPC_ID) - 1;
127  v6 = 0;
128  char buf[1024];
129 
130  for (int i = 0; i < 2; ++i) {
131  if (pParty->pHirelings[i].pName) buf[v6++] = i;
132  }
133  for (int i = 0; i < pNPCStats->uNumNewNPCs; ++i) {
134  if (pNPCStats->pNewNPCData[i].Hired() &&
135  (!pParty->pHirelings[0].pName ||
136  strcmp(pNPCStats->pNewNPCData[i].pName,
137  pParty->pHirelings[0].pName)) &&
138  (!pParty->pHirelings[1].pName ||
139  strcmp(pNPCStats->pNewNPCData[i].pName,
140  pParty->pHirelings[1].pName))) {
141  buf[v6++] = i + 2;
142  }
143  }
144  v11 = buf[v5];
145 
146  if (v11 >= 2u) {
147  *v3 = v11 - 2;
148  result = &pNPCStats->pNewNPCData[v11 - 2];
149  } else {
150  *v3 = v11;
151  result = &pParty->pHirelings[v11];
152  }
153  }
154  return result;
155 }

Перекрестные ссылки NPCData::Hired(), logger, NPCStats::pAdditionalNPC, Party::pHirelings, NPCData::pName, NPCStats::pNewNPCData, pNPCStats, pParty, sDialogue_SpeakingActorNPC_ID, NPCStats::uNumNewNPCs и Log::Warning().

Используется в GameUI_DrawNPCPopup() и Player::SubtractVariable().

+ Граф вызовов:
+ Граф вызова функции:

◆ PartyHasDragon()

bool PartyHasDragon ( )

См. определение в файле NPC.cpp строка 750

750 { return pNPCStats->pNewNPCData[57].Hired(); }

Перекрестные ссылки NPCData::Hired(), NPCStats::pNewNPCData и pNPCStats.

Используется в _493938_regenerate(), Player::GetActualSkillLevel() и PrepareToLoadRestUI().

+ Граф вызовов:
+ Граф вызова функции:

◆ CheckHiredNPCSpeciality()

bool CheckHiredNPCSpeciality ( unsigned int  uProfession)

См. определение в файле NPC.cpp строка 754

754  {
755  if (bNoNPCHiring == 1) return 0;
756 
757  for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i) {
758  if (pNPCStats->pNewNPCData[i].uProfession == uProfession &&
760  0x80)) // Uninitialized memory access
761  return true;
762  }
763  if (pParty->pHirelings[0].uProfession == uProfession ||
764  pParty->pHirelings[1].uProfession == uProfession)
765  return true;
766  else
767  return false;
768 }

Перекрестные ссылки bNoNPCHiring, Party::pHirelings, NPCStats::pNewNPCData, pNPCStats, pParty, NPCData::uFlags, NPCStats::uNumNewNPCs и NPCData::uProfession.

Используется в Player::CanIdentify(), Player::CanRepair(), Player::CompareVariable(), GameUI_DrawMinimap(), Player::GetActualLuck(), Player::GetActualResistance(), Player::GetActualSkillLevel(), Party::GetPartyReputation(), GetTravelTime(), Party::PartyFindsGold(), PrepareToLoadRestUI() и TravelByTransport().

+ Граф вызова функции:

◆ ContractSelectText()

const char* ContractSelectText ( int  pEventCode)

См. определение в файле NPC.cpp строка 1052

1052  {
1053  static const int dialogue_base = 110;
1054  contract_approved = 0;
1055  dword_F8B1AC_award_bit_number = pEventCode + 50;
1057 
1058  if (uActiveCharacter == 0)
1059  uActiveCharacter = pParty->GetFirstCanAct(); // avoid nzi
1060 
1061  if (pPlayers[uActiveCharacter]->CanAct()) {
1064  ->_achieved_awards_bits,
1066  return pNPCTopics[dialogue_base + 13].pText;
1067  } else {
1068  if (gold_transaction_amount <= pParty->GetGold()) {
1069  contract_approved = 1;
1070  return pNPCTopics[pEventCode + dialogue_base].pText;
1071  } else {
1072  return pNPCTopics[dialogue_base + 14].pText;
1073  }
1074  }
1075  } else {
1076  return pNPCTopics[dialogue_base + 12].pText;
1077  }
1078 }

Перекрестные ссылки _449B57_test_bit(), contract_approved, dword_F8B1AC_award_bit_number, Party::GetFirstCanAct(), gold_transaction_amount, pNPCTopics, pParty, pPlayers, price_for_membership и uActiveCharacter.

Используется в DrawJoinGuildWindow() и SimpleHouseDialog().

+ Граф вызовов:
+ Граф вызова функции:

◆ NPCHireableDialogPrepare()

void NPCHireableDialogPrepare ( )

См. определение в файле NPC.cpp строка 1080

1080  {
1081  signed int v0; // ebx@1
1082  NPCData *v1; // edi@1
1083 
1084  v0 = 0;
1085  v1 = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount +
1086  -(dword_591080 != 0))]; //- 1
1088  pDialogueWindow = new GUIWindow(WINDOW_Dialogue, 0, 0, window->GetWidth(), 350, 0);
1090  471, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0,
1091  localization->GetString(34), // "Cancel"
1092  {{ui_exit_cancel_button_background}});
1093  pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0,
1095  if (pNPCStats->pProfessions[v1->uProfession]
1096  .pBenefits) { // *(&pNPCStats->field_13A5C + 5 * v1->uProfession) )
1098  480, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Du, 0,
1099  localization->GetString(407)); // "More Information"
1100  v0 = 1;
1101  }
1102  pDialogueWindow->CreateButton(0x1E0u, 30 * v0 + 160, 0x8Cu, 0x1Eu, 1, 0,
1103  UIMSG_ClickNPCTopic, 0x4Cu, 0,
1104  localization->GetString(406)); // "Hire"
1107 }

Перекрестные ссылки GUIWindow::CreateButton(), dword_591080, Localization::GetString(), HouseNPCData, localization, pBtn_ExitCancel, pDialogueNPCCount, pDialogueWindow, GUIWindow::Release(), UIMSG_Escape и WINDOW_Dialogue.

Используется в ClickNPCTopic().

+ Граф вызовов:
+ Граф вызова функции:

◆ _4B4224_UpdateNPCTopics()

void _4B4224_UpdateNPCTopics ( int  _this)

См. определение в файле NPC.cpp строка 1110

1110  {
1111  int num_menu_buttons; // ebx@1
1112  int i; // ebp@5
1113  // signed int v4; // ebp@9
1114  int v6; // eax@16
1115  int v8; // eax@21
1116  int v10; // eax@26
1117  int v12; // eax@31
1118  int v14; // eax@36
1119  int v16; // eax@41
1120  NPCData *v17; // [sp+10h] [bp-4h]@4
1121 
1122  num_menu_buttons = 0;
1123  pDialogueNPCCount = (_this + 1);
1124  if (_this + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic) {
1126  pDialogueWindow =
1127  new GUIWindow(WINDOW_Dialogue, 0, 0, window->GetWidth(), window->GetHeight(), 0);
1129  411, pMapStats->pInfos[uHouse_ExitPic].pName); // Enter %s
1131  566, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 'N',
1132  localization->GetString(34), {{ui_buttdesc2}}); // "Cancel"
1134  486, 445, 75, 33, 1, 0, UIMSG_BF, 1, 'Y',
1135  transition_button_label.c_str(), {{ui_buttyes2}});
1137  pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63u, 73u, 1, 0,
1138  UIMSG_BF, 1u, 0x20u, transition_button_label.c_str());
1139  pDialogueWindow->CreateButton(8, 8, 460, 344, 1, 0, UIMSG_BF, 1, 0x59u,
1140  transition_button_label.c_str());
1141  } else {
1142  v17 = HouseNPCData[_this + 1 - ((dword_591080 != 0) ? 1 : 0)]; //+ 1
1145  } else {
1146  for (i = 0; i < uNumDialogueNPCPortraits; ++i)
1147  HouseNPCPortraitsButtonsList[i]->Release();
1148  }
1149  pDialogueWindow = new GUIWindow(WINDOW_Dialogue, 0, 0, window->GetWidth(), 345, 0);
1151  471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0,
1152  localization->GetString(74), // "End Conversation"
1153  {{ui_exit_cancel_button_background}});
1155  8, 8, 450, 320, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "");
1156  if (pDialogueNPCCount == 1 && dword_591080) {
1158  } else {
1159  if (v17->joins) {
1160  num_menu_buttons = 1;
1161  pDialogueWindow->CreateButton(480u, 160u, 140u, 30, 1, 0,
1162  UIMSG_ClickNPCTopic, 0xDu, 0, "");
1163  }
1164  if (v17->evt_A) {
1165  if (num_menu_buttons < 4) {
1166  v6 = NPC_EventProcessor(v17->evt_A);
1167  if (v6 == 1 || v6 == 2)
1169  480u, 30 * num_menu_buttons++ + 160, 140u, 30u, 1,
1170  0, UIMSG_ClickNPCTopic, 0x13u, 0, "");
1171  }
1172  }
1173  if (v17->evt_B) {
1174  if (num_menu_buttons < 4) {
1175  v8 = NPC_EventProcessor(v17->evt_B);
1176  if (v8 == 1 || v8 == 2)
1178  480u, 30 * num_menu_buttons++ + 160, 140u, 30u, 1,
1179  0, UIMSG_ClickNPCTopic, 0x14u, 0, "");
1180  }
1181  }
1182  if (v17->evt_C) {
1183  if (num_menu_buttons < 4) {
1184  v10 = NPC_EventProcessor(v17->evt_C);
1185  if (v10 == 1 || v10 == 2)
1187  480u, 30 * num_menu_buttons++ + 160, 140u, 30u, 1,
1188  0, UIMSG_ClickNPCTopic, 0x15u, 0, "");
1189  }
1190  }
1191 
1192  if (v17->evt_D) {
1193  if (num_menu_buttons < 4) {
1194  v12 = NPC_EventProcessor(v17->evt_D);
1195  if (v12 == 1 || v12 == 2)
1197  0x1E0u, 30 * num_menu_buttons++ + 160, 0x8Cu, 0x1Eu,
1198  1, 0, UIMSG_ClickNPCTopic, 0x16u, 0, "");
1199  }
1200  }
1201  if (v17->evt_E) {
1202  if (num_menu_buttons < 4) {
1203  v14 = NPC_EventProcessor(v17->evt_E);
1204  if (v14 == 1 || v14 == 2)
1206  0x1E0u, 30 * num_menu_buttons++ + 160, 0x8Cu, 0x1Eu,
1207  1, 0, UIMSG_ClickNPCTopic, 0x17u, 0, "");
1208  }
1209  }
1210  if (v17->evt_F) {
1211  if (num_menu_buttons < 4) {
1212  v16 = NPC_EventProcessor(v17->evt_F);
1213  if (v16 == 1 || v16 == 2)
1215  0x1E0u, 30 * num_menu_buttons++ + 160, 0x8Cu, 0x1Eu,
1216  1, 0, UIMSG_ClickNPCTopic, 0x18u, 0, "");
1217  }
1218  }
1220  num_menu_buttons, 1, 0, 2);
1222  }
1224  }
1225 }

Перекрестные ссылки GUIWindow::CreateButton(), Localization::FormatString(), Localization::GetString(), localization, pBtn_ExitCancel, pBtn_YES, pDialogueNPCCount, pDialogueWindow, MapStats::pInfos, pMapStats, MapInfo::pName, GUIWindow::Release(), transition_button_label, uHouse_ExitPic, UIMSG_BF, UIMSG_Escape, uNumDialogueNPCPortraits и WINDOW_Dialogue.

Используется в Application::Game::EventLoop() и HouseDialogPressCloseBtn().

+ Граф вызовов:
+ Граф вызова функции:

◆ NPC_EventProcessor()

int NPC_EventProcessor ( int  npc_event_id,
int  entry_line 
)

См. определение в файле NPC.cpp строка 1227

1227  {
1228  signed int event_index; // ebp@1
1229  int evt_seq_num; // esi@3
1230  bool ready_to_exit; // [sp+Ch] [bp-Ch]@3
1231  signed int npc_activity; // [sp+10h] [bp-8h]@3
1232  int result;
1233 
1234  event_index = 0;
1235  if (!npc_event_id) return 0;
1236  evt_seq_num = entry_line;
1237  pSomeOtherEVT = pGlobalEVT.data();
1239  memcpy(pSomeOtherEVT_Events.data(), pGlobalEVT_Index.data(),
1240  sizeof(EventIndex) * 4400);
1241  npc_activity = 1;
1242  ready_to_exit = false;
1243  if (uSomeOtherEVT_NumEvents <= 0) return 2;
1244  do {
1245  if ((pSomeOtherEVT_Events[event_index].uEventID == npc_event_id) &&
1246  (pSomeOtherEVT_Events[event_index].event_sequence_num ==
1247  evt_seq_num)) {
1248  _evt_raw *_evt =
1250  .uEventOffsetInEVT];
1251  switch (_evt->_e_type) {
1252  case EVENT_Exit:
1253  // exit
1254  if (ready_to_exit)
1255  result = npc_activity != 0;
1256  else
1257  result = 2;
1258  return result;
1259  break;
1261  ready_to_exit = true;
1262  // v8 = (unsigned __int8)v7[7] + (((unsigned __int8)v7[8] +
1263  // (((unsigned __int8)v7[9] + ((unsigned __int8)v7[10] << 8))
1264  // << 8)) << 8);
1265  for (int i = 0; i < 4; ++i) {
1266  // if (pParty->pPlayers[i].CompareVariable((enum
1267  // VariableType)((unsigned __int8)pSomeOtherEVT[v6 + 5]
1268  // + ((unsigned __int8)pSomeOtherEVT[v6 + 6] << 8)),
1269  // v8))
1270  if (pParty->pPlayers[i].CompareVariable(
1271  (enum VariableType)EVT_WORD(_evt->v5),
1272  EVT_DWORD(_evt->v7))) {
1273  event_index = -1;
1274  evt_seq_num =
1275  EVT_BYTE(_evt->v11) -
1276  1; // (unsigned __int8)pSomeOtherEVT[v6 + 11] -
1277  // 1;
1278  break;
1279  }
1280  }
1281  break;
1283  if (ready_to_exit)
1284  result = npc_activity != 0;
1285  else
1286  result = 2;
1287  return result;
1288  break;
1290  ready_to_exit = true;
1291  npc_activity =
1292  EVT_BYTE(_evt->v5); // (unsigned __int8)v7[5];
1293  break;
1295  // if (IsActorAlive( (unsigned __int8)v7[5],
1296  // (unsigned __int8)v7[6] + (((unsigned __int8)v7[7] +
1297  // (((unsigned __int8)v7[8] + ((unsigned __int8)v7[9] << 8))
1298  // << 8)) << 8),
1299  // (unsigned __int8)v7[10]) )
1300  if (IsActorAlive(
1301  EVT_BYTE(_evt->v5), EVT_DWORD(_evt->v6),
1302  EVT_BYTE(_evt->v10))) { // drop linear sequense,
1303  // going to new seq
1304  event_index = -1;
1305  evt_seq_num =
1306  EVT_BYTE(_evt->v11) -
1307  1; // (unsigned __int8)pSomeOtherEVT[v6 + 11] - 1;
1308  }
1309  break;
1310  }
1311  ++evt_seq_num;
1312  }
1313  ++event_index;
1314  } while (event_index < uSomeOtherEVT_NumEvents);
1315  if (ready_to_exit)
1316  result = npc_activity != 0;
1317  else
1318  result = 2;
1319  return result;
1320 }

Перекрестные ссылки _evt_raw::_e_type, EVENT_EndCanShowDialogItem, EVENT_Exit, EVENT_IsActorAssasinated, EVENT_OnCanShowDialogItemCmp, EVENT_SetCanShowDialogItem, IsActorAlive(), pGlobalEVT, pGlobalEVT_Index, pParty, Party::pPlayers, pSomeOtherEVT, pSomeOtherEVT_Events, uGlobalEVT_NumEvents, uSomeOtherEVT_NumEvents, _evt_raw::v10, _evt_raw::v11, _evt_raw::v5, _evt_raw::v6 и _evt_raw::v7.

+ Граф вызовов:

◆ GetGreetType()

int GetGreetType ( signed int  SpeakingNPC_ID)

См. определение в файле NPC.cpp строка 1322

1322  {
1323  int v1; // ebx@1
1324  int v3; // edi@6
1325  int v4; // ecx@6
1326  int v5; // edx@6
1327  NPCData *v6; // eax@6
1328  char *v7; // ebp@11
1329  NPCData *v8; // esi@11
1330 
1331  v1 = 0;
1332  if (SpeakingNPC_ID >= 0) {
1333  if (SpeakingNPC_ID < 5000) return 1; // QuestNPC_greet
1334  return 2; // HiredNPC_greet
1335  }
1336 
1337  if (SpeakingNPC_ID >= 5000) return 2;
1338 
1339  v3 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1;
1340  v4 = 0;
1341  v5 = 0;
1342  v6 = pParty->pHirelings.data();
1343 
1344  char buf[1024];
1345  do {
1346  if (v6->pName) buf[v4++] = v5;
1347  ++v6;
1348  ++v5;
1349  } while ((signed int)v6 < (signed int)&pParty->pPickedItem);
1350  if ((signed int)pNPCStats->uNumNewNPCs > 0) {
1351  v7 = &buf[v4];
1352  v8 = pNPCStats->pNewNPCData;
1353  do {
1354  if (v8->Hired() &&
1355  (!pParty->pHirelings[0].pName ||
1356  strcmp(v8->pName, pParty->pHirelings[0].pName))) {
1357  if (!pParty->pHirelings[1].pName ||
1358  strcmp(v8->pName, pParty->pHirelings[1].pName))
1359  *v7++ = v1 + 2;
1360  }
1361  ++v1;
1362  ++v8;
1363  } while (v1 < (signed int)pNPCStats->uNumNewNPCs);
1364  }
1365  return ((unsigned __int8)buf[v3] < 2) + 1;
1366 }

Перекрестные ссылки NPCData::Hired(), Party::pHirelings, NPCData::pName, NPCStats::pNewNPCData, pNPCStats, pParty, Party::pPickedItem, sDialogue_SpeakingActorNPC_ID и NPCStats::uNumNewNPCs.

Используется в GUIWindow_Dialogue::Update().

+ Граф вызовов:
+ Граф вызова функции:

◆ GetProfessionActionText()

const char* GetProfessionActionText ( int  a1)

См. определение в файле NPC.cpp строка 1369

1369  {
1370  if (a1 == 10 || a1 == 11 || a1 == 12 || a1 == 33 || a1 == 34 || a1 == 39 ||
1371  a1 == 40 || a1 == 41 || a1 == 42 || a1 == 43 || a1 == 52)
1372  return pNPCStats->pProfessions[a1 - 1].pActionText;
1373  else
1374  return pNPCTopics[407].pTopic;
1375 }

Перекрестные ссылки NPCProfession::pActionText, pNPCStats, pNPCTopics и NPCStats::pProfessions.

Используется в GUIWindow_Dialogue::Update().

+ Граф вызова функции:

◆ UseNPCSkill()

int UseNPCSkill ( NPCProf  profession)

См. определение в файле NPC.cpp строка 1378

1378  {
1379  switch (profession) {
1380  case Healer: {
1381  for (int i = 0; i < 4; ++i)
1382  pParty->pPlayers[i].sHealth =
1383  pParty->pPlayers[i].GetMaxHealth();
1384  } break;
1385 
1386  case ExpertHealer: {
1387  for (int i = 0; i < 4; ++i) {
1388  pParty->pPlayers[i].sHealth =
1389  pParty->pPlayers[i].GetMaxHealth();
1390 
1391  for (int j = 0; j < 14; ++j)
1392  pParty->pPlayers[i].conditions_times[j].Reset();
1393  pParty->pPlayers[i].conditions_times[Condition_Good].Reset();
1394  }
1395  } break;
1396 
1397  case MasterHealer: {
1398  for (int i = 0; i < 4; ++i) {
1399  __debugbreak(); // Ritor1:needed cleaned(Необходимо почистить)
1400  Player *player = &pParty->pPlayers[i];
1401  pParty->pPlayers[i].sHealth =
1402  pParty->pPlayers[i].GetMaxHealth();
1403 
1404  int v5 = HEXRAYS_LODWORD(
1405  player->conditions_times[19]); // *((int *)v4 - 32);
1406  int v6 = HEXRAYS_HIDWORD(
1407  player->conditions_times[19]); // *((int *)v4 - 31);
1408  memset(&pParty->pPlayers[i].conditions_times, 0,
1409  sizeof(pParty->pPlayers[i].conditions_times));
1410 
1411  *(int *)&player->pActiveSkills[PLAYER_SKILL_SHIELD] = v5;
1412  *(int *)&player->pActiveSkills[PLAYER_SKILL_CHAIN] = v6;
1413  }
1414  } break;
1415 
1416  case Cook: {
1417  if (pParty->GetFood() >= 13) return 1;
1418 
1419  Party::GiveFood(1);
1420  } break;
1421 
1422  case Chef: {
1423  if (pParty->GetFood() >= 13) return 1;
1424 
1425  if (pParty->GetFood() == 13)
1426  Party::GiveFood(1);
1427  else
1428  Party::GiveFood(2);
1429  } break;
1430 
1431  case WindMaster: {
1434  494)); // Can't fly indoors Нельзя применить знание
1435  // Полет в помещении!
1436  pAudioPlayer->PlaySound(SOUND_fizzle, 0, 0, -1, 0, 0);
1437  } else {
1438  int v19 = pOtherOverlayList->_4418B1(10008, 203, 0, 65536);
1441  v19, 0);
1442  pParty->pPartyBuffs[PARTY_BUFF_FLY].uFlags |= 1;
1443  pAudioPlayer->PlaySound(SOUND_21fly03, 0, 0, -1, 0, 0);
1444  }
1445  } break;
1446 
1447  case WaterMaster: {
1448  int v20 = pOtherOverlayList->_4418B1(10005, 201, 0, 65536);
1450  GameTime(pParty->GetPlayingTime() + GameTime::FromHours(3)), 3, 0, v20,
1451  0);
1453  pAudioPlayer->PlaySound(SOUND_WaterWalk, 0, 0, -1, 0, 0);
1454  } break;
1455 
1456  case GateMaster: {
1457  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 0, 0);
1458  dword_50C9DC = 195;
1460  } break;
1461 
1462  case Acolyte:
1464  break;
1465  case Piper:
1467  break;
1468  case FallenWizard:
1470  break;
1471 
1472  case Teacher:
1473  case Instructor:
1474  case Armsmaster:
1475  case Weaponsmaster:
1476  case Apprentice:
1477  case Mystic:
1478  case Spellmaster:
1479  case Trader:
1480  case Merchant:
1481  case Scout:
1482  case Herbalist:
1483  case Apothecary:
1484  case Tinker:
1485  case Locksmith:
1486  case Fool:
1487  case ChimneySweep:
1488  case Porter:
1489  case QuarterMaster:
1490  case Factor:
1491  case Banker:
1492  case Horseman:
1493  case Bard:
1494  case Enchanter:
1495  case Cartographer:
1496  case Explorer:
1497  case Pirate:
1498  case Squire:
1499  case Psychic:
1500  case Gypsy:
1501  case Diplomat:
1502  case Duper:
1503  case Burglar:
1504  case Acolyte2:
1505  case Initiate:
1506  case Prelate:
1507  case Monk:
1508  case Sage:
1509  case Hunter:
1510  break;
1511 
1512  default:
1513  assert(false && "Invalid enum value");
1514  }
1515  return 0;
1516 }

Перекрестные ссылки _42777D_CastSpell_UseWand_ShootArrow(), OtherOverlayList::_4418B1(), __debugbreak(), Acolyte, Acolyte2, Apothecary, Apprentice, Armsmaster, Banker, Bard, Burglar, Cartographer, Chef, ChimneySweep, Condition_Good, Player::conditions_times, Cook, Diplomat, Duper, dword_50C9DC, Enchanter, ExpertHealer, Explorer, Factor, FallenWizard, Fool, GameTime::FromHours(), GameUI_StatusBar_OnEvent(), GateMaster, Party::GetFood(), GetNPCData(), Party::GetPlayingTime(), Localization::GetString(), Party::GiveFood(), Gypsy, Healer, Herbalist, Horseman, Hunter, Initiate, Instructor, LEVEL_Indoor, localization, Locksmith, MasterHealer, Merchant, Monk, Mystic, Player::pActiveSkills, PARTY_BUFF_FLY, PARTY_BUFF_WATER_WALK, pAudioPlayer, Piper, Pirate, PLAYER_SKILL_CHAIN, PLAYER_SKILL_SHIELD, AudioPlayer::PlaySound(), pMessageQueue_50CBD0, Porter, pOtherOverlayList, pParty, Party::pPartyBuffs, Party::pPlayers, Prelate, Psychic, ptr_50C9E0, QuarterMaster, Sage, Scout, sDialogue_SpeakingActorNPC_ID, SOUND_21fly03, SOUND_fizzle, SOUND_WaterWalk, SPELL_LIGHT_HOUR_OF_POWER, SPELL_SPIRIT_BLESS, SPELL_SPIRIT_HEROISM, Spellmaster, Squire, Teacher, Tinker, Trader, uCurrentlyLoadedLevelType, UIMSG_Escape, WaterMaster, Weaponsmaster и WindMaster.

Используется в OnSelectNPCDialogueOption().

+ Граф вызовов:
+ Граф вызова функции:

Переменные

◆ pDialogueNPCCount

◆ pDialogueNPCPortraits

std::array<class Image *, 6> pDialogueNPCPortraits

См. определение в файле NPC.cpp строка 27

Используется в GameUI_InitializeDialogue(), GUIWindow::HouseDialogManager(), PrepareHouse(), GUIWindow_House::Release() и GUIWindow_Dialogue::Update().

◆ uNumDialogueNPCPortraits

◆ pNPCStats

EVENT_IsActorAssasinated
@ EVENT_IsActorAssasinated
Definition: Events.h:108
Party::pPickedItem
ItemGen pPickedItem
Definition: Party.h:312
uNumDialogueNPCPortraits
int uNumDialogueNPCPortraits
Definition: NPC.cpp:28
uint16_t
unsigned __int16 uint16_t
Definition: SDL_config.h:37
pMerchantsIdentifyPhrases
std::array< const char *, 7 > pMerchantsIdentifyPhrases
Definition: mm7_data.cpp:751
AUTONOTE_MISC
@ AUTONOTE_MISC
Definition: Autonotes.h:10
AUTONOTE_OBELISK
@ AUTONOTE_OBELISK
Definition: Autonotes.h:8
Player
Definition: Player.h:401
transition_button_label
String transition_button_label
Definition: UITransition.cpp:30
SOUND_fizzle
@ SOUND_fizzle
Definition: AudioPlayer.h:74
GetNPCData
NPCData * GetNPCData(signed int npcid)
Definition: NPC.cpp:43
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
NPCData::uProfession
unsigned int uProfession
Definition: NPC.h:89
RemoveQuotes
char * RemoveQuotes(char *str)
Definition: Strings.h:17
UIMSG_Escape
@ UIMSG_Escape
Definition: GUIWindow.h:96
MapStats::pInfos
MapInfo pInfos[77]
Definition: MapInfo.h:79
Party::GetPlayingTime
GameTime & GetPlayingTime()
Definition: Party.h:230
EVENT_Exit
@ EVENT_Exit
Definition: Events.h:61
pAwardsTXT_Raw
char * pAwardsTXT_Raw
Definition: mm7_data.cpp:745
Teacher
@ Teacher
Definition: NPC.h:18
Tinker
@ Tinker
Definition: NPC.h:30
GUIWindow
Definition: GUIWindow.h:433
Pirate
@ Pirate
Definition: NPC.h:50
AUTONOTE_STAT_HINT
@ AUTONOTE_STAT_HINT
Definition: Autonotes.h:7
Monk
@ Monk
Definition: NPC.h:65
NPCData::uFlags
unsigned int uFlags
Definition: NPC.h:84
UIMSG_ClickNPCTopic
@ UIMSG_ClickNPCTopic
Definition: GUIWindow.h:142
HouseNPCData
std::array< struct NPCData *, 7 > HouseNPCData
Definition: mm7_data.cpp:617
_evt_raw::v7
unsigned char v7
Definition: Events.h:29
NPCData::Hired
bool Hired()
Definition: NPC.h:80
uSomeOtherEVT_NumEvents
signed int uSomeOtherEVT_NumEvents
Definition: Events.cpp:37
dword_50C9DC
int dword_50C9DC
Definition: mm7_data.cpp:583
_449B57_test_bit
bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2)
Definition: Party.cpp:1185
GUIWindow::CreateButton
GUIButton * CreateButton(int x, int y, int width, int height, int a6, int a7, UIMessageType msg, unsigned int msg_param, uint8_t hotkey, const String &label, const std::vector< Image * > &textures=std::vector< Image * >())
Definition: GUIWindow.cpp:717
dialog_menu_id
HOUSE_DIALOGUE_MENU dialog_menu_id
Definition: UIHouses.cpp:50
gold_transaction_amount
int gold_transaction_amount
Definition: mm7_data.cpp:775
LOD::File::LoadCompressedTexture
void * LoadCompressedTexture(const String &pContainer, size_t *data_size=nullptr)
Definition: LOD.cpp:921
SPELL_LIGHT_HOUR_OF_POWER
@ SPELL_LIGHT_HOUR_OF_POWER
Definition: Spells.h:105
OtherOverlayList::_4418B1
int _4418B1(int a2, int a3, int a4, int a5)
Definition: Overlays.cpp:29
Psychic
@ Psychic
Definition: NPC.h:53
pNPCTopics
std::array< NPCTopic, 789 > pNPCTopics
Definition: mm7_data.cpp:740
AudioPlayer::PlaySound
void PlaySound(SoundID eSoundID, int pid, unsigned int uNumRepeats, int x, int y, int a7)
Definition: AudioPlayer.cpp:195
pTransitionStrings
std::array< char *, 465 > pTransitionStrings
Definition: mm7_data.cpp:309
Diplomat
@ Diplomat
Definition: NPC.h:55
NPCData::evt_B
unsigned int evt_B
Definition: NPC.h:94
bNoNPCHiring
char bNoNPCHiring
Definition: mm7_data.cpp:720
NPCProfession::pActionText
char * pActionText
Definition: NPC.h:117
localization
Localization * localization
Definition: Localization.cpp:11
PARTY_BUFF_WATER_WALK
@ PARTY_BUFF_WATER_WALK
Definition: Party.h:89
Instructor
@ Instructor
Definition: NPC.h:19
pNPCPortraits_y
std::array< std::array< int, 6 >, 6 > pNPCPortraits_y
Definition: mm7_data.cpp:290
Burglar
@ Burglar
Definition: NPC.h:57
_evt_raw::_e_type
unsigned char _e_type
Definition: Events.h:26
InitializaDialogueOptions
void InitializaDialogueOptions(BuildingType type)
Definition: UIHouses.cpp:442
Party::pPlayers
std::array< Player, 4 > pPlayers
Definition: Party.h:310
pNPCPortraits_x
std::array< std::array< int, 6 >, 6 > pNPCPortraits_x
Definition: mm7_data.cpp:282
FallenWizard
@ FallenWizard
Definition: NPC.h:58
GUIWindow::Release
virtual void Release()
Definition: GUIWindow.cpp:292
Apothecary
@ Apothecary
Definition: NPC.h:29
NPCData::evt_E
unsigned int evt_E
Definition: NPC.h:97
HouseNPCPortraitsButtonsList
GUIButton * HouseNPCPortraitsButtonsList[6]
Definition: mm7_data.cpp:618
pTransitionsTXT_Raw
char * pTransitionsTXT_Raw
Definition: mm7_data.cpp:752
NPCData::evt_C
unsigned int evt_C
Definition: NPC.h:95
Player::pActiveSkills
std::array< unsigned __int16, 37 > pActiveSkills
Definition: Player.h:711
pPlayers
NZIArray< struct Player *, 5 > pPlayers
Definition: Player.cpp:46
WaterMaster
@ WaterMaster
Definition: NPC.h:45
dword_591080
int dword_591080
Definition: UIHouses.cpp:47
pGlobalEVT
std::array< char, 46080 > pGlobalEVT
Definition: Events.cpp:45
dword_F8B1E0
int dword_F8B1E0
Definition: mm7_data.cpp:778
result
GLuint64EXT * result
Definition: SDL_opengl_glext.h:9435
EventIndex
Definition: Events.h:6
pMapStats
struct MapStats * pMapStats
Definition: mm7_data.cpp:20
Party::pPartyBuffs
std::array< SpellBuff, 20 > pPartyBuffs
Definition: Party.h:309
GameTime::FromHours
static GameTime FromHours(int hours)
Definition: Time.h:89
_42777D_CastSpell_UseWand_ShootArrow
void _42777D_CastSpell_UseWand_ShootArrow(SPELL_TYPE spell, unsigned int uPlayerID, unsigned int a4, __int16 flags, int a6)
Definition: CastSpellInfo.cpp:4369
uHouse_ExitPic
int uHouse_ExitPic
Definition: UIHouses.cpp:45
GUIWindow::_41D08F_set_keyboard_control_group
void _41D08F_set_keyboard_control_group(int num_buttons, int a3, int a4, int a5)
Definition: GUIWindow.cpp:273
pAutonoteTXT_Raw
char * pAutonoteTXT_Raw
Definition: mm7_data.cpp:753
pSomeOtherEVT_Events
std::array< EventIndex, 4400 > pSomeOtherEVT_Events
Definition: Events.cpp:36
SOUND_21fly03
@ SOUND_21fly03
Definition: AudioPlayer.h:97
in_current_building_type
BuildingType in_current_building_type
Definition: UIHouses.cpp:49
NPCData::evt_A
unsigned int evt_A
Definition: NPC.h:93
_evt_raw::v6
unsigned char v6
Definition: Events.h:28
SOUND_WaterWalk
@ SOUND_WaterWalk
Definition: AudioPlayer.h:98
NPCData::evt_D
unsigned int evt_D
Definition: NPC.h:96
NPCStats::uNumNewNPCs
unsigned int uNumNewNPCs
Definition: NPC.h:179
WindMaster
@ WindMaster
Definition: NPC.h:44
uGlobalEVT_NumEvents
unsigned int uGlobalEVT_NumEvents
Definition: Events.cpp:43
Acolyte2
@ Acolyte2
Definition: NPC.h:59
contract_approved
int contract_approved
Definition: mm7_data.cpp:772
Merchant
@ Merchant
Definition: NPC.h:26
NPC_EventProcessor
int NPC_EventProcessor(int npc_event_id, int entry_line)
Definition: NPC.cpp:1227
pBtn_ExitCancel
GUIButton * pBtn_ExitCancel
Definition: GUIButton.cpp:28
ptr_50C9E0
struct NPCData * ptr_50C9E0
Definition: mm7_data.cpp:584
pGlobalEVT_Index
std::array< EventIndex, 4400 > pGlobalEVT_Index
Definition: Events.cpp:46
pBtn_YES
GUIButton * pBtn_YES
Definition: GUIButton.cpp:29
pParty
Party * pParty
Definition: Party.cpp:30
HOUSE_DIALOGUE_MAIN
@ HOUSE_DIALOGUE_MAIN
Definition: UIHouses.h:8
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: SDL_opengl_glext.h:2483
Herbalist
@ Herbalist
Definition: NPC.h:28
AUTONOTE_POTION_RECEPIE
@ AUTONOTE_POTION_RECEPIE
Definition: Autonotes.h:6
pQuestsTXT_Raw
char * pQuestsTXT_Raw
Definition: mm7_data.cpp:754
NPCData::pName
char * pName
Definition: NPC.h:82
NPCStats::pNewNPCData
NPCData pNewNPCData[501]
Definition: NPC.h:165
Mystic
@ Mystic
Definition: NPC.h:23
GUIWindow::pNumPresenceButton
int pNumPresenceButton
Definition: GUIWindow.h:481
Banker
@ Banker
Definition: NPC.h:37
Gypsy
@ Gypsy
Definition: NPC.h:54
NPCStats::pProfessions
NPCProfession pProfessions[59]
Definition: NPC.h:167
NPCStats::pNPCData
NPCData pNPCData[501]
Definition: NPC.h:164
Trader
@ Trader
Definition: NPC.h:25
ExpertHealer
@ ExpertHealer
Definition: NPC.h:16
pScrollsTXT_Raw
char * pScrollsTXT_Raw
Definition: mm7_data.cpp:746
EVENT_EndCanShowDialogItem
@ EVENT_EndCanShowDialogItem
Definition: Events.h:101
Cook
@ Cook
Definition: NPC.h:38
WINDOW_Dialogue
@ WINDOW_Dialogue
Definition: GUIWindow.h:298
IsActorAlive
int IsActorAlive(unsigned int uType, unsigned int uParam, unsigned int uNumAlive)
Definition: Actor.cpp:3240
v1
GLfloat GLfloat v1
Definition: SDL_opengl_glext.h:694
Cartographer
@ Cartographer
Definition: NPC.h:43
Bard
@ Bard
Definition: NPC.h:41
Log::Warning
void Warning(const wchar_t *pFormat,...)
Definition: Log.cpp:28
Weaponsmaster
@ Weaponsmaster
Definition: NPC.h:21
pQuestTable
std::array< const char *, 513 > pQuestTable
Definition: mm7_data.cpp:741
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
AUTONOTE_SEER
@ AUTONOTE_SEER
Definition: Autonotes.h:9
MapInfo::pName
String pName
Definition: MapInfo.h:38
_evt_raw::v10
unsigned char v10
Definition: Events.h:32
NPCStats::pAdditionalNPC
NPCData pAdditionalNPC[100]
Definition: NPC.h:168
HOUSE_DIALOGUE_OTHER
@ HOUSE_DIALOGUE_OTHER
Definition: UIHouses.h:46
pMerchantsSellPhrases
std::array< const char *, 7 > pMerchantsSellPhrases
Definition: mm7_data.cpp:749
EVENT_SetCanShowDialogItem
@ EVENT_SetCanShowDialogItem
Definition: Events.h:102
NPCData
Definition: NPC.h:79
pScrolls
std::array< const char *, 82 > pScrolls
Definition: mm7_data.cpp:743
UIMSG_BuyInShop_Identify_Repair
@ UIMSG_BuyInShop_Identify_Repair
Definition: GUIWindow.h:66
pDialogueNPCCount
int pDialogueNPCCount
Definition: NPC.cpp:26
Armsmaster
@ Armsmaster
Definition: NPC.h:20
Squire
@ Squire
Definition: NPC.h:52
Party::GetFood
int GetFood() const
Definition: Party.cpp:272
AUTONOTE_TEACHER
@ AUTONOTE_TEACHER
Definition: Autonotes.h:11
Scout
@ Scout
Definition: NPC.h:27
dword_F8B1AC_award_bit_number
int dword_F8B1AC_award_bit_number
Definition: mm7_data.cpp:773
PLAYER_SKILL_SHIELD
@ PLAYER_SKILL_SHIELD
Definition: Player.h:179
pEvents_LOD
LODFile_IconsBitmaps * pEvents_LOD
Definition: LOD.cpp:10
Sage
@ Sage
Definition: NPC.h:66
Hunter
@ Hunter
Definition: NPC.h:67
Explorer
@ Explorer
Definition: NPC.h:49
MasterHealer
@ MasterHealer
Definition: NPC.h:17
LEVEL_Indoor
@ LEVEL_Indoor
Definition: Indoor.h:286
pMerchantsTXT_Raw
char * pMerchantsTXT_Raw
Definition: mm7_data.cpp:747
Party::pHirelings
std::array< NPCData, 2 > pHirelings
Definition: Party.h:311
Horseman
@ Horseman
Definition: NPC.h:40
Player::conditions_times
std::array< GameTime, 20 > conditions_times
Definition: Player.h:635
SPELL_SPIRIT_BLESS
@ SPELL_SPIRIT_BLESS
Definition: Spells.h:62
_evt_raw::v11
unsigned char v11
Definition: Events.h:33
GateMaster
@ GateMaster
Definition: NPC.h:46
Initiate
@ Initiate
Definition: NPC.h:61
uint8_t
unsigned __int8 uint8_t
Definition: SDL_config.h:35
PLAYER_SKILL_CHAIN
@ PLAYER_SKILL_CHAIN
Definition: Player.h:181
Factor
@ Factor
Definition: NPC.h:36
Healer
@ Healer
Definition: NPC.h:15
EVENT_OnCanShowDialogItemCmp
@ EVENT_OnCanShowDialogItemCmp
Definition: Events.h:100
Prelate
@ Prelate
Definition: NPC.h:63
VariableType
VariableType
Definition: Events.h:128
pOtherOverlayList
struct OtherOverlayList * pOtherOverlayList
Definition: Overlays.cpp:19
UIMSG_BF
@ UIMSG_BF
Definition: GUIWindow.h:158
pSomeOtherEVT
char * pSomeOtherEVT
Definition: Events.cpp:38
Acolyte
@ Acolyte
Definition: NPC.h:47
Fool
@ Fool
Definition: NPC.h:32
c
const GLubyte * c
Definition: SDL_opengl_glext.h:11096
uint
unsigned int uint
Definition: MM7.h:4
uActiveCharacter
unsigned int uActiveCharacter
Definition: mm7_data.cpp:555
v3
GLfloat GLfloat GLfloat GLfloat v3
Definition: SDL_opengl_glext.h:696
Localization::FormatString
String FormatString(unsigned int index,...) const
Definition: Localization.cpp:17
NPCData::evt_F
unsigned int evt_F
Definition: NPC.h:98
__debugbreak
void __cdecl __debugbreak(void)
_evt_raw
Definition: Events.h:20
NPCData::joins
int joins
Definition: NPC.h:91
pNPCStats
struct NPCStats * pNPCStats
Definition: NPC.cpp:29
GameUI_StatusBar_OnEvent
void GameUI_StatusBar_OnEvent(const String &str, unsigned int num_seconds)
Definition: UIStatusBar.cpp:33
price_for_membership
std::array< int, 11 > price_for_membership
Definition: mm7_data.cpp:494
PARTY_BUFF_FLY
@ PARTY_BUFF_FLY
Definition: Party.h:78
Condition_Good
@ Condition_Good
Definition: Conditions.h:26
_evt_raw::v5
unsigned char v5
Definition: Events.h:27
Locksmith
@ Locksmith
Definition: NPC.h:31
Duper
@ Duper
Definition: NPC.h:56
NPCProfession::pBenefits
char * pBenefits
Definition: NPC.h:116
uCurrentlyLoadedLevelType
LEVEL_TYPE uCurrentlyLoadedLevelType
Definition: Indoor.cpp:52
Party::GetFirstCanAct
int GetFirstCanAct()
Definition: Party.cpp:156
pMerchantsBuyPhrases
std::array< const char *, 7 > pMerchantsBuyPhrases
Definition: mm7_data.cpp:748
Chef
@ Chef
Definition: NPC.h:39
ChimneySweep
@ ChimneySweep
Definition: NPC.h:33
Apprentice
@ Apprentice
Definition: NPC.h:22
Porter
@ Porter
Definition: NPC.h:34
pMerchantsRepairPhrases
std::array< const char *, 7 > pMerchantsRepairPhrases
Definition: mm7_data.cpp:750
Enchanter
@ Enchanter
Definition: NPC.h:42
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
v0
GLfloat v0
Definition: SDL_opengl_glext.h:693
pMessageQueue_50CBD0
struct GUIMessageQueue * pMessageQueue_50CBD0
Definition: GUIWindow.cpp:86
logger
Log * logger
Definition: IocContainer.cpp:47
pAutonoteTxt
std::array< Autonote, 196 > pAutonoteTxt
Definition: mm7_data.cpp:25
pAwards
std::array< Award, 105 > pAwards
Definition: mm7_data.cpp:26
pDialogueWindow
GUIWindow * pDialogueWindow
Definition: GUIWindow.cpp:50
QuarterMaster
@ QuarterMaster
Definition: NPC.h:35
Piper
@ Piper
Definition: NPC.h:48
GameTime
Definition: Time.h:14
SPELL_SPIRIT_HEROISM
@ SPELL_SPIRIT_HEROISM
Definition: Spells.h:67
Spellmaster
@ Spellmaster
Definition: NPC.h:24
sDialogue_SpeakingActorNPC_ID
int sDialogue_SpeakingActorNPC_ID
Definition: mm7_data.cpp:605
Party::GiveFood
static void GiveFood(int amount)
Definition: Party.cpp:255