annotate Party.h @ 55:a3e1017bfc21

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