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