Skip to content

Commit 39e2d5b

Browse files
committed
Fix issue with dclicking items on ground with return 1 in equip test disappearing
1 parent 7bd0e6f commit 39e2d5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/game/chars/CCharAct.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3308,12 +3308,12 @@ bool CChar::ItemEquip( CItem * pItem, CChar * pCharMsg, bool fFromDClick )
33083308
if (IsTrigUsed(TRIGGER_EQUIPTEST) || IsTrigUsed(TRIGGER_ITEMEQUIPTEST))
33093309
{
33103310
// Swap the layer for real one, because if we don't use dclick for equip, real layer gets rewritten with LAYER_DRAGGING.
3311-
pItem->SetEquipLayer(layer);
3311+
pItem->SetContainedLayer(layer);
33123312

33133313
if (pItem->OnTrigger(ITRIG_EQUIPTEST, CScriptTriggerArgsPtr{}, this) == TRIGRET_RET_TRUE)
33143314
{
33153315
// Reset layer to the original value, that item doesn't get misplaced.
3316-
pItem->SetEquipLayer(requestedLayer);
3316+
pItem->SetContainedLayer(requestedLayer);
33173317

33183318
// since this trigger is called also when creating an item via ITEM=, if the created item has a RETURN 1 in @EquipTest
33193319
// (or if the NPC has a RETURN 1 in @ItemEquipTest), the item will be created but not placed in the world.
@@ -3326,7 +3326,7 @@ bool CChar::ItemEquip( CItem * pItem, CChar * pCharMsg, bool fFromDClick )
33263326
}
33273327

33283328
// Reset layer to the original value.
3329-
pItem->SetEquipLayer(requestedLayer);
3329+
pItem->SetContainedLayer(requestedLayer);
33303330

33313331
if (pItem->IsDeleted())
33323332
return false;

0 commit comments

Comments
 (0)