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