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