0
|
1 #pragma once
|
|
2 #include "Items.h"
|
|
3 #include "Spells.h"
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9 /* 339 */
|
|
10 enum CHARACTER_RACE
|
|
11 {
|
|
12 CHARACTER_RACE_HUMAN = 0x0,
|
|
13 CHARACTER_RACE_ELF = 0x1,
|
|
14 CHARACTER_RACE_GOBLIN = 0x2,
|
|
15 CHARACTER_RACE_DWARF = 0x3,
|
|
16 };
|
|
17
|
|
18
|
|
19 /* 332 */
|
|
20 enum CHARACTER_ATTRIBUTE_TYPE
|
|
21 {
|
|
22 CHARACTER_ATTRIBUTE_STRENGTH = 0x0,
|
|
23 CHARACTER_ATTRIBUTE_INTELLIGENCE = 0x1,
|
|
24 CHARACTER_ATTRIBUTE_WILLPOWER = 0x2,
|
|
25 CHARACTER_ATTRIBUTE_ENDURANCE = 0x3,
|
|
26 CHARACTER_ATTRIBUTE_ACCURACY = 0x4,
|
|
27 CHARACTER_ATTRIBUTE_SPEED = 0x5,
|
|
28 CHARACTER_ATTRIBUTE_LUCK = 0x6,
|
|
29 CHARACTER_ATTRIBUTE_HEALTH = 0x7,
|
|
30 CHARACTER_ATTRIBUTE_MANA = 0x8,
|
|
31 CHARACTER_ATTRIBUTE_AC_BONUS = 0x9,
|
|
32 CHARACTER_ATTRIBUTE_RESIST_FIRE = 0xA,
|
|
33 CHARACTER_ATTRIBUTE_RESIST_AIR = 0xB,
|
|
34 CHARACTER_ATTRIBUTE_RESIST_WATER = 0xC,
|
|
35 CHARACTER_ATTRIBUTE_RESIST_EARTH = 0xD,
|
|
36 CHARACTER_ATTRIBUTE_RESIST_MIND = 0xE,
|
|
37 CHARACTER_ATTRIBUTE_RESIST_BODY = 0xF,
|
|
38 CHARACTER_ATTRIBUTE_LEVEL = 0x18,
|
|
39 CHARACTER_ATTRIBUTE_ATTACK = 0x19,
|
|
40 CHARACTER_ATTRIBUTE_MELEE_DMG_BONUS = 0x1A,
|
|
41 CHARACTER_ATTRIBUTE_MELEE_DMG_MIN = 0x1B,
|
|
42 CHARACTER_ATTRIBUTE_MELEE_DMG_MAX = 0x1C,
|
|
43 CHARACTER_ATTRIBUTE_RANGED_ATTACK = 0x1D,
|
|
44 CHARACTER_ATTRIBUTE_RANGED_DAMAGE_BONUS = 0x1E,
|
|
45 CHARACTER_ATTRIBUTE_RANGED_DAMAGE_MIN = 0x1F,
|
|
46 CHARACTER_ATTRIBUTE_RANGED_DAMAGE_MAX = 0x20,
|
|
47 };
|
|
48
|
|
49 /* 328 */
|
|
50 enum PLAYER_SKILL_TYPE
|
|
51 {
|
|
52 PLAYER_SKILL_STAFF = 0x0,
|
|
53 PLAYER_SKILL_SWORD = 0x1,
|
|
54 PLAYER_SKILL_DAGGER = 0x2,
|
|
55 PLAYER_SKILL_AXE = 0x3,
|
|
56 PLAYER_SKILL_SPEAR = 0x4,
|
|
57 PLAYER_SKILL_BOW = 0x5,
|
|
58 PLAYER_SKILL_MACE = 0x6,
|
|
59 PLAYER_SKILL_BLASTER = 0x7,
|
|
60 PLAYER_SKILL_SHIELD = 0x8,
|
|
61 PLAYER_SKILL_LEATHER = 0x9,
|
|
62 PLAYER_SKILL_CHAIN = 0xA,
|
|
63 PLAYER_SKILL_PLATE = 0xB,
|
|
64 PLAYER_SKILL_FIRE = 0xC,
|
|
65 PLAYER_SKILL_AIR = 0xD,
|
|
66 PLAYER_SKILL_WATER = 0xE,
|
|
67 PLAYER_SKILL_EARTH = 0xF,
|
|
68 PLAYER_SKILL_SPIRIT = 0x10,
|
|
69 PLAYER_SKILL_MIND = 0x11,
|
|
70 PLAYER_SKILL_BODY = 0x12,
|
|
71 PLAYER_SKILL_LIGHT = 0x13,
|
|
72 PLAYER_SKILL_DARK = 0x14,
|
|
73 PLAYER_SKILL_ITEM_ID = 0x15,
|
|
74 PLAYER_SKILL_MERCHANT = 0x16,
|
|
75 PLAYER_SKILL_REPAIR = 0x17,
|
|
76 PLAYER_SKILL_BODYBUILDING = 0x18,
|
|
77 PLAYER_SKILL_MEDITATION = 0x19,
|
|
78 PLAYER_SKILL_PERCEPTION = 0x1A,
|
|
79 PLAYER_SKILL_DIPLOMACY = 0x1B,
|
|
80 PLAYER_SKILL_TIEVERY = 0x1C,
|
|
81 PLAYER_SKILL_TRAP_DISARM = 0x1D,
|
|
82 PLAYER_SKILL_DODGE = 0x1E,
|
|
83 PLAYER_SKILL_UNARMED = 0x1F,
|
|
84 PLAYER_SKILL_MONSTER_ID = 0x20,
|
|
85 PLAYER_SKILL_ARMSMASTER = 0x21,
|
|
86 PLAYER_SKILL_STEALING = 0x22,
|
|
87 PLAYER_SKILL_ALCHEMY = 0x23,
|
|
88 PLAYER_SKILL_LEARNING = 0x24,
|
|
89 };
|
|
90
|
|
91 /* 329 */
|
|
92 enum PLAYER_CLASS_TYPE
|
|
93 {
|
|
94 PLAYER_CLASS_KNIGHT = 0x0,
|
|
95 PLAYER_CLASS_THEIF = 0x4,
|
|
96 PLAYER_CLASS_CLERIC = 0x18,
|
|
97 PLAYER_CLASS_SORCERER = 0x20,
|
|
98 };
|
|
99
|
|
100
|
|
101
|
|
102
|
|
103 #pragma pack(push, 1)
|
|
104 struct LloydBeacon
|
|
105 {
|
|
106 unsigned __int64 uBeaconTime;
|
|
107 int field_8;
|
|
108 int field_C;
|
|
109 int field_10;
|
|
110 int field_14;
|
|
111 int field_18;
|
|
112 };
|
|
113 #pragma pack(pop)
|
|
114
|
|
115
|
|
116
|
|
117 #pragma pack(push, 1)
|
23
|
118 struct PlayerSpellbookChapter
|
0
|
119 {
|
|
120 unsigned __int8 bIsSpellbookAvailable;
|
|
121 char bIsSpellAvailable[10];
|
|
122 };
|
|
123 #pragma pack(pop)
|
|
124
|
23
|
125 #pragma pack(push, 1)
|
|
126 struct PlayerSpells
|
|
127 {
|
|
128 union
|
|
129 {
|
|
130 struct
|
|
131 {
|
|
132 PlayerSpellbookChapter pFireSpellbook;
|
|
133 PlayerSpellbookChapter pAirSpellbook;
|
|
134 PlayerSpellbookChapter pWaterSpellbook;
|
|
135 PlayerSpellbookChapter pEarthSpellbook;
|
|
136 PlayerSpellbookChapter pSpiritSpellbook;
|
|
137 PlayerSpellbookChapter pMindSpellbook;
|
|
138 PlayerSpellbookChapter pBodySpellbook;
|
|
139 PlayerSpellbookChapter pLightSpellbook;
|
|
140 PlayerSpellbookChapter pDarkSpellbook;
|
|
141 char _pad_0;
|
|
142 };
|
|
143 struct
|
|
144 {
|
|
145 PlayerSpellbookChapter pChapters[9];
|
|
146 char _pad_1;
|
|
147 };
|
|
148 };
|
|
149 };
|
|
150 #pragma pack(pop)
|
|
151
|
0
|
152
|
|
153
|
|
154 #pragma pack(push, 1)
|
|
155 union PlayerEquipment
|
|
156 {
|
|
157 union
|
|
158 {
|
|
159 struct
|
|
160 {
|
|
161 unsigned int uOffHand;
|
|
162 unsigned int uMainHand;
|
|
163 unsigned int uBow;
|
|
164 unsigned int uBody;
|
|
165 unsigned int uHelm;
|
|
166 unsigned int uBelt;
|
|
167 unsigned int uCloak;
|
|
168 unsigned int field_1C;
|
|
169 unsigned int field_20;
|
|
170 unsigned int field_24;
|
|
171 unsigned int field_28;
|
|
172 unsigned int field_2C;
|
|
173 unsigned int field_30;
|
|
174 unsigned int field_34;
|
|
175 unsigned int field_38;
|
|
176 unsigned int field_3C;
|
|
177 };
|
|
178 unsigned int pIndices[16];
|
|
179 };
|
|
180 };
|
|
181 #pragma pack(pop)
|
|
182
|
|
183
|
|
184
|
25
|
185
|
|
186
|
|
187 enum PLAYER_SEX: unsigned __int8
|
|
188 {
|
|
189 SEX_MALE = 0,
|
|
190 SEX_FEMALE = 1
|
|
191 };
|
|
192
|
0
|
193 #pragma pack(push, 1)
|
|
194 struct Player
|
|
195 {
|
47
|
196 enum Condition: unsigned __int32
|
|
197 {
|
|
198 Condition_Cursed = 0,
|
|
199 Condition_Weak = 1,
|
|
200 Condition_Sleep = 2,
|
|
201 Condition_Fear = 3,
|
|
202 Condition_Drunk = 4,
|
|
203 Condition_Insane = 5,
|
|
204 Condition_Poison1 = 6,
|
|
205 Condition_Disease1 = 7,
|
|
206 Condition_Posion2 = 8,
|
|
207 Condition_Disease2 = 9,
|
|
208 Condition_Poison3 = 10,
|
|
209 Condition_Disease3 = 11,
|
|
210 Condition_Paralyzed = 12,
|
|
211 Condition_Unconcious = 13,
|
|
212 Condition_Dead = 14,
|
|
213 Condition_Pertified = 15,
|
|
214 Condition_Eradicated = 16,
|
|
215 Condition_Zombie = 17,
|
|
216 Condition_Good = 18
|
|
217 };
|
|
218
|
0
|
219 Player();
|
|
220
|
|
221 void SetVariable(enum VariableType var, signed int a3);
|
|
222 void AddVariable(enum VariableType var, signed int val);
|
|
223 void SubtractVariable(enum VariableType var, void *a3);
|
|
224 char CompareVariable(enum VariableType var, signed int a1);
|
|
225 void UseItem_DrinkPotion_etc(signed int a2, int a3);
|
|
226 bool AddItem(struct ItemGen *pItem);
|
|
227 int GetBaseStrength();
|
|
228 int GetBaseIntelligence();
|
|
229 int GetBaseWillpower();
|
|
230 int GetBaseEndurance();
|
|
231 int GetBaseAccuracy();
|
|
232 int GetBaseSpeed();
|
|
233 int GetBaseLuck();
|
|
234 int GetBaseLevel();
|
|
235 int GetActualLevel();
|
|
236 int GetActualMight();
|
|
237 int GetActualIntelligence();
|
|
238 int GetActualWillpower();
|
|
239 int GetActualEndurance();
|
|
240 int GetActualAccuracy();
|
|
241 int GetActualSpeed();
|
|
242 int GetActualLuck();
|
|
243 int GetActualAttack(int a2);
|
|
244 int GetMeleeDamageMinimal();
|
|
245 int GetMeleeDamageMaximal();
|
|
246 int CalculateMeleeDamageTo(int a2, int a3, unsigned int uTargetActorID);
|
|
247 int GetRangedAttack();
|
|
248 int GetRangedDamageMin();
|
|
249 int GetRangedDamageMax();
|
|
250 bool CalculateRangedDamageTo(int a2);
|
|
251 char *GetMeleeDamageString();
|
|
252 char *GetRangedDamageString();
|
|
253 bool CanTrainToNextLevel();
|
|
254 unsigned int GetExperienceDisplayColor();
|
|
255 int CalculateIncommingDamage(int resistance, signed int type);
|
|
256 int GetEquippedItemEquipType(unsigned int uEquipSlot);
|
|
257 int GetEquippedItemSkillType(enum ITEM_EQUIP_TYPE uEquipSlot);
|
|
258 bool IsUnarmed();
|
|
259 bool HasItemEquipped(enum ITEM_EQUIP_TYPE uEquipIndex);
|
24
|
260 bool HasEnchantedItemEquipped(int uEnchantment);
|
0
|
261 bool WearsItem(int a1, signed int a2);
|
|
262 bool StealFromShop(struct ItemGen *a2, int a3, int a4, int a5, int *a6);
|
|
263 int StealFromActor(unsigned int uActorID, int _steal_perm, int reputation);
|
|
264 void Heal(int amount);
|
|
265 int ReceiveDamage(signed int type, int resistance);
|
|
266 int _48DCF6(int a2, struct Actor *pActor);
|
|
267 unsigned int GetSpellSchool(unsigned int uSpellID);
|
|
268 int GetAttackRecoveryTime(int a2);
|
|
269 int GetMaxHealth();
|
|
270 int GetMaxMana();
|
|
271 int GetBaseAC();
|
|
272 int GetActualAC();
|
|
273 unsigned int GetBaseAge();
|
|
274 unsigned int GetActualAge();
|
|
275 int GetBaseResistance(enum CHARACTER_ATTRIBUTE_TYPE a2);
|
|
276 int GetActualResistance(enum CHARACTER_ATTRIBUTE_TYPE a2);
|
|
277 void SetRecoveryTime(signed int sRecoveryTime);
|
|
278 void RandomizeName();
|
23
|
279 unsigned int GetMajorConditionIdx();
|
0
|
280 int _48EA1B_get_static_effect(int a2);
|
|
281 int _48EA46_calc_special_bonus_by_items(int a2);
|
|
282 int GetItemsBonus(enum CHARACTER_ATTRIBUTE_TYPE attr, int a3);
|
|
283 int GetMagicalBonus(enum CHARACTER_ATTRIBUTE_TYPE a2);
|
|
284 char GetActualSkillLevel(enum PLAYER_SKILL_TYPE uSkillType);
|
|
285 int GetSkillBonus(enum CHARACTER_ATTRIBUTE_TYPE a2);
|
|
286 enum CHARACTER_RACE GetRace();
|
|
287 int GetSexByVoice();
|
|
288 void SetInitialStats();
|
|
289 int SetSexByVoice();
|
|
290 void Reset(unsigned __int8 uClass);
|
|
291 enum PLAYER_SKILL_TYPE GetSkillIdxByOrder(signed int order);
|
|
292 unsigned __int16 DecreaseAttribute(int eAttribute);
|
|
293 int IncreaseAttribute(int eAttribute);
|
|
294 void Player::Zero();
|
|
295 __int16 GetStatColor(unsigned int uStat);
|
|
296 bool DiscardConditionIfLastsLongerThan(unsigned int uCondition, unsigned __int64 uTime);
|
|
297 int _490EEE(ItemGen *pItem, int a3, int a4, int a5);
|
|
298 int GetBodybuilding();
|
|
299 int GetMediatation();
|
|
300 int CanIdentify(ItemGen *pItem);
|
|
301 int CanRepair(ItemGen *);
|
|
302 int GetMerchant();
|
|
303 int GetPerception();
|
|
304 int GetDisarmTrap();
|
|
305 char GetLearningPercent();
|
|
306 bool CanFitItem(unsigned int uSlot, unsigned int uItemID);
|
|
307 unsigned int FindFreeInventorySlot();
|
|
308 int CreateItemInInventory(unsigned int uSlot, unsigned int uItemID);
|
|
309 int HasSkill(unsigned int uSkillType);
|
|
310 int WearItem(unsigned int uItemID);
|
|
311 int AddItem(unsigned int uSlot, unsigned int uItemID);
|
|
312 int AddItem2(unsigned int uSlot, ItemGen *Src);
|
|
313 int CreateItemInInventory2(unsigned int uSlot, ItemGen *Src);
|
|
314 bool _49298B(ItemGen *a2, int a3, int a4);
|
|
315 unsigned int RemoveItemAtInventoryIndex(unsigned int uSlot);
|
|
316 bool CanAct();
|
|
317 bool CanSteal();
|
|
318 bool CanEquip_RaceAndAlignmentCheck(unsigned int uItemID);
|
|
319 int SetCondition(unsigned int uConditionIdx, int a3);
|
|
320 int _49327B(unsigned int uClass, int a3);
|
|
321 __int16 PlaySound(int a2, int a3);
|
|
322 __int16 PlayEmotion(int a2, int a3);
|
|
323 char _4160CA(int a2);
|
|
324 unsigned int GetItemIDAtInventoryIndex(int *a2);
|
|
325 int _4B6FF9();
|
|
326 int _4B824B(float a2);
|
|
327 int _4B8265(int a2, float a3);
|
|
328 int _4B8233(int a2, float a3);
|
|
329 int _4B8213(int a2, float a3);
|
|
330 int _4B81C3(int a2, float a3);
|
|
331 int _4B8179(float a2);
|
|
332 int _4B8142(int a2, float a3);
|
|
333 int _4B8102(int a2, float a3);
|
|
334 int _4B807C(float a2);
|
|
335 int _4B8040_condition_time(unsigned int uCondition);
|
|
336 bool _43EEF3();
|
|
337 void _4BE2DD(unsigned int a2, int a3, int _2devent_idx);
|
|
338 bool Recover(signed int a2);
|
|
339 bool CanCastSpell(unsigned int uRequiredMana);
|
|
340
|
47
|
341 inline bool Dead() {return pConditions[Condition::Condition_Dead] != 0;}
|
|
342 inline bool Eradicated() {return pConditions[Condition::Condition_Eradicated] != 0;}
|
|
343
|
0
|
344
|
|
345
|
|
346 __int64 pConditions[20];
|
|
347 unsigned __int64 uExperience;
|
|
348 char pName[16];
|
25
|
349 PLAYER_SEX uSex;
|
0
|
350 unsigned __int8 uClass;
|
|
351 unsigned __int8 uFace;
|
|
352 char field_BB;
|
|
353 unsigned __int16 uMight;
|
|
354 unsigned __int16 uMightBonus;
|
|
355 unsigned __int16 uIntelligence;
|
|
356 unsigned __int16 uIntelligenceBonus;
|
|
357 unsigned __int16 uWillpower;
|
|
358 unsigned __int16 uWillpowerBonus;
|
|
359 unsigned __int16 uEndurance;
|
|
360 unsigned __int16 uEnduranceBonus;
|
|
361 unsigned __int16 uSpeed;
|
|
362 unsigned __int16 uSpeedBonus;
|
|
363 unsigned __int16 uAccuracy;
|
|
364 unsigned __int16 uAccuracyBonus;
|
|
365 unsigned __int16 uLuck;
|
|
366 unsigned __int16 uLuckBonus;
|
|
367 __int16 sACModifier;
|
|
368 unsigned __int16 uLevel;
|
|
369 __int16 sLevelModifier;
|
|
370 __int16 sAgeModifier;
|
|
371 int field_E0;
|
|
372 int field_E4;
|
|
373 int field_E8;
|
|
374 int field_EC;
|
|
375 int field_F0;
|
|
376 int field_F4;
|
|
377 int field_F8;
|
|
378 int field_FC;
|
|
379 int field_100;
|
|
380 int field_104;
|
|
381 unsigned __int16 pActiveSkills[37];
|
|
382 char field_152[64];
|
23
|
383 PlayerSpells spellbook;
|
24
|
384 char field_1F5[30]; // used to be [31]
|
0
|
385 ItemGen pInventoryItems[126];
|
|
386 ItemGen pEquippedItems[12];
|
|
387 int pInventoryIndices[126];
|
|
388 __int16 sResFireBase;
|
|
389 __int16 sResAirBase;
|
|
390 __int16 sResWaterBase;
|
|
391 __int16 sResEarthBase;
|
|
392 __int16 field_177C;
|
|
393 __int16 sResMagicBase;
|
|
394 __int16 sResSpiritBase;
|
|
395 __int16 sResMindBase;
|
|
396 __int16 sResBodyBase;
|
|
397 __int16 sResLightBase;
|
|
398 __int16 sResDarkBase;
|
|
399 __int16 sResFireBonus;
|
|
400 __int16 sResAirBonus;
|
|
401 __int16 sResWaterBonus;
|
|
402 __int16 sResEarthBonus;
|
|
403 __int16 field_1792;
|
|
404 __int16 sResMagicBonus;
|
|
405 __int16 sResSpiritBonus;
|
|
406 __int16 sResMindBonus;
|
|
407 __int16 sResBodyBonus;
|
|
408 __int16 sResLightBonus;
|
|
409 __int16 sResDarkBonus;
|
|
410 SpellBuff pPlayerBuffs[24];
|
|
411 unsigned int uVoiceID;
|
|
412 int field_1924;
|
|
413 int field_1928;
|
|
414 int field_192C;
|
|
415 int field_1930;
|
|
416 unsigned __int16 uTimeToRecovery;
|
|
417 char field_1936;
|
|
418 char field_1937;
|
|
419 unsigned int uSkillPoints;
|
|
420 int sHealth;
|
|
421 int sMana;
|
|
422 unsigned int uBirthYear;
|
|
423 PlayerEquipment pEquipment;
|
|
424 int field_1988[49];
|
|
425 char field_1A4C;
|
|
426 char field_1A4D;
|
|
427 char field_1A4E;
|
|
428 unsigned __int8 uQuickSpell;
|
|
429 char field_1A50[64];
|
|
430 char _some_attack_bonus;
|
|
431 char field_1A91;
|
|
432 char _melee_dmg_bonus;
|
|
433 char field_1A93;
|
|
434 char _ranged_atk_bonus;
|
|
435 char field_1A95;
|
|
436 char _ranged_dmg_bonus;
|
|
437 char field_1A97;
|
|
438 char uFullHealthBonus;
|
|
439 char _health_related;
|
|
440 char uFullManaBonus;
|
|
441 char _mana_related;
|
|
442 unsigned __int16 uExpressionID;
|
|
443 unsigned __int16 uExpressionTimePassed;
|
|
444 unsigned __int16 uExpressionTimeLength;
|
|
445 __int16 field_1AA2;
|
|
446 int field_1AA4;
|
|
447 int field_1AA8;
|
|
448 LloydBeacon pInstalledBeacons[5];
|
|
449 char uNumDivineInterventionCastsThisDay;
|
|
450 char uNumArmageddonCasts;
|
|
451 char uNumFireSpikeCasts;
|
|
452 char field_1B3B;
|
|
453 };
|
|
454 #pragma pack(pop)
|