0
|
1 #pragma once
|
|
2
|
374
|
3 /*
|
|
4 enum NPCProffession
|
|
5 {
|
|
6 Smith 1
|
|
7 Armorer 2
|
|
8 Alchemist 3
|
|
9 Scholar 4
|
|
10 Guide 5
|
|
11 Tracker 6
|
|
12 Pathfinder 7
|
|
13 Sailor 8
|
|
14 Navigator 9
|
|
15 Healer 10
|
|
16 Expert Healer 11
|
|
17 Master Healer 12
|
|
18 Teacher 13
|
|
19 Instructor 14
|
|
20 Arms Master 15
|
|
21 Weapons Master 16
|
|
22 Apprentice 17
|
|
23 Mystic 18
|
|
24 Spell Master 19
|
|
25 Trader 20
|
|
26 Merchant 21
|
|
27 Scout 22
|
|
28 Herbalist 23
|
|
29 Apothecary 24
|
|
30 Tinker 25
|
|
31 Locksmith 26
|
|
32 Fool 27
|
|
33 Chimney Sweep 28
|
|
34 Porter 29
|
|
35 Quarter Master 30
|
|
36 Factor 31
|
|
37 Banker 32
|
|
38 Cook 33
|
|
39 Chef 34
|
|
40 Horseman 35
|
|
41 Bard 36
|
|
42 Enchanter 37
|
|
43 Cartographer 38
|
|
44 Wind Master 39
|
|
45 Water Master 40
|
|
46 Gate Master 41
|
|
47 Acolyte 42
|
|
48 Piper 43
|
|
49 Explorer 44
|
|
50 Pirate 45
|
|
51 Squire 46
|
|
52 Psychic 47
|
|
53 Gypsy 48
|
|
54 Diplomat 49
|
|
55 Duper 50
|
|
56 Burglar 51
|
|
57 Fallen Wizard 52
|
|
58 Acolyte 53
|
|
59 Initiate 54
|
|
60 Prelate 55
|
|
61 Monk 56
|
|
62 Sage 57
|
|
63 Hunter 58
|
|
64
|
|
65
|
|
66 };
|
|
67 */
|
|
68
|
0
|
69
|
|
70 struct NPCTopic
|
|
71 {
|
|
72 const char *pTopic;
|
|
73 const char *pText;
|
|
74 };
|
|
75
|
|
76 extern NPCTopic pNPCTopics[789];
|
|
77
|
|
78
|
|
79 /* 136 */
|
|
80 #pragma pack(push, 1)
|
291
|
81 struct NPCData //4Ch
|
0
|
82 {
|
248
|
83 inline bool Hired() {return uFlags & 0x80;}
|
|
84
|
291
|
85 char *pName; //0
|
|
86 unsigned int uPortraitID; //4
|
|
87 unsigned int uFlags; //8 // & 0x80 no greeting on dialogue start; looks like hired
|
|
88 int fame; //c
|
|
89 int rep; //10
|
|
90 unsigned int Location2D; //14
|
353
|
91 unsigned int uProfession; //18 CheckHiredNPCSpeciality(uProfession)
|
|
92 /*
|
|
93
|
437
|
94 v0 = uDefaultTravelTime_ByFoot;
|
|
95 if ( CheckHiredNPCSpeciality(5u) )
|
|
96 --v0;
|
|
97 if ( CheckHiredNPCSpeciality(6u) )
|
|
98 v0 -= 2;
|
|
99 if ( CheckHiredNPCSpeciality(7u) )
|
|
100 v0 -= 3;
|
|
101 if ( CheckHiredNPCSpeciality(0x2Cu) )
|
|
102 --v0;
|
|
103
|
|
104
|
353
|
105 case PLAYER_SKILL_MONSTER_ID:
|
|
106 if ( CheckHiredNPCSpeciality(58) )
|
|
107 skill += 6;
|
|
108 if ( CheckHiredNPCSpeciality(57) )
|
|
109 skill += 6;
|
|
110
|
|
111 case PLAYER_SKILL_ARMSMASTER:
|
|
112 if ( CheckHiredNPCSpeciality(15) )
|
|
113 skill += 2;
|
|
114 if ( CheckHiredNPCSpeciality(16) )
|
|
115 skill += 3;
|
|
116
|
|
117 case PLAYER_SKILL_STEALING:
|
|
118 if (CheckHiredNPCSpeciality(51))
|
|
119 skill +=
|
|
120
|
|
121 case PLAYER_SKILL_ALCHEMY:
|
|
122 if ( CheckHiredNPCSpeciality(23) )
|
|
123 skill += 4;
|
|
124 if ( CheckHiredNPCSpeciality(24) )
|
|
125 skill += 8
|
|
126
|
|
127 case PLAYER_SKILL_LEARNING:
|
|
128 if ( CheckHiredNPCSpeciality(13) )
|
|
129 skill += 10;
|
|
130 if ( CheckHiredNPCSpeciality(14) )
|
|
131 skill += 15;
|
|
132 if ( CheckHiredNPCSpeciality(4) )
|
|
133 skill += 5;
|
|
134
|
|
135 case PLAYER_SKILL_UNARMED:
|
|
136 if (CheckHiredNPCSpeciality(56) )
|
|
137 skill +
|
|
138
|
|
139 case PLAYER_SKILL_DODGE:
|
|
140 if ( CheckHiredNPCSpeciality(56) )
|
|
141 skill+
|
|
142
|
|
143 case PLAYER_SKILL_MERCHANT:
|
|
144 if ( CheckHiredNPCSpeciality(20) )
|
|
145 skill += 4;
|
|
146 if ( CheckHiredNPCSpeciality(21) )
|
|
147 skill += 6;
|
|
148 if ( CheckHiredNPCSpeciality(48) )
|
|
149 skill += 3;
|
|
150 if ( CheckHiredNPCSpeciality(50) )
|
|
151 skill += 8;
|
|
152
|
|
153 case PLAYER_SKILL_PERCEPTION:
|
|
154 if ( CheckHiredNPCSpeciality(22) )
|
|
155 v2 = 6;
|
|
156 if ( CheckHiredNPCSpeciality(47) )
|
|
157 v2 += 5;
|
|
158
|
|
159 case PLAYER_SKILL_TRAP_DISARM:
|
|
160 if ( CheckHiredNPCSpeciality(25) )
|
|
161 v2 = 4;
|
|
162 if ( CheckHiredNPCSpeciality(26) )
|
|
163 v2 += 6;
|
|
164 if ( CheckHiredNPCSpeciality(51) )
|
|
165 v2 += 8;
|
|
166
|
|
167 FIRE WATER EARTH AIR
|
|
168 if ( CheckHiredNPCSpeciality(17) )
|
|
169 v2 = 2;
|
|
170 if ( CheckHiredNPCSpeciality(18) )
|
|
171 v2 += 3;
|
|
172 if ( CheckHiredNPCSpeciality(19) )
|
|
173 v2 += 4;
|
|
174 if ( classType == PLAYER_CLASS_WARLOCK && PartyHasDragon() )
|
|
175 v2 += 3;
|
|
176
|
|
177 SPIRIT MIND BODY
|
|
178 if ( CheckHiredNPCSpeciality(53) )
|
|
179 v2 = 2;
|
|
180 if ( CheckHiredNPCSpeciality(54) )
|
|
181 v2 += 3;
|
|
182 if ( CheckHiredNPCSpeciality(55) )
|
|
183 v2 += 4;
|
|
184 */
|
291
|
185 int greet; //1c
|
|
186 int joins; //20
|
0
|
187 int field_24;
|
291
|
188 unsigned int evt_A; //28
|
|
189 unsigned int evt_B; //2c evtb
|
|
190 unsigned int evt_C; // 30 evtc
|
|
191 unsigned int evt_D; //34
|
|
192 unsigned int evt_E; //38
|
|
193 unsigned int evt_F; //3c
|
|
194 unsigned int uSex; //40
|
|
195 int bHasUsedTheAbility; //44
|
|
196 int news_topic; //48
|
0
|
197 };
|
|
198 #pragma pack(pop)
|
|
199
|
|
200
|
|
201 /* 138 */
|
|
202 #pragma pack(push, 1)
|
|
203 struct NPCProfession
|
|
204 {
|
|
205 unsigned int uHirePrice;
|
|
206 char *pBenefits;
|
|
207 char *pActionText;
|
|
208 char *pJoinText;
|
|
209 char *pDismissText;
|
|
210 };
|
|
211 #pragma pack(pop)
|
|
212
|
|
213
|
|
214 /* 139 */
|
|
215 #pragma pack(push, 1)
|
291
|
216 struct NPCProfessionChance
|
0
|
217 {
|
291
|
218 unsigned int uTotalprofChance; //summ
|
|
219 char professionChancePerArea[60]; //prof position
|
0
|
220 };
|
|
221 #pragma pack(pop)
|
|
222
|
|
223 /* 140 */
|
|
224 #pragma pack(push, 1)
|
|
225 struct NPCGreeting
|
|
226 {
|
377
|
227 char *pGreeting1; //at first meet
|
|
228 char *pGreeting2; // at latest meets
|
0
|
229 };
|
|
230 #pragma pack(pop)
|
|
231
|
|
232
|
|
233 /* 137 */
|
|
234 #pragma pack(push, 1)
|
|
235 struct NPCStats
|
|
236 {
|
|
237 inline NPCStats():
|
|
238 pNPCTextTXT_Raw(nullptr), pNPCTopicTXT_Raw(nullptr), pNPCDistTXT_Raw(nullptr)
|
|
239 {
|
|
240 uNumNPCNames[0] = uNumNPCNames[1] = 0;
|
|
241 }
|
|
242
|
291
|
243 void InitializeNPCText();
|
|
244 void InitializeNPCData();
|
0
|
245 void Initialize();
|
|
246 void Release();
|
291
|
247 void InitializeAdditionalNPCs(NPCData *pNPCDataBuff, int npc_uid, int uLocation2D, int uMapId);
|
0
|
248 void _476C60();
|
|
249
|
237
|
250
|
291
|
251 NPCData pNPCData[501]; //0 - 94BCh count from 1
|
|
252 NPCData pNewNPCData[501]; //94BCh- 12978h count from 1
|
0
|
253 char *pNPCNames[540][2];
|
291
|
254 NPCProfession pProfessions[59]; //count from 1
|
|
255 NPCData pAdditionalNPC[100];
|
|
256 char *pCatchPhrases[52]; //15CA4h
|
|
257 char *pNPCUnicNames[500]; //from first batch
|
|
258 NPCProfessionChance pProfessionChance[77]; //16544h profession chance in each area
|
0
|
259 int field_17884;
|
|
260 int field_17888;
|
|
261 NPCGreeting pNPCGreetings[205];
|
|
262 unsigned __int16 pGroups[51];
|
|
263 unsigned __int16 pGroups_copy[51];
|
291
|
264 unsigned int uNewlNPCBufPos;
|
0
|
265 unsigned int uNumNewNPCs;
|
|
266 int field_17FC8;
|
|
267 unsigned int uNumNPCProfessions;
|
291
|
268 unsigned int uNumNPCNames[2]; //0 male 1 female
|
0
|
269 char *pNPCDataTXT_Raw;
|
|
270 char *pNPCNamesTXT_Raw;
|
|
271 char *pNPCProfTXT_Raw;
|
|
272 char *pNPCNewsTXT_Raw;
|
|
273 char *pNPCTopicTXT_Raw;
|
|
274 char *pNPCTextTXT_Raw;
|
|
275 char *pNPCDistTXT_Raw;
|
|
276 char *pNPCGreetTXT_Raw;
|
|
277 char *pNCPGroupTXT_Raw;
|
|
278 };
|
|
279 #pragma pack(pop)
|
|
280
|
253
|
281 bool PartyHasDragon();
|
251
|
282 bool CheckHiredNPCSpeciality(unsigned int uProfession);
|