annotate Engine/Party.h @ 2575:a76d408c5132 tip

DrawTranslucent -> DrawTextureGrayShade Removed old texture drawing stuff
author a.parshin
date Wed, 09 Mar 2016 01:39:52 +0200
parents 117c219bf913
children
rev   line source
2499
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
1 #pragma once
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
2 #include "Engine/Objects/Player.h"
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
3 #include "Engine/Objects/NPC.h"
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
4 #include <array>
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
5
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
6
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
7
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
8 #define PARTY_AUTONOTES_BIT__EMERALD_FIRE_FOUNTAIN 2
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
9
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
10 enum PARTY_QUEST_BITS: uint16_t
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
11 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
12 PARTY_QUEST_EMERALD_RED_POTION_ACTIVE = 1,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
13 PARTY_QUEST_EMERALD_SEASHELL_ACTIVE = 2,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
14 PARTY_QUEST_EMERALD_LONGBOW_ACTIVE = 3,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
15 PARTY_QUEST_EMERALD_PLATE_ACTIVE = 4,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
16 PARTY_QUEST_EMERALD_LUTE_ACTIVE = 5,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
17 PARTY_QUEST_EMERALD_HAT_ACTIVE = 6,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
18
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
19 PARTY_QUEST_EMERALD_MARGARETH_OFF = 17,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
20
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
21 PARTY_QUEST_EVENMORN_MAP_FOUND = 64,
2549
3121fb54a110 Rest & Spelbook refactored into class
a.parshin
parents: 2499
diff changeset
22
3121fb54a110 Rest & Spelbook refactored into class
a.parshin
parents: 2499
diff changeset
23 PARTY_QUEST_HARMONDALE_REBUILT = 98,
3121fb54a110 Rest & Spelbook refactored into class
a.parshin
parents: 2499
diff changeset
24
2499
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
25 PARTY_QUEST_FINISHED_EMERALD_ISLE = 136,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
26
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
27 PARTY_QUEST_OBELISK_HARMONDALE = 164,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
28 PARTY_QUEST_OBELISK_ERATHIA = 165,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
29 PARTY_QUEST_OBELISK_TULAREAN_FOREST = 166,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
30 PARTY_QUEST_OBELISK_DEYJA = 167,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
31 PARTY_QUEST_OBELISK_BRACADA_DESERT = 168,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
32 PARTY_QUEST_OBELISK_CELESTE = 169,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
33 PARTY_QUEST_OBELISK_THE_PIT = 170,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
34 PARTY_QUEST_OBELISK_EVENMORN_ISLAND = 171,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
35 PARTY_QUEST_OBELISK_MOUNT_NIGHON = 172,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
36 PARTY_QUEST_OBELISK_BARROW_DOWNS = 173,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
37 PARTY_QUEST_OBELISK_LAND_OF_THE_GIANTS = 174,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
38 PARTY_QUEST_OBELISK_TATALIA = 175,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
39 PARTY_QUEST_OBELISK_AVLEE = 176,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
40 PARTY_QUEST_OBELISK_STONE_CITY = 177,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
41
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
42 PARTY_QUEST_OBELISK_TREASURE_FOUND = 178,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
43
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
44 PARTY_QUEST_FOUNTAIN_HARMONDALE = 206,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
45 PARTY_QUEST_FOUNTAIN_NIGHON = 207,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
46 PARTY_QUEST_FOUNTAIN_PIERPONT = 208,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
47 PARTY_QUEST_FOUNTAIN_CELESTIA = 209,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
48 PARTY_QUEST_FOUNTAIN_THE_PIT = 210,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
49 PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE = 211
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
50 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
51
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
52 /* 355 */
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
53 enum PARTY_FLAGS_1: __int32
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
54 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
55 PARTY_FLAGS_1_0002 = 0x0002,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
56 PARTY_FLAGS_1_WATER_DAMAGE = 0x0004,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
57 PARTY_FLAGS_1_FALLING = 0x0008,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
58 PARTY_FLAGS_1_ALERT_RED = 0x0010,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
59 PARTY_FLAGS_1_ALERT_YELLOW = 0x0020,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
60 PARTY_FLAGS_1_STANDING_ON_WATER = 0x0080,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
61 PARTY_FLAGS_1_LANDING = 0x0100,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
62 PARTY_FLAGS_1_BURNING = 0x200
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
63 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
64 enum PARTY_FLAGS_2: __int32
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
65 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
66 PARTY_FLAGS_2_RUNNING = 0x2,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
67 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
68
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
69 /* 347 */
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
70 enum PARTY_BUFF_INDEX
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
71 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
72 PARTY_BUFF_RESIST_AIR = 0,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
73 PARTY_BUFF_RESIST_BODY = 1,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
74 PARTY_BUFF_DAY_OF_GODS = 2,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
75 PARTY_BUFF_DETECT_LIFE = 3,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
76 PARTY_BUFF_RESIST_EARTH = 4,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
77 PARTY_BUFF_FEATHER_FALL = 5,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
78 PARTY_BUFF_RESIST_FIRE = 6,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
79 PARTY_BUFF_FLY = 7,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
80 PARTY_BUFF_HASTE = 8,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
81 PARTY_BUFF_HEROISM = 9,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
82 PARTY_BUFF_IMMOLATION = 10,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
83 PARTY_BUFF_INVISIBILITY = 11,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
84 PARTY_BUFF_RESIST_MIND = 12,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
85 PARTY_BUFF_PROTECTION_FROM_MAGIC = 13,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
86 PARTY_BUFF_SHIELD = 14,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
87 PARTY_BUFF_STONE_SKIN = 15,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
88 PARTY_BUFF_TORCHLIGHT = 16,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
89 PARTY_BUFF_RESIST_WATER = 17,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
90 PARTY_BUFF_WATER_WALK = 18,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
91 PARTY_BUFF_WIZARD_EYE = 19,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
92 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
93
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
94
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
95
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
96 /* 300 */
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
97 enum PartyAction: unsigned __int32
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
98 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
99 PARTY_INVALID = 0,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
100 PARTY_TurnLeft = 0x1,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
101 PARTY_TurnRight = 0x2,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
102 PARTY_StrafeLeft = 0x3,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
103 PARTY_StrafeRight = 0x4,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
104 PARTY_WalkForward = 0x5,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
105 PARTY_WalkBackward = 0x6,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
106 PARTY_LookUp = 0x7,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
107 PARTY_LookDown = 0x8,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
108 PARTY_CenterView = 0x9,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
109 PARTY_unkA = 0xA,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
110 PARTY_unkB = 0xB,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
111 PARTY_Jump = 0xC,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
112 PARTY_FlyUp = 0xD,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
113 PARTY_FlyDown = 0xE,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
114 PARTY_Land = 0xF,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
115 PARTY_RunForward = 0x10,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
116 PARTY_RunBackward = 0x11,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
117 PARTY_FastTurnLeft = 0x12,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
118 PARTY_FastTurnRight = 0x13,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
119
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
120 PARTY_dword = 0xFFFFFFFF
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
121 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
122
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
123
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
124
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
125 /* 135 */
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
126 #pragma pack(push, 1)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
127 struct ActionQueue
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
128 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
129 inline ActionQueue():
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
130 uNumActions(0)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
131 {}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
132
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
133 void Add(PartyAction action);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
134 void Reset();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
135 PartyAction Next();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
136
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
137 unsigned int uNumActions;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
138 PartyAction pActions[30];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
139 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
140 #pragma pack(pop)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
141
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
142
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
143
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
144
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
145
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
146 enum PartyAlignment: unsigned __int32
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
147 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
148 PartyAlignment_Good = 0,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
149 PartyAlignment_Neutral = 1,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
150 PartyAlignment_Evil = 2
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
151 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
152
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
153
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
154
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
155
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
156
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
157 /* 208 */
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
158 #pragma pack(push, 1)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
159 struct PartyTimeStruct
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
160 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
161 std::array<__int64, 10> bountyHunting_next_generation_time;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
162 std::array<__int64, 85> Shops_next_generation_time;//field_50
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
163 std::array<__int64, 53> _shop_ban_times;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
164 std::array<unsigned __int64, 10> CounterEventValues; // (0xACD314h in Silvo's binary)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
165 std::array<__int64, 29> HistoryEventTimes; // (0xACD364h in Silvo's binary)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
166 std::array<unsigned __int64, 20> _s_times; //5d8 440h+8*51 //(0xACD44Ch in Silvo's binary)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
167 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
168 #pragma pack(pop)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
169
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
170 /* 207 */
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
171 #pragma pack(push, 1)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
172 struct Party
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
173 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
174 Party():
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
175 uTimePlayed(0)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
176 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
177 Zero();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
178 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
179
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
180 void Zero();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
181 void UpdatePlayersAndHirelingsEmotions();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
182 void RestAndHeal();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
183 unsigned int GetPartyFame();
2565
117c219bf913 Party, items and stuff are abstracted from savegame file representation
a.parshin
parents: 2549
diff changeset
184 void CreateDefaultParty(bool bDebugGiveItems = false);
117c219bf913 Party, items and stuff are abstracted from savegame file representation
a.parshin
parents: 2549
diff changeset
185 void Reset();
2499
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
186 void ResetPosMiscAndSpellBuffs();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
187 bool HasItem(unsigned int uItemID);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
188 void SetHoldingItem(ItemGen *pItem);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
189 int GetNextActiveCharacter();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
190 bool _497FC5_check_party_perception_against_level();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
191 bool AddItemToParty(ItemGen *pItem);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
192 void Yell();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
193 void CountHirelings();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
194
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
195 void GivePartyExp(unsigned int pEXPNum);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
196 int GetPartyReputation();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
197
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
198
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
199 void PartyFindsGold(unsigned int uNumGold, int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
200 void sub_421B2C_PlaceInInventory_or_DropPickedItem();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
201
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
202 static void SetGold(unsigned int uNumGold);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
203 static void TakeGold(unsigned int uNumGold);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
204 static void SetFood(unsigned int uNumFood);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
205 static void TakeFood(unsigned int uNumFood);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
206 static void GiveFood(unsigned int _this);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
207
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
208 static void Sleep6Hours();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
209
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
210 inline bool WizardEyeActive() {return pPartyBuffs[PARTY_BUFF_WIZARD_EYE].uExpireTime > 0;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
211 inline int WizardEyeSkillLevel() {return pPartyBuffs[PARTY_BUFF_WIZARD_EYE].uSkill;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
212 inline bool TorchlightActive() {return pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uExpireTime > 0;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
213 inline bool FlyActive() {return pPartyBuffs[PARTY_BUFF_FLY].uExpireTime > 0;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
214 inline bool WaterWalkActive() {return pPartyBuffs[PARTY_BUFF_WATER_WALK].uExpireTime > 0;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
215 inline bool ImmolationActive() {return pPartyBuffs[PARTY_BUFF_IMMOLATION].uExpireTime > 0;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
216 inline int ImmolationSkillLevel() {return pPartyBuffs[PARTY_BUFF_IMMOLATION].uSkill;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
217 inline bool FeatherFallActive() {return pPartyBuffs[PARTY_BUFF_FEATHER_FALL].uExpireTime > 0;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
218 inline bool Invisible() {return pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime > 0;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
219
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
220 inline bool GetRedAlert() {return (uFlags & PARTY_FLAGS_1_ALERT_RED) != 0;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
221 inline void SetRedAlert() {uFlags |= PARTY_FLAGS_1_ALERT_RED;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
222 inline bool GetYellowAlert() {return (uFlags & PARTY_FLAGS_1_ALERT_YELLOW) != 0;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
223 inline void SetYellowAlert() {uFlags |= PARTY_FLAGS_1_ALERT_YELLOW;}
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
224
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
225 bool IsPartyEvil();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
226 bool IsPartyGood();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
227 int _46A89E_immolation_effect(int* affected, int affectedArrSize, int effectRange);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
228 int field_0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
229 unsigned int uPartyHeight;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
230 unsigned int uDefaultPartyHeight;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
231 int sEyelevel;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
232 unsigned int uDefaultEyelevel;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
233 int field_14_radius;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
234 int y_rotation_granularity;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
235 unsigned int uWalkSpeed;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
236 int y_rotation_speed; // deg/s
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
237 int field_24;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
238 int field_28;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
239 unsigned __int64 uTimePlayed;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
240 __int64 uLastRegenerationTime;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
241 PartyTimeStruct PartyTimes;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
242 Vec3_int_ vPosition;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
243 int sRotationY;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
244 int sRotationX;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
245 Vec3_int_ vPrevPosition;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
246 int sPrevRotationY;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
247 int sPrevRotationX;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
248 int sPrevEyelevel;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
249 int field_6E0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
250 int field_6E4;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
251 int uFallSpeed;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
252 int field_6EC;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
253 int field_6F0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
254 int floor_face_pid; // face we are standing at
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
255 int walk_sound_timer;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
256 int field_6FC;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
257 int uFallStartY;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
258 unsigned int bFlying;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
259 char field_708;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
260 unsigned __int8 hirelingScrollPosition;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
261 char field_70A;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
262 char field_70B;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
263 unsigned int uCurrentYear;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
264 unsigned int uCurrentMonth;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
265 unsigned int uCurrentMonthWeek;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
266 unsigned int uDaysPlayed;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
267 unsigned int uCurrentHour;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
268 unsigned int uCurrentMinute;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
269 unsigned int uCurrentTimeSecond;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
270 unsigned int uNumFoodRations;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
271 int field_72C;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
272 int field_730;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
273 unsigned int uNumGold;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
274 unsigned int uNumGoldInBank;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
275 unsigned int uNumDeaths;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
276 int field_740;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
277 int uNumPrisonTerms;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
278 unsigned int uNumBountiesCollected;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
279 int field_74C;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
280 std::array<__int16, 5> monster_id_for_hunting;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
281 std::array<__int16, 5> monster_for_hunting_killed;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
282 unsigned char days_played_without_rest;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
283 unsigned __int8 _quest_bits[64];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
284 std::array<unsigned __int8, 16> pArcomageWins;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
285 char field_7B5_in_arena_quest;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
286 char uNumArenaPageWins;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
287 char uNumArenaSquireWins;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
288 char uNumArenaKnightWins;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
289 char uNumArenaLordWins;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
290 std::array<char, 29> pIsArtifactFound; //7ba
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
291 std::array<char, 39> field_7d7;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
292 unsigned char _autonote_bits[26];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
293 std::array<char, 60> field_818;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
294 std::array<char, 32> field_854;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
295 int uNumArcomageWins;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
296 int uNumArcomageLoses;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
297 unsigned int bTurnBasedModeOn;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
298 int field_880;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
299 int uFlags2;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
300 PartyAlignment alignment;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
301 std::array<SpellBuff, 20> pPartyBuffs;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
302 std::array<Player, 4> pPlayers;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
303 std::array<NPCData, 2> pHirelings;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
304 ItemGen pPickedItem;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
305 unsigned int uFlags;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
306 std::array<std::array<ItemGen, 12>, 53> StandartItemsInShops;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
307 std::array<std::array<ItemGen, 12>, 53> SpecialItemsInShops; //D0EC
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
308 std::array<std::array<ItemGen, 12>, 32> SpellBooksInGuilds;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
309 std::array<char, 24> field_1605C;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
310 char pHireling1Name[100];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
311 char pHireling2Name[100];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
312 int armageddon_timer;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
313 int armageddonDamage;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
314 std::array<int, 4> pTurnBasedPlayerRecoveryTimes;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
315 std::array<int, 53> InTheShopFlags;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
316 int uFine;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
317 float flt_TorchlightColorR;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
318 float flt_TorchlightColorG;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
319 float flt_TorchlightColorB;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
320 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
321 #pragma pack(pop)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
322
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
323
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
324
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
325 extern Party *pParty; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
326
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
327
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
328 extern struct ActionQueue *pPartyActionQueue;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
329
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
330 bool TestPartyQuestBit(PARTY_QUEST_BITS bit);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
331 void __fastcall Rest(unsigned int uHoursToSleep);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
332 void RestAndHeal(__int64 uNumMinutes); // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
333 int GetTravelTime();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
334
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
335 bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
336 void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle); // idb