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