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];
|
|
116 int field_50[170];
|
|
117 int _shop_ban_times[82];
|
|
118 int field_440[44];
|
|
119 int field_4F0[38];
|
|
120 char field_588[2];
|
|
121 char pIsArtifactFound[238];
|
|
122 };
|
|
123 #pragma pack(pop)
|
|
124
|
|
125 /* 207 */
|
|
126 #pragma pack(push, 1)
|
|
127 struct Party
|
|
128 {
|
|
129 Party():
|
|
130 uTimePlayed(0)
|
|
131 {
|
|
132 uCurrentYear = 0;
|
|
133 uCurrentMonth = 0;
|
|
134 uCurrentMonthWeek = 0;
|
|
135 uDaysPlayed = 0;
|
|
136 uCurrentHour = 0;
|
|
137 uCurrentMinute = 0;
|
|
138 uCurrentTimeSecond = 0;
|
|
139
|
|
140 field_6FC = 0;
|
|
141 field_764 = 0;
|
120
|
142
|
122
|
143 vPosition.y = 0;
|
|
144 vPosition.z = 0;
|
|
145 vPosition.x = 0;
|
|
146 uFallStartY = 0;
|
|
147 sRotationY = 0;
|
|
148 sRotationX = 0;
|
|
149 uFallSpeed = 0;
|
|
150 field_28 = 0;
|
|
151 uDefaultPartyHeight = 120;
|
|
152 field_14 = 37;
|
|
153 y_rotation_granularity = 25;
|
|
154 uWalkSpeed = 384;
|
|
155 y_rotation_speed = 90;
|
|
156 field_24 = 5;
|
|
157 field_6FC = 0;
|
|
158 field_708 = 15;
|
|
159 field_0 = 25;
|
0
|
160 }
|
|
161
|
130
|
162 void UpdatePlayersAndHirelingsEmotions();
|
0
|
163 void RestAndHeal();
|
|
164 unsigned int GetPartyFame();
|
|
165 void CreateDefaultParty(char bGiveItems);
|
|
166 int Reset();
|
|
167 void ResetPosMiscAndSpellBuffs();
|
|
168 bool HasItem(unsigned int uItemID);
|
|
169 void SetHoldingItem(ItemGen *pItem);
|
|
170 int GetNextActiveCharacter();
|
|
171 bool _497FC5_check_party_perception_against_level();
|
|
172 bool AddItem(ItemGen *pItem);
|
|
173 void Yell();
|
|
174
|
|
175 static void SetGold(unsigned int uNumGold);
|
|
176 static void TakeGold(unsigned int uNumGold);
|
|
177 static __int16 SetFood(unsigned int uNumFood);
|
|
178 static void TakeFood(unsigned int uNumFood);
|
|
179 static __int16 GiveFood(unsigned int _this);
|
|
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;
|
|
223 int field_6F4_packedid;
|
|
224 int field_6F8;
|
|
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];
|
|
251 char field_764; // num hours resting or some sort of.
|
|
252 unsigned __int8 _award_bits[64];
|
|
253 unsigned __int8 pArcomageWins[16];
|
|
254 char field_7B5_in_arena_quest;
|
|
255 char uNumArenaPageWins;
|
|
256 char uNumArenaSquireWins;
|
|
257 char uNumArenaKnightWins;
|
|
258 char uNumArenaLordWins;
|
|
259 char field_7BA[12];
|
|
260 char pArtifactsFound[56];
|
|
261 unsigned char _autonote_bits[12];
|
|
262 char field_80A[74];
|
|
263 char field_854[32];
|
|
264 int field_874;
|
|
265 int field_878;
|
|
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;
|
440
|
275 ItemGen field_777C[53][12];
|
|
276 ItemGen Recipes_Item[53][12]; //D0EC
|
|
277 int field_12A5C[2117];
|
0
|
278 char field_14B70[5000];
|
|
279 char field_15EF8[250];
|
|
280 char field_15FF2[130];
|
|
281 char pHireling1Name[100];
|
|
282 char pHireling2Name[100];
|
349
|
283 int armageddon_timer;
|
0
|
284 int field_16140;
|
|
285 int pTurnBasedPlayerRecoveryTimes[4];
|
439
|
286 int field_16154[53];
|
0
|
287 int uFine;
|
|
288 float flt_TorchlightColorR;
|
|
289 float flt_TorchlightColorG;
|
|
290 float flt_TorchlightColorB;
|
|
291 };
|
|
292 #pragma pack(pop)
|
|
293
|
|
294
|
|
295
|
|
296 extern Party *pParty; // idb
|
|
297
|
|
298
|
66
|
299 extern struct ActionQueue *pPartyActionQueue;
|
|
300
|