Skip to content

Commit

Permalink
Container empty
Browse files Browse the repository at this point in the history
When a container was emptied, the content was not updated.
  • Loading branch information
canerksk committed Oct 3, 2024
1 parent 304255e commit bedfa22
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/game/items/CItemContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,18 @@ bool CItemContainer::r_Verb( CScript &s, CTextConsole *pSrc )
case ICV_EMPTY:
{
ClearContainer(false);
if (pSrc->GetChar())
{
CChar *pChar = pSrc->GetChar();
if (pChar->IsClientActive())
{
CClient *pClient = pChar->GetClientActive();
ASSERT(pClient);
pClient->addItem(this); // may crash client if we dont do this.
pClient->addContainerSetup(this);
OnOpenEvent(pChar, GetTopLevelObj());
}
}
return true;
}
case ICV_FIXWEIGHT:
Expand Down

0 comments on commit bedfa22

Please sign in to comment.