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
|
|
98
|
|
99
|
|
100
|
|
101
|
|
102
|
|
103 /* 208 */
|
|
104 #pragma pack(push, 1)
|
|
105 struct Party_stru0
|
|
106 {
|
|
107 int field_0[20];
|
|
108 int field_50[170];
|
|
109 int _shop_ban_times[82];
|
|
110 int field_440[44];
|
|
111 int field_4F0[38];
|
|
112 char field_588[2];
|
|
113 char pIsArtifactFound[238];
|
|
114 };
|
|
115 #pragma pack(pop)
|
|
116
|
|
117 /* 207 */
|
|
118 #pragma pack(push, 1)
|
|
119 struct Party
|
|
120 {
|
|
121 Party():
|
|
122 uTimePlayed(0)
|
|
123 {
|
|
124 uCurrentYear = 0;
|
|
125 uCurrentMonth = 0;
|
|
126 uCurrentMonthWeek = 0;
|
|
127 uDaysPlayed = 0;
|
|
128 uCurrentHour = 0;
|
|
129 uCurrentMinute = 0;
|
|
130 uCurrentTimeSecond = 0;
|
|
131
|
|
132 field_6FC = 0;
|
|
133 field_764 = 0;
|
120
|
134
|
122
|
135 vPosition.y = 0;
|
|
136 vPosition.z = 0;
|
|
137 vPosition.x = 0;
|
|
138 uFallStartY = 0;
|
|
139 sRotationY = 0;
|
|
140 sRotationX = 0;
|
|
141 uFallSpeed = 0;
|
|
142 field_28 = 0;
|
|
143 uDefaultPartyHeight = 120;
|
|
144 field_14 = 37;
|
|
145 y_rotation_granularity = 25;
|
|
146 uWalkSpeed = 384;
|
|
147 y_rotation_speed = 90;
|
|
148 field_24 = 5;
|
|
149 field_6FC = 0;
|
|
150 field_708 = 15;
|
|
151 field_0 = 25;
|
0
|
152 }
|
|
153
|
130
|
154 void UpdatePlayersAndHirelingsEmotions();
|
0
|
155 void RestAndHeal();
|
|
156 unsigned int GetPartyFame();
|
|
157 void CreateDefaultParty(char bGiveItems);
|
|
158 int Reset();
|
|
159 void ResetPosMiscAndSpellBuffs();
|
|
160 bool HasItem(unsigned int uItemID);
|
|
161 void SetHoldingItem(ItemGen *pItem);
|
|
162 int GetNextActiveCharacter();
|
|
163 bool _497FC5_check_party_perception_against_level();
|
|
164 bool AddItem(ItemGen *pItem);
|
|
165 void Yell();
|
|
166
|
|
167 static void SetGold(unsigned int uNumGold);
|
|
168 static void TakeGold(unsigned int uNumGold);
|
|
169 static __int16 SetFood(unsigned int uNumFood);
|
|
170 static void TakeFood(unsigned int uNumFood);
|
|
171 static __int16 GiveFood(unsigned int _this);
|
|
172
|
|
173 inline bool WizardEyeActive() {return pPartyBuffs[PARTY_BUFF_WIZARD_EYE].uExpireTime > 0;}
|
|
174 inline int WizardEyeSkillLevel() {return pPartyBuffs[PARTY_BUFF_WIZARD_EYE].uSkill;}
|
|
175 inline bool TorchlightActive() {return pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uExpireTime > 0;}
|
|
176 inline bool FlyActive() {return pPartyBuffs[PARTY_BUFF_FLY].uExpireTime > 0;}
|
|
177 inline bool WaterWalkActive() {return pPartyBuffs[PARTY_BUFF_WATER_WALK].uExpireTime > 0;}
|
|
178 inline bool ImmolationActive() {return pPartyBuffs[PARTY_BUFF_IMMOLATION].uExpireTime > 0;}
|
|
179 inline bool ImmolationSkillLevel() {return pPartyBuffs[PARTY_BUFF_IMMOLATION].uSkill;}
|
|
180 inline bool FeatherFallActive() {return pPartyBuffs[PARTY_BUFF_FEATHER_FALL].uExpireTime > 0;}
|
141
|
181 inline bool Invisible() {return pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime > 0;}
|
0
|
182
|
|
183
|
|
184 int field_0;
|
|
185 unsigned int uPartyHeight;
|
|
186 unsigned int uDefaultPartyHeight;
|
|
187 int sEyelevel;
|
|
188 unsigned int uDefaultEyelevel;
|
|
189 int field_14;
|
120
|
190 int y_rotation_granularity;
|
0
|
191 unsigned int uWalkSpeed;
|
122
|
192 int y_rotation_speed; // deg/s
|
0
|
193 int field_24;
|
|
194 int field_28;
|
|
195 unsigned __int64 uTimePlayed;
|
|
196 __int64 uLastRegenerationTime;
|
|
197 Party_stru0 field_3C;
|
|
198 Vec3_int_ vPosition;
|
|
199 int sRotationY;
|
|
200 int sRotationX;
|
|
201 Vec3_int_ vPrevPosition;
|
|
202 int sPrevRotationY;
|
|
203 int sPrevRotationX;
|
|
204 int sPrevEyelevel;
|
|
205 int field_6E0;
|
|
206 int field_6E4;
|
|
207 int uFallSpeed;
|
|
208 int field_6EC;
|
|
209 int field_6F0;
|
|
210 int field_6F4_packedid;
|
|
211 int field_6F8;
|
|
212 int field_6FC;
|
|
213 int uFallStartY;
|
|
214 unsigned int bFlying;
|
|
215 char field_708;
|
|
216 char field_709;
|
|
217 char field_70A;
|
|
218 char field_70B;
|
|
219 unsigned int uCurrentYear;
|
|
220 unsigned int uCurrentMonth;
|
|
221 unsigned int uCurrentMonthWeek;
|
|
222 unsigned int uDaysPlayed;
|
|
223 unsigned int uCurrentHour;
|
|
224 unsigned int uCurrentMinute;
|
|
225 unsigned int uCurrentTimeSecond;
|
|
226 unsigned int uNumFoodRations;
|
|
227 int field_72C;
|
|
228 int field_730;
|
|
229 unsigned int uNumGold;
|
|
230 unsigned int uNumGoldInBank;
|
|
231 unsigned int uNumDeaths;
|
|
232 int field_740;
|
|
233 int uNumPrisonTerms;
|
|
234 unsigned int uNumBountiesCollected;
|
|
235 int field_74C;
|
|
236 __int16 field_750[5];
|
|
237 __int16 field_75A[5];
|
|
238 char field_764; // num hours resting or some sort of.
|
|
239 unsigned __int8 _award_bits[64];
|
|
240 unsigned __int8 pArcomageWins[16];
|
|
241 char field_7B5_in_arena_quest;
|
|
242 char uNumArenaPageWins;
|
|
243 char uNumArenaSquireWins;
|
|
244 char uNumArenaKnightWins;
|
|
245 char uNumArenaLordWins;
|
|
246 char field_7BA[12];
|
|
247 char pArtifactsFound[56];
|
|
248 unsigned char _autonote_bits[12];
|
|
249 char field_80A[74];
|
|
250 char field_854[32];
|
|
251 int field_874;
|
|
252 int field_878;
|
|
253 unsigned int bTurnBasedModeOn;
|
|
254 int field_880;
|
|
255 int uFlags2;
|
|
256 unsigned int uAlignment;
|
|
257 SpellBuff pPartyBuffs[20];
|
|
258 Player pPlayers[4];
|
|
259 NPCData pHirelings[2];
|
|
260 ItemGen pPickedItem;
|
|
261 unsigned int uFlags;
|
|
262 int field_777C[1000];
|
|
263 int field_871C[1000];
|
|
264 int field_96BC[1000];
|
|
265 int field_A65C[1000];
|
|
266 int field_B5FC[1000];
|
|
267 int field_C59C[1000];
|
|
268 int field_D53C[1000];
|
|
269 int field_E4DC[300];
|
|
270 int field_E98C[13];
|
|
271 int dword_E9C0;
|
|
272 int dword_E9C4;
|
|
273 char field_E9C8[5000];
|
|
274 char field_FD50[5000];
|
|
275 char field_110D8[5000];
|
|
276 char field_12460[5000];
|
|
277 char field_137E8[5000];
|
|
278 char field_14B70[5000];
|
|
279 char field_15EF8[250];
|
|
280 char field_15FF2[130];
|
|
281 char pHireling1Name[100];
|
|
282 char pHireling2Name[100];
|
|
283 int field_1613C;
|
|
284 int field_16140;
|
|
285 int pTurnBasedPlayerRecoveryTimes[4];
|
|
286 char field_16154[212];
|
|
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
|