Mercurial > mm7
annotate Player.h @ 1357:06926081358f
Player::CanEquip_RaceAndAlignmentCheck fixed 3 missing return values, started using new race and gender functions, moved everything to a switch
author | Grumpy7 |
---|---|
date | Sat, 13 Jul 2013 16:15:35 +0200 |
parents | af2fc30d765f |
children | b3ac17fd12de |
rev | line source |
---|---|
0 | 1 #pragma once |
2 #include "Items.h" | |
3 #include "Spells.h" | |
4 | |
5 | |
6 | |
7 | |
488 | 8 #define PLAYER_BUFF_BLESS 1 |
9 #define PLAYER_BUFF_FATE 4 | |
10 #define PLAYER_BUFF_HAMMERHANDS 6 | |
816 | 11 #define PLAYER_BUFF_7 7 |
488 | 12 #define PLAYER_BUFF_PAIN_REFLECTION 10 |
13 #define PLAYER_BUFF_PRESERVATION 11 | |
14 #define PLAYER_BUFF_REGENERATION 12 | |
187 | 15 |
16 | |
949 | 17 #define PLAYER_GUILD_BITS__SPIRIT_MEMBERSHIP 58 |
18 #define PLAYER_GUILD_BITS__ARCOMAGE_WIN 103 | |
19 #define PLAYER_GUILD_BITS__ARCOMAGE_LOSE 104 | |
735 | 20 |
21 | |
187 | 22 /* 301 */ |
23 enum PlayerSpeech | |
24 { | |
25 SPEECH_1 = 1, | |
26 SPEECH_2 = 2, | |
27 SPEECH_3 = 3, | |
28 SPEECH_4 = 4, | |
29 SPEECH_5 = 5, | |
30 SPEECH_6 = 6, | |
31 SPEECH_7 = 7, | |
32 SPEECH_8 = 8, | |
33 SPEECH_9 = 9, | |
34 SPEECH_10 = 10, | |
35 SPEECH_11 = 11, | |
36 SPEECH_12 = 12, | |
37 SPEECH_14 = 14, | |
201 | 38 SPEECH_NoRoom = 15, // when placing to inventory |
187 | 39 SPEECH_16 = 16, |
40 SPEECH_17 = 17, | |
41 SPEECH_18 = 18, | |
42 SPEECH_19 = 19, | |
43 SPEECH_20 = 20, | |
44 SPEECH_21 = 21, | |
201 | 45 SPEECH_GoodDay = 22, // greets on dialogue start |
188 | 46 SPEECH_GoodEvening = 23, |
187 | 47 SPEECH_24 = 24, |
48 SPEECH_25 = 25, | |
49 SPEECH_26 = 26, | |
50 SPEECH_27 = 27, | |
51 SPEECH_28 = 28, | |
52 SPEECH_29 = 29, | |
53 SPEECH_30 = 30, | |
54 SPEECH_31 = 31, | |
55 SPEECH_32 = 32, | |
56 SPEECH_33 = 33, | |
57 SPEECH_34 = 34, | |
58 SPEECH_35 = 35, | |
59 SPEECH_36 = 36, | |
60 SPEECH_37 = 37, | |
248 | 61 SPEECH_NotEnoughGold = 38, |
187 | 62 SPEECH_39 = 39, |
63 SPEECH_40 = 40, | |
64 SPEECH_41 = 41, | |
65 SPEECH_42 = 42, | |
66 SPEECH_43 = 43, | |
67 SPEECH_44 = 44, | |
68 SPEECH_45 = 45, | |
69 SPEECH_46 = 46, | |
70 SPEECH_47 = 47, | |
71 SPEECH_48 = 48, | |
72 SPEECH_49 = 49, | |
73 SPEECH_50 = 50, | |
74 SPEECH_51 = 51, | |
75 SPEECH_52 = 52, | |
76 SPEECH_53 = 53, | |
77 SPEECH_54 = 54, | |
78 SPEECH_55 = 55, | |
79 SPEECH_56 = 56, | |
80 SPEECH_57 = 57, | |
81 SPEECH_58 = 58, | |
82 SPEECH_59 = 59, | |
83 SPEECH_60 = 60, | |
84 SPEECH_61 = 61, | |
85 SPEECH_62 = 62, | |
86 SPEECH_63 = 63, | |
87 SPEECH_64 = 64, | |
88 SPEECH_Yell = 65, | |
89 SPEECH_66 = 66, | |
90 SPEECH_67 = 67, | |
91 SPEECH_68 = 68, | |
92 SPEECH_69 = 69, | |
93 SPEECH_70 = 70, | |
652 | 94 SPEECH_CarriageReady = 71, // travelling by carriage |
95 SPEECH_SetSail = 72, // travelling by sea | |
187 | 96 SPEECH_73 = 73, |
97 SPEECH_74 = 74, | |
98 SPEECH_75 = 75, | |
99 SPEECH_76 = 76, | |
100 SPEECH_77 = 77, | |
101 SPEECH_78 = 78, | |
102 SPEECH_79 = 79, | |
103 SPEECH_80 = 80, | |
104 SPEECH_81 = 81, | |
105 SPEECH_82 = 82, | |
106 SPEECH_83 = 83, | |
107 SPEECH_84 = 84, | |
108 SPEECH_85 = 85, | |
109 SPEECH_86 = 86, | |
110 SPEECH_87 = 87, | |
111 SPEECH_88 = 88, | |
112 SPEECH_89 = 89, | |
113 SPEECH_90 = 90, | |
114 SPEECH_91 = 91, | |
115 SPEECH_92 = 92, | |
116 SPEECH_93 = 93, | |
117 SPEECH_94 = 94, | |
118 SPEECH_95 = 95, | |
119 SPEECH_96 = 96, | |
120 SPEECH_97 = 97, | |
121 SPEECH_98 = 98, | |
122 SPEECH_99 = 99, | |
123 SPEECH_100 = 100, | |
124 SPEECH_101 = 101, | |
125 SPEECH_PickMe = 102, | |
126 SPEECH_103 = 103, | |
127 SPEECH_104 = 104, | |
128 SPEECH_105 = 105, | |
129 SPEECH_106 = 106, | |
130 SPEECH_107 = 107, | |
131 SPEECH_108 = 108, | |
132 SPEECH_109 = 109, | |
133 SPEECH_110 = 110, | |
134 }; | |
135 | |
136 | |
137 | |
0 | 138 /* 339 */ |
139 enum CHARACTER_RACE | |
140 { | |
991 | 141 CHARACTER_RACE_HUMAN = 0, |
142 CHARACTER_RACE_ELF = 1, | |
143 CHARACTER_RACE_GOBLIN = 2, | |
144 CHARACTER_RACE_DWARF = 3, | |
0 | 145 }; |
130 | 146 |
0 | 147 /* 332 */ |
148 enum CHARACTER_ATTRIBUTE_TYPE | |
149 { | |
1040 | 150 CHARACTER_ATTRIBUTE_STRENGTH = 0, |
151 CHARACTER_ATTRIBUTE_INTELLIGENCE = 1, | |
152 CHARACTER_ATTRIBUTE_WILLPOWER = 2, | |
153 CHARACTER_ATTRIBUTE_ENDURANCE = 3, | |
154 CHARACTER_ATTRIBUTE_ACCURACY = 4, | |
155 CHARACTER_ATTRIBUTE_SPEED = 5, | |
156 CHARACTER_ATTRIBUTE_LUCK = 6, | |
157 CHARACTER_ATTRIBUTE_HEALTH = 7, | |
158 CHARACTER_ATTRIBUTE_MANA = 8, | |
159 CHARACTER_ATTRIBUTE_AC_BONUS = 9, | |
160 | |
161 CHARACTER_ATTRIBUTE_RESIST_FIRE = 10, | |
162 CHARACTER_ATTRIBUTE_RESIST_AIR = 11, | |
163 CHARACTER_ATTRIBUTE_RESIST_WATER = 12, | |
164 CHARACTER_ATTRIBUTE_RESIST_EARTH = 13, | |
165 CHARACTER_ATTRIBUTE_RESIST_MIND = 14, | |
166 CHARACTER_ATTRIBUTE_RESIST_BODY = 15, | |
167 | |
168 CHARACTER_ATTRIBUTE_SKILL_ALCHEMY = 16, | |
169 CHARACTER_ATTRIBUTE_SKILL_STEALING = 17, | |
170 CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM = 18, | |
171 CHARACTER_ATTRIBUTE_SKILL_ITEM_ID = 19, | |
172 CHARACTER_ATTRIBUTE_SKILL_MONSTER_ID = 20, | |
173 CHARACTER_ATTRIBUTE_SKILL_ARMSMASTER = 21, | |
174 CHARACTER_ATTRIBUTE_SKILL_DODGE = 22, | |
175 CHARACTER_ATTRIBUTE_SKILL_UNARMED = 23, | |
176 | |
177 CHARACTER_ATTRIBUTE_LEVEL = 24, | |
178 CHARACTER_ATTRIBUTE_ATTACK = 25, | |
179 CHARACTER_ATTRIBUTE_MELEE_DMG_BONUS = 26, | |
180 CHARACTER_ATTRIBUTE_MELEE_DMG_MIN = 27, | |
181 CHARACTER_ATTRIBUTE_MELEE_DMG_MAX = 28, | |
182 CHARACTER_ATTRIBUTE_RANGED_ATTACK = 29, | |
183 CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS = 30, | |
184 CHARACTER_ATTRIBUTE_RANGED_DMG_MIN = 31, | |
185 CHARACTER_ATTRIBUTE_RANGED_DMG_MAX = 32, | |
186 CHARACTER_ATTRIBUTE_RESIST_SPIRIT = 33, | |
187 | |
188 CHARACTER_ATTRIBUTE_SKILL_FIRE = 34, | |
189 CHARACTER_ATTRIBUTE_SKILL_AIR = 35, | |
190 CHARACTER_ATTRIBUTE_SKILL_WATER = 36, | |
191 CHARACTER_ATTRIBUTE_SKILL_EARTH = 37, | |
192 CHARACTER_ATTRIBUTE_SKILL_SPIRIT = 38, | |
193 CHARACTER_ATTRIBUTE_SKILL_MIND = 39, | |
194 CHARACTER_ATTRIBUTE_SKILL_BODY = 40, | |
195 CHARACTER_ATTRIBUTE_SKILL_LIGHT = 41, | |
196 CHARACTER_ATTRIBUTE_SKILL_DARK = 42, | |
197 CHARACTER_ATTRIBUTE_SKILL_MEDITATION = 43, | |
198 CHARACTER_ATTRIBUTE_SKILL_BOW = 44, | |
199 CHARACTER_ATTRIBUTE_SKILL_SHIELD = 45, | |
200 CHARACTER_ATTRIBUTE_SKILL_LEARNING = 46 | |
0 | 201 }; |
202 | |
203 /* 328 */ | |
1160 | 204 enum PLAYER_SKILL_TYPE: signed __int8 |
0 | 205 { |
135 | 206 PLAYER_SKILL_STAFF = 0, |
207 PLAYER_SKILL_SWORD = 1, | |
208 PLAYER_SKILL_DAGGER = 2, | |
209 PLAYER_SKILL_AXE = 3, | |
210 PLAYER_SKILL_SPEAR = 4, | |
211 PLAYER_SKILL_BOW = 5, | |
212 PLAYER_SKILL_MACE = 6, | |
213 PLAYER_SKILL_BLASTER = 7, | |
214 PLAYER_SKILL_SHIELD = 8, | |
215 PLAYER_SKILL_LEATHER = 9, | |
216 PLAYER_SKILL_CHAIN = 10, | |
217 PLAYER_SKILL_PLATE = 11, | |
218 PLAYER_SKILL_FIRE = 12, | |
219 PLAYER_SKILL_AIR = 13, | |
220 PLAYER_SKILL_WATER = 14, | |
221 PLAYER_SKILL_EARTH = 15, | |
222 PLAYER_SKILL_SPIRIT = 16, | |
198 | 223 PLAYER_SKILL_MIND = 17, |
135 | 224 PLAYER_SKILL_BODY = 18, |
198 | 225 PLAYER_SKILL_LIGHT = 19, |
226 PLAYER_SKILL_DARK = 20, | |
227 PLAYER_SKILL_ITEM_ID = 21, | |
228 PLAYER_SKILL_MERCHANT = 22, | |
229 PLAYER_SKILL_REPAIR = 23, | |
230 PLAYER_SKILL_BODYBUILDING = 24, | |
231 PLAYER_SKILL_MEDITATION = 25, | |
232 PLAYER_SKILL_PERCEPTION = 26, | |
233 PLAYER_SKILL_DIPLOMACY = 27, | |
234 PLAYER_SKILL_TIEVERY = 28, | |
135 | 235 PLAYER_SKILL_TRAP_DISARM = 29, |
198 | 236 PLAYER_SKILL_DODGE = 30, |
237 PLAYER_SKILL_UNARMED = 31, | |
238 PLAYER_SKILL_MONSTER_ID = 32, | |
135 | 239 PLAYER_SKILL_ARMSMASTER = 33, |
240 PLAYER_SKILL_STEALING = 34, | |
241 PLAYER_SKILL_ALCHEMY = 35, | |
198 | 242 PLAYER_SKILL_LEARNING = 36, |
374 | 243 PLAYER_SKILL_CLUB = 37, |
385 | 244 PLAYER_SKILL_MISC = 38, |
201 | 245 PLAYER_SKILL_INVALID = -1 |
0 | 246 }; |
247 | |
248 /* 329 */ | |
135 | 249 enum PLAYER_CLASS_TYPE: unsigned __int8 |
0 | 250 { |
135 | 251 PLAYER_CLASS_KNIGHT = 0, |
255 | 252 PLAYER_CLASS_CHEVALIER = 1, |
253 PLAYER_CLASS_CHAMPION = 2, | |
254 PLAYER_CLASS_BLACK_KNIGHT = 3, | |
135 | 255 PLAYER_CLASS_THEIF = 4, |
255 | 256 PLAYER_CLASS_ROGUE = 5, |
257 PLAYER_CLASS_SPY = 6, | |
258 PLAYER_CLASS_ASSASSIN = 7, | |
259 PLAYER_CLASS_MONK = 8, | |
260 PLAYER_CLASS_INITIATE = 9, | |
261 PLAYER_CLASS_MASTER = 10, | |
262 PLAYER_CLASS_NINJA = 11, | |
263 PLAYER_CLASS_PALADIN = 12, | |
264 PLAYER_CLASS_CRUSADER = 13, | |
265 PLAYER_CLASS_HERO = 14, | |
266 PLAYER_CLASS_VILLIAN = 15, | |
267 PLAYER_CLASS_ARCHER = 16, | |
268 PLAYER_CLASS_WARRIOR_MAGE = 17, | |
269 PLAYER_CLASS_MASTER_ARCHER = 18, | |
270 PLAYER_CLASS_SNIPER = 19, | |
271 PLAYER_CLASS_RANGER = 20, | |
272 PLAYER_CLASS_HUNTER = 21, | |
273 PLAYER_CLASS_RANGER_LORD = 22, | |
274 PLAYER_CLASS_BOUNTY_HUNTER = 23, | |
135 | 275 PLAYER_CLASS_CLERIC = 24, |
255 | 276 PLAYER_CLASS_PRIEST = 25, |
277 PLAYER_CLASS_PRIEST_OF_SUN = 26, | |
278 PLAYER_CLASS_PRIEST_OF_MOON = 27, | |
135 | 279 PLAYER_CLASS_DRUID = 28, |
255 | 280 PLAYER_CLASS_GREAT_DRUID = 29, |
281 PLAYER_CLASS_ARCH_DRUID = 30, | |
282 PLAYER_CLASS_WARLOCK = 31, | |
135 | 283 PLAYER_CLASS_SORCERER = 32, |
255 | 284 PLAYER_CLASS_WIZARD = 33, |
285 PLAYER_CLASS_ARCHMAGE = 34, | |
286 PLAYER_CLASS_LICH = 35 | |
0 | 287 }; |
288 | |
289 | |
290 | |
291 | |
292 #pragma pack(push, 1) | |
293 struct LloydBeacon | |
294 { | |
295 unsigned __int64 uBeaconTime; | |
296 int field_8; | |
297 int field_C; | |
298 int field_10; | |
299 int field_14; | |
300 int field_18; | |
301 }; | |
302 #pragma pack(pop) | |
303 | |
304 | |
305 | |
306 #pragma pack(push, 1) | |
307 struct PlayerSpellbookChapter | |
308 { | |
198 | 309 char bIsSpellAvailable[11]; |
0 | 310 }; |
311 #pragma pack(pop) | |
312 | |
313 #pragma pack(push, 1) | |
314 struct PlayerSpells | |
315 { | |
316 union | |
317 { | |
318 struct | |
319 { | |
320 PlayerSpellbookChapter pFireSpellbook; | |
321 PlayerSpellbookChapter pAirSpellbook; | |
322 PlayerSpellbookChapter pWaterSpellbook; | |
323 PlayerSpellbookChapter pEarthSpellbook; | |
324 PlayerSpellbookChapter pSpiritSpellbook; | |
325 PlayerSpellbookChapter pMindSpellbook; | |
326 PlayerSpellbookChapter pBodySpellbook; | |
327 PlayerSpellbookChapter pLightSpellbook; | |
328 PlayerSpellbookChapter pDarkSpellbook; | |
232 | 329 char _pad_0; |
0 | 330 }; |
331 struct | |
332 { | |
333 PlayerSpellbookChapter pChapters[9]; | |
232 | 334 char _pad_1; |
0 | 335 }; |
1021 | 336 struct |
337 { | |
338 char bHaveSpell[99]; | |
339 char _pad_1; | |
340 }; | |
0 | 341 }; |
342 }; | |
343 #pragma pack(pop) | |
344 | |
345 | |
346 | |
347 #pragma pack(push, 1) | |
348 union PlayerEquipment | |
349 { | |
350 union | |
351 { | |
352 struct | |
353 { | |
898 | 354 unsigned int uShield; |
0 | 355 unsigned int uMainHand; |
356 unsigned int uBow; | |
898 | 357 unsigned int uArmor; |
0 | 358 unsigned int uHelm; |
359 unsigned int uBelt; | |
360 unsigned int uCloak; | |
910 | 361 unsigned int uGlove; |
898 | 362 unsigned int uBoot; |
910 | 363 unsigned int uAmulet; |
364 unsigned int uRings[6]; | |
365 //unsigned int field_2C; | |
366 //unsigned int field_30; | |
367 //unsigned int field_34; | |
368 //unsigned int field_38; | |
369 //unsigned int field_3C; | |
0 | 370 }; |
371 unsigned int pIndices[16]; | |
372 }; | |
373 }; | |
374 #pragma pack(pop) | |
375 | |
376 | |
377 | |
378 | |
379 | |
130 | 380 enum CHARACTER_EXPRESSION_ID: unsigned __int16 |
381 { | |
382 CHARACTER_EXPRESSION_INVALID = 0, | |
383 CHARACTER_EXPRESSION_1 = 1, | |
384 CHARACTER_EXPRESSION_CURSED = 2, | |
385 CHARACTER_EXPRESSION_WEAK = 3, | |
386 CHARACTER_EXPRESSION_SLEEP = 4, | |
387 CHARACTER_EXPRESSION_FEAR = 5, | |
388 CHARACTER_EXPRESSION_DRUNK = 6, | |
389 CHARACTER_EXPRESSION_INSANE = 7, | |
390 CHARACTER_EXPRESSION_POISONED = 8, | |
391 CHARACTER_EXPRESSION_DISEASED = 9, | |
392 CHARACTER_EXPRESSION_PARALYZED = 10, | |
393 CHARACTER_EXPRESSION_UNCONCIOUS = 11, | |
394 CHARACTER_EXPRESSION_PERTIFIED = 12, | |
395 CHARACTER_EXPRESSION_13 = 13, | |
396 CHARACTER_EXPRESSION_14 = 14, | |
397 CHARACTER_EXPRESSION_15 = 15, | |
398 CHARACTER_EXPRESSION_16 = 16, | |
399 CHARACTER_EXPRESSION_17 = 17, | |
400 CHARACTER_EXPRESSION_18 = 18, | |
401 CHARACTER_EXPRESSION_19 = 19, | |
402 CHARACTER_EXPRESSION_20 = 20, | |
403 CHARACTER_EXPRESSION_21 = 21, | |
404 CHARACTER_EXPRESSION_22 = 22, | |
405 CHARACTER_EXPRESSION_23 = 23, | |
406 CHARACTER_EXPRESSION_24 = 24, | |
407 CHARACTER_EXPRESSION_25 = 25, | |
408 CHARACTER_EXPRESSION_26 = 26, | |
409 CHARACTER_EXPRESSION_27 = 27, | |
410 CHARACTER_EXPRESSION_28 = 28, | |
411 CHARACTER_EXPRESSION_29 = 29, | |
412 CHARACTER_EXPRESSION_30 = 30, | |
413 CHARACTER_EXPRESSION_31 = 31, | |
414 CHARACTER_EXPRESSION_32 = 32, | |
415 CHARACTER_EXPRESSION_33 = 33, | |
1352
88f80476c99c
Player::PlayEmotion simplified main condition, renamed a few expression enum vals
Grumpy7
parents:
1348
diff
changeset
|
416 CHARACTER_EXPRESSION_DMGRECVD_MINOR = 34, |
88f80476c99c
Player::PlayEmotion simplified main condition, renamed a few expression enum vals
Grumpy7
parents:
1348
diff
changeset
|
417 CHARACTER_EXPRESSION_DMGRECVD_MODERATE = 35, |
88f80476c99c
Player::PlayEmotion simplified main condition, renamed a few expression enum vals
Grumpy7
parents:
1348
diff
changeset
|
418 CHARACTER_EXPRESSION_DMGRECVD_MAJOR = 36, |
130 | 419 CHARACTER_EXPRESSION_37 = 37, |
420 CHARACTER_EXPRESSION_38 = 38, | |
421 CHARACTER_EXPRESSION_39 = 39, | |
422 | |
423 // ? | |
424 | |
831 | 425 CHARACTER_EXPRESSION_SCARED = 46, // like falling |
130 | 426 |
427 CHARACTER_EXPRESSION_54 = 54, | |
428 CHARACTER_EXPRESSION_55 = 55, | |
429 CHARACTER_EXPRESSION_56 = 56, | |
430 CHARACTER_EXPRESSION_57 = 57, | |
1352
88f80476c99c
Player::PlayEmotion simplified main condition, renamed a few expression enum vals
Grumpy7
parents:
1348
diff
changeset
|
431 CHARACTER_EXPRESSION_FALLING = 58, |
130 | 432 |
433 // ? | |
434 | |
435 CHARACTER_EXPRESSION_DEAD = 98, | |
436 CHARACTER_EXPRESSION_ERADICATED = 99, | |
437 }; | |
438 | |
439 | |
0 | 440 enum PLAYER_SEX: unsigned __int8 |
441 { | |
442 SEX_MALE = 0, | |
443 SEX_FEMALE = 1 | |
444 }; | |
445 | |
446 #pragma pack(push, 1) | |
447 struct Player | |
448 { | |
1006 | 449 enum Condition: unsigned __int32 |
450 { | |
0 | 451 Condition_Cursed = 0, |
452 Condition_Weak = 1, | |
453 Condition_Sleep = 2, | |
454 Condition_Fear = 3, | |
455 Condition_Drunk = 4, | |
456 Condition_Insane = 5, | |
457 Condition_Poison1 = 6, | |
458 Condition_Disease1 = 7, | |
130 | 459 Condition_Poison2 = 8, |
0 | 460 Condition_Disease2 = 9, |
461 Condition_Poison3 = 10, | |
462 Condition_Disease3 = 11, | |
463 Condition_Paralyzed = 12, | |
464 Condition_Unconcious = 13, | |
465 Condition_Dead = 14, | |
466 Condition_Pertified = 15, | |
467 Condition_Eradicated = 16, | |
468 Condition_Zombie = 17, | |
469 Condition_Good = 18 | |
1006 | 470 }; |
0 | 471 |
472 Player(); | |
473 | |
474 void SetVariable(enum VariableType var, signed int a3); | |
475 void AddVariable(enum VariableType var, signed int val); | |
501 | 476 bool SubtractVariable(enum VariableType VarNum, signed int pValue); |
484 | 477 bool CompareVariable(enum VariableType VarNum, signed int pValue); |
0 | 478 void UseItem_DrinkPotion_etc(signed int a2, int a3); |
479 bool AddItem(struct ItemGen *pItem); | |
1325 | 480 int GetActualAttribute(CHARACTER_ATTRIBUTE_TYPE attrId); |
0 | 481 int GetBaseStrength(); |
482 int GetBaseIntelligence(); | |
483 int GetBaseWillpower(); | |
484 int GetBaseEndurance(); | |
485 int GetBaseAccuracy(); | |
486 int GetBaseSpeed(); | |
487 int GetBaseLuck(); | |
488 int GetBaseLevel(); | |
489 int GetActualLevel(); | |
490 int GetActualMight(); | |
491 int GetActualIntelligence(); | |
492 int GetActualWillpower(); | |
493 int GetActualEndurance(); | |
494 int GetActualAccuracy(); | |
495 int GetActualSpeed(); | |
496 int GetActualLuck(); | |
497 int GetActualAttack(int a2); | |
498 int GetMeleeDamageMinimal(); | |
499 int GetMeleeDamageMaximal(); | |
500 int CalculateMeleeDamageTo(int a2, int a3, unsigned int uTargetActorID); | |
501 int GetRangedAttack(); | |
502 int GetRangedDamageMin(); | |
503 int GetRangedDamageMax(); | |
504 bool CalculateRangedDamageTo(int a2); | |
505 char *GetMeleeDamageString(); | |
506 char *GetRangedDamageString(); | |
507 bool CanTrainToNextLevel(); | |
508 unsigned int GetExperienceDisplayColor(); | |
1036 | 509 int CalculateIncommingDamage(DAMAGE_TYPE dmg_type, int amount); |
821 | 510 ITEM_EQUIP_TYPE GetEquippedItemEquipType(ITEM_EQUIP_TYPE uEquipSlot); |
511 PLAYER_SKILL_TYPE GetEquippedItemSkillType(ITEM_EQUIP_TYPE uEquipSlot); | |
0 | 512 bool IsUnarmed(); |
821 | 513 bool HasItemEquipped(ITEM_EQUIP_TYPE uEquipIndex); |
0 | 514 bool HasEnchantedItemEquipped(int uEnchantment); |
1080 | 515 bool WearsItem(int item_id, ITEM_EQUIP_TYPE equip_type); |
0 | 516 bool StealFromShop(struct ItemGen *a2, int a3, int a4, int a5, int *a6); |
517 int StealFromActor(unsigned int uActorID, int _steal_perm, int reputation); | |
518 void Heal(int amount); | |
1036 | 519 int ReceiveDamage(signed int amount, DAMAGE_TYPE dmg_type); |
0 | 520 int _48DCF6(int a2, struct Actor *pActor); |
521 unsigned int GetSpellSchool(unsigned int uSpellID); | |
816 | 522 int GetAttackRecoveryTime(bool bRangedAttack); |
0 | 523 int GetMaxHealth(); |
524 int GetMaxMana(); | |
525 int GetBaseAC(); | |
526 int GetActualAC(); | |
527 unsigned int GetBaseAge(); | |
528 unsigned int GetActualAge(); | |
529 int GetBaseResistance(enum CHARACTER_ATTRIBUTE_TYPE a2); | |
530 int GetActualResistance(enum CHARACTER_ATTRIBUTE_TYPE a2); | |
531 void SetRecoveryTime(signed int sRecoveryTime); | |
532 void RandomizeName(); | |
533 unsigned int GetMajorConditionIdx(); | |
1036 | 534 int GetParameterBonus(int player_parameter); |
0 | 535 int _48EA46_calc_special_bonus_by_items(int a2); |
536 int GetItemsBonus(enum CHARACTER_ATTRIBUTE_TYPE attr, int a3); | |
537 int GetMagicalBonus(enum CHARACTER_ATTRIBUTE_TYPE a2); | |
1008 | 538 int GetActualSkillLevel(PLAYER_SKILL_TYPE uSkillType); |
0 | 539 int GetSkillBonus(enum CHARACTER_ATTRIBUTE_TYPE a2); |
540 enum CHARACTER_RACE GetRace(); | |
187 | 541 PLAYER_SEX GetSexByVoice(); |
0 | 542 void SetInitialStats(); |
1022 | 543 void SetSexByVoice(); |
135 | 544 void Reset(PLAYER_CLASS_TYPE classType); |
821 | 545 PLAYER_SKILL_TYPE GetSkillIdxByOrder(signed int order); |
0 | 546 void DecreaseAttribute(int eAttribute); |
1273 | 547 void IncreaseAttribute(int eAttribute); |
0 | 548 void Player::Zero(); |
297 | 549 unsigned int GetStatColor(int uStat); |
0 | 550 bool DiscardConditionIfLastsLongerThan(unsigned int uCondition, unsigned __int64 uTime); |
917 | 551 int SelectPhrasesTransaction(ItemGen *pItem, int building_type, int BuildID_2Events, int a5); |
0 | 552 int GetBodybuilding(); |
607 | 553 int GetMeditation(); |
0 | 554 int CanIdentify(ItemGen *pItem); |
555 int CanRepair(ItemGen *); | |
556 int GetMerchant(); | |
557 int GetPerception(); | |
558 int GetDisarmTrap(); | |
559 char GetLearningPercent(); | |
560 bool CanFitItem(unsigned int uSlot, unsigned int uItemID); | |
561 unsigned int FindFreeInventorySlot(); | |
562 int CreateItemInInventory(unsigned int uSlot, unsigned int uItemID); | |
563 int HasSkill(unsigned int uSkillType); | |
564 int WearItem(unsigned int uItemID); | |
1014 | 565 int AddItem(int uSlot, unsigned int uItemID); |
566 int AddItem2(int uSlot, ItemGen *Src); | |
0 | 567 int CreateItemInInventory2(unsigned int uSlot, ItemGen *Src); |
1014 | 568 int PutItemArInventoryIndex(ItemGen *item, int item_id, int uSlot); |
1006 | 569 void RemoveItemAtInventoryIndex(unsigned int uSlot); |
0 | 570 bool CanAct(); |
571 bool CanSteal(); | |
572 bool CanEquip_RaceAndAlignmentCheck(unsigned int uItemID); | |
573 int SetCondition(unsigned int uConditionIdx, int a3); | |
1355 | 574 bool ProfessionOrGuildFlagsCorrect(unsigned int uClass, int a3); |
187 | 575 void PlaySound(PlayerSpeech speech, int a3); |
576 void PlayEmotion(CHARACTER_EXPRESSION_ID expression, int a3); | |
1012 | 577 void ItemsEnchant(int enchant_count); |
0 | 578 unsigned int GetItemIDAtInventoryIndex(int *a2); |
1348 | 579 bool IsPlayerHealableByTemple(); |
1275 | 580 int GetBaseIdentifyPrice(float a2); |
581 int GetBaseRepairPrice(int a2, float a3); | |
582 int GetBaseBuyingPrice(int a2, float a3); | |
583 int GetBaseSellingPrice(int a2, float a3); | |
916 | 584 int GetPriceRepair(int a2, float a3); |
585 int GetPriceIdentification(float a2); | |
749 | 586 int GetBuyingPrice(unsigned int uRealValue, float price_multiplier); |
917 | 587 int GetPriceSell(int uRealValue, float price_multiplier); |
1274
351bc06722f2
Player::_4B807C changed to Player::GetTempleHealCostModifier, cleaned up
Grumpy7
parents:
1273
diff
changeset
|
588 int GetTempleHealCostModifier(float a2); |
1036 | 589 int GetConditionDayOfWeek(unsigned int uCondition); |
1346
1434b36f4bdb
Player::_43EEF3 renamed to NothingOrJustBlastersEquipped
Grumpy7
parents:
1325
diff
changeset
|
590 bool NothingOrJustBlastersEquipped(); |
1014 | 591 void SalesProcess(unsigned int inventory_idnx, int item_index, int _2devent_idx);//0x4BE2DD |
0 | 592 bool Recover(signed int a2); |
593 bool CanCastSpell(unsigned int uRequiredMana); | |
1259
d6e5b6b76612
Player::SetVariable cleanup - removing unused variables and function calls with them, some case shuffling
Grumpy7
parents:
1258
diff
changeset
|
594 void PlaySoundBasedOnCondition(int currPlayerId); |
d6e5b6b76612
Player::SetVariable cleanup - removing unused variables and function calls with them, some case shuffling
Grumpy7
parents:
1258
diff
changeset
|
595 void DrawPlayerBuffAnimBasedOnCondition(int currPlayerId); |
1276
f11651288371
changed sub_467E7F_EquipBody to Player::EquipBody, some more header file stuff
Grumpy7
parents:
1275
diff
changeset
|
596 void EquipBody(ITEM_EQUIP_TYPE uEquipType); |
0 | 597 |
1160 | 598 inline bool Weak() {return pConditions[Condition_Weak] != 0;} |
599 inline bool Dead() {return pConditions[Condition_Dead] != 0;} | |
600 inline bool Eradicated() {return pConditions[Condition_Eradicated] != 0;} | |
601 inline bool Zombie() {return pConditions[Condition_Zombie] != 0;} | |
602 inline bool Cursed() {return pConditions[Condition_Cursed] != 0;} | |
603 inline bool Pertified() {return pConditions[Condition_Pertified] != 0;} | |
0 | 604 |
1160 | 605 inline void SetCursed(bool state) {pConditions[Condition_Cursed] = state;} |
606 inline void SetWeak(bool state) {pConditions[Condition_Weak] = state;} | |
607 inline void SetAsleep(bool state) {pConditions[Condition_Sleep] = state;} | |
608 inline void SetAfraid(bool state) {pConditions[Condition_Fear] = state;} | |
609 inline void SetDrunk(bool state) {pConditions[Condition_Drunk] = state;} | |
610 inline void SetInsane(bool state) {pConditions[Condition_Insane] = state;} | |
611 inline void SetPoison1(bool state) {pConditions[Condition_Poison1] = state;} | |
612 inline void SetDisease1(bool state) {pConditions[Condition_Disease1] = state;} | |
613 inline void SetPoison2(bool state) {pConditions[Condition_Poison2] = state;} | |
614 inline void SetDisease2(bool state) {pConditions[Condition_Disease2] = state;} | |
615 inline void SetPoison3(bool state) {pConditions[Condition_Poison3] = state;} | |
616 inline void SetDisease3(bool state) {pConditions[Condition_Disease3] = state;} | |
617 inline void SetParalyzed(bool state) {pConditions[Condition_Paralyzed] = state;} | |
618 inline void SetUnconcious(bool state) {pConditions[Condition_Unconcious] = state;} | |
619 inline void SetDead(bool state) {pConditions[Condition_Dead] = state;} | |
620 inline void SetPertified(bool state) {pConditions[Condition_Pertified] = state;} | |
621 inline void SetEradicated(bool state) {pConditions[Condition_Eradicated] = state;} | |
622 inline void SetZombie(bool state) {pConditions[Condition_Zombie] = state;} | |
1357
06926081358f
Player::CanEquip_RaceAndAlignmentCheck fixed 3 missing return values, started using new race and gender functions, moved everything to a switch
Grumpy7
parents:
1355
diff
changeset
|
623 |
06926081358f
Player::CanEquip_RaceAndAlignmentCheck fixed 3 missing return values, started using new race and gender functions, moved everything to a switch
Grumpy7
parents:
1355
diff
changeset
|
624 inline bool IsRaceHuman() {return GetRace() == CHARACTER_RACE_HUMAN;} |
06926081358f
Player::CanEquip_RaceAndAlignmentCheck fixed 3 missing return values, started using new race and gender functions, moved everything to a switch
Grumpy7
parents:
1355
diff
changeset
|
625 inline bool IsRaceDwarf() {return GetRace() == CHARACTER_RACE_DWARF;} |
06926081358f
Player::CanEquip_RaceAndAlignmentCheck fixed 3 missing return values, started using new race and gender functions, moved everything to a switch
Grumpy7
parents:
1355
diff
changeset
|
626 inline bool IsRaceElf() {return GetRace() == CHARACTER_RACE_ELF;} |
06926081358f
Player::CanEquip_RaceAndAlignmentCheck fixed 3 missing return values, started using new race and gender functions, moved everything to a switch
Grumpy7
parents:
1355
diff
changeset
|
627 inline bool IsRaceGoblin() {return GetRace() == CHARACTER_RACE_GOBLIN;} |
06926081358f
Player::CanEquip_RaceAndAlignmentCheck fixed 3 missing return values, started using new race and gender functions, moved everything to a switch
Grumpy7
parents:
1355
diff
changeset
|
628 |
06926081358f
Player::CanEquip_RaceAndAlignmentCheck fixed 3 missing return values, started using new race and gender functions, moved everything to a switch
Grumpy7
parents:
1355
diff
changeset
|
629 inline bool IsMale() { return GetSexByVoice() == SEX_MALE;} |
06926081358f
Player::CanEquip_RaceAndAlignmentCheck fixed 3 missing return values, started using new race and gender functions, moved everything to a switch
Grumpy7
parents:
1355
diff
changeset
|
630 inline bool IsFemale() { return !IsMale();} |
06926081358f
Player::CanEquip_RaceAndAlignmentCheck fixed 3 missing return values, started using new race and gender functions, moved everything to a switch
Grumpy7
parents:
1355
diff
changeset
|
631 |
0 | 632 __int64 pConditions[20]; |
633 unsigned __int64 uExperience; | |
634 char pName[16]; | |
635 PLAYER_SEX uSex; | |
135 | 636 PLAYER_CLASS_TYPE classType; |
1014 | 637 unsigned __int8 uCurrentFace; |
0 | 638 char field_BB; |
639 unsigned __int16 uMight; | |
640 unsigned __int16 uMightBonus; | |
641 unsigned __int16 uIntelligence; | |
642 unsigned __int16 uIntelligenceBonus; | |
643 unsigned __int16 uWillpower; | |
644 unsigned __int16 uWillpowerBonus; | |
645 unsigned __int16 uEndurance; | |
646 unsigned __int16 uEnduranceBonus; | |
647 unsigned __int16 uSpeed; | |
648 unsigned __int16 uSpeedBonus; | |
649 unsigned __int16 uAccuracy; | |
650 unsigned __int16 uAccuracyBonus; | |
651 unsigned __int16 uLuck; | |
652 unsigned __int16 uLuckBonus; | |
653 __int16 sACModifier; | |
654 unsigned __int16 uLevel; | |
655 __int16 sLevelModifier; | |
656 __int16 sAgeModifier; | |
657 int field_E0; | |
658 int field_E4; | |
659 int field_E8; | |
660 int field_EC; | |
661 int field_F0; | |
662 int field_F4; | |
663 int field_F8; | |
664 int field_FC; | |
665 int field_100; | |
666 int field_104; | |
667 union | |
668 { | |
669 struct | |
670 { | |
671 unsigned __int16 skillStaff; | |
672 unsigned __int16 skillSword; | |
673 unsigned __int16 skillDagger; | |
674 unsigned __int16 skillAxe; | |
675 unsigned __int16 skillSpear; | |
676 unsigned __int16 skillBow; | |
677 unsigned __int16 skillMace; | |
678 unsigned __int16 skillBlaster; | |
679 unsigned __int16 skillShield; | |
680 unsigned __int16 skillLeather; | |
681 unsigned __int16 skillChain; | |
682 unsigned __int16 skillPlate; | |
683 unsigned __int16 skillFire; | |
684 unsigned __int16 skillAir; | |
685 unsigned __int16 skillWater; | |
686 unsigned __int16 skillEarth; | |
687 unsigned __int16 skillSpirit; | |
688 unsigned __int16 skillMind; | |
689 unsigned __int16 skillBody; | |
690 unsigned __int16 skillLight; | |
691 unsigned __int16 skillDark; | |
692 unsigned __int16 skillItemId; | |
693 unsigned __int16 skillMerchant; | |
694 unsigned __int16 skillRepair; | |
695 unsigned __int16 skillBodybuilding; | |
696 unsigned __int16 skillMeditation; | |
697 unsigned __int16 skillPerception; | |
698 unsigned __int16 skillDiplomacy; | |
699 unsigned __int16 skillThievery; | |
700 unsigned __int16 skillDisarmTrap; | |
701 unsigned __int16 skillDodge; | |
702 unsigned __int16 skillUnarmed; | |
703 unsigned __int16 skillMonsterId; | |
704 unsigned __int16 skillArmsmaster; | |
705 unsigned __int16 skillStealing; | |
706 unsigned __int16 skillAlchemy; | |
707 unsigned __int16 skillLearning; | |
708 }; | |
709 unsigned __int16 pActiveSkills[37]; | |
710 }; | |
735 | 711 unsigned char _guilds_member_bits[64]; |
0 | 712 PlayerSpells spellbook; |
1019 | 713 char field__1F5[2]; // used to be [31] |
714 int pure_luck_used; | |
715 int pure_speed_used; | |
716 int pure_intellect_used; | |
717 int pure_endurance_used; | |
718 int pure_willpower_used; | |
719 int pure_accuracy_used; | |
720 int pure_might_used; | |
721 union //214h | |
1012 | 722 { |
723 struct | |
724 { | |
725 ItemGen pInventoryItems[126]; | |
726 ItemGen pEquippedItems[12]; | |
727 }; | |
728 ItemGen pOwnItems[138]; | |
729 }; | |
730 | |
1014 | 731 int pInventoryIndices[126]; |
0 | 732 __int16 sResFireBase; |
733 __int16 sResAirBase; | |
734 __int16 sResWaterBase; | |
735 __int16 sResEarthBase; | |
736 __int16 field_177C; | |
737 __int16 sResMagicBase; | |
738 __int16 sResSpiritBase; | |
739 __int16 sResMindBase; | |
740 __int16 sResBodyBase; | |
741 __int16 sResLightBase; | |
742 __int16 sResDarkBase; | |
743 __int16 sResFireBonus; | |
744 __int16 sResAirBonus; | |
745 __int16 sResWaterBonus; | |
746 __int16 sResEarthBonus; | |
747 __int16 field_1792; | |
748 __int16 sResMagicBonus; | |
749 __int16 sResSpiritBonus; | |
750 __int16 sResMindBonus; | |
751 __int16 sResBodyBonus; | |
752 __int16 sResLightBonus; | |
753 __int16 sResDarkBonus; | |
754 SpellBuff pPlayerBuffs[24]; | |
755 unsigned int uVoiceID; | |
1014 | 756 int uPrevVoiceID; |
757 int uPrevFace; | |
0 | 758 int field_192C; |
759 int field_1930; | |
760 unsigned __int16 uTimeToRecovery; | |
761 char field_1936; | |
762 char field_1937; | |
763 unsigned int uSkillPoints; | |
764 int sHealth; | |
765 int sMana; | |
766 unsigned int uBirthYear; | |
767 PlayerEquipment pEquipment; | |
768 int field_1988[49]; | |
769 char field_1A4C; | |
770 char field_1A4D; | |
198 | 771 char lastOpenedSpellbookPage; |
0 | 772 unsigned __int8 uQuickSpell; |
773 char field_1A50[64]; | |
774 char _some_attack_bonus; | |
775 char field_1A91; | |
776 char _melee_dmg_bonus; | |
777 char field_1A93; | |
778 char _ranged_atk_bonus; | |
779 char field_1A95; | |
780 char _ranged_dmg_bonus; | |
781 char field_1A97; | |
782 char uFullHealthBonus; | |
783 char _health_related; | |
784 char uFullManaBonus; | |
785 char _mana_related; | |
130 | 786 CHARACTER_EXPRESSION_ID expression; |
0 | 787 unsigned __int16 uExpressionTimePassed; |
788 unsigned __int16 uExpressionTimeLength; | |
789 __int16 field_1AA2; | |
554
9caf59edb1ee
Cave and Temple load and even doesn't crash (for a while).
Nomad
parents:
501
diff
changeset
|
790 int _expression21_animtime; |
9caf59edb1ee
Cave and Temple load and even doesn't crash (for a while).
Nomad
parents:
501
diff
changeset
|
791 int _expression21_frameset; |
0 | 792 LloydBeacon pInstalledBeacons[5]; |
793 char uNumDivineInterventionCastsThisDay; | |
794 char uNumArmageddonCasts; | |
795 char uNumFireSpikeCasts; | |
796 char field_1B3B; | |
797 }; | |
798 #pragma pack(pop) |