Mercurial > mm7
annotate Party.h @ 793:290afbd48b6b
IndoorLocation::GetSector fixed (even better!)
author | Nomad |
---|---|
date | Mon, 25 Mar 2013 09:17:42 +0200 |
parents | b27dd658ea77 |
children | cfc65feef029 |
rev | line source |
---|---|
0 | 1 #pragma once |
2 #include "Player.h" | |
3 #include "NPC.h" | |
4 #include "Spells.h" | |
5 #include "VectorTypes.h" | |
6 | |
7 | |
8 | |
9 | |
10 | |
710 | 11 enum PARTY_QUEST_BITS: unsigned __int32 |
12 { | |
778 | 13 PARTY_QUEST_EVENMORN_MAP_FOUND = 64, |
710 | 14 PARTY_QUEST_FOUNTAIN_HARMONDALE = 206, |
15 PARTY_QUEST_FOUNTAIN_NIGHON = 207, | |
16 PARTY_QUEST_FOUNTAIN_PIERPONT = 208, | |
17 PARTY_QUEST_FOUNTAIN_CELESTIA = 209, | |
18 PARTY_QUEST_FOUNTAIN_THE_PIT = 210, | |
19 PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE = 211 | |
20 }; | |
0 | 21 |
22 | |
23 | |
24 | |
25 /* 355 */ | |
141 | 26 enum PARTY_FLAGS_1: __int32 |
27 { | |
569 | 28 PARTY_FLAGS_1_FALLING = 0x0008, |
390 | 29 PARTY_FLAGS_1_ALERT_RED = 0x0010, |
30 PARTY_FLAGS_1_ALERT_YELLOW = 0x0020, | |
569 | 31 PARTY_FLAGS_1_STANDING_ON_WATER = 0x0080, |
390 | 32 PARTY_FLAGS_1_LANDING = 0x0100, |
141 | 33 }; |
34 enum PARTY_FLAGS_2: __int32 | |
0 | 35 { |
36 PARTY_FLAGS_2_RUNNING = 0x2, | |
37 }; | |
38 | |
39 /* 347 */ | |
40 enum PARTY_BUFF_INDEX | |
41 { | |
488 | 42 PARTY_BUFF_RESIST_AIR = 0, |
43 PARTY_BUFF_RESIST_BODY = 1, | |
44 PARTY_BUFF_DAY_OF_GODS = 2, | |
45 PARTY_BUFF_DETECT_LIFE = 3, | |
46 PARTY_BUFF_RESIST_EARTH = 4, | |
47 PARTY_BUFF_FEATHER_FALL = 5, | |
48 PARTY_BUFF_RESIST_FIRE = 6, | |
49 PARTY_BUFF_FLY = 7, | |
50 PARTY_BUFF_HASTE = 8, | |
51 PARTY_BUFF_HEROISM = 9, | |
52 PARTY_BUFF_IMMOLATION = 10, | |
271 | 53 PARTY_BUFF_INVISIBILITY = 11, |
488 | 54 PARTY_BUFF_RESIST_MIND = 12, |
55 PARTY_BUFF_PROTECTION_FROM_MAGIC = 13, | |
56 PARTY_BUFF_SHIELD = 14, | |
57 PARTY_BUFF_STONE_SKIN = 15, | |
58 PARTY_BUFF_TORCHLIGHT = 16, | |
59 PARTY_BUFF_RESIST_WATER = 17, | |
60 PARTY_BUFF_WATER_WALK = 18, | |
61 PARTY_BUFF_WIZARD_EYE = 19, | |
0 | 62 }; |
63 | |
64 | |
65 | |
66 /* 300 */ | |
67 enum PartyAction: unsigned __int32 | |
68 { | |
69 PARTY_INVALID = 0, | |
70 PARTY_TurnLeft = 0x1, | |
71 PARTY_TurnRight = 0x2, | |
72 PARTY_StrafeLeft = 0x3, | |
73 PARTY_StrafeRight = 0x4, | |
74 PARTY_WalkForward = 0x5, | |
75 PARTY_WalkBackward = 0x6, | |
76 PARTY_LookUp = 0x7, | |
77 PARTY_LookDown = 0x8, | |
78 PARTY_CenterView = 0x9, | |
79 PARTY_unkA = 0xA, | |
80 PARTY_unkB = 0xB, | |
81 PARTY_Jump = 0xC, | |
82 PARTY_FlyUp = 0xD, | |
83 PARTY_FlyDown = 0xE, | |
84 PARTY_Land = 0xF, | |
85 PARTY_RunForward = 0x10, | |
86 PARTY_RunBackward = 0x11, | |
87 PARTY_FastTurnLeft = 0x12, | |
88 PARTY_FastTurnRight = 0x13, | |
89 | |
90 PARTY_dword = 0xFFFFFFFF | |
91 }; | |
92 | |
93 | |
94 | |
95 /* 135 */ | |
96 #pragma pack(push, 1) | |
97 struct ActionQueue | |
98 { | |
99 void Add(PartyAction action); | |
783 | 100 void Reset(); |
0 | 101 PartyAction Next(); |
102 | |
103 unsigned int uNumActions; | |
104 PartyAction pActions[30]; | |
105 }; | |
106 #pragma pack(pop) | |
107 | |
108 | |
109 | |
110 | |
111 | |
373 | 112 enum PartyAlignment: unsigned __int32 |
113 { | |
114 PartyAlignment_Good = 0, | |
115 PartyAlignment_Neutral = 1, | |
116 PartyAlignment_Evil = 2 | |
117 }; | |
0 | 118 |
119 | |
120 | |
121 | |
122 | |
123 /* 208 */ | |
124 #pragma pack(push, 1) | |
125 struct Party_stru0 | |
126 { | |
127 int field_0[20]; | |
471
c43f156a95c9
ArmorShopDialog crash fixed. All shops show its items
Gloval
parents:
470
diff
changeset
|
128 // int field_50[170]; |
c43f156a95c9
ArmorShopDialog crash fixed. All shops show its items
Gloval
parents:
470
diff
changeset
|
129 __int64 field_50[85]; |
484 | 130 __int64 _shop_ban_times[53]; |
131 int field_4A0[20]; | |
0 | 132 int field_4F0[38]; |
133 char field_588[2]; | |
484 | 134 __int64 _s_times[21]; //5d8 440h+8*51 |
527 | 135 __int64 field_632[8]; |
136 char field_672[6]; | |
484 | 137 // char pIsArtifactFound[8]; |
0 | 138 }; |
139 #pragma pack(pop) | |
140 | |
141 /* 207 */ | |
142 #pragma pack(push, 1) | |
143 struct Party | |
144 { | |
145 Party(): | |
146 uTimePlayed(0) | |
147 { | |
783 | 148 Zero(); |
0 | 149 } |
150 | |
783 | 151 void Zero(); |
130 | 152 void UpdatePlayersAndHirelingsEmotions(); |
0 | 153 void RestAndHeal(); |
154 unsigned int GetPartyFame(); | |
155 void CreateDefaultParty(char bGiveItems); | |
156 int Reset(); | |
157 void ResetPosMiscAndSpellBuffs(); | |
158 bool HasItem(unsigned int uItemID); | |
159 void SetHoldingItem(ItemGen *pItem); | |
160 int GetNextActiveCharacter(); | |
161 bool _497FC5_check_party_perception_against_level(); | |
162 bool AddItem(ItemGen *pItem); | |
163 void Yell(); | |
164 | |
165 static void SetGold(unsigned int uNumGold); | |
166 static void TakeGold(unsigned int uNumGold); | |
593 | 167 static void SetFood(unsigned int uNumFood); |
0 | 168 static void TakeFood(unsigned int uNumFood); |
592 | 169 static void GiveFood(unsigned int _this); |
0 | 170 |
171 inline bool WizardEyeActive() {return pPartyBuffs[PARTY_BUFF_WIZARD_EYE].uExpireTime > 0;} | |
172 inline int WizardEyeSkillLevel() {return pPartyBuffs[PARTY_BUFF_WIZARD_EYE].uSkill;} | |
173 inline bool TorchlightActive() {return pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uExpireTime > 0;} | |
174 inline bool FlyActive() {return pPartyBuffs[PARTY_BUFF_FLY].uExpireTime > 0;} | |
175 inline bool WaterWalkActive() {return pPartyBuffs[PARTY_BUFF_WATER_WALK].uExpireTime > 0;} | |
176 inline bool ImmolationActive() {return pPartyBuffs[PARTY_BUFF_IMMOLATION].uExpireTime > 0;} | |
177 inline bool ImmolationSkillLevel() {return pPartyBuffs[PARTY_BUFF_IMMOLATION].uSkill;} | |
178 inline bool FeatherFallActive() {return pPartyBuffs[PARTY_BUFF_FEATHER_FALL].uExpireTime > 0;} | |
141 | 179 inline bool Invisible() {return pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime > 0;} |
0 | 180 |
390 | 181 inline bool GetRedAlert() {return uFlags & PARTY_FLAGS_1_ALERT_RED;} |
182 inline void SetRedAlert() {uFlags |= PARTY_FLAGS_1_ALERT_RED;} | |
183 inline bool GetYellowAlert() {return uFlags & PARTY_FLAGS_1_ALERT_YELLOW;} | |
184 inline void SetYellowAlert() {uFlags |= PARTY_FLAGS_1_ALERT_YELLOW;} | |
185 | |
0 | 186 |
187 int field_0; | |
188 unsigned int uPartyHeight; | |
189 unsigned int uDefaultPartyHeight; | |
190 int sEyelevel; | |
191 unsigned int uDefaultEyelevel; | |
192 int field_14; | |
120 | 193 int y_rotation_granularity; |
0 | 194 unsigned int uWalkSpeed; |
122 | 195 int y_rotation_speed; // deg/s |
0 | 196 int field_24; |
197 int field_28; | |
198 unsigned __int64 uTimePlayed; | |
199 __int64 uLastRegenerationTime; | |
200 Party_stru0 field_3C; | |
201 Vec3_int_ vPosition; | |
202 int sRotationY; | |
203 int sRotationX; | |
204 Vec3_int_ vPrevPosition; | |
205 int sPrevRotationY; | |
206 int sPrevRotationX; | |
207 int sPrevEyelevel; | |
208 int field_6E0; | |
209 int field_6E4; | |
210 int uFallSpeed; | |
211 int field_6EC; | |
212 int field_6F0; | |
213 int field_6F4_packedid; | |
214 int field_6F8; | |
215 int field_6FC; | |
216 int uFallStartY; | |
217 unsigned int bFlying; | |
218 char field_708; | |
219 char field_709; | |
220 char field_70A; | |
221 char field_70B; | |
222 unsigned int uCurrentYear; | |
223 unsigned int uCurrentMonth; | |
224 unsigned int uCurrentMonthWeek; | |
225 unsigned int uDaysPlayed; | |
226 unsigned int uCurrentHour; | |
227 unsigned int uCurrentMinute; | |
228 unsigned int uCurrentTimeSecond; | |
229 unsigned int uNumFoodRations; | |
230 int field_72C; | |
231 int field_730; | |
232 unsigned int uNumGold; | |
233 unsigned int uNumGoldInBank; | |
234 unsigned int uNumDeaths; | |
235 int field_740; | |
236 int uNumPrisonTerms; | |
237 unsigned int uNumBountiesCollected; | |
238 int field_74C; | |
239 __int16 field_750[5]; | |
240 __int16 field_75A[5]; | |
766 | 241 unsigned char days_played_without_rest; |
484 | 242 unsigned __int8 _quest_bits[64]; |
0 | 243 unsigned __int8 pArcomageWins[16]; |
244 char field_7B5_in_arena_quest; | |
245 char uNumArenaPageWins; | |
246 char uNumArenaSquireWins; | |
247 char uNumArenaKnightWins; | |
248 char uNumArenaLordWins; | |
492 | 249 char pIsArtifactFound[29]; //7ba |
250 char field_7d7[39]; | |
0 | 251 unsigned char _autonote_bits[12]; |
252 char field_80A[74]; | |
253 char field_854[32]; | |
254 int field_874; | |
255 int field_878; | |
256 unsigned int bTurnBasedModeOn; | |
257 int field_880; | |
258 int uFlags2; | |
373 | 259 PartyAlignment alignment; |
0 | 260 SpellBuff pPartyBuffs[20]; |
261 Player pPlayers[4]; | |
262 NPCData pHirelings[2]; | |
263 ItemGen pPickedItem; | |
264 unsigned int uFlags; | |
463 | 265 ItemGen StandartItemsInShops[53][12]; |
470 | 266 ItemGen SpecialItemsInShops[53][12]; //D0EC |
496 | 267 ItemGen SpellBooksInGuilds[32][12]; |
527 | 268 char field_1605C[24]; |
0 | 269 char pHireling1Name[100]; |
270 char pHireling2Name[100]; | |
349 | 271 int armageddon_timer; |
0 | 272 int field_16140; |
273 int pTurnBasedPlayerRecoveryTimes[4]; | |
463 | 274 int InTheShopFlags[53]; |
0 | 275 int uFine; |
276 float flt_TorchlightColorR; | |
277 float flt_TorchlightColorG; | |
278 float flt_TorchlightColorB; | |
279 }; | |
280 #pragma pack(pop) | |
281 | |
282 | |
283 | |
284 extern Party *pParty; // idb | |
285 | |
286 | |
66 | 287 extern struct ActionQueue *pPartyActionQueue; |
288 |