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