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