void TrashHolder::__addThing(int32_t, Thing* thing) { Item* item = thing->getItem(); if (!item) { return; } if (item == this || !item->hasProperty(CONST_PROP_MOVEABLE)) { return; } if (item->isHangable() && isGroundTile()) { Tile* tile = dynamic_cast<Tile*>(getParent()); if (tile && tile->hasFlag(TILESTATE_SUPPORTS_HANGABLE)) { return; } } g_game.internalRemoveItem(item); const ItemType& it = Item::items[getID()]; if (it.magicEffect != CONST_ME_NONE) { g_game.addMagicEffect(getPosition(), it.magicEffect); } }
void MapTile::setGroundTile(Symbol* gTile){ groundTile = gTile; if (showingTile == NULL || isGroundTile()){ showingTile = groundTile; } }