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