2496
|
1 #define _CRTDBG_MAP_ALLOC
|
|
2 #include <stdlib.h>
|
|
3 #include <crtdbg.h>
|
|
4
|
|
5 #define _CRT_SECURE_NO_WARNINGS
|
|
6
|
2541
|
7 #include "Engine/Engine.h"
|
2496
|
8
|
2541
|
9 #include "Viewport.h"
|
|
10 #include "Engine/Party.h"
|
|
11 #include "Engine/OurMath.h"
|
|
12 #include "Engine/Objects/Actor.h"
|
2496
|
13 #include "Outdoor.h"
|
2541
|
14 #include "Engine/Events.h"
|
2502
|
15 #include "IO/Mouse.h"
|
2541
|
16 #include "Engine/Objects/SpriteObject.h"
|
|
17 #include "Engine/Objects/ObjectList.h"
|
2496
|
18 #include "DecorationList.h"
|
2541
|
19 #include "Engine/texts.h"
|
2496
|
20 #include "Vis.h"
|
2541
|
21 #include "Engine/LOD.h"
|
2502
|
22 #include "GUI/GUIWindow.h"
|
2541
|
23 #include "Engine/TurnEngine/TurnEngine.h"
|
|
24 #include "Engine/stru123.h"
|
2499
|
25 #include "Level/Decoration.h"
|
2496
|
26
|
|
27
|
|
28 //----- (004C0262) --------------------------------------------------------
|
|
29 void Viewport::SetScreen( signed int sTL_X, signed int sTL_Y, signed int sBR_X, signed int sBR_Y )
|
|
30 {
|
|
31 unsigned int tl_x; // edx@1
|
|
32 unsigned int br_x; // esi@1
|
|
33 unsigned int tl_y; // edi@3
|
|
34 unsigned int br_y; // eax@3
|
|
35
|
|
36 tl_x = sTL_X;
|
|
37 br_x = sBR_X;
|
|
38 if ( sTL_X > sBR_X )
|
|
39 {
|
|
40 br_x = sTL_X; // swap x's
|
|
41 tl_x = sBR_X;
|
|
42 }
|
|
43 tl_y = sTL_Y;
|
|
44 br_y = sBR_Y;
|
|
45 if ( sTL_Y > sBR_Y )
|
|
46 {
|
|
47 br_y = sTL_Y; // swap y's
|
|
48 tl_y = sBR_Y;
|
|
49 }
|
|
50 this->uScreen_TL_X = tl_x;
|
|
51 this->uScreen_TL_Y = tl_y;
|
|
52 this->uScreen_BR_X = br_x;
|
|
53 this->uScreen_BR_Y = br_y;
|
|
54 this->uScreenWidth = br_x - tl_x + 1;
|
|
55 this->uScreenHeight = br_y - tl_y + 1;
|
|
56 this->uScreenCenterX = (signed int)(br_x + tl_x) /2;
|
|
57 //if ( pRenderer->pRenderD3D == 0 )
|
|
58 // this->uScreenCenterY = this->uScreen_BR_Y - fixpoint_mul(field_30, uScreenHeight);
|
|
59 //else
|
|
60 this->uScreenCenterY = (br_y + tl_y)/2;
|
|
61 SetViewport(this->uScreen_TL_X, this->uScreen_TL_Y, this->uScreen_BR_X, this->uScreen_BR_Y);
|
|
62 }
|
|
63
|
|
64 //----- (004C02F8) --------------------------------------------------------
|
|
65 void Viewport::SetFOV(int field_of_view)
|
|
66 {
|
|
67 this->field_of_view = field_of_view;
|
|
68 SetScreen(uScreen_TL_X, uScreen_TL_Y, uScreen_BR_X, uScreen_BR_Y);
|
|
69 }
|
|
70
|
|
71 //----- (004C0312) --------------------------------------------------------
|
|
72 void Viewport::SetViewport( signed int sTL_X, signed int sTL_Y, signed int sBR_X, signed int sBR_Y )
|
|
73 {
|
|
74 signed int tl_x; // ebx@1
|
|
75 signed int tl_y; // edi@3
|
|
76 signed int br_x; // edx@5
|
|
77 signed int br_y; // eax@7
|
|
78
|
|
79 tl_x = sTL_X;
|
|
80 if ( sTL_X < this->uScreen_TL_X )
|
|
81 tl_x = this->uScreen_TL_X;
|
|
82 tl_y = sTL_Y;
|
|
83 if ( sTL_Y < this->uScreen_TL_Y )
|
|
84 tl_y = this->uScreen_TL_Y;
|
|
85 br_x = sBR_X;
|
|
86 if ( sBR_X > this->uScreen_BR_X )
|
|
87 br_x = this->uScreen_BR_X;
|
|
88 br_y = sBR_Y;
|
|
89 if ( sBR_Y > this->uScreen_BR_Y )
|
|
90 br_y = this->uScreen_BR_Y;
|
|
91 this->uViewportTL_Y = tl_y;
|
|
92 this->uViewportTL_X = tl_x;
|
|
93 this->uViewportBR_X = br_x;
|
|
94 this->uViewportBR_Y = br_y;
|
|
95 }
|
|
96
|
|
97 //----- (00443219) --------------------------------------------------------
|
|
98 void ViewingParams::_443219()
|
|
99 {
|
|
100 this->sViewCenterY += 512;
|
|
101
|
|
102 AdjustPosition();
|
|
103 }
|
|
104
|
|
105 //----- (00443225) --------------------------------------------------------
|
|
106 void ViewingParams::_443225()
|
|
107 {
|
|
108 this->sViewCenterX -= 512;
|
|
109
|
|
110 AdjustPosition();
|
|
111 }
|
|
112
|
|
113 //----- (00443231) --------------------------------------------------------
|
|
114 void ViewingParams::_443231()
|
|
115 {
|
|
116 this->sViewCenterY -= 512;
|
|
117
|
|
118 AdjustPosition();
|
|
119 }
|
|
120
|
|
121 //----- (0044323D) --------------------------------------------------------
|
|
122 void ViewingParams::_44323D()
|
|
123 {
|
|
124 this->sViewCenterX += 512;
|
|
125
|
|
126 AdjustPosition();
|
|
127 }
|
|
128
|
|
129 //----- (00443249) --------------------------------------------------------
|
|
130 void ViewingParams::CenterOnParty()
|
|
131 {
|
|
132 this->uMapBookMapZoom = fixpoint_mul(0x8000, this->uMapBookMapZoom);
|
|
133 if (this->uMapBookMapZoom < 384)
|
|
134 this->uMapBookMapZoom = 384;
|
|
135
|
|
136 this->sViewCenterX = pParty->vPosition.x;
|
|
137 this->sViewCenterY = pParty->vPosition.y;
|
|
138
|
|
139 AdjustPosition();
|
|
140 }
|
|
141
|
|
142 //----- (00443291) --------------------------------------------------------
|
|
143 void ViewingParams::CenterOnParty2()
|
|
144 {
|
|
145 int v2; // eax@1
|
|
146
|
|
147 if (uCurrentlyLoadedLevelType == LEVEL_Outdoor)
|
|
148 v2 = 1536;
|
|
149 else if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
|
|
150 v2 = 3072;
|
|
151 else assert(false);
|
|
152
|
|
153 this->uMapBookMapZoom *= 2;
|
|
154 if (this->uMapBookMapZoom > v2 )
|
|
155 this->uMapBookMapZoom = v2;
|
|
156
|
|
157 this->sViewCenterX = pParty->vPosition.x;
|
|
158 this->sViewCenterY = pParty->vPosition.y;
|
|
159 AdjustPosition();
|
|
160 }
|
|
161
|
|
162 //----- (004432E7) --------------------------------------------------------
|
|
163 void ViewingParams::AdjustPosition()
|
|
164 {
|
|
165 ViewingParams *v1; // esi@1
|
|
166 int v2; // ebx@1
|
|
167 signed int v3; // edx@1
|
|
168 int v4; // ecx@1
|
|
169 int v5; // edi@3
|
|
170 int v6; // eax@3
|
|
171 int v7; // eax@5
|
|
172
|
|
173
|
|
174 v1 = this;
|
|
175 v2 = this->indoor_center_y;
|
|
176 v3 = 88 >> (this->uMapBookMapZoom / 384);
|
|
177 v4 = (44 - v3) << 9;
|
|
178 if ( v1->sViewCenterY > v2 + v4 )
|
|
179 v1->sViewCenterY = v2 + v4;
|
|
180
|
|
181 v5 = v1->indoor_center_x;
|
|
182 v6 = (v3 - 44) << 9;
|
|
183 if ( v1->sViewCenterX < v5 + v6 )
|
|
184 v1->sViewCenterX = v5 + v6;
|
|
185
|
|
186 v7 = v2 + v6;
|
|
187 if ( v1->sViewCenterY < v7 )
|
|
188 v1->sViewCenterY = v7;
|
|
189
|
|
190 if ( v1->sViewCenterX > v5 + v4 )
|
|
191 v1->sViewCenterX = v5 + v4;
|
|
192 }
|
|
193
|
|
194 //----- (00443343) --------------------------------------------------------
|
|
195 void ViewingParams::InitGrayPalette()
|
|
196 {
|
|
197 for (unsigned short i=0; i<256; ++i)
|
|
198 pPalette[i]=Color16(i, i, i);
|
|
199 }
|
|
200
|
|
201 //----- (00443365) --------------------------------------------------------
|
|
202 void ViewingParams::_443365()
|
|
203 {
|
|
204 Vec3_short_ *v3; // eax@4
|
|
205 Vec3_short_ *v6; // eax@12
|
|
206 int minimum_y; // [sp+10h] [bp-10h]@2
|
|
207 int maximum_y; // [sp+14h] [bp-Ch]@2
|
|
208 int minimum_x; // [sp+18h] [bp-8h]@2
|
|
209 int maximum_x; // [sp+1Ch] [bp-4h]@2
|
|
210
|
|
211 InitGrayPalette();
|
|
212 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
|
|
213 {
|
|
214 minimum_x = 0x40000000;
|
|
215 minimum_y = 0x40000000;
|
|
216
|
|
217 maximum_x = -0x40000000;
|
|
218 maximum_y = -0x40000000;
|
|
219 for (int i=0; i<pIndoor->pMapOutlines->uNumOutlines; ++i)
|
|
220 {
|
|
221 v3 = &pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uFace1ID];
|
|
222
|
|
223 if ( v3->x < minimum_x )
|
|
224 minimum_x = v3->x;
|
|
225 if ( v3->x > maximum_x )
|
|
226 maximum_x = v3->x;
|
|
227 if ( v3->y < minimum_y )
|
|
228 minimum_y = v3->x;
|
|
229 if ( v3->y > maximum_y )
|
|
230 maximum_y = v3->x;
|
|
231
|
|
232 v6 = &pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uFace2ID];
|
|
233
|
|
234 if ( v6->x < minimum_x )
|
|
235 minimum_x = v3->x;
|
|
236 if ( v6->x > maximum_x )
|
|
237 maximum_x = v3->x;
|
|
238
|
|
239 if ( v6->y < minimum_y )
|
|
240 minimum_y = v3->y;
|
|
241 if ( v6->y > maximum_y )
|
|
242 maximum_y = v3->y;
|
|
243 }
|
|
244
|
|
245 uMinimapZoom = 1024;
|
|
246 indoor_center_x = (signed int)(minimum_x + maximum_x) / 2;
|
|
247 field_28 = 10;
|
|
248 indoor_center_y = (signed int)(minimum_y + maximum_y) / 2;
|
|
249 }
|
|
250 else
|
|
251 {
|
|
252 indoor_center_x = 0;
|
|
253 indoor_center_y = 0;
|
|
254 uMinimapZoom = _576E2C_current_minimap_zoom;
|
|
255 field_28 = dword_576E28;
|
|
256 }
|
|
257 uMapBookMapZoom = 384;
|
|
258 }
|
2567
|
259
|
|
260
|
|
261
|
|
262
|
|
263
|
|
264
|
|
265 void ItemInteraction(unsigned int item_id)
|
|
266 {
|
|
267 if (pItemsTable->pItems[pSpriteObjects[item_id].containing_item.uItemID].uEquipType == EQUIP_GOLD)
|
|
268 {
|
|
269 pParty->PartyFindsGold(pSpriteObjects[item_id].containing_item.special_enchantment, 0);
|
|
270 viewparams->bRedrawGameUI = 1;
|
|
271 }
|
|
272 else
|
|
273 {
|
|
274 if (pParty->pPickedItem.uItemID)
|
|
275 return;
|
|
276
|
|
277 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[471], pItemsTable->pItems[pSpriteObjects[item_id].containing_item.uItemID].pUnidentifiedName);//You found an item (%s)!
|
|
278 ShowStatusBarString(pTmpBuf2.data(), 2);
|
|
279 if (pSpriteObjects[item_id].containing_item.uItemID == ITEM_ARTIFACT_SPLITTER)
|
|
280 _449B7E_toggle_bit(pParty->_quest_bits, 184, 1);
|
|
281 if (pSpriteObjects[item_id].containing_item.uItemID == ITEM_SPELLBOOK_MIND_REMOVE_FEAR)
|
|
282 _449B7E_toggle_bit(pParty->_quest_bits, 185, 1);
|
|
283 if (!pParty->AddItemToParty(&pSpriteObjects[item_id].containing_item))
|
|
284 pParty->SetHoldingItem(&pSpriteObjects[item_id].containing_item);
|
|
285 }
|
|
286 SpriteObject::OnInteraction(item_id);
|
|
287 }
|
|
288
|
|
289 bool ActorInteraction(unsigned int id)
|
|
290 {
|
|
291 if (!pActors[id].GetActorsRelation(0) && pActors[id].ActorFriend() && pActors[id].CanAct())
|
|
292 {
|
|
293 Actor::AI_FaceObject(id, 4, 0, 0);
|
|
294 if (pActors[id].sNPC_ID)
|
|
295 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_StartNPCDialogue, id, 0);
|
|
296 else
|
|
297 {
|
|
298 if (pNPCStats->pGroups_copy[pActors[id].uGroup])
|
|
299 {
|
|
300 if (pNPCStats->pCatchPhrases[pNPCStats->pGroups_copy[pActors[id].uGroup]])
|
|
301 {
|
|
302 pParty->uFlags |= 2;
|
|
303 strcpy(byte_5B0938.data(), pNPCStats->pCatchPhrases[pNPCStats->pGroups_copy[pActors[id].uGroup]]);
|
|
304 sub_4451A8_press_any_key(0, 0, 0);
|
|
305 }
|
|
306 }
|
|
307 }
|
|
308 return true;
|
|
309 }
|
|
310 return false;
|
|
311 }
|
|
312
|
|
313 void DecorationInteraction(unsigned int id, unsigned int pid)
|
|
314 {
|
|
315 if (pLevelDecorations[id].uEventID)
|
|
316 {
|
|
317 EventProcessor(pLevelDecorations[id].uEventID, pid, 1);
|
|
318 pLevelDecorations[id].uFlags |= LEVEL_DECORATION_VISIBLE_ON_MAP;
|
|
319 }
|
|
320 else
|
|
321 {
|
|
322 if (pLevelDecorations[id].IsInteractive())
|
|
323 {
|
|
324 activeLevelDecoration = &pLevelDecorations[id];
|
|
325 EventProcessor(stru_5E4C90_MapPersistVars._decor_events[pLevelDecorations[id]._idx_in_stru123 - 75] + 380, 0, 1);
|
|
326 activeLevelDecoration = nullptr;
|
|
327 }
|
|
328 }
|
|
329 }
|
|
330
|
|
331
|
|
332 void DropHeldItem()
|
|
333 {
|
|
334 if (!pParty->pPickedItem.uItemID)
|
|
335 return;
|
|
336
|
|
337 SpriteObject a1; // [sp+Ch] [bp-80h]@1
|
|
338 POINT *v1; // esi@3
|
|
339 __debugbreak();//no checker
|
|
340 int v6 = 0;
|
|
341 a1.uType = (SPRITE_OBJECT_TYPE)pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID;
|
|
342 if ((signed int)pObjectList->uNumObjects <= 0)
|
|
343 LOWORD(v6) = 0;
|
|
344 else
|
|
345 {
|
|
346 auto v7 = (char *)&pObjectList->pObjects->uObjectID;
|
|
347 while (pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID != *(short *)v7)
|
|
348 {
|
|
349 ++v6;
|
|
350 v7 += 56;
|
|
351 if (v6 >= (signed int)pObjectList->uNumObjects)
|
|
352 {
|
|
353 LOWORD(v6) = 0;
|
|
354 break;
|
|
355 }
|
|
356 }
|
|
357 }
|
|
358 a1.uObjectDescID = v6;
|
|
359 a1.vPosition.y = pParty->vPosition.y;
|
|
360 a1.spell_caster_pid = OBJECT_Player;
|
|
361 a1.vPosition.x = pParty->vPosition.x;
|
|
362 a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z;
|
|
363 a1.uSoundID = 0;
|
|
364 a1.uFacing = 0;
|
|
365 a1.uAttributes = 8;
|
|
366 a1.uSectorID = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->sEyelevel + pParty->vPosition.z);
|
|
367 a1.uSpriteFrameID = 0;
|
|
368 memcpy(&a1.containing_item, &pParty->pPickedItem, 0x24u);
|
|
369
|
|
370 extern int UnprojectX(int);
|
|
371 //v9 = UnprojectX(v1->x);
|
|
372 a1.Create(pParty->sRotationY + UnprojectX(v1->x), 184, 200, 0);
|
|
373 auto pTextureID = pIcons_LOD->LoadTexture(pParty->pPickedItem.GetIconName(), TEXTURE_16BIT_PALETTE);
|
|
374 if (pTextureID != -1)
|
|
375 pIcons_LOD->pTextures[pTextureID].Release();
|
|
376 pMouse->RemoveHoldingItem();
|
|
377 pIcons_LOD->SyncLoadedFilesCount();
|
|
378 }
|
|
379
|
|
380
|
2496
|
381 //----- (0042213C) --------------------------------------------------------
|
|
382 void OnGameViewportClick()
|
|
383 {
|
|
384 signed int v0; // ebx@2
|
|
385 POINT *v1; // esi@3
|
|
386 signed int v6; // eax@14
|
|
387 char *v7; // esi@15
|
|
388 int v9; // eax@19
|
|
389 unsigned int pTextureID; // eax@19
|
|
390 int pEventID; // ecx@21
|
|
391 int v15; // ecx@29
|
|
392 // signed int v16; // edx@30
|
|
393 // int v18; // ebx@47
|
|
394 // signed int v21; // eax@58
|
|
395 SpriteObject a1; // [sp+Ch] [bp-80h]@1
|
|
396 POINT a2; // [sp+84h] [bp-8h]@3
|
|
397
|
|
398 int clickable_distance = 512;
|
|
399
|
|
400 v1 = pMouse->GetCursorPos(&a2);
|
|
401 //if ( pRenderer->pRenderD3D )
|
2541
|
402 v0 = pEngine->pVisInstance->get_picked_object_zbuf_val();
|
2570
|
403 int distance = HIWORD(v0);
|
|
404 bool in_range = distance < clickable_distance;
|
2496
|
405 //else
|
|
406 // v0 = pRenderer->pActiveZBuffer[v1->x + pSRZBufferLineOffsets[v1->y]];
|
|
407
|
|
408 if ( PID_TYPE(v0) == OBJECT_Item)
|
|
409 {
|
|
410 int item_id = PID_ID(v0);
|
|
411 //v21 = (signed int)(unsigned __int16)v0 >> 3;
|
2567
|
412 if (pObjectList->pObjects[pSpriteObjects[item_id].uObjectDescID].uFlags & 0x10 || item_id >= 1000 || !pSpriteObjects[item_id].uObjectDescID
|
|
413 || !in_range)
|
2496
|
414 {
|
2567
|
415 if (pParty->pPickedItem.uItemID)
|
|
416 DropHeldItem();
|
2496
|
417 }
|
2567
|
418 else
|
|
419 ItemInteraction(item_id);
|
2496
|
420 }
|
2567
|
421 else if ( PID_TYPE(v0) == OBJECT_Actor)
|
2496
|
422 {
|
|
423 int mon_id = PID_ID(v0);
|
|
424 //a2.y = v16;
|
|
425 if ( pActors[mon_id].uAIState == Dead )
|
|
426 {
|
2567
|
427 if (in_range)
|
|
428 pActors[mon_id].LootActor();
|
|
429 else if (pParty->pPickedItem.uItemID)
|
|
430 DropHeldItem();
|
|
431 }
|
|
432 else if ( GetAsyncKeyState(VK_SHIFT) >= 0 )
|
|
433 {
|
|
434 if (!in_range)
|
|
435 {
|
|
436 if (pParty->pPickedItem.uItemID)
|
|
437 DropHeldItem();
|
|
438 }
|
|
439 else if (!ActorInteraction(mon_id))
|
|
440 {
|
|
441 if (pParty->bTurnBasedModeOn == true && pTurnEngine->turn_stage == TE_MOVEMENT)
|
|
442 pTurnEngine->field_18 |= TE_FLAG_8;
|
|
443 else
|
|
444 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Attack, 0, 0);
|
|
445 }
|
|
446 }
|
|
447 else if ( pParty->bTurnBasedModeOn == true && pTurnEngine->turn_stage == TE_MOVEMENT )
|
|
448 pParty->uFlags |= PARTY_FLAGS_1_FALLING;
|
|
449 else if ( uActiveCharacter && sub_427769_isSpellQuickCastableOnShiftClick(pPlayers[uActiveCharacter]->uQuickSpell))
|
|
450 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_CastQuickSpell, 0, 0);
|
|
451 }
|
|
452 else if ( PID_TYPE(v0) == OBJECT_Decoration)
|
|
453 {
|
|
454 int id = PID_ID(v0);
|
|
455 if (distance - pDecorationList->pDecorations[pLevelDecorations[id].uDecorationDescID].uRadius >= clickable_distance)
|
2496
|
456 {
|
2567
|
457 if (pParty->pPickedItem.uItemID)
|
|
458 DropHeldItem();
|
2496
|
459 }
|
2567
|
460 else
|
|
461 DecorationInteraction(id, v0);
|
|
462 }
|
|
463 else if (PID_TYPE(v0) == OBJECT_BModel && in_range)
|
|
464 {
|
|
465 if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
|
2496
|
466 {
|
2567
|
467 if (!pIndoor->pFaces[PID_ID(v0)].Clickable())
|
|
468 {
|
|
469 if (!pParty->pPickedItem.uItemID)
|
|
470 {
|
|
471 ShowNothingHereStatus();
|
|
472 if (!pParty->pPickedItem.uItemID)
|
|
473 return;
|
|
474 }
|
|
475 else
|
|
476 DropHeldItem();
|
|
477 }
|
2496
|
478 else
|
|
479 {
|
2567
|
480 pEventID = pIndoor->pFaceExtras[pIndoor->pFaces[PID_ID(v0)].uFaceExtraID].uEventID;
|
|
481 EventProcessor(pEventID, (unsigned __int16)v0, 1);
|
2496
|
482 }
|
|
483 }
|
2567
|
484 else if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
|
2496
|
485 {
|
2567
|
486 if (!pOutdoor->pBModels[(signed int)(v0 & 0xFFFF) >> 9].pFaces[PID_ID(v0) & 0x3F].Clickable())
|
2496
|
487 {
|
2567
|
488 if (!pParty->pPickedItem.uItemID)
|
|
489 {
|
|
490 ShowNothingHereStatus();
|
|
491 if (!pParty->pPickedItem.uItemID)
|
|
492 return;
|
|
493 }
|
|
494 else
|
|
495 DropHeldItem();
|
2496
|
496 }
|
2567
|
497 else
|
|
498 {
|
|
499 pEventID = pOutdoor->pBModels[(signed int)(v0 & 0xFFFF) >> 9].pFaces[PID_ID(v0) & 0x3F].sCogTriggeredID;
|
|
500 EventProcessor(pEventID, (unsigned __int16)v0, 1);
|
|
501 }
|
2496
|
502 }
|
|
503 }
|
2567
|
504 else if (pParty->pPickedItem.uItemID)
|
|
505 DropHeldItem();
|
2496
|
506 }
|