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