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