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