Mercurial > mm7
annotate Party.cpp @ 1865:e622546c8f0c
Actor::AI_FaceObject cleanup
author | Grumpy7 |
---|---|
date | Mon, 14 Oct 2013 08:22:12 +0200 |
parents | a86c60679949 |
children | 351b4ff10ac1 |
rev | line source |
---|---|
1165
29a8defbad9e
temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents:
1071
diff
changeset
|
1 #ifdef _MSC_VER |
29a8defbad9e
temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents:
1071
diff
changeset
|
2 #define _CRT_SECURE_NO_WARNINGS |
29a8defbad9e
temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents:
1071
diff
changeset
|
3 #endif |
29a8defbad9e
temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents:
1071
diff
changeset
|
4 |
0 | 5 #include "Party.h" |
6 #include "MapInfo.h" | |
7 #include "Time.h" | |
8 #include "AudioPlayer.h" | |
9 #include "IconFrameTable.h" | |
10 #include "Mouse.h" | |
11 #include "PlayerFrameTable.h" | |
12 #include "TurnEngine.h" | |
13 #include "Viewport.h" | |
14 #include "Actor.h" | |
15 #include "GUIWindow.h" | |
189 | 16 #include "texts.h" |
0 | 17 |
18 #include "mm7_data.h" | |
828
0f56abdcce94
Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents:
783
diff
changeset
|
19 #include "MM7.h" |
1295 | 20 #include "Outdoor.h" |
21 #include "Indoor.h" | |
1297 | 22 #include "Texture.h" |
23 #include "LOD.h" | |
24 #include "Sprites.h" | |
25 #include "SpriteObject.h" | |
26 #include "ObjectList.h" | |
1361
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
27 #include "Conditions.h" |
0 | 28 |
29 Party *pParty; // idb | |
30 | |
31 struct ActionQueue *pPartyActionQueue = new ActionQueue; | |
32 | |
33 | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
34 std::array<bool, 4> playerAlreadyPicked; // byte_AE3368_ |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
35 char PickedPlayer2_unused; // byte_AE3369_ |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
36 char PickedPlayer3_unused; // byte_AE336A_ |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
37 char PickedPlayer4_unused; // byte_AE336B_ |
0 | 38 |
1035 | 39 |
40 | |
41 //----- (0044A56A) -------------------------------------------------------- | |
42 void Party::CountHirelings() | |
43 { | |
44 field_70A = 0; | |
45 | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
46 for (unsigned int i = 0; i < pNPCStats->uNumNewNPCs; ++i) |
1035 | 47 { |
48 auto npc = pNPCStats->pNewNPCData + i; | |
49 if (npc->Hired() && | |
50 (!pHirelings[0].pName || strcmp(npc->pName, pHirelings[0].pName))) | |
51 { | |
52 if (!pHirelings[1].pName || strcmp(npc->pName, pHirelings[1].pName)) | |
53 ++field_70A; | |
54 } | |
55 } | |
56 } | |
57 | |
58 | |
783 | 59 // inlined |
60 //----- (mm6c::004858D0) -------------------------------------------------- | |
61 void Party::Zero() | |
62 { | |
63 | |
64 uFlags2 = 0; | |
65 uNumGoldInBank = 0; | |
66 | |
67 uCurrentYear = 0; | |
68 uCurrentMonth = 0; | |
69 uCurrentMonthWeek = 0; | |
70 uDaysPlayed = 0; | |
71 uCurrentHour = 0; | |
72 uCurrentMinute = 0; | |
73 uCurrentTimeSecond = 0; | |
74 | |
75 field_6FC = 0; | |
76 days_played_without_rest = 0; | |
77 | |
78 vPosition.y = 0; | |
79 vPosition.z = 0; | |
80 vPosition.x = 0; | |
81 uFallStartY = 0; | |
82 sRotationY = 0; | |
83 sRotationX = 0; | |
84 uFallSpeed = 0; | |
85 field_28 = 0; | |
86 uDefaultPartyHeight = 120; | |
1546 | 87 field_14_radius = 37; |
783 | 88 y_rotation_granularity = 25; |
1425
16a24dc103e7
uninitialized Party::walk_sound_timer leads to crash
Nomad
parents:
1405
diff
changeset
|
89 y_rotation_speed = 90; |
16a24dc103e7
uninitialized Party::walk_sound_timer leads to crash
Nomad
parents:
1405
diff
changeset
|
90 |
783 | 91 uWalkSpeed = 384; |
1425
16a24dc103e7
uninitialized Party::walk_sound_timer leads to crash
Nomad
parents:
1405
diff
changeset
|
92 walk_sound_timer = 0; |
16a24dc103e7
uninitialized Party::walk_sound_timer leads to crash
Nomad
parents:
1405
diff
changeset
|
93 |
783 | 94 field_24 = 5; |
95 field_6FC = 0; | |
96 field_708 = 15; | |
97 field_0 = 25; | |
1425
16a24dc103e7
uninitialized Party::walk_sound_timer leads to crash
Nomad
parents:
1405
diff
changeset
|
98 |
1840 | 99 uNumDeaths = 0; |
1839 | 100 uNumPrisonTerms = 0; |
101 uNumBountiesCollected = 0; | |
1861
a86c60679949
changing most of party arrays to std::arrays, some minor cleanups in actor.cpp
Grumpy7
parents:
1840
diff
changeset
|
102 memset(monster_for_hunting_killed.data(), 5, sizeof(__int16)); |
a86c60679949
changing most of party arrays to std::arrays, some minor cleanups in actor.cpp
Grumpy7
parents:
1840
diff
changeset
|
103 memset(monster_id_for_hunting.data(), 5, sizeof(__int16)); |
1839 | 104 memset(_quest_bits, 64, sizeof(__int8)); |
1861
a86c60679949
changing most of party arrays to std::arrays, some minor cleanups in actor.cpp
Grumpy7
parents:
1840
diff
changeset
|
105 memset(pArcomageWins.data(), 16, sizeof(__int8)); |
1839 | 106 uNumArenaPageWins = 0; |
107 uNumArenaSquireWins = 0; | |
108 uNumArenaKnightWins = 0; | |
109 uNumArenaLordWins = 0; | |
110 | |
783 | 111 } |
112 | |
113 //inlined | |
114 //----- (mm6c::0045BE90) -------------------------------------------------- | |
115 void ActionQueue::Reset() | |
116 { | |
117 uNumActions = 0; | |
118 } | |
0 | 119 |
120 //----- (004760C1) -------------------------------------------------------- | |
121 void ActionQueue::Add(PartyAction action) | |
122 { | |
123 if (uNumActions < 30) | |
124 pActions[uNumActions++] = action; | |
125 } | |
126 | |
127 //----- (00497FC5) -------------------------------------------------------- | |
128 bool Party::_497FC5_check_party_perception_against_level() | |
129 { | |
130 int uMaxPerception; // edi@1 | |
131 signed int v5; // eax@3 | |
132 bool result; // eax@7 | |
133 | |
134 uMaxPerception = 0; | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
135 for (int i = 0; i < 4; i++) |
0 | 136 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
137 if ( this->pPlayers[i].CanAct() ) |
0 | 138 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
139 v5 = this->pPlayers[i].GetPerception(); |
0 | 140 if ( v5 > uMaxPerception ) |
141 uMaxPerception = v5; | |
142 } | |
143 } | |
144 if ( uLevelMapStatsID && (signed int)uLevelMapStatsID < 77 ) | |
145 result = uMaxPerception >= 2 * pMapStats->pInfos[uLevelMapStatsID]._per; | |
146 else | |
147 result = 0; | |
148 return result; | |
149 } | |
150 | |
151 //----- (004936E1) -------------------------------------------------------- | |
152 void Party::SetHoldingItem(ItemGen *pItem) | |
153 { | |
154 sub_421B2C_PlaceInInventory_or_DropPickedItem(); | |
201 | 155 memcpy(&pPickedItem, pItem, sizeof(pPickedItem)); |
156 pMouse->SetCursorBitmapFromItemID(pPickedItem.uItemID); | |
0 | 157 } |
158 | |
159 //----- (0049370F) -------------------------------------------------------- | |
160 int Party::GetNextActiveCharacter() | |
161 { | |
162 int v2; // eax@4 | |
163 Player *v6; // eax@7 | |
164 signed int v8; // esi@23 | |
165 int v12; // [sp+Ch] [bp-4h]@1 | |
166 | |
167 v12 = 0; | |
168 if ( pParty->bTurnBasedModeOn == 1 ) | |
169 { | |
1340 | 170 if ( pTurnEngine->turn_stage != 2 || PID_TYPE(pTurnEngine->pQueue[0].uPackedID) != OBJECT_Player) |
0 | 171 return 0; |
848 | 172 v2 = PID_ID(pTurnEngine->pQueue[0].uPackedID); |
0 | 173 return v2 + 1; |
174 } | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
175 |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
176 if ( playerAlreadyPicked[0] && playerAlreadyPicked[1] && playerAlreadyPicked[2] && playerAlreadyPicked[3] ) |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
177 memset(playerAlreadyPicked.data(), 0, 4u); |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
178 for (int i = 0; i < 4; i++) |
0 | 179 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
180 v6 = &this->pPlayers[i]; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
181 if ( !v6->CanAct() |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
182 || v6->uTimeToRecovery > 0) |
0 | 183 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
184 playerAlreadyPicked[i] = true; |
0 | 185 } |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
186 else if ( !playerAlreadyPicked[i] ) |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
187 { |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
188 playerAlreadyPicked[i] = true; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
189 if (i > 0) //TODO check if this condition really should be here. it is equal to the original source but still seems kind of weird |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
190 return i + 1; |
0 | 191 break; |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
192 } |
89 | 193 } |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
194 |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
195 for (int i = 0; i < 4; i++) |
0 | 196 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
197 if ( this->pPlayers[i].CanAct() |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
198 && this->pPlayers[i].uTimeToRecovery == 0 ) |
0 | 199 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
200 if ( v12 == 0 || this->pPlayers[i].uSpeedBonus > v8 ) |
0 | 201 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
202 v8 = this->pPlayers[i].uSpeedBonus; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
203 v12 = i + 1; |
0 | 204 } |
205 } | |
206 } | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
207 return v12; |
0 | 208 } |
209 | |
210 | |
211 //----- (00493244) -------------------------------------------------------- | |
212 bool Party::HasItem(unsigned int uItemID) | |
213 { | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
214 for (int player = 0; player < 4; player++) |
0 | 215 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
216 for (int itemPos = 0; itemPos < 138; itemPos++) |
0 | 217 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
218 if (pParty->pPlayers[player].pOwnItems[itemPos].uItemID == uItemID) |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
219 return true; |
0 | 220 } |
221 } | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
222 return false; |
0 | 223 } |
224 | |
225 | |
226 //----- (00492AD5) -------------------------------------------------------- | |
593 | 227 void Party::SetFood(unsigned int uNumFood) |
0 | 228 { |
229 pUIAnim_Food->uAnimTime = 0; | |
230 pParty->uNumFoodRations = uNumFood; | |
592 | 231 pUIAnim_Food->uAnimLength = 8 * pIconsFrameTable->pIcons[pUIAnim_Food->uIconID].uAnimLength; |
0 | 232 } |
233 | |
234 //----- (00492B03) -------------------------------------------------------- | |
235 void Party::TakeFood(unsigned int uNumFood) | |
236 { | |
592 | 237 if (pParty->uNumFoodRations <= uNumFood) |
238 pParty->uNumFoodRations = 0; | |
0 | 239 else |
592 | 240 pParty->uNumFoodRations -= uNumFood; |
241 | |
0 | 242 pUIAnim_Food->uAnimTime = 0; |
592 | 243 pUIAnim_Food->uAnimLength = 8 * pIconsFrameTable->pIcons[pUIAnim_Food->uIconID].uAnimLength; |
0 | 244 } |
245 | |
246 //----- (00492B42) -------------------------------------------------------- | |
592 | 247 void Party::GiveFood(unsigned int _this) |
0 | 248 { |
249 pParty->uNumFoodRations += _this; | |
250 pUIAnim_Food->uAnimTime = 0; | |
592 | 251 pUIAnim_Food->uAnimLength = 8 * pIconsFrameTable->pIcons[pUIAnim_Food->uIconID].uAnimLength; |
0 | 252 } |
253 | |
254 //----- (00492B70) -------------------------------------------------------- | |
255 void Party::SetGold(unsigned int uNumGold) | |
256 { | |
257 pParty->uNumGold = uNumGold; | |
258 pUIAnim_Gold->uAnimTime = 0; | |
592 | 259 pUIAnim_Gold->uAnimLength = 8 * pIconsFrameTable->pIcons[pUIAnim_Gold->uIconID].uAnimLength; |
0 | 260 pAudioPlayer->PlaySound(SOUND_GoldReceived, 0, 0, -1, 0, 0, 0, 0); |
261 } | |
262 | |
263 //----- (00492BB6) -------------------------------------------------------- | |
264 void Party::TakeGold(unsigned int uNumGold) | |
265 { | |
266 if ( uNumGold <= pParty->uNumGold ) | |
267 pParty->uNumGold -= uNumGold; | |
268 else | |
269 pParty->uNumGold = 0; | |
270 pUIAnim_Gold->uAnimTime = 0; | |
592 | 271 pUIAnim_Gold->uAnimLength = 8 * pIconsFrameTable->pIcons[pUIAnim_Gold->uIconID].uAnimLength; |
0 | 272 pAudioPlayer->PlaySound(SOUND_GoldReceived, 0, 0, -1, 0, 0, 0, 0); |
273 } | |
274 | |
275 //----- (0049135E) -------------------------------------------------------- | |
276 unsigned int Party::GetPartyFame() | |
277 { | |
566 | 278 unsigned __int64 total_exp = 0; |
279 for (uint i = 0; i < 4; ++i) | |
280 total_exp += pPlayers[i].uExperience; | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
281 return (unsigned int)(min(total_exp / 1000, UINT_MAX)); //min wasn't present, but could be incorrect without it |
0 | 282 } |
283 | |
284 //----- (0049137D) -------------------------------------------------------- | |
285 void Party::CreateDefaultParty(char bGiveItems) | |
286 { | |
287 Player *pCharacter; // esi@3 | |
288 int uSkillIdx; // eax@11 | |
289 unsigned int v16; // [sp-4h] [bp-44h]@26 | |
290 signed int uNumPlayers; // [sp+18h] [bp-28h]@1 | |
291 ItemGen Dst; // [sp+1Ch] [bp-24h]@10 | |
292 | |
130 | 293 pHireling1Name[0] = 0; |
294 pHireling2Name[0] = 0; | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
295 this->hirelingScrollPosition = 0; |
1861
a86c60679949
changing most of party arrays to std::arrays, some minor cleanups in actor.cpp
Grumpy7
parents:
1840
diff
changeset
|
296 memset(pHirelings.data(), 0, 2 * sizeof(NPCData)); |
130 | 297 |
0 | 298 strcpy(this->pPlayers[0].pName, pGlobalTXT_LocalizationStrings[509]); //Zoltan |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
299 this->pPlayers[0].uPrevFace = 17; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
300 this->pPlayers[0].uCurrentFace = 17; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
301 this->pPlayers[0].uPrevVoiceID = 17; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
302 this->pPlayers[0].uVoiceID = 17; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
303 this->pPlayers[0].uMight = 30; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
304 this->pPlayers[0].uIntelligence = 5; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
305 this->pPlayers[0].uWillpower = 5; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
306 this->pPlayers[0].uEndurance = 13; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
307 this->pPlayers[0].uAccuracy = 13; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
308 this->pPlayers[0].uSpeed = 14; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
309 this->pPlayers[0].uLuck = 7; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
310 this->pPlayers[0].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
311 this->pPlayers[0].pActiveSkills[PLAYER_SKILL_ARMSMASTER] = 1; // armsmaster |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
312 this->pPlayers[0].pActiveSkills[PLAYER_SKILL_BOW] = 1; // bow |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
313 this->pPlayers[0].pActiveSkills[PLAYER_SKILL_SWORD] = 1; // sword |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
314 this->pPlayers[1].uPrevFace = 3; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
315 this->pPlayers[1].uCurrentFace = 3; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
316 this->pPlayers[1].uPrevVoiceID = 3; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
317 this->pPlayers[1].uVoiceID = 3; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
318 strcpy(this->pPlayers[1].pName, pGlobalTXT_LocalizationStrings[506]); //Roderic |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
319 this->pPlayers[1].uMight = 13; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
320 this->pPlayers[1].uIntelligence = 9; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
321 this->pPlayers[1].uWillpower = 9; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
322 this->pPlayers[1].uEndurance = 13; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
323 this->pPlayers[1].uAccuracy = 13; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
324 this->pPlayers[1].uSpeed = 13; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
325 this->pPlayers[1].uLuck = 13; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
326 this->pPlayers[1].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
327 this->pPlayers[1].pActiveSkills[PLAYER_SKILL_STEALING] = 1; // stealing |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
328 this->pPlayers[1].pActiveSkills[PLAYER_SKILL_DAGGER] = 1; // dagger |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
329 this->pPlayers[1].pActiveSkills[PLAYER_SKILL_TRAP_DISARM] = 1; // disarm trap |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
330 this->pPlayers[2].uPrevFace = 14; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
331 this->pPlayers[2].uCurrentFace = 14; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
332 this->pPlayers[2].uPrevVoiceID = 14; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
333 this->pPlayers[2].uVoiceID = 14; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
334 strcpy(this->pPlayers[2].pName, pGlobalTXT_LocalizationStrings[508]); // Serena |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
335 this->pPlayers[2].uMight = 12; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
336 this->pPlayers[2].uIntelligence = 9; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
337 this->pPlayers[2].uWillpower = 20; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
338 this->pPlayers[2].uEndurance = 22; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
339 this->pPlayers[2].uAccuracy = 7; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
340 this->pPlayers[2].uSpeed = 13; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
341 this->pPlayers[2].uLuck = 7; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
342 this->pPlayers[2].pActiveSkills[PLAYER_SKILL_ALCHEMY] = 1; // alchemy |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
343 this->pPlayers[2].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
344 this->pPlayers[2].pActiveSkills[PLAYER_SKILL_BODY] = 1; // body |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
345 this->pPlayers[2].pActiveSkills[PLAYER_SKILL_MACE] = 1; // mace |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
346 strcpy(this->pPlayers[3].pName, pGlobalTXT_LocalizationStrings[507]); // Alexis |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
347 this->pPlayers[3].uPrevFace = 10; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
348 this->pPlayers[3].uCurrentFace = 10; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
349 this->pPlayers[3].uEndurance = 13; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
350 this->pPlayers[3].uAccuracy = 13; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
351 this->pPlayers[3].uSpeed = 13; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
352 this->pPlayers[3].uPrevVoiceID = 10; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
353 this->pPlayers[3].uVoiceID = 10; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
354 this->pPlayers[3].uMight = 5; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
355 this->pPlayers[3].uIntelligence = 30; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
356 this->pPlayers[3].uWillpower = 9; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
357 this->pPlayers[3].uLuck = 7; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
358 this->pPlayers[3].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
359 this->pPlayers[3].pActiveSkills[PLAYER_SKILL_AIR] = 1; // air |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
360 this->pPlayers[3].pActiveSkills[PLAYER_SKILL_FIRE] = 1; // fire |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
361 this->pPlayers[3].pActiveSkills[PLAYER_SKILL_STAFF] = 1; // staff |
0 | 362 for (uNumPlayers = 0; uNumPlayers < 4; uNumPlayers++) |
363 { | |
135 | 364 pCharacter = &pParty->pPlayers[uNumPlayers]; |
365 if (pCharacter->classType == PLAYER_CLASS_KNIGHT) | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
366 pCharacter->sResMagicBase = 10; //player[i].pResMagicBase |
321 | 367 pCharacter->lastOpenedSpellbookPage = 0; |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
368 for (int i = 0; i < 9; i++)//for Magic Book |
0 | 369 { |
370 if (pPlayers[uNumPlayers].pActiveSkills[12+i]) | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
371 { |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
372 pCharacter->lastOpenedSpellbookPage = i; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
373 break; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
374 } |
0 | 375 } |
376 pCharacter->uExpressionTimePassed = 0; | |
377 Dst.Reset(); | |
378 if ( bGiveItems ) | |
379 { | |
439 | 380 pItemsTable->GenerateItem(2, 40, &Dst); //ring |
0 | 381 pCharacter->AddItem2(-1, &Dst); |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
382 for (uSkillIdx = 0; uSkillIdx < 36; uSkillIdx++) |
0 | 383 { |
384 if ( pCharacter->pActiveSkills[uSkillIdx] ) | |
385 { | |
386 switch ( uSkillIdx ) | |
387 { | |
388 case PLAYER_SKILL_STAFF: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
389 pCharacter->WearItem(ITEM_STAFF_1); |
0 | 390 break; |
391 case PLAYER_SKILL_SWORD: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
392 pCharacter->WearItem(ITEM_LONGSWORD_1); |
0 | 393 break; |
394 case PLAYER_SKILL_DAGGER: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
395 pCharacter->WearItem(ITEM_DAGGER_1); |
0 | 396 break; |
397 case PLAYER_SKILL_AXE: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
398 pCharacter->WearItem(ITEM_AXE_1); |
0 | 399 break; |
400 case PLAYER_SKILL_SPEAR: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
401 pCharacter->WearItem(ITEM_SPEAR_1); |
0 | 402 break; |
403 case PLAYER_SKILL_BOW: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
404 pCharacter->WearItem(ITEM_CROSSBOW_1); |
0 | 405 break; |
406 case PLAYER_SKILL_MACE: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
407 pCharacter->WearItem(ITEM_MACE_1); |
0 | 408 break; |
409 case PLAYER_SKILL_SHIELD: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
410 pCharacter->WearItem(ITEM_BUCKLER_1); |
0 | 411 break; |
412 case PLAYER_SKILL_LEATHER: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
413 pCharacter->WearItem(ITEM_LEATHER_1); |
0 | 414 break; |
415 case PLAYER_SKILL_CHAIN: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
416 pCharacter->WearItem(ITEM_CHAINMAIL_1); |
0 | 417 break; |
418 case PLAYER_SKILL_PLATE: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
419 pCharacter->WearItem(ITEM_PLATE_1); |
0 | 420 break; |
421 case PLAYER_SKILL_FIRE: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
422 pCharacter->AddItem(-1, ITEM_SPELLBOOK_FIRE_STRIKE); |
0 | 423 break; |
424 case PLAYER_SKILL_AIR: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
425 pCharacter->AddItem(-1, ITEM_SPELLBOOK_AIR_FEATHER_FALL); |
0 | 426 break; |
427 case PLAYER_SKILL_WATER: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
428 pCharacter->AddItem(-1, ITEM_SPELLBOOK_WATER_POISON_SPRAY); |
0 | 429 break; |
430 case PLAYER_SKILL_EARTH: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
431 pCharacter->AddItem(-1, ITEM_SPELLBOOK_EARTH_SLOW); |
0 | 432 break; |
433 case PLAYER_SKILL_SPIRIT: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
434 pCharacter->AddItem(-1, ITEM_SPELLBOOK_SPIRIT_BLESS); |
0 | 435 break; |
436 case PLAYER_SKILL_MIND: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
437 pCharacter->AddItem(-1, ITEM_SPELLBOOK_MIND_MIND_BLAST); |
0 | 438 break; |
439 case PLAYER_SKILL_BODY: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
440 pCharacter->AddItem(-1, ITEM_SPELLBOOK_BODY_FIRST_AID); |
0 | 441 break; |
442 case PLAYER_SKILL_ITEM_ID: | |
443 case PLAYER_SKILL_REPAIR: | |
444 case PLAYER_SKILL_MEDITATION: | |
445 case PLAYER_SKILL_PERCEPTION: | |
446 case PLAYER_SKILL_DIPLOMACY: | |
447 case PLAYER_SKILL_TRAP_DISARM: | |
448 case PLAYER_SKILL_LEARNING: | |
449 pCharacter->AddItem(-1, ITEM_POTION_BOTTLE); | |
450 v16 = 5 * (rand() % 3 + 40); // simple reagent | |
451 pCharacter->AddItem(-1, v16); | |
452 break; | |
453 case PLAYER_SKILL_DODGE: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
454 pCharacter->AddItem(-1, ITEM_BOOTS_1); |
0 | 455 break; |
456 case PLAYER_SKILL_UNARMED: | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
457 pCharacter->AddItem(-1, ITEM_GAUNTLETS_1); |
0 | 458 break; |
459 default: | |
460 break; | |
461 } | |
462 } | |
463 } | |
1071 | 464 for (int i = 0; i < 138; i++) |
0 | 465 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
466 if ( pCharacter->pInventoryItemList[i].uItemID != 0) |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
467 pCharacter->pInventoryItemList[i].SetIdentified(); |
0 | 468 } |
469 } | |
470 pCharacter->sHealth = pCharacter->GetMaxHealth(); | |
471 pCharacter->sMana = pCharacter->GetMaxMana(); | |
472 } | |
473 } | |
474 | |
475 //----- (004917CE) -------------------------------------------------------- | |
476 int Party::Reset() | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
477 { |
783 | 478 Zero(); |
0 | 479 |
480 field_708 = 15; | |
481 sEyelevel = 160; | |
482 uNumGold = 200; | |
483 uNumFoodRations = 7; | |
484 | |
783 | 485 |
373 | 486 alignment = PartyAlignment_Neutral; |
487 SetUserInterface(alignment, true); | |
0 | 488 |
489 uTimePlayed = 0x21C00u; | |
490 uLastRegenerationTime = 0x21C00; | |
491 | |
492 bTurnBasedModeOn = false; | |
493 | |
494 uActiveCharacter = 1; | |
1861
a86c60679949
changing most of party arrays to std::arrays, some minor cleanups in actor.cpp
Grumpy7
parents:
1840
diff
changeset
|
495 ::pPlayers.ZerothIndex() = &pPlayers[0]; |
0 | 496 for (uint i = 0; i < 4; ++i) |
497 ::pPlayers[i + 1] = &pPlayers[i]; | |
498 | |
135 | 499 pPlayers[0].Reset(PLAYER_CLASS_KNIGHT); |
500 pPlayers[1].Reset(PLAYER_CLASS_THEIF); | |
501 pPlayers[2].Reset(PLAYER_CLASS_CLERIC); | |
502 pPlayers[3].Reset(PLAYER_CLASS_SORCERER); | |
1014 | 503 pPlayers[0].uCurrentFace = 17; |
504 pPlayers[0].uPrevVoiceID = 17; | |
0 | 505 pPlayers[0].uVoiceID = 17; |
506 pPlayers[0].SetInitialStats(); | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
507 |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
508 pPlayers[0].uSex = pPlayers[0].GetSexByVoice(); |
0 | 509 pPlayers[0].RandomizeName(); |
510 strcpy(pPlayers[0].pName, pGlobalTXT_LocalizationStrings[509]); | |
511 | |
512 | |
1014 | 513 pPlayers[1].uCurrentFace = 3; |
514 pPlayers[1].uPrevVoiceID = 3; | |
0 | 515 pPlayers[1].uVoiceID = 3; |
516 pPlayers[1].SetInitialStats(); | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
517 pPlayers[1].uSex = pPlayers[1].GetSexByVoice(); |
0 | 518 pPlayers[1].RandomizeName(); |
519 strcpy(pPlayers[1].pName, pGlobalTXT_LocalizationStrings[506]); | |
1014 | 520 pPlayers[2].uCurrentFace = 14; |
521 pPlayers[2].uPrevVoiceID = 14; | |
0 | 522 pPlayers[2].uVoiceID = 14; |
523 pPlayers[2].SetInitialStats(); | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
524 pPlayers[2].uSex = pPlayers[3].GetSexByVoice(); |
0 | 525 pPlayers[2].RandomizeName(); |
526 strcpy(pPlayers[2].pName, pGlobalTXT_LocalizationStrings[508]); | |
1014 | 527 pPlayers[3].uCurrentFace = 10; |
528 pPlayers[3].uPrevVoiceID = 10; | |
0 | 529 pPlayers[3].uVoiceID = 10; |
530 pPlayers[3].SetInitialStats(); | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
531 pPlayers[3].uSex = pPlayers[3].GetSexByVoice(); |
0 | 532 pPlayers[3].RandomizeName(); |
533 strcpy(pPlayers[3].pName, pGlobalTXT_LocalizationStrings[507]); | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
534 |
0 | 535 for (uint i = 0; i < 4; ++i) |
536 { | |
537 pPlayers[i].uTimeToRecovery = 0; | |
538 for (uint j = 0; j < 20; ++j) | |
539 pPlayers[i].pConditions[j] = 0; | |
540 | |
541 for (uint j = 0; j < 24; ++j) | |
542 pPlayers[i].pPlayerBuffs[j].Reset(); | |
543 | |
130 | 544 pPlayers[i].expression = CHARACTER_EXPRESSION_1; |
0 | 545 pPlayers[i].uExpressionTimePassed = 0; |
546 pPlayers[i].uExpressionTimeLength = rand() % 256 + 128; | |
547 } | |
548 | |
549 for (uint i = 1; i < 20; ++i) | |
550 pPartyBuffs[i].Reset(); | |
551 | |
552 | |
1035 | 553 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 100; // default character ui - stats |
0 | 554 uFlags = 0; |
1310 | 555 memset(_autonote_bits, 0, 26); |
484 | 556 memset(_quest_bits, 0, 64); |
1861
a86c60679949
changing most of party arrays to std::arrays, some minor cleanups in actor.cpp
Grumpy7
parents:
1840
diff
changeset
|
557 memset(pIsArtifactFound.data(), 0, 29); |
1035 | 558 _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_RED_POTION_ACTIVE, 1); |
559 _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_SEASHELL_ACTIVE, 1); | |
560 _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_LONGBOW_ACTIVE, 1); | |
561 _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_PLATE_ACTIVE, 1); | |
562 _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_LUTE_ACTIVE, 1); | |
563 _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_HAT_ACTIVE, 1); | |
0 | 564 |
1861
a86c60679949
changing most of party arrays to std::arrays, some minor cleanups in actor.cpp
Grumpy7
parents:
1840
diff
changeset
|
565 memset(PartyTimes._shop_ban_times.data(),0,53*sizeof(__int64)); |
0 | 566 |
567 memcpy(pNPCStats->pNewNPCData, pNPCStats->pNPCData, 0x94BCu); | |
568 memcpy(pNPCStats->pGroups_copy, pNPCStats->pGroups, 0x66u); | |
655 | 569 pNPCStats->pNewNPCData[3].uFlags |= 128;//|= 0x80u; Lady Margaret |
0 | 570 _494035_timed_effects__water_walking_damage__etc(); |
571 pEventTimer->Pause(); | |
572 return 0; | |
573 } | |
574 | |
575 | |
576 //----- (0043AD34) -------------------------------------------------------- | |
577 void Party::Yell() | |
578 { | |
90 | 579 Actor *v0; // esi@5 |
0 | 580 int v1; // edi@9 |
581 int v2; // ebx@9 | |
582 int v3; // eax@9 | |
583 | |
1167 | 584 if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime > 0 ) |
585 pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Reset(); | |
0 | 586 if ( pParty->bTurnBasedModeOn != 1 ) |
587 { | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
588 for (unsigned int i = 0; i < uNumActors; i++) |
0 | 589 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
590 v0 = &pActors[i]; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
591 if ( v0->Actor::CanAct() && v0->pMonsterInfo.uHostilityType != MonsterInfo::Hostility_Long && v0->pMonsterInfo.uMovementType != 5 ) |
0 | 592 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
593 v1 = abs(v0->vPosition.x - pParty->vPosition.x); |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
594 v2 = abs(v0->vPosition.y - pParty->vPosition.y); |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
595 v3 = abs(v0->vPosition.z - pParty->vPosition.z); |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
596 if (int_get_vector_length(v1, v2, v3) < 512) |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
597 Actor::AI_Flee(i, 4, 0, 0); |
0 | 598 } |
599 } | |
600 } | |
601 } | |
602 | |
603 //----- (00491BF9) -------------------------------------------------------- | |
604 void Party::ResetPosMiscAndSpellBuffs() | |
605 { | |
606 this->vPosition.y = 0; | |
607 this->vPosition.z = 0; | |
608 this->vPosition.x = 0; | |
609 this->uFallStartY = 0; | |
610 this->sRotationY = 0; | |
611 this->sRotationX = 0; | |
612 this->uFallSpeed = 0; | |
613 this->field_28 = 0; | |
614 this->uDefaultPartyHeight = 120; | |
1546 | 615 this->field_14_radius = 37; |
120 | 616 this->y_rotation_granularity = 25; |
0 | 617 this->uWalkSpeed = 384; |
122 | 618 this->y_rotation_speed = 90; |
0 | 619 this->field_24 = 5; |
620 this->field_6FC = 0; | |
621 this->field_708 = 15; | |
622 this->field_0 = 25; | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
623 |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
624 for (auto playerId = 0; playerId < 4; playerId++) |
0 | 625 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
626 for (auto buffId = 0; buffId < 24; buffId++) |
0 | 627 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
628 this->pPlayers[playerId].pPlayerBuffs[buffId].Reset(); |
0 | 629 } |
630 } | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
631 for (auto buffId = 0; buffId < 20; buffId++) |
0 | 632 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
633 this->pPartyBuffs[buffId].Reset(); |
0 | 634 } |
635 } | |
636 | |
637 //----- (004909F4) -------------------------------------------------------- | |
130 | 638 void Party::UpdatePlayersAndHirelingsEmotions() |
0 | 639 { |
640 int v4; // edx@27 | |
130 | 641 |
642 for (int i = 0; i < 4; ++i) | |
0 | 643 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
644 Player* player = &pPlayers[i]; |
130 | 645 player->uExpressionTimePassed += (unsigned short)pMiscTimer->uTimeElapsed; |
646 | |
647 auto condition = player->GetMajorConditionIdx(); | |
1361
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
648 if (condition == Condition_Good || condition == Condition_Zombie) |
0 | 649 { |
130 | 650 if (player->uExpressionTimePassed < player->uExpressionTimeLength) |
651 continue; | |
652 | |
653 player->uExpressionTimePassed = 0; | |
654 if (player->expression != 1 || rand() % 5) | |
0 | 655 { |
130 | 656 player->expression = CHARACTER_EXPRESSION_1; |
657 player->uExpressionTimeLength = rand() % 256 + 32; | |
0 | 658 } |
659 else | |
660 { | |
130 | 661 v4 = rand() % 100; |
662 if (v4 < 25) player->expression = CHARACTER_EXPRESSION_13; | |
663 else if (v4 < 31) player->expression = CHARACTER_EXPRESSION_14; | |
664 else if (v4 < 37) player->expression = CHARACTER_EXPRESSION_15; | |
665 else if (v4 < 43) player->expression = CHARACTER_EXPRESSION_16; | |
666 else if (v4 < 46) player->expression = CHARACTER_EXPRESSION_17; | |
667 else if (v4 < 52) player->expression = CHARACTER_EXPRESSION_18; | |
668 else if (v4 < 58) player->expression = CHARACTER_EXPRESSION_19; | |
669 else if (v4 < 64) player->expression = CHARACTER_EXPRESSION_20; | |
670 else if (v4 < 70) player->expression = CHARACTER_EXPRESSION_54; | |
671 else if (v4 < 76) player->expression = CHARACTER_EXPRESSION_55; | |
672 else if (v4 < 82) player->expression = CHARACTER_EXPRESSION_56; | |
673 else if (v4 < 88) player->expression = CHARACTER_EXPRESSION_57; | |
674 else if (v4 < 94) player->expression = CHARACTER_EXPRESSION_29; | |
675 else player->expression = CHARACTER_EXPRESSION_30; | |
676 } | |
677 | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
678 for (unsigned int j = 0; j < pPlayerFrameTable->uNumFrames; ++j) |
130 | 679 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
680 PlayerFrame* frame = &pPlayerFrameTable->pFrames[j]; |
130 | 681 if (frame->expression == player->expression) |
0 | 682 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
683 player->uExpressionTimeLength = 8 * frame->uAnimLength; |
130 | 684 break; |
0 | 685 } |
686 } | |
687 } | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
688 else if (player->expression != CHARACTER_EXPRESSION_DMGRECVD_MINOR && |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
689 player->expression != CHARACTER_EXPRESSION_DMGRECVD_MODERATE && |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
690 player->expression != CHARACTER_EXPRESSION_DMGRECVD_MAJOR || |
130 | 691 player->uExpressionTimePassed >= player->uExpressionTimeLength) |
0 | 692 { |
130 | 693 player->uExpressionTimeLength = 0; |
694 player->uExpressionTimePassed = 0; | |
695 | |
696 switch (condition) | |
0 | 697 { |
1361
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
698 case Condition_Dead: player->expression = CHARACTER_EXPRESSION_DEAD; break; |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
699 case Condition_Pertified: player->expression = CHARACTER_EXPRESSION_PERTIFIED; break; |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
700 case Condition_Eradicated: player->expression = CHARACTER_EXPRESSION_ERADICATED; break; |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
701 case Condition_Cursed: player->expression = CHARACTER_EXPRESSION_CURSED; break; |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
702 case Condition_Weak: player->expression = CHARACTER_EXPRESSION_WEAK; break; |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
703 case Condition_Sleep: player->expression = CHARACTER_EXPRESSION_SLEEP; break; |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
704 case Condition_Fear: player->expression = CHARACTER_EXPRESSION_FEAR; break; |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
705 case Condition_Drunk: player->expression = CHARACTER_EXPRESSION_DRUNK; break; |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
706 case Condition_Insane: player->expression = CHARACTER_EXPRESSION_INSANE; break; |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
707 case Condition_Poison1: |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
708 case Condition_Poison2: |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
709 case Condition_Poison3: player->expression = CHARACTER_EXPRESSION_POISONED; break; |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
710 case Condition_Disease1: |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
711 case Condition_Disease2: |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
712 case Condition_Disease3: player->expression = CHARACTER_EXPRESSION_DISEASED; break; |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
713 case Condition_Paralyzed: player->expression = CHARACTER_EXPRESSION_PARALYZED; break; |
b3ac17fd12de
Moved condition checking to a separate class, extracted it from player::SetCondition
Grumpy7
parents:
1359
diff
changeset
|
714 case Condition_Unconcious: player->expression = CHARACTER_EXPRESSION_UNCONCIOUS; break; |
130 | 715 default: |
1545 | 716 Error("Invalid condition: %u", condition); |
0 | 717 } |
718 } | |
130 | 719 } |
720 | |
721 for (int i = 0; i < 2; ++i) | |
722 { | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
723 NPCData* hireling = &pParty->pHirelings[i]; |
291 | 724 if (!hireling->evt_C) |
130 | 725 continue; |
726 | |
291 | 727 hireling->evt_B += pMiscTimer->uTimeElapsed; |
728 if (hireling->evt_B >= hireling->evt_C) | |
130 | 729 { |
291 | 730 hireling->evt_A = 0; |
731 hireling->evt_B = 0; | |
732 hireling->evt_C = 0; | |
130 | 733 |
1545 | 734 Assert(sizeof(NPCData) == 0x4C); |
130 | 735 memset(hireling, 0, sizeof(*hireling)); |
736 | |
1793
4dee76d79c78
dword_5B65CC to npcIdToDismissAfterDialogue, Party::field_709 to Party::hirelingScrollPosition
Grumpy7
parents:
1747
diff
changeset
|
737 pParty->hirelingScrollPosition = 0; |
1035 | 738 pParty->CountHirelings(); |
739 viewparams->bRedrawGameUI = true; | |
130 | 740 } |
0 | 741 } |
742 } | |
743 | |
744 //----- (00490D02) -------------------------------------------------------- | |
745 void Party::RestAndHeal() | |
746 { | |
910 | 747 Player *pPlayer; // esi@4 |
748 bool have_vessels_soul; // [sp+10h] [bp-8h]@10 | |
0 | 749 |
910 | 750 for ( uint i = 0; i < 20; ++i ) |
751 pParty->pPartyBuffs[i].Reset(); | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
752 |
910 | 753 for ( int pPlayerID = 0; pPlayerID < 4; ++pPlayerID ) |
754 { | |
755 pPlayer = &pParty->pPlayers[pPlayerID]; | |
756 for ( uint i = 0; i < 20; ++i ) | |
757 pPlayer->pPlayerBuffs[i].Reset(); | |
758 | |
759 pPlayer->Zero(); | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
760 if ( pPlayer->pConditions[Condition_Dead] || pPlayer->pConditions[Condition_Pertified] || pPlayer->pConditions[Condition_Eradicated] )//Dead/Petrified/Eradicated |
910 | 761 continue; |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
762 pPlayer->pConditions[Condition_Unconcious] = 0;//Unconcious |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
763 pPlayer->pConditions[Condition_Drunk] = 0;//Drunk |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
764 pPlayer->pConditions[Condition_Fear] = 0;//Fear |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
765 pPlayer->pConditions[Condition_Sleep] = 0;//Sleep |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
766 pPlayer->pConditions[Condition_Weak] = 0;//Weak |
910 | 767 pPlayer->uTimeToRecovery = 0; |
768 pPlayer->sHealth = pPlayer->GetMaxHealth(); | |
769 pPlayer->sMana = pPlayer->GetMaxMana(); | |
770 if ( pPlayer->classType == PLAYER_CLASS_LICH ) | |
0 | 771 { |
910 | 772 have_vessels_soul = false; |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
773 for ( uint i = 0; i < 138; i++ ) |
0 | 774 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
775 if ( pPlayer->pInventoryItemList[i].uItemID == ITEM_LICH_JAR_FULL && pPlayer->pInventoryItemList[i].uHolderPlayer == pPlayerID + 1 ) |
910 | 776 have_vessels_soul = true; |
0 | 777 } |
910 | 778 if ( !have_vessels_soul ) |
0 | 779 { |
910 | 780 pPlayer->sHealth = pPlayer->GetMaxHealth() / 2; |
781 pPlayer->sMana = pPlayer->GetMaxMana() / 2; | |
0 | 782 } |
783 } | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
784 |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
785 if (pPlayer->pConditions[Condition_Zombie]) |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
786 { |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
787 pPlayer->sMana = 0; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
788 pPlayer->sHealth /= 2; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
789 } |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
790 else if ( pPlayer->pConditions[Condition_Poison3] || pPlayer->pConditions[Condition_Disease3] ) |
0 | 791 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
792 pPlayer->sHealth /= 4; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
793 pPlayer->sMana /= 4; |
0 | 794 } |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
795 else if ( pPlayer->pConditions[Condition_Poison2] || pPlayer->pConditions[Condition_Disease2] ) |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
796 { |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
797 pPlayer->sHealth /= 3; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
798 pPlayer->sMana /= 3; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
799 } |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
800 else if ( pPlayer->pConditions[Condition_Poison1] || pPlayer->pConditions[Condition_Disease1] ) |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
801 { |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
802 pPlayer->sHealth /= 2; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
803 pPlayer->sMana /= 2; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
804 } |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
805 if ( pPlayer->pConditions[Condition_Insane] ) |
910 | 806 pPlayer->sMana = 0; |
130 | 807 UpdatePlayersAndHirelingsEmotions(); |
0 | 808 } |
766 | 809 pParty->days_played_without_rest = 0; |
1295 | 810 } |
1359
60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
Grumpy7
parents:
1340
diff
changeset
|
811 |
1295 | 812 //----- (004938D1) -------------------------------------------------------- |
813 void __fastcall Rest(unsigned int uHoursToSleep) | |
814 { | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
815 signed __int64 v2; // st7@3 |
1295 | 816 |
817 if ( uHoursToSleep > 240 ) | |
818 InitializeActors(); | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
819 v2 = (signed __int64)((7680 * uHoursToSleep) * 0.033333335); |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
820 pParty->uTimePlayed += v2; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
821 for (int i = 0; i < 4; i++) |
1295 | 822 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
823 pPlayers[i + 1]->Recover((int)v2); |
1295 | 824 } |
825 _494035_timed_effects__water_walking_damage__etc(); | |
826 } | |
827 //----- (004B1BDB) -------------------------------------------------------- | |
1459 | 828 void RestAndHeal(__int64 uNumMinutes) |
1295 | 829 { |
830 signed __int64 v1; // ST2C_8@1 | |
831 signed __int64 v2; // qax@1 | |
832 unsigned __int64 v4; // qax@1 | |
833 unsigned int v5; // ebx@1 | |
834 | |
835 pParty->pHirelings[0].bHasUsedTheAbility = 0; | |
836 pParty->pHirelings[1].bHasUsedTheAbility = 0; | |
837 pParty->uTimePlayed += (signed __int64)((double)(7680 * uNumMinutes) * 0.033333335); | |
838 v1 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375); | |
839 v2 = v1 / 60 / 60; | |
840 v4 = (unsigned int)v2 / 0x18; | |
841 v5 = (unsigned int)(v4 / 7) >> 2; | |
842 pParty->uCurrentTimeSecond = v1 % 60; | |
843 pParty->uCurrentMinute = v1 / 60 % 60; | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
844 pParty->uCurrentHour = v2 % 24; |
1295 | 845 pParty->uCurrentMonthWeek = v4 / 7 & 3; |
846 pParty->uDaysPlayed = (unsigned int)v4 % 0x1C; | |
847 pParty->uCurrentMonth = v5 % 0xC; | |
848 pParty->uCurrentYear = v5 / 0xC + game_starting_year; | |
849 pParty->RestAndHeal(); | |
850 dword_507B94 = 1; | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
851 for (int i = 0; i < 4; i++) |
1295 | 852 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
853 pParty->pPlayers[i].uTimeToRecovery = 0; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
854 pParty->pPlayers[i].uNumDivineInterventionCastsThisDay = 0; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
855 pParty->pPlayers[i].uNumArmageddonCasts = 0; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
856 pParty->pPlayers[i].uNumFireSpikeCasts = 0; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
857 pParty->pPlayers[i].field_1B3B = 0; |
1295 | 858 } |
859 pParty->UpdatePlayersAndHirelingsEmotions(); | |
860 } | |
1297 | 861 //----- (0041F5BE) -------------------------------------------------------- |
1458 | 862 void Sleep6Hours() |
1297 | 863 { |
1396 | 864 if ( _506F18_num_minutes_to_sleep < 6 ) |
1297 | 865 { |
1396 | 866 if ( _506F18_num_minutes_to_sleep ) |
1297 | 867 { |
1396 | 868 Rest(_506F18_num_minutes_to_sleep); |
869 _506F18_num_minutes_to_sleep = 0; | |
1297 | 870 LoadActualSkyFrame(); |
871 } | |
1522 | 872 if ( dword_506F14 == 2 ) |
873 { | |
1521 | 874 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); |
875 } | |
1297 | 876 } |
877 else | |
878 { | |
879 Rest(6u); | |
1396 | 880 _506F18_num_minutes_to_sleep -= 6; |
1297 | 881 LoadActualSkyFrame(); |
882 } | |
883 viewparams->bRedrawGameUI = 1; | |
884 } | |
885 | |
1295 | 886 //----- (0047752B) -------------------------------------------------------- |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
887 int Party::GetPartyReputation() |
1295 | 888 { |
889 DDM_DLV_Header *v0; // ebx@1 | |
890 signed int v1; // esi@3 | |
891 | |
892 v0 = &pOutdoor->ddm; | |
893 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor ) | |
894 v0 = &pIndoor->dlv; | |
895 v1 = 0; | |
896 if ( CheckHiredNPCSpeciality(Pirate) ) | |
897 v1 += 5; | |
898 if ( CheckHiredNPCSpeciality(Burglar) ) | |
899 v1 += 5; | |
900 if ( CheckHiredNPCSpeciality(Gypsy) ) | |
901 v1 += 5; | |
902 if ( CheckHiredNPCSpeciality(Duper) ) | |
903 v1 += 5; | |
904 if ( CheckHiredNPCSpeciality(FallenWizard) ) | |
905 v1 += 5; | |
906 return v1 + v0->uReputation; | |
1296 | 907 } |
908 //----- (004269A2) -------------------------------------------------------- | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
909 void Party::GivePartyExp(unsigned int pEXPNum) |
1296 | 910 { |
911 signed int pActivePlayerCount; // ecx@1 | |
912 int pLearningPercent; // eax@13 | |
913 | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
914 if ( pEXPNum > 0) |
1296 | 915 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
916 pActivePlayerCount = 0; |
1296 | 917 for ( uint i = 0; i < 4; ++i ) |
918 { | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
919 if ( !pParty->pPlayers[i].pConditions[Condition_Unconcious] && |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
920 !pParty->pPlayers[i].pConditions[Condition_Dead] && |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
921 !pParty->pPlayers[i].pConditions[Condition_Pertified] && |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
922 !pParty->pPlayers[i].pConditions[Condition_Eradicated] ) |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
923 pActivePlayerCount ++; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
924 } |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
925 if ( pActivePlayerCount ) |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
926 { |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
927 pEXPNum = pEXPNum / pActivePlayerCount; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
928 for ( uint i = 0; i < 4; ++i ) |
1296 | 929 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
930 if ( !pParty->pPlayers[i].pConditions[Condition_Unconcious] && |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
931 !pParty->pPlayers[i].pConditions[Condition_Dead] && |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
932 !pParty->pPlayers[i].pConditions[Condition_Pertified] && |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
933 !pParty->pPlayers[i].pConditions[Condition_Eradicated] ) |
1296 | 934 { |
935 pLearningPercent = pParty->pPlayers[i].GetLearningPercent(); | |
936 pEXPNum = pEXPNum + pEXPNum * pLearningPercent / 100; | |
937 pParty->pPlayers[i].uExperience += pEXPNum; | |
938 if ( pParty->pPlayers[i].uExperience > 4000000000i64 ) | |
939 { | |
940 pParty->pPlayers[i].uExperience = 0; | |
941 } | |
942 } | |
943 } | |
944 } | |
945 } | |
946 } | |
1297 | 947 //----- (00420C05) -------------------------------------------------------- |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
948 void Party::PartyFindsGold(unsigned int uNumGold, int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal) |
1297 | 949 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
950 int hirelingSalaries; // ebp@1 |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
951 unsigned int goldToGain; // esi@1 |
1297 | 952 NPCData *v12; // ecx@21 |
953 unsigned int v13; // ecx@23 | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
954 signed int hirelingCount; // [sp+Ch] [bp-4h]@6 |
1297 | 955 |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
956 hirelingSalaries = 0; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
957 goldToGain = uNumGold; |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
958 |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
959 if ( _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal == 2 ) |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
960 pTmpBuf2[0] = 0; |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
961 else if ( _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal == 1 ) |
1297 | 962 { |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
963 sprintf(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[467], uNumGold);// You found %lu gold! |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
964 } |
1297 | 965 else |
966 { | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
967 hirelingCount = 0; |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
968 for (int i = 0; i < 2; i++) |
1297 | 969 { |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
970 if (this->pHirelings[i].pName) |
1297 | 971 { |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
972 hirelingCount++; |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
973 pTmpBuf[hirelingCount] = i; |
1297 | 974 } |
975 } | |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
976 for (uint i = 0; i < pNPCStats->uNumNewNPCs; i++) |
1297 | 977 { |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
978 if ( pNPCStats->pNewNPCData[i].uFlags & 0x80 |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
979 && (!this->pHirelings[0].pName || strcmp(pNPCStats->pNewNPCData[i].pName, this->pHirelings[0].pName)) |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
980 && (!this->pHirelings[1].pName || strcmp(pNPCStats->pNewNPCData[i].pName, this->pHirelings[1].pName)) ) |
1297 | 981 { |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
982 hirelingCount++; |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
983 pTmpBuf[hirelingCount] = i + 2; |
1297 | 984 } |
985 } | |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
986 for (int i = 0; i < hirelingCount; i++) |
1297 | 987 { |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
988 uchar thisBufId = (uchar)pTmpBuf[i]; |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
989 if (thisBufId < 2) |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
990 v12 = &this->pHirelings[thisBufId]; |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
991 else |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
992 v12 = &pNPCStats->pNPCData[thisBufId + 499]; |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
993 v13 = v12->uProfession; |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
994 if ( v13 ) |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
995 hirelingSalaries += pNPCStats->pProfessions[v13].uHirePrice;//*(&pNPCStats->field_13A58 + 5 * v13); |
1297 | 996 } |
997 if ( CheckHiredNPCSpeciality(Factor) ) | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
998 goldToGain += (signed int)(10 * goldToGain) / 100; |
1297 | 999 if ( CheckHiredNPCSpeciality(Banker) ) |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
1000 goldToGain += (signed int)(20 * goldToGain) / 100; |
1297 | 1001 if ( CheckHiredNPCSpeciality(Pirate) ) |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
1002 goldToGain += (signed int)(10 * goldToGain) / 100; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
1003 if ( hirelingSalaries ) |
1297 | 1004 { |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
1005 hirelingSalaries = (signed int)(goldToGain * hirelingSalaries / 100) / 100; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
1006 if ( hirelingSalaries < 1 ) |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
1007 hirelingSalaries = 1; |
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
1008 sprintf(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[466], goldToGain, hirelingSalaries);// You found %lu gold (followers take %lu)! |
1297 | 1009 } |
1010 else | |
1011 { | |
1827
0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
Grumpy7
parents:
1826
diff
changeset
|
1012 sprintf(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[467], goldToGain);// You found %lu gold! |
1297 | 1013 } |
1014 } | |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
1015 this->uNumGold += goldToGain - hirelingSalaries; |
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
1016 pUIAnim_Gold->uAnimTime = 0; |
1297 | 1017 pUIAnim_Gold->uAnimLength = 8 * pIconsFrameTable->pIcons[(signed __int16)pUIAnim_Gold->uIconID].uAnimLength; |
1018 if ( pTmpBuf2[0] ) | |
1019 ShowStatusBarString(pTmpBuf2.data(), 2u); | |
1828
35c1e4ff6ba7
party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents:
1827
diff
changeset
|
1020 pAudioPlayer->PlaySound(SOUND_GoldReceived, 0, 0, -1, 0, 0, 0, 0); |
1297 | 1021 } |
1022 //----- (00421B2C) -------------------------------------------------------- | |
1829
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1023 void Party::sub_421B2C_PlaceInInventory_or_DropPickedItem() |
1297 | 1024 { |
1025 unsigned int v0; // eax@2 | |
1026 Texture *v1; // ebx@2 | |
1027 int v2; // eax@3 | |
1028 int v4; // eax@6 | |
1029 unsigned __int16 v5; // dx@11 | |
1030 signed int v6; // eax@11 | |
1031 __int16 v8; // ax@16 | |
1032 SpriteObject a1; // [sp+4h] [bp-78h]@11 | |
1033 int v11; // [sp+74h] [bp-8h]@2 | |
1034 int v12; // [sp+78h] [bp-4h]@5 | |
1035 | |
1036 if ( !pParty->pPickedItem.uItemID ) | |
1829
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1037 return; |
1297 | 1038 v0 = pIcons_LOD->LoadTexture( |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1657
diff
changeset
|
1039 pParty->pPickedItem.GetIconName(), |
1297 | 1040 TEXTURE_16BIT_PALETTE); |
1041 v1 = pIcons_LOD->GetTexture(v0); | |
1042 v11 = areWeLoadingTexture; | |
1043 if ( uActiveCharacter | |
1829
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1044 && (v2 = ::pPlayers[uActiveCharacter]->AddItem(-1, pParty->pPickedItem.uItemID)) != 0 ) |
1297 | 1045 { |
1829
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1046 memcpy(&::pPlayers[uActiveCharacter]->pInventoryItemList[v2-1], &pParty->pPickedItem, 0x24u); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1047 pMouse->RemoveHoldingItem(); |
1297 | 1048 } |
1049 else | |
1050 { | |
1829
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1051 for (v12 = 0; v12 < 4; v12++) |
1297 | 1052 { |
1829
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1053 v4 = pParty->pPlayers[v12].AddItem(-1, pParty->pPickedItem.uItemID); |
1297 | 1054 if ( v4 ) |
1829
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1055 { |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1056 memcpy(&pParty->pPlayers[v12].pInventoryItemList[v4 - 1], &pParty->pPickedItem, sizeof(ItemGen)); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1057 pMouse->RemoveHoldingItem(); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1058 break; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1059 } |
1297 | 1060 } |
1061 if ( v12 == 4 ) | |
1829
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1062 { |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1063 v5 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1064 v6 = 0; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1065 a1.uType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1066 for ( uint i = 0; i < pObjectList->uNumObjects; i++ ) |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1067 { |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1068 if ( v5 == pObjectList->pObjects[i].uObjectID ) |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1069 { |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1070 v6 = i; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1071 break; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1072 } |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1073 } |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1074 a1.spell_caster_pid = OBJECT_Player; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1075 a1.uObjectDescID = v6; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1076 a1.vPosition.y = pParty->vPosition.y; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1077 a1.vPosition.x = pParty->vPosition.x; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1078 a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1079 a1.uSoundID = 0; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1080 a1.uFacing = 0; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1081 a1.uAttributes = 8; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1082 v8 = pIndoor->GetSector( |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1083 pParty->vPosition.x, |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1084 pParty->vPosition.y, |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1085 pParty->sEyelevel + pParty->vPosition.z); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1086 a1.uSpriteFrameID = 0; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1087 a1.uSectorID = v8; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1088 memcpy(&a1.stru_24, &pParty->pPickedItem, sizeof(a1.stru_24)); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1089 a1.Create(pParty->sRotationY, 184, 200, 0); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1090 pMouse->RemoveHoldingItem(); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1091 } |
1297 | 1092 } |
1093 if ( !v11 ) | |
1094 { | |
1095 v1->Release(); | |
1096 pIcons_LOD->SyncLoadedFilesCount(); | |
1097 } | |
1829
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1098 return; |
1359
60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
Grumpy7
parents:
1340
diff
changeset
|
1099 } |
60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
Grumpy7
parents:
1340
diff
changeset
|
1100 |
60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
Grumpy7
parents:
1340
diff
changeset
|
1101 |
1829
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1102 //----- (0048C6F6) -------------------------------------------------------- |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1103 bool Party::AddItemToParty(ItemGen *pItem) |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1104 { |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1105 unsigned int v2; // eax@1 |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1106 char *v5; // eax@8 |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1107 Texture *v7; // ebx@10 |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1108 signed int v8; // esi@10 |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1109 Player *v9; // edi@11 |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1110 int v10; // eax@11 |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1111 int v21; // [sp+24h] [bp-4h]@10 |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1112 |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1113 v2 = pItem->uItemID; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1114 if ( !pItemsTable->pItems[v2].uItemID_Rep_St ) |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1115 pItem->SetIdentified(); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1116 |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1117 v5 = pItemsTable->pItems[v2].pIconName; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1118 if ( v5 ) |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1119 { |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1120 v7 = pIcons_LOD->LoadTexturePtr(v5, TEXTURE_16BIT_PALETTE); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1121 v21 = areWeLoadingTexture; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1122 v8 = 0; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1123 int startId = uActiveCharacter >= 0 ? uActiveCharacter - 1 : 0; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1124 for (int i = 0; i < 4; i++) |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1125 { |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1126 v9 = &pPlayers[(startId + i) % 4]; //start with current active player, then cycle right if item won't fit |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1127 v10 = v9->AddItem(-1, pItem->uItemID); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1128 if ( v10 ) |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1129 { |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1130 memcpy(&v9->pInventoryItemList[v10-1], pItem, 0x24u); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1131 pItem->Reset(); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1132 pAudioPlayer->PlaySound(SOUND_GoldReceived, 0, 0, -1, 0, 0, 0, 0); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1133 v9->PlaySound(SPEECH_60, 0); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1134 if ( !v21 ) |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1135 { |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1136 v7->Release(); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1137 pIcons_LOD->SyncLoadedFilesCount(); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1138 } |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1139 return true; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1140 } |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1141 } |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1142 if ( !v21 ) |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1143 { |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1144 v7->Release(); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1145 pIcons_LOD->SyncLoadedFilesCount(); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1146 } |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1147 return false; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1148 } |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1149 else |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1150 { |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1151 MessageBoxW(nullptr, L"Invalid picture_name detected ::addItem()", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Party.cpp:795", 0); |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1152 return false; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1153 } |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1154 } |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1155 // 506128: using guessed type int areWeLoadingTexture; |
e4e27261d84e
sub_421B2C_PlaceInInventory_or_DropPickedItem to Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
Grumpy7
parents:
1828
diff
changeset
|
1156 |
1359
60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
Grumpy7
parents:
1340
diff
changeset
|
1157 bool Party::IsPartyEvil() |
60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
Grumpy7
parents:
1340
diff
changeset
|
1158 { |
60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
Grumpy7
parents:
1340
diff
changeset
|
1159 return _449B57_test_bit(_quest_bits, 100); |
60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
Grumpy7
parents:
1340
diff
changeset
|
1160 } |
60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
Grumpy7
parents:
1340
diff
changeset
|
1161 |
60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
Grumpy7
parents:
1340
diff
changeset
|
1162 bool Party::IsPartyGood() |
60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
Grumpy7
parents:
1340
diff
changeset
|
1163 { |
60cdc3eac407
_449B57_test_bit(pParty->_quest_bits, 99) and _449B57_test_bit(pParty->_quest_bits, 100) changed to Party::IsPartyGood, Party::IsPartyEvil, respectively
Grumpy7
parents:
1340
diff
changeset
|
1164 return _449B57_test_bit(_quest_bits, 99); |
1297 | 1165 } |