Mercurial > mm7
annotate Player.h @ 1395:8d4ec56416ef
Fix to ticket #69 array_50A2B0 being accessed outside of bounds
author | Nomad |
---|---|
date | Thu, 18 Jul 2013 17:07:49 +0200 |
parents | b51332ab228f |
children | 71a2cf416478 |
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; | |
297 int field_8; | |
298 int field_C; | |
299 int field_10; | |
300 int field_14; | |
301 int field_18; | |
302 }; | |
303 #pragma pack(pop) | |
304 | |
305 | |
306 | |
307 #pragma pack(push, 1) | |
308 struct PlayerSpellbookChapter | |
309 { | |
198 | 310 char bIsSpellAvailable[11]; |
0 | 311 }; |
312 #pragma pack(pop) | |
313 | |
314 #pragma pack(push, 1) | |
315 struct PlayerSpells | |
316 { | |
317 union | |
318 { | |
319 struct | |
320 { | |
321 PlayerSpellbookChapter pFireSpellbook; | |
322 PlayerSpellbookChapter pAirSpellbook; | |
323 PlayerSpellbookChapter pWaterSpellbook; | |
324 PlayerSpellbookChapter pEarthSpellbook; | |
325 PlayerSpellbookChapter pSpiritSpellbook; | |
326 PlayerSpellbookChapter pMindSpellbook; | |
327 PlayerSpellbookChapter pBodySpellbook; | |
328 PlayerSpellbookChapter pLightSpellbook; | |
329 PlayerSpellbookChapter pDarkSpellbook; | |
232 | 330 char _pad_0; |
0 | 331 }; |
332 struct | |
333 { | |
334 PlayerSpellbookChapter pChapters[9]; | |
232 | 335 char _pad_1; |
0 | 336 }; |
1021 | 337 struct |
338 { | |
339 char bHaveSpell[99]; | |
340 char _pad_1; | |
341 }; | |
0 | 342 }; |
343 }; | |
344 #pragma pack(pop) | |
345 | |
346 | |
347 | |
348 #pragma pack(push, 1) | |
349 union PlayerEquipment | |
350 { | |
351 union | |
352 { | |
353 struct | |
354 { | |
898 | 355 unsigned int uShield; |
0 | 356 unsigned int uMainHand; |
357 unsigned int uBow; | |
898 | 358 unsigned int uArmor; |
0 | 359 unsigned int uHelm; |
360 unsigned int uBelt; | |
361 unsigned int uCloak; | |
910 | 362 unsigned int uGlove; |
898 | 363 unsigned int uBoot; |
910 | 364 unsigned int uAmulet; |
365 unsigned int uRings[6]; | |
366 //unsigned int field_2C; | |
367 //unsigned int field_30; | |
368 //unsigned int field_34; | |
369 //unsigned int field_38; | |
370 //unsigned int field_3C; | |
0 | 371 }; |
372 unsigned int pIndices[16]; | |
373 }; | |
374 }; | |
375 #pragma pack(pop) | |
376 | |
377 | |
378 | |
379 | |
380 | |
130 | 381 enum CHARACTER_EXPRESSION_ID: unsigned __int16 |
382 { | |
383 CHARACTER_EXPRESSION_INVALID = 0, | |
384 CHARACTER_EXPRESSION_1 = 1, | |
385 CHARACTER_EXPRESSION_CURSED = 2, | |
386 CHARACTER_EXPRESSION_WEAK = 3, | |
387 CHARACTER_EXPRESSION_SLEEP = 4, | |
388 CHARACTER_EXPRESSION_FEAR = 5, | |
389 CHARACTER_EXPRESSION_DRUNK = 6, | |
390 CHARACTER_EXPRESSION_INSANE = 7, | |
391 CHARACTER_EXPRESSION_POISONED = 8, | |
392 CHARACTER_EXPRESSION_DISEASED = 9, | |
393 CHARACTER_EXPRESSION_PARALYZED = 10, | |
394 CHARACTER_EXPRESSION_UNCONCIOUS = 11, | |
395 CHARACTER_EXPRESSION_PERTIFIED = 12, | |
396 CHARACTER_EXPRESSION_13 = 13, | |
397 CHARACTER_EXPRESSION_14 = 14, | |
398 CHARACTER_EXPRESSION_15 = 15, | |
399 CHARACTER_EXPRESSION_16 = 16, | |
400 CHARACTER_EXPRESSION_17 = 17, | |
401 CHARACTER_EXPRESSION_18 = 18, | |
402 CHARACTER_EXPRESSION_19 = 19, | |
403 CHARACTER_EXPRESSION_20 = 20, | |
404 CHARACTER_EXPRESSION_21 = 21, | |
405 CHARACTER_EXPRESSION_22 = 22, | |
406 CHARACTER_EXPRESSION_23 = 23, | |
407 CHARACTER_EXPRESSION_24 = 24, | |
408 CHARACTER_EXPRESSION_25 = 25, | |
409 CHARACTER_EXPRESSION_26 = 26, | |
410 CHARACTER_EXPRESSION_27 = 27, | |
411 CHARACTER_EXPRESSION_28 = 28, | |
412 CHARACTER_EXPRESSION_29 = 29, | |
413 CHARACTER_EXPRESSION_30 = 30, | |
414 CHARACTER_EXPRESSION_31 = 31, | |
415 CHARACTER_EXPRESSION_32 = 32, | |
416 CHARACTER_EXPRESSION_33 = 33, | |
1352
88f80476c99c
Player::PlayEmotion simplified main condition, renamed a few expression enum vals
Grumpy7
parents:
1348
diff
changeset
|
417 CHARACTER_EXPRESSION_DMGRECVD_MINOR = 34, |
88f80476c99c
Player::PlayEmotion simplified main condition, renamed a few expression enum vals
Grumpy7
parents:
1348
diff
changeset
|
418 CHARACTER_EXPRESSION_DMGRECVD_MODERATE = 35, |
88f80476c99c
Player::PlayEmotion simplified main condition, renamed a few expression enum vals
Grumpy7
parents:
1348
diff
changeset
|
419 CHARACTER_EXPRESSION_DMGRECVD_MAJOR = 36, |
130 | 420 CHARACTER_EXPRESSION_37 = 37, |
421 CHARACTER_EXPRESSION_38 = 38, | |
422 CHARACTER_EXPRESSION_39 = 39, | |
423 | |
424 // ? | |
425 | |
831 | 426 CHARACTER_EXPRESSION_SCARED = 46, // like falling |
130 | 427 |
428 CHARACTER_EXPRESSION_54 = 54, | |
429 CHARACTER_EXPRESSION_55 = 55, | |
430 CHARACTER_EXPRESSION_56 = 56, | |
431 CHARACTER_EXPRESSION_57 = 57, | |
1352
88f80476c99c
Player::PlayEmotion simplified main condition, renamed a few expression enum vals
Grumpy7
parents:
1348
diff
changeset
|
432 CHARACTER_EXPRESSION_FALLING = 58, |
130 | 433 |
434 // ? | |
435 | |
436 CHARACTER_EXPRESSION_DEAD = 98, | |
437 CHARACTER_EXPRESSION_ERADICATED = 99, | |
438 }; | |
439 | |
440 | |
0 | 441 enum PLAYER_SEX: unsigned __int8 |
442 { | |
443 SEX_MALE = 0, | |
444 SEX_FEMALE = 1 | |
445 }; | |
446 | |
447 #pragma pack(push, 1) | |
448 struct Player | |
449 { | |
1363 | 450 static const unsigned int INVETORYSLOTSWIDTH = 14; |
451 static const unsigned int INVETORYSLOTSHEIGHT = 9; | |
452 | |
0 | 453 |
454 Player(); | |
455 | |
456 void SetVariable(enum VariableType var, signed int a3); | |
457 void AddVariable(enum VariableType var, signed int val); | |
501 | 458 bool SubtractVariable(enum VariableType VarNum, signed int pValue); |
484 | 459 bool CompareVariable(enum VariableType VarNum, signed int pValue); |
0 | 460 void UseItem_DrinkPotion_etc(signed int a2, int a3); |
461 bool AddItem(struct ItemGen *pItem); | |
1325 | 462 int GetActualAttribute(CHARACTER_ATTRIBUTE_TYPE attrId); |
0 | 463 int GetBaseStrength(); |
464 int GetBaseIntelligence(); | |
465 int GetBaseWillpower(); | |
466 int GetBaseEndurance(); | |
467 int GetBaseAccuracy(); | |
468 int GetBaseSpeed(); | |
469 int GetBaseLuck(); | |
470 int GetBaseLevel(); | |
471 int GetActualLevel(); | |
472 int GetActualMight(); | |
473 int GetActualIntelligence(); | |
474 int GetActualWillpower(); | |
475 int GetActualEndurance(); | |
476 int GetActualAccuracy(); | |
477 int GetActualSpeed(); | |
478 int GetActualLuck(); | |
479 int GetActualAttack(int a2); | |
480 int GetMeleeDamageMinimal(); | |
481 int GetMeleeDamageMaximal(); | |
482 int CalculateMeleeDamageTo(int a2, int a3, unsigned int uTargetActorID); | |
483 int GetRangedAttack(); | |
484 int GetRangedDamageMin(); | |
485 int GetRangedDamageMax(); | |
486 bool CalculateRangedDamageTo(int a2); | |
487 char *GetMeleeDamageString(); | |
488 char *GetRangedDamageString(); | |
489 bool CanTrainToNextLevel(); | |
490 unsigned int GetExperienceDisplayColor(); | |
1036 | 491 int CalculateIncommingDamage(DAMAGE_TYPE dmg_type, int amount); |
821 | 492 ITEM_EQUIP_TYPE GetEquippedItemEquipType(ITEM_EQUIP_TYPE uEquipSlot); |
493 PLAYER_SKILL_TYPE GetEquippedItemSkillType(ITEM_EQUIP_TYPE uEquipSlot); | |
0 | 494 bool IsUnarmed(); |
821 | 495 bool HasItemEquipped(ITEM_EQUIP_TYPE uEquipIndex); |
0 | 496 bool HasEnchantedItemEquipped(int uEnchantment); |
1080 | 497 bool WearsItem(int item_id, ITEM_EQUIP_TYPE equip_type); |
0 | 498 bool StealFromShop(struct ItemGen *a2, int a3, int a4, int a5, int *a6); |
499 int StealFromActor(unsigned int uActorID, int _steal_perm, int reputation); | |
500 void Heal(int amount); | |
1036 | 501 int ReceiveDamage(signed int amount, DAMAGE_TYPE dmg_type); |
0 | 502 int _48DCF6(int a2, struct Actor *pActor); |
503 unsigned int GetSpellSchool(unsigned int uSpellID); | |
816 | 504 int GetAttackRecoveryTime(bool bRangedAttack); |
0 | 505 int GetMaxHealth(); |
506 int GetMaxMana(); | |
507 int GetBaseAC(); | |
508 int GetActualAC(); | |
509 unsigned int GetBaseAge(); | |
510 unsigned int GetActualAge(); | |
511 int GetBaseResistance(enum CHARACTER_ATTRIBUTE_TYPE a2); | |
512 int GetActualResistance(enum CHARACTER_ATTRIBUTE_TYPE a2); | |
513 void SetRecoveryTime(signed int sRecoveryTime); | |
514 void RandomizeName(); | |
515 unsigned int GetMajorConditionIdx(); | |
1036 | 516 int GetParameterBonus(int player_parameter); |
0 | 517 int _48EA46_calc_special_bonus_by_items(int a2); |
518 int GetItemsBonus(enum CHARACTER_ATTRIBUTE_TYPE attr, int a3); | |
519 int GetMagicalBonus(enum CHARACTER_ATTRIBUTE_TYPE a2); | |
1008 | 520 int GetActualSkillLevel(PLAYER_SKILL_TYPE uSkillType); |
0 | 521 int GetSkillBonus(enum CHARACTER_ATTRIBUTE_TYPE a2); |
522 enum CHARACTER_RACE GetRace(); | |
187 | 523 PLAYER_SEX GetSexByVoice(); |
0 | 524 void SetInitialStats(); |
1022 | 525 void SetSexByVoice(); |
135 | 526 void Reset(PLAYER_CLASS_TYPE classType); |
821 | 527 PLAYER_SKILL_TYPE GetSkillIdxByOrder(signed int order); |
0 | 528 void DecreaseAttribute(int eAttribute); |
1273 | 529 void IncreaseAttribute(int eAttribute); |
0 | 530 void Player::Zero(); |
297 | 531 unsigned int GetStatColor(int uStat); |
0 | 532 bool DiscardConditionIfLastsLongerThan(unsigned int uCondition, unsigned __int64 uTime); |
917 | 533 int SelectPhrasesTransaction(ItemGen *pItem, int building_type, int BuildID_2Events, int a5); |
0 | 534 int GetBodybuilding(); |
607 | 535 int GetMeditation(); |
0 | 536 int CanIdentify(ItemGen *pItem); |
537 int CanRepair(ItemGen *); | |
538 int GetMerchant(); | |
539 int GetPerception(); | |
540 int GetDisarmTrap(); | |
541 char GetLearningPercent(); | |
542 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
|
543 int FindFreeInventoryListSlot(); |
0 | 544 int CreateItemInInventory(unsigned int uSlot, unsigned int uItemID); |
545 int HasSkill(unsigned int uSkillType); | |
1382
132a6a0d5cef
Player::AddItem2, Player::CreateItemInInventory2 cleanup
Grumpy7
parents:
1365
diff
changeset
|
546 void WearItem(unsigned int uItemID); |
1014 | 547 int AddItem(int uSlot, unsigned int uItemID); |
548 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
|
549 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
|
550 void PutItemArInventoryIndex(int uItemID, int itemListPos, int uSlot); |
1006 | 551 void RemoveItemAtInventoryIndex(unsigned int uSlot); |
0 | 552 bool CanAct(); |
553 bool CanSteal(); | |
554 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
|
555 void SetCondition(unsigned int uConditionIdx, int a3); |
1355 | 556 bool ProfessionOrGuildFlagsCorrect(unsigned int uClass, int a3); |
187 | 557 void PlaySound(PlayerSpeech speech, int a3); |
558 void PlayEmotion(CHARACTER_EXPRESSION_ID expression, int a3); | |
1012 | 559 void ItemsEnchant(int enchant_count); |
0 | 560 unsigned int GetItemIDAtInventoryIndex(int *a2); |
1348 | 561 bool IsPlayerHealableByTemple(); |
1275 | 562 int GetBaseIdentifyPrice(float a2); |
563 int GetBaseRepairPrice(int a2, float a3); | |
564 int GetBaseBuyingPrice(int a2, float a3); | |
565 int GetBaseSellingPrice(int a2, float a3); | |
916 | 566 int GetPriceRepair(int a2, float a3); |
567 int GetPriceIdentification(float a2); | |
749 | 568 int GetBuyingPrice(unsigned int uRealValue, float price_multiplier); |
917 | 569 int GetPriceSell(int uRealValue, float price_multiplier); |
1274
351bc06722f2
Player::_4B807C changed to Player::GetTempleHealCostModifier, cleaned up
Grumpy7
parents:
1273
diff
changeset
|
570 int GetTempleHealCostModifier(float a2); |
1036 | 571 int GetConditionDayOfWeek(unsigned int uCondition); |
1346
1434b36f4bdb
Player::_43EEF3 renamed to NothingOrJustBlastersEquipped
Grumpy7
parents:
1325
diff
changeset
|
572 bool NothingOrJustBlastersEquipped(); |
1014 | 573 void SalesProcess(unsigned int inventory_idnx, int item_index, int _2devent_idx);//0x4BE2DD |
0 | 574 bool Recover(signed int a2); |
575 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
|
576 void PlaySoundBasedOnCondition(int currPlayerId); |
d6e5b6b76612
Player::SetVariable cleanup - removing unused variables and function calls with them, some case shuffling
Grumpy7
parents:
1258
diff
changeset
|
577 void DrawPlayerBuffAnimBasedOnCondition(int currPlayerId); |
1276
f11651288371
changed sub_467E7F_EquipBody to Player::EquipBody, some more header file stuff
Grumpy7
parents:
1275
diff
changeset
|
578 void EquipBody(ITEM_EQUIP_TYPE uEquipType); |
0 | 579 |
1362
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
580 bool IsWeak(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
581 bool IsDead(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
582 bool IsEradicated(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
583 bool IsZombie(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
584 bool IsCursed(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
585 bool IsPertified(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
586 bool IsUnconcious(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
587 bool IsAsleep(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
588 bool IsParalyzed(); |
0 | 589 |
1361
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
590 void SetCursed(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
591 void SetWeak(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
592 void SetAsleep(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
593 void SetAfraid(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
594 void SetDrunk(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
595 void SetInsane(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
596 void SetPoison1(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
597 void SetDisease1(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
598 void SetPoison2(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
599 void SetDisease2(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
600 void SetPoison3(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
601 void SetDisease3(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
602 void SetParalyzed(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
603 void SetUnconcious(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
604 void SetDead(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
605 void SetPertified(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
606 void SetEradicated(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
607 void SetZombie(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
608 |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
609 void SetCondWeakWithBlockCheck (int blockable); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
610 void SetCondInsaneWithBlockCheck (int blockable); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
611 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
|
612 |
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 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
|
614 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
|
615 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
|
616 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
|
617 |
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 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
|
619 inline bool IsFemale() { return !IsMale();} |
0 | 620 __int64 pConditions[20]; |
621 unsigned __int64 uExperience; | |
622 char pName[16]; | |
623 PLAYER_SEX uSex; | |
135 | 624 PLAYER_CLASS_TYPE classType; |
1014 | 625 unsigned __int8 uCurrentFace; |
0 | 626 char field_BB; |
627 unsigned __int16 uMight; | |
628 unsigned __int16 uMightBonus; | |
629 unsigned __int16 uIntelligence; | |
630 unsigned __int16 uIntelligenceBonus; | |
631 unsigned __int16 uWillpower; | |
632 unsigned __int16 uWillpowerBonus; | |
633 unsigned __int16 uEndurance; | |
634 unsigned __int16 uEnduranceBonus; | |
635 unsigned __int16 uSpeed; | |
636 unsigned __int16 uSpeedBonus; | |
637 unsigned __int16 uAccuracy; | |
638 unsigned __int16 uAccuracyBonus; | |
639 unsigned __int16 uLuck; | |
640 unsigned __int16 uLuckBonus; | |
641 __int16 sACModifier; | |
642 unsigned __int16 uLevel; | |
643 __int16 sLevelModifier; | |
644 __int16 sAgeModifier; | |
645 int field_E0; | |
646 int field_E4; | |
647 int field_E8; | |
648 int field_EC; | |
649 int field_F0; | |
650 int field_F4; | |
651 int field_F8; | |
652 int field_FC; | |
653 int field_100; | |
654 int field_104; | |
655 union | |
656 { | |
657 struct | |
658 { | |
659 unsigned __int16 skillStaff; | |
660 unsigned __int16 skillSword; | |
661 unsigned __int16 skillDagger; | |
662 unsigned __int16 skillAxe; | |
663 unsigned __int16 skillSpear; | |
664 unsigned __int16 skillBow; | |
665 unsigned __int16 skillMace; | |
666 unsigned __int16 skillBlaster; | |
667 unsigned __int16 skillShield; | |
668 unsigned __int16 skillLeather; | |
669 unsigned __int16 skillChain; | |
670 unsigned __int16 skillPlate; | |
671 unsigned __int16 skillFire; | |
672 unsigned __int16 skillAir; | |
673 unsigned __int16 skillWater; | |
674 unsigned __int16 skillEarth; | |
675 unsigned __int16 skillSpirit; | |
676 unsigned __int16 skillMind; | |
677 unsigned __int16 skillBody; | |
678 unsigned __int16 skillLight; | |
679 unsigned __int16 skillDark; | |
680 unsigned __int16 skillItemId; | |
681 unsigned __int16 skillMerchant; | |
682 unsigned __int16 skillRepair; | |
683 unsigned __int16 skillBodybuilding; | |
684 unsigned __int16 skillMeditation; | |
685 unsigned __int16 skillPerception; | |
686 unsigned __int16 skillDiplomacy; | |
687 unsigned __int16 skillThievery; | |
688 unsigned __int16 skillDisarmTrap; | |
689 unsigned __int16 skillDodge; | |
690 unsigned __int16 skillUnarmed; | |
691 unsigned __int16 skillMonsterId; | |
692 unsigned __int16 skillArmsmaster; | |
693 unsigned __int16 skillStealing; | |
694 unsigned __int16 skillAlchemy; | |
695 unsigned __int16 skillLearning; | |
696 }; | |
697 unsigned __int16 pActiveSkills[37]; | |
698 }; | |
735 | 699 unsigned char _guilds_member_bits[64]; |
0 | 700 PlayerSpells spellbook; |
1019 | 701 char field__1F5[2]; // used to be [31] |
702 int pure_luck_used; | |
703 int pure_speed_used; | |
704 int pure_intellect_used; | |
705 int pure_endurance_used; | |
706 int pure_willpower_used; | |
707 int pure_accuracy_used; | |
708 int pure_might_used; | |
709 union //214h | |
1012 | 710 { |
711 struct | |
712 { | |
1384
b51332ab228f
changed a few member variables in Player to slightly less confusing names
Grumpy7
parents:
1383
diff
changeset
|
713 ItemGen pInventoryItemList[126]; |
1012 | 714 ItemGen pEquippedItems[12]; |
715 }; | |
716 ItemGen pOwnItems[138]; | |
717 }; | |
718 | |
1384
b51332ab228f
changed a few member variables in Player to slightly less confusing names
Grumpy7
parents:
1383
diff
changeset
|
719 int pInventoryMatrix[126]; |
0 | 720 __int16 sResFireBase; |
721 __int16 sResAirBase; | |
722 __int16 sResWaterBase; | |
723 __int16 sResEarthBase; | |
724 __int16 field_177C; | |
725 __int16 sResMagicBase; | |
726 __int16 sResSpiritBase; | |
727 __int16 sResMindBase; | |
728 __int16 sResBodyBase; | |
729 __int16 sResLightBase; | |
730 __int16 sResDarkBase; | |
731 __int16 sResFireBonus; | |
732 __int16 sResAirBonus; | |
733 __int16 sResWaterBonus; | |
734 __int16 sResEarthBonus; | |
735 __int16 field_1792; | |
736 __int16 sResMagicBonus; | |
737 __int16 sResSpiritBonus; | |
738 __int16 sResMindBonus; | |
739 __int16 sResBodyBonus; | |
740 __int16 sResLightBonus; | |
741 __int16 sResDarkBonus; | |
742 SpellBuff pPlayerBuffs[24]; | |
743 unsigned int uVoiceID; | |
1014 | 744 int uPrevVoiceID; |
745 int uPrevFace; | |
0 | 746 int field_192C; |
747 int field_1930; | |
748 unsigned __int16 uTimeToRecovery; | |
749 char field_1936; | |
750 char field_1937; | |
751 unsigned int uSkillPoints; | |
752 int sHealth; | |
753 int sMana; | |
754 unsigned int uBirthYear; | |
755 PlayerEquipment pEquipment; | |
756 int field_1988[49]; | |
757 char field_1A4C; | |
758 char field_1A4D; | |
198 | 759 char lastOpenedSpellbookPage; |
0 | 760 unsigned __int8 uQuickSpell; |
761 char field_1A50[64]; | |
762 char _some_attack_bonus; | |
763 char field_1A91; | |
764 char _melee_dmg_bonus; | |
765 char field_1A93; | |
766 char _ranged_atk_bonus; | |
767 char field_1A95; | |
768 char _ranged_dmg_bonus; | |
769 char field_1A97; | |
770 char uFullHealthBonus; | |
771 char _health_related; | |
772 char uFullManaBonus; | |
773 char _mana_related; | |
130 | 774 CHARACTER_EXPRESSION_ID expression; |
0 | 775 unsigned __int16 uExpressionTimePassed; |
776 unsigned __int16 uExpressionTimeLength; | |
777 __int16 field_1AA2; | |
554
9caf59edb1ee
Cave and Temple load and even doesn't crash (for a while).
Nomad
parents:
501
diff
changeset
|
778 int _expression21_animtime; |
9caf59edb1ee
Cave and Temple load and even doesn't crash (for a while).
Nomad
parents:
501
diff
changeset
|
779 int _expression21_frameset; |
0 | 780 LloydBeacon pInstalledBeacons[5]; |
781 char uNumDivineInterventionCastsThisDay; | |
782 char uNumArmageddonCasts; | |
783 char uNumFireSpikeCasts; | |
784 char field_1B3B; | |
785 }; | |
786 #pragma pack(pop) |