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