annotate Party.h @ 339:37b19ff5addd

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