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