Mercurial > mm7
annotate Player.h @ 2153:d28d3c006077
Some Render decoupling.
author | Nomad |
---|---|
date | Thu, 09 Jan 2014 02:34:20 +0200 |
parents | 62a27b2cfcc2 |
children | 385040580292 |
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); |
0 | 555 bool DiscardConditionIfLastsLongerThan(unsigned int uCondition, unsigned __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 |
1553
b98812ead5d9
Get(skillname) functions cleaned up, using GetMultiplierForSkillLevel instead of nested conditions
Grumpy7
parents:
1552
diff
changeset
|
605 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
|
606 int CalculateMeleeDmgToEnemyWithWeapon( ItemGen * weapon, unsigned int uTargetActorID , bool addOneDice); |
1563 | 607 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
|
608 float GetArmorRecoveryMultiplierFromSkillLevel( unsigned char armour_skill_type, float param2, float param3, float param4, float param5 ); |
1822 | 609 void SetSkillByEvent(unsigned __int16 Player::* skillToSet, unsigned __int16 skillValue); |
610 void AddSkillByEvent( unsigned __int16 Player::* skillToSet, unsigned __int16 addSkillValue); | |
611 void PlayAwardSound_Anim(); | |
612 void PlayAwardSound_Anim_Face(PlayerSpeech speech); | |
613 void PlayAwardSound_Anim97(); | |
614 void PlayAwardSound_Anim97_Face(PlayerSpeech speech); | |
615 void PlayAwardSound_Anim98(); | |
616 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
|
617 |
1362
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
618 bool IsWeak(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
619 bool IsDead(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
620 bool IsEradicated(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
621 bool IsZombie(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
622 bool IsCursed(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
623 bool IsPertified(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
624 bool IsUnconcious(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
625 bool IsAsleep(); |
d6cf8ead9242
Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents:
1361
diff
changeset
|
626 bool IsParalyzed(); |
1685
2a309997c42f
Player::StealFromShop started cleanup, fixing a few errors caused by not commiting everything
Grumpy7
parents:
1684
diff
changeset
|
627 bool IsDrunk(); |
0 | 628 |
1361
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
629 void SetCursed(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
630 void SetWeak(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
631 void SetAsleep(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
632 void SetAfraid(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
633 void SetDrunk(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
634 void SetInsane(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
635 void SetPoison1(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
636 void SetDisease1(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
637 void SetPoison2(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
638 void SetDisease2(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
639 void SetPoison3(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
640 void SetDisease3(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
641 void SetParalyzed(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
642 void SetUnconcious(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
643 void SetDead(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
644 void SetPertified(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
645 void SetEradicated(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
646 void SetZombie(bool state); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
647 |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
648 void SetCondWeakWithBlockCheck (int blockable); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
649 void SetCondInsaneWithBlockCheck (int blockable); |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1357
diff
changeset
|
650 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
|
651 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
|
652 |
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
|
653 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
|
654 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
|
655 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
|
656 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
|
657 |
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 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
|
659 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
|
660 |
bafc79e65a4d
Item getter functions to reduce the number of ugly array accesses, fixing a bug with Player::setrecoverytime
Grumpy7
parents:
1695
diff
changeset
|
661 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
|
662 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
|
663 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
|
664 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
|
665 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
|
666 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
|
667 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
|
668 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
|
669 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
|
670 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
|
671 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
|
672 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
|
673 ItemGen* GetItem(unsigned int PlayerEquipment::* itemPos); |
1822 | 674 int GetPlayerIndex(); |
675 | |
1826 | 676 std::array<__int64, 20> pConditions; |
0 | 677 unsigned __int64 uExperience; |
678 char pName[16]; | |
679 PLAYER_SEX uSex; | |
135 | 680 PLAYER_CLASS_TYPE classType; |
1014 | 681 unsigned __int8 uCurrentFace; |
0 | 682 char field_BB; |
683 unsigned __int16 uMight; | |
684 unsigned __int16 uMightBonus; | |
685 unsigned __int16 uIntelligence; | |
686 unsigned __int16 uIntelligenceBonus; | |
687 unsigned __int16 uWillpower; | |
688 unsigned __int16 uWillpowerBonus; | |
689 unsigned __int16 uEndurance; | |
690 unsigned __int16 uEnduranceBonus; | |
691 unsigned __int16 uSpeed; | |
692 unsigned __int16 uSpeedBonus; | |
693 unsigned __int16 uAccuracy; | |
694 unsigned __int16 uAccuracyBonus; | |
695 unsigned __int16 uLuck; | |
696 unsigned __int16 uLuckBonus; | |
697 __int16 sACModifier; | |
698 unsigned __int16 uLevel; | |
699 __int16 sLevelModifier; | |
700 __int16 sAgeModifier; | |
701 int field_E0; | |
702 int field_E4; | |
703 int field_E8; | |
704 int field_EC; | |
705 int field_F0; | |
706 int field_F4; | |
707 int field_F8; | |
708 int field_FC; | |
709 int field_100; | |
710 int field_104; | |
711 union | |
712 { | |
713 struct | |
714 { | |
715 unsigned __int16 skillStaff; | |
716 unsigned __int16 skillSword; | |
717 unsigned __int16 skillDagger; | |
718 unsigned __int16 skillAxe; | |
719 unsigned __int16 skillSpear; | |
720 unsigned __int16 skillBow; | |
721 unsigned __int16 skillMace; | |
722 unsigned __int16 skillBlaster; | |
723 unsigned __int16 skillShield; | |
724 unsigned __int16 skillLeather; | |
725 unsigned __int16 skillChain; | |
726 unsigned __int16 skillPlate; | |
727 unsigned __int16 skillFire; | |
728 unsigned __int16 skillAir; | |
729 unsigned __int16 skillWater; | |
730 unsigned __int16 skillEarth; | |
731 unsigned __int16 skillSpirit; | |
732 unsigned __int16 skillMind; | |
733 unsigned __int16 skillBody; | |
734 unsigned __int16 skillLight; | |
735 unsigned __int16 skillDark; | |
736 unsigned __int16 skillItemId; | |
737 unsigned __int16 skillMerchant; | |
738 unsigned __int16 skillRepair; | |
739 unsigned __int16 skillBodybuilding; | |
740 unsigned __int16 skillMeditation; | |
741 unsigned __int16 skillPerception; | |
742 unsigned __int16 skillDiplomacy; | |
743 unsigned __int16 skillThievery; | |
744 unsigned __int16 skillDisarmTrap; | |
745 unsigned __int16 skillDodge; | |
746 unsigned __int16 skillUnarmed; | |
747 unsigned __int16 skillMonsterId; | |
748 unsigned __int16 skillArmsmaster; | |
749 unsigned __int16 skillStealing; | |
750 unsigned __int16 skillAlchemy; | |
751 unsigned __int16 skillLearning; | |
752 }; | |
1826 | 753 std::array<unsigned __int16, 37> pActiveSkills; |
0 | 754 }; |
1460
ff2118028c71
renaming _guilds_member_bits to _achieved_awards_bits
Gloval
parents:
1430
diff
changeset
|
755 unsigned char _achieved_awards_bits[64]; |
0 | 756 PlayerSpells spellbook; |
1019 | 757 char field__1F5[2]; // used to be [31] |
758 int pure_luck_used; | |
759 int pure_speed_used; | |
760 int pure_intellect_used; | |
761 int pure_endurance_used; | |
762 int pure_willpower_used; | |
763 int pure_accuracy_used; | |
764 int pure_might_used; | |
765 union //214h | |
1012 | 766 { |
767 struct | |
768 { | |
1826 | 769 std::array<ItemGen, 126> pInventoryItemList; |
770 std::array<ItemGen, 12> pEquippedItems; | |
1012 | 771 }; |
1826 | 772 std::array<ItemGen, 138> pOwnItems; |
1012 | 773 }; |
774 | |
1826 | 775 std::array<int, 126> pInventoryMatrix; |
0 | 776 __int16 sResFireBase; |
777 __int16 sResAirBase; | |
778 __int16 sResWaterBase; | |
779 __int16 sResEarthBase; | |
780 __int16 field_177C; | |
781 __int16 sResMagicBase; | |
782 __int16 sResSpiritBase; | |
783 __int16 sResMindBase; | |
784 __int16 sResBodyBase; | |
785 __int16 sResLightBase; | |
786 __int16 sResDarkBase; | |
787 __int16 sResFireBonus; | |
788 __int16 sResAirBonus; | |
789 __int16 sResWaterBonus; | |
790 __int16 sResEarthBonus; | |
791 __int16 field_1792; | |
792 __int16 sResMagicBonus; | |
793 __int16 sResSpiritBonus; | |
794 __int16 sResMindBonus; | |
795 __int16 sResBodyBonus; | |
796 __int16 sResLightBonus; | |
797 __int16 sResDarkBonus; | |
1826 | 798 std::array<SpellBuff, 24> pPlayerBuffs; |
0 | 799 unsigned int uVoiceID; |
1014 | 800 int uPrevVoiceID; |
801 int uPrevFace; | |
0 | 802 int field_192C; |
803 int field_1930; | |
804 unsigned __int16 uTimeToRecovery; | |
805 char field_1936; | |
806 char field_1937; | |
807 unsigned int uSkillPoints; | |
808 int sHealth; | |
809 int sMana; | |
810 unsigned int uBirthYear; | |
811 PlayerEquipment pEquipment; | |
812 int field_1988[49]; | |
813 char field_1A4C; | |
814 char field_1A4D; | |
198 | 815 char lastOpenedSpellbookPage; |
0 | 816 unsigned __int8 uQuickSpell; |
1822 | 817 char playerEventBits[64]; |
0 | 818 char _some_attack_bonus; |
819 char field_1A91; | |
820 char _melee_dmg_bonus; | |
821 char field_1A93; | |
822 char _ranged_atk_bonus; | |
823 char field_1A95; | |
824 char _ranged_dmg_bonus; | |
825 char field_1A97; | |
826 char uFullHealthBonus; | |
827 char _health_related; | |
828 char uFullManaBonus; | |
829 char _mana_related; | |
130 | 830 CHARACTER_EXPRESSION_ID expression; |
0 | 831 unsigned __int16 uExpressionTimePassed; |
832 unsigned __int16 uExpressionTimeLength; | |
833 __int16 field_1AA2; | |
554
9caf59edb1ee
Cave and Temple load and even doesn't crash (for a while).
Nomad
parents:
501
diff
changeset
|
834 int _expression21_animtime; |
9caf59edb1ee
Cave and Temple load and even doesn't crash (for a while).
Nomad
parents:
501
diff
changeset
|
835 int _expression21_frameset; |
1826 | 836 std::array<LloydBeacon, 5> pInstalledBeacons; |
0 | 837 char uNumDivineInterventionCastsThisDay; |
838 char uNumArmageddonCasts; | |
839 char uNumFireSpikeCasts; | |
840 char field_1B3B; | |
841 }; | |
842 #pragma pack(pop) | |
2054 | 843 |
844 extern NZIArray<struct Player *, 5> pPlayers; |