0
|
1 #pragma once
|
|
2
|
|
3
|
|
4 struct NPCTopic
|
|
5 {
|
|
6 const char *pTopic;
|
|
7 const char *pText;
|
|
8 };
|
|
9
|
|
10 extern NPCTopic pNPCTopics[789];
|
|
11
|
|
12
|
|
13 /* 136 */
|
|
14 #pragma pack(push, 1)
|
291
|
15 struct NPCData //4Ch
|
0
|
16 {
|
248
|
17 inline bool Hired() {return uFlags & 0x80;}
|
|
18
|
291
|
19 char *pName; //0
|
|
20 unsigned int uPortraitID; //4
|
|
21 unsigned int uFlags; //8 // & 0x80 no greeting on dialogue start; looks like hired
|
|
22 int fame; //c
|
|
23 int rep; //10
|
|
24 unsigned int Location2D; //14
|
353
|
25 unsigned int uProfession; //18 CheckHiredNPCSpeciality(uProfession)
|
|
26 /*
|
|
27
|
|
28 case PLAYER_SKILL_MONSTER_ID:
|
|
29 if ( CheckHiredNPCSpeciality(58) )
|
|
30 skill += 6;
|
|
31 if ( CheckHiredNPCSpeciality(57) )
|
|
32 skill += 6;
|
|
33
|
|
34 case PLAYER_SKILL_ARMSMASTER:
|
|
35 if ( CheckHiredNPCSpeciality(15) )
|
|
36 skill += 2;
|
|
37 if ( CheckHiredNPCSpeciality(16) )
|
|
38 skill += 3;
|
|
39
|
|
40 case PLAYER_SKILL_STEALING:
|
|
41 if (CheckHiredNPCSpeciality(51))
|
|
42 skill +=
|
|
43
|
|
44 case PLAYER_SKILL_ALCHEMY:
|
|
45 if ( CheckHiredNPCSpeciality(23) )
|
|
46 skill += 4;
|
|
47 if ( CheckHiredNPCSpeciality(24) )
|
|
48 skill += 8
|
|
49
|
|
50 case PLAYER_SKILL_LEARNING:
|
|
51 if ( CheckHiredNPCSpeciality(13) )
|
|
52 skill += 10;
|
|
53 if ( CheckHiredNPCSpeciality(14) )
|
|
54 skill += 15;
|
|
55 if ( CheckHiredNPCSpeciality(4) )
|
|
56 skill += 5;
|
|
57
|
|
58 case PLAYER_SKILL_UNARMED:
|
|
59 if (CheckHiredNPCSpeciality(56) )
|
|
60 skill +
|
|
61
|
|
62 case PLAYER_SKILL_DODGE:
|
|
63 if ( CheckHiredNPCSpeciality(56) )
|
|
64 skill+
|
|
65
|
|
66 case PLAYER_SKILL_MERCHANT:
|
|
67 if ( CheckHiredNPCSpeciality(20) )
|
|
68 skill += 4;
|
|
69 if ( CheckHiredNPCSpeciality(21) )
|
|
70 skill += 6;
|
|
71 if ( CheckHiredNPCSpeciality(48) )
|
|
72 skill += 3;
|
|
73 if ( CheckHiredNPCSpeciality(50) )
|
|
74 skill += 8;
|
|
75
|
|
76 case PLAYER_SKILL_PERCEPTION:
|
|
77 if ( CheckHiredNPCSpeciality(22) )
|
|
78 v2 = 6;
|
|
79 if ( CheckHiredNPCSpeciality(47) )
|
|
80 v2 += 5;
|
|
81
|
|
82 case PLAYER_SKILL_TRAP_DISARM:
|
|
83 if ( CheckHiredNPCSpeciality(25) )
|
|
84 v2 = 4;
|
|
85 if ( CheckHiredNPCSpeciality(26) )
|
|
86 v2 += 6;
|
|
87 if ( CheckHiredNPCSpeciality(51) )
|
|
88 v2 += 8;
|
|
89
|
|
90 FIRE WATER EARTH AIR
|
|
91 if ( CheckHiredNPCSpeciality(17) )
|
|
92 v2 = 2;
|
|
93 if ( CheckHiredNPCSpeciality(18) )
|
|
94 v2 += 3;
|
|
95 if ( CheckHiredNPCSpeciality(19) )
|
|
96 v2 += 4;
|
|
97 if ( classType == PLAYER_CLASS_WARLOCK && PartyHasDragon() )
|
|
98 v2 += 3;
|
|
99
|
|
100 SPIRIT MIND BODY
|
|
101 if ( CheckHiredNPCSpeciality(53) )
|
|
102 v2 = 2;
|
|
103 if ( CheckHiredNPCSpeciality(54) )
|
|
104 v2 += 3;
|
|
105 if ( CheckHiredNPCSpeciality(55) )
|
|
106 v2 += 4;
|
|
107 */
|
291
|
108 int greet; //1c
|
|
109 int joins; //20
|
0
|
110 int field_24;
|
291
|
111 unsigned int evt_A; //28
|
|
112 unsigned int evt_B; //2c evtb
|
|
113 unsigned int evt_C; // 30 evtc
|
|
114 unsigned int evt_D; //34
|
|
115 unsigned int evt_E; //38
|
|
116 unsigned int evt_F; //3c
|
|
117 unsigned int uSex; //40
|
|
118 int bHasUsedTheAbility; //44
|
|
119 int news_topic; //48
|
0
|
120 };
|
|
121 #pragma pack(pop)
|
|
122
|
|
123
|
|
124 /* 138 */
|
|
125 #pragma pack(push, 1)
|
|
126 struct NPCProfession
|
|
127 {
|
|
128 unsigned int uHirePrice;
|
|
129 char *pBenefits;
|
|
130 char *pActionText;
|
|
131 char *pJoinText;
|
|
132 char *pDismissText;
|
|
133 };
|
|
134 #pragma pack(pop)
|
|
135
|
|
136
|
|
137 /* 139 */
|
|
138 #pragma pack(push, 1)
|
291
|
139 struct NPCProfessionChance
|
0
|
140 {
|
291
|
141 unsigned int uTotalprofChance; //summ
|
|
142 char professionChancePerArea[60]; //prof position
|
0
|
143 };
|
|
144 #pragma pack(pop)
|
|
145
|
|
146 /* 140 */
|
|
147 #pragma pack(push, 1)
|
|
148 struct NPCGreeting
|
|
149 {
|
|
150 char *pGreeting1;
|
|
151 char *pGreeting2;
|
|
152 };
|
|
153 #pragma pack(pop)
|
|
154
|
|
155
|
|
156 /* 137 */
|
|
157 #pragma pack(push, 1)
|
|
158 struct NPCStats
|
|
159 {
|
|
160 inline NPCStats():
|
|
161 pNPCTextTXT_Raw(nullptr), pNPCTopicTXT_Raw(nullptr), pNPCDistTXT_Raw(nullptr)
|
|
162 {
|
|
163 uNumNPCNames[0] = uNumNPCNames[1] = 0;
|
|
164 }
|
|
165
|
291
|
166 void InitializeNPCText();
|
|
167 void InitializeNPCData();
|
0
|
168 void Initialize();
|
|
169 void Release();
|
291
|
170 void InitializeAdditionalNPCs(NPCData *pNPCDataBuff, int npc_uid, int uLocation2D, int uMapId);
|
0
|
171 void _476C60();
|
|
172
|
237
|
173
|
291
|
174 NPCData pNPCData[501]; //0 - 94BCh count from 1
|
|
175 NPCData pNewNPCData[501]; //94BCh- 12978h count from 1
|
0
|
176 char *pNPCNames[540][2];
|
291
|
177 NPCProfession pProfessions[59]; //count from 1
|
|
178 NPCData pAdditionalNPC[100];
|
|
179 char *pCatchPhrases[52]; //15CA4h
|
|
180 char *pNPCUnicNames[500]; //from first batch
|
|
181 NPCProfessionChance pProfessionChance[77]; //16544h profession chance in each area
|
0
|
182 int field_17884;
|
|
183 int field_17888;
|
|
184 NPCGreeting pNPCGreetings[205];
|
|
185 unsigned __int16 pGroups[51];
|
|
186 unsigned __int16 pGroups_copy[51];
|
291
|
187 unsigned int uNewlNPCBufPos;
|
0
|
188 unsigned int uNumNewNPCs;
|
|
189 int field_17FC8;
|
|
190 unsigned int uNumNPCProfessions;
|
291
|
191 unsigned int uNumNPCNames[2]; //0 male 1 female
|
0
|
192 char *pNPCDataTXT_Raw;
|
|
193 char *pNPCNamesTXT_Raw;
|
|
194 char *pNPCProfTXT_Raw;
|
|
195 char *pNPCNewsTXT_Raw;
|
|
196 char *pNPCTopicTXT_Raw;
|
|
197 char *pNPCTextTXT_Raw;
|
|
198 char *pNPCDistTXT_Raw;
|
|
199 char *pNPCGreetTXT_Raw;
|
|
200 char *pNCPGroupTXT_Raw;
|
|
201 };
|
|
202 #pragma pack(pop)
|
|
203
|
253
|
204 bool PartyHasDragon();
|
251
|
205 bool CheckHiredNPCSpeciality(unsigned int uProfession);
|