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