Mercurial > mm7
annotate Party.h @ 506:9b4bdf6089af
Слияние
author | Ritor1 |
---|---|
date | Tue, 26 Feb 2013 18:48:05 +0600 |
parents | c43f156a95c9 |
children | 4bd56919f075 |
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]; |
0 | 118 int _shop_ban_times[82]; |
119 int field_440[44]; | |
120 int field_4F0[38]; | |
121 char field_588[2]; | |
122 char pIsArtifactFound[238]; | |
123 }; | |
124 #pragma pack(pop) | |
125 | |
126 /* 207 */ | |
127 #pragma pack(push, 1) | |
128 struct Party | |
129 { | |
130 Party(): | |
131 uTimePlayed(0) | |
132 { | |
133 uCurrentYear = 0; | |
134 uCurrentMonth = 0; | |
135 uCurrentMonthWeek = 0; | |
136 uDaysPlayed = 0; | |
137 uCurrentHour = 0; | |
138 uCurrentMinute = 0; | |
139 uCurrentTimeSecond = 0; | |
140 | |
141 field_6FC = 0; | |
142 field_764 = 0; | |
120 | 143 |
122 | 144 vPosition.y = 0; |
145 vPosition.z = 0; | |
146 vPosition.x = 0; | |
147 uFallStartY = 0; | |
148 sRotationY = 0; | |
149 sRotationX = 0; | |
150 uFallSpeed = 0; | |
151 field_28 = 0; | |
152 uDefaultPartyHeight = 120; | |
153 field_14 = 37; | |
154 y_rotation_granularity = 25; | |
155 uWalkSpeed = 384; | |
156 y_rotation_speed = 90; | |
157 field_24 = 5; | |
158 field_6FC = 0; | |
159 field_708 = 15; | |
160 field_0 = 25; | |
0 | 161 } |
162 | |
130 | 163 void UpdatePlayersAndHirelingsEmotions(); |
0 | 164 void RestAndHeal(); |
165 unsigned int GetPartyFame(); | |
166 void CreateDefaultParty(char bGiveItems); | |
167 int Reset(); | |
168 void ResetPosMiscAndSpellBuffs(); | |
169 bool HasItem(unsigned int uItemID); | |
170 void SetHoldingItem(ItemGen *pItem); | |
171 int GetNextActiveCharacter(); | |
172 bool _497FC5_check_party_perception_against_level(); | |
173 bool AddItem(ItemGen *pItem); | |
174 void Yell(); | |
175 | |
176 static void SetGold(unsigned int uNumGold); | |
177 static void TakeGold(unsigned int uNumGold); | |
178 static __int16 SetFood(unsigned int uNumFood); | |
179 static void TakeFood(unsigned int uNumFood); | |
180 static __int16 GiveFood(unsigned int _this); | |
181 | |
182 inline bool WizardEyeActive() {return pPartyBuffs[PARTY_BUFF_WIZARD_EYE].uExpireTime > 0;} | |
183 inline int WizardEyeSkillLevel() {return pPartyBuffs[PARTY_BUFF_WIZARD_EYE].uSkill;} | |
184 inline bool TorchlightActive() {return pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uExpireTime > 0;} | |
185 inline bool FlyActive() {return pPartyBuffs[PARTY_BUFF_FLY].uExpireTime > 0;} | |
186 inline bool WaterWalkActive() {return pPartyBuffs[PARTY_BUFF_WATER_WALK].uExpireTime > 0;} | |
187 inline bool ImmolationActive() {return pPartyBuffs[PARTY_BUFF_IMMOLATION].uExpireTime > 0;} | |
188 inline bool ImmolationSkillLevel() {return pPartyBuffs[PARTY_BUFF_IMMOLATION].uSkill;} | |
189 inline bool FeatherFallActive() {return pPartyBuffs[PARTY_BUFF_FEATHER_FALL].uExpireTime > 0;} | |
141 | 190 inline bool Invisible() {return pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime > 0;} |
0 | 191 |
390 | 192 inline bool GetRedAlert() {return uFlags & PARTY_FLAGS_1_ALERT_RED;} |
193 inline void SetRedAlert() {uFlags |= PARTY_FLAGS_1_ALERT_RED;} | |
194 inline bool GetYellowAlert() {return uFlags & PARTY_FLAGS_1_ALERT_YELLOW;} | |
195 inline void SetYellowAlert() {uFlags |= PARTY_FLAGS_1_ALERT_YELLOW;} | |
196 | |
0 | 197 |
198 int field_0; | |
199 unsigned int uPartyHeight; | |
200 unsigned int uDefaultPartyHeight; | |
201 int sEyelevel; | |
202 unsigned int uDefaultEyelevel; | |
203 int field_14; | |
120 | 204 int y_rotation_granularity; |
0 | 205 unsigned int uWalkSpeed; |
122 | 206 int y_rotation_speed; // deg/s |
0 | 207 int field_24; |
208 int field_28; | |
209 unsigned __int64 uTimePlayed; | |
210 __int64 uLastRegenerationTime; | |
211 Party_stru0 field_3C; | |
212 Vec3_int_ vPosition; | |
213 int sRotationY; | |
214 int sRotationX; | |
215 Vec3_int_ vPrevPosition; | |
216 int sPrevRotationY; | |
217 int sPrevRotationX; | |
218 int sPrevEyelevel; | |
219 int field_6E0; | |
220 int field_6E4; | |
221 int uFallSpeed; | |
222 int field_6EC; | |
223 int field_6F0; | |
224 int field_6F4_packedid; | |
225 int field_6F8; | |
226 int field_6FC; | |
227 int uFallStartY; | |
228 unsigned int bFlying; | |
229 char field_708; | |
230 char field_709; | |
231 char field_70A; | |
232 char field_70B; | |
233 unsigned int uCurrentYear; | |
234 unsigned int uCurrentMonth; | |
235 unsigned int uCurrentMonthWeek; | |
236 unsigned int uDaysPlayed; | |
237 unsigned int uCurrentHour; | |
238 unsigned int uCurrentMinute; | |
239 unsigned int uCurrentTimeSecond; | |
240 unsigned int uNumFoodRations; | |
241 int field_72C; | |
242 int field_730; | |
243 unsigned int uNumGold; | |
244 unsigned int uNumGoldInBank; | |
245 unsigned int uNumDeaths; | |
246 int field_740; | |
247 int uNumPrisonTerms; | |
248 unsigned int uNumBountiesCollected; | |
249 int field_74C; | |
250 __int16 field_750[5]; | |
251 __int16 field_75A[5]; | |
252 char field_764; // num hours resting or some sort of. | |
253 unsigned __int8 _award_bits[64]; | |
254 unsigned __int8 pArcomageWins[16]; | |
255 char field_7B5_in_arena_quest; | |
256 char uNumArenaPageWins; | |
257 char uNumArenaSquireWins; | |
258 char uNumArenaKnightWins; | |
259 char uNumArenaLordWins; | |
260 char field_7BA[12]; | |
261 char pArtifactsFound[56]; | |
262 unsigned char _autonote_bits[12]; | |
263 char field_80A[74]; | |
264 char field_854[32]; | |
265 int field_874; | |
266 int field_878; | |
267 unsigned int bTurnBasedModeOn; | |
268 int field_880; | |
269 int uFlags2; | |
373 | 270 PartyAlignment alignment; |
0 | 271 SpellBuff pPartyBuffs[20]; |
272 Player pPlayers[4]; | |
273 NPCData pHirelings[2]; | |
274 ItemGen pPickedItem; | |
275 unsigned int uFlags; | |
463 | 276 ItemGen StandartItemsInShops[53][12]; |
470 | 277 ItemGen SpecialItemsInShops[53][12]; //D0EC |
440 | 278 int field_12A5C[2117]; |
0 | 279 char field_14B70[5000]; |
280 char field_15EF8[250]; | |
281 char field_15FF2[130]; | |
282 char pHireling1Name[100]; | |
283 char pHireling2Name[100]; | |
349 | 284 int armageddon_timer; |
0 | 285 int field_16140; |
286 int pTurnBasedPlayerRecoveryTimes[4]; | |
463 | 287 int InTheShopFlags[53]; |
0 | 288 int uFine; |
289 float flt_TorchlightColorR; | |
290 float flt_TorchlightColorG; | |
291 float flt_TorchlightColorB; | |
292 }; | |
293 #pragma pack(pop) | |
294 | |
295 | |
296 | |
297 extern Party *pParty; // idb | |
298 | |
299 | |
66 | 300 extern struct ActionQueue *pPartyActionQueue; |
301 |