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
|
|
94 case PLAYER_SKILL_MONSTER_ID:
|
|
95 if ( CheckHiredNPCSpeciality(58) )
|
|
96 skill += 6;
|
|
97 if ( CheckHiredNPCSpeciality(57) )
|
|
98 skill += 6;
|
|
99
|
|
100 case PLAYER_SKILL_ARMSMASTER:
|
|
101 if ( CheckHiredNPCSpeciality(15) )
|
|
102 skill += 2;
|
|
103 if ( CheckHiredNPCSpeciality(16) )
|
|
104 skill += 3;
|
|
105
|
|
106 case PLAYER_SKILL_STEALING:
|
|
107 if (CheckHiredNPCSpeciality(51))
|
|
108 skill +=
|
|
109
|
|
110 case PLAYER_SKILL_ALCHEMY:
|
|
111 if ( CheckHiredNPCSpeciality(23) )
|
|
112 skill += 4;
|
|
113 if ( CheckHiredNPCSpeciality(24) )
|
|
114 skill += 8
|
|
115
|
|
116 case PLAYER_SKILL_LEARNING:
|
|
117 if ( CheckHiredNPCSpeciality(13) )
|
|
118 skill += 10;
|
|
119 if ( CheckHiredNPCSpeciality(14) )
|
|
120 skill += 15;
|
|
121 if ( CheckHiredNPCSpeciality(4) )
|
|
122 skill += 5;
|
|
123
|
|
124 case PLAYER_SKILL_UNARMED:
|
|
125 if (CheckHiredNPCSpeciality(56) )
|
|
126 skill +
|
|
127
|
|
128 case PLAYER_SKILL_DODGE:
|
|
129 if ( CheckHiredNPCSpeciality(56) )
|
|
130 skill+
|
|
131
|
|
132 case PLAYER_SKILL_MERCHANT:
|
|
133 if ( CheckHiredNPCSpeciality(20) )
|
|
134 skill += 4;
|
|
135 if ( CheckHiredNPCSpeciality(21) )
|
|
136 skill += 6;
|
|
137 if ( CheckHiredNPCSpeciality(48) )
|
|
138 skill += 3;
|
|
139 if ( CheckHiredNPCSpeciality(50) )
|
|
140 skill += 8;
|
|
141
|
|
142 case PLAYER_SKILL_PERCEPTION:
|
|
143 if ( CheckHiredNPCSpeciality(22) )
|
|
144 v2 = 6;
|
|
145 if ( CheckHiredNPCSpeciality(47) )
|
|
146 v2 += 5;
|
|
147
|
|
148 case PLAYER_SKILL_TRAP_DISARM:
|
|
149 if ( CheckHiredNPCSpeciality(25) )
|
|
150 v2 = 4;
|
|
151 if ( CheckHiredNPCSpeciality(26) )
|
|
152 v2 += 6;
|
|
153 if ( CheckHiredNPCSpeciality(51) )
|
|
154 v2 += 8;
|
|
155
|
|
156 FIRE WATER EARTH AIR
|
|
157 if ( CheckHiredNPCSpeciality(17) )
|
|
158 v2 = 2;
|
|
159 if ( CheckHiredNPCSpeciality(18) )
|
|
160 v2 += 3;
|
|
161 if ( CheckHiredNPCSpeciality(19) )
|
|
162 v2 += 4;
|
|
163 if ( classType == PLAYER_CLASS_WARLOCK && PartyHasDragon() )
|
|
164 v2 += 3;
|
|
165
|
|
166 SPIRIT MIND BODY
|
|
167 if ( CheckHiredNPCSpeciality(53) )
|
|
168 v2 = 2;
|
|
169 if ( CheckHiredNPCSpeciality(54) )
|
|
170 v2 += 3;
|
|
171 if ( CheckHiredNPCSpeciality(55) )
|
|
172 v2 += 4;
|
|
173 */
|
291
|
174 int greet; //1c
|
|
175 int joins; //20
|
0
|
176 int field_24;
|
291
|
177 unsigned int evt_A; //28
|
|
178 unsigned int evt_B; //2c evtb
|
|
179 unsigned int evt_C; // 30 evtc
|
|
180 unsigned int evt_D; //34
|
|
181 unsigned int evt_E; //38
|
|
182 unsigned int evt_F; //3c
|
|
183 unsigned int uSex; //40
|
|
184 int bHasUsedTheAbility; //44
|
|
185 int news_topic; //48
|
0
|
186 };
|
|
187 #pragma pack(pop)
|
|
188
|
|
189
|
|
190 /* 138 */
|
|
191 #pragma pack(push, 1)
|
|
192 struct NPCProfession
|
|
193 {
|
|
194 unsigned int uHirePrice;
|
|
195 char *pBenefits;
|
|
196 char *pActionText;
|
|
197 char *pJoinText;
|
|
198 char *pDismissText;
|
|
199 };
|
|
200 #pragma pack(pop)
|
|
201
|
|
202
|
|
203 /* 139 */
|
|
204 #pragma pack(push, 1)
|
291
|
205 struct NPCProfessionChance
|
0
|
206 {
|
291
|
207 unsigned int uTotalprofChance; //summ
|
|
208 char professionChancePerArea[60]; //prof position
|
0
|
209 };
|
|
210 #pragma pack(pop)
|
|
211
|
|
212 /* 140 */
|
|
213 #pragma pack(push, 1)
|
|
214 struct NPCGreeting
|
|
215 {
|
|
216 char *pGreeting1;
|
|
217 char *pGreeting2;
|
|
218 };
|
|
219 #pragma pack(pop)
|
|
220
|
|
221
|
|
222 /* 137 */
|
|
223 #pragma pack(push, 1)
|
|
224 struct NPCStats
|
|
225 {
|
|
226 inline NPCStats():
|
|
227 pNPCTextTXT_Raw(nullptr), pNPCTopicTXT_Raw(nullptr), pNPCDistTXT_Raw(nullptr)
|
|
228 {
|
|
229 uNumNPCNames[0] = uNumNPCNames[1] = 0;
|
|
230 }
|
|
231
|
291
|
232 void InitializeNPCText();
|
|
233 void InitializeNPCData();
|
0
|
234 void Initialize();
|
|
235 void Release();
|
291
|
236 void InitializeAdditionalNPCs(NPCData *pNPCDataBuff, int npc_uid, int uLocation2D, int uMapId);
|
0
|
237 void _476C60();
|
|
238
|
237
|
239
|
291
|
240 NPCData pNPCData[501]; //0 - 94BCh count from 1
|
|
241 NPCData pNewNPCData[501]; //94BCh- 12978h count from 1
|
0
|
242 char *pNPCNames[540][2];
|
291
|
243 NPCProfession pProfessions[59]; //count from 1
|
|
244 NPCData pAdditionalNPC[100];
|
|
245 char *pCatchPhrases[52]; //15CA4h
|
|
246 char *pNPCUnicNames[500]; //from first batch
|
|
247 NPCProfessionChance pProfessionChance[77]; //16544h profession chance in each area
|
0
|
248 int field_17884;
|
|
249 int field_17888;
|
|
250 NPCGreeting pNPCGreetings[205];
|
|
251 unsigned __int16 pGroups[51];
|
|
252 unsigned __int16 pGroups_copy[51];
|
291
|
253 unsigned int uNewlNPCBufPos;
|
0
|
254 unsigned int uNumNewNPCs;
|
|
255 int field_17FC8;
|
|
256 unsigned int uNumNPCProfessions;
|
291
|
257 unsigned int uNumNPCNames[2]; //0 male 1 female
|
0
|
258 char *pNPCDataTXT_Raw;
|
|
259 char *pNPCNamesTXT_Raw;
|
|
260 char *pNPCProfTXT_Raw;
|
|
261 char *pNPCNewsTXT_Raw;
|
|
262 char *pNPCTopicTXT_Raw;
|
|
263 char *pNPCTextTXT_Raw;
|
|
264 char *pNPCDistTXT_Raw;
|
|
265 char *pNPCGreetTXT_Raw;
|
|
266 char *pNCPGroupTXT_Raw;
|
|
267 };
|
|
268 #pragma pack(pop)
|
|
269
|
253
|
270 bool PartyHasDragon();
|
251
|
271 bool CheckHiredNPCSpeciality(unsigned int uProfession);
|