annotate Party.h @ 149:2b0c652cc165

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