Skip to content

Commit

Permalink
Some fixes on function for not remove items with decay added from map (
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas authored Dec 3, 2022
1 parent fcb1ead commit a53d99c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ ReturnValue Game::internalRemoveItem(Item* item, int32_t count /*= -1*/, bool te
if (item->canDecay() && cylinder->getTile() && item->getLoadedFromMap()) {
SPDLOG_DEBUG("Cannot remove item with id {}, name {}, on position {}", item->getID(), item->getName(), cylinder->getPosition().toString());
item->stopDecaying();
return RETURNVALUE_NOERROR;
return RETURNVALUE_THISISIMPOSSIBLE;
}

if (!test) {
Expand Down
2 changes: 1 addition & 1 deletion src/items/item.h
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ class Item : virtual public Thing
virtual void startDecaying();
virtual void stopDecaying();

bool getLoadedFromMap() {
bool getLoadedFromMap() const {
return loadedFromMap;
}

Expand Down

0 comments on commit a53d99c

Please sign in to comment.