marek12
Available for sprite works
- Joined
- Apr 8, 2020
- Messages
- 398
- Solutions
- 4
- Reaction score
- 394
Hi again guys, I am facing now the problem with items that can't be moved being removed from the house after server restart.
I am 99.999999% sure this is coded in cpp (which I don't know completely), anyone can help me with this one so it's not going to remove unmovable items?
Example: when I create a blueberry bush inside a house it will remove it after restart, and that's logical but I want to fix that so it will not remove it.
And that's because I got exercise dummies on my server that players can buy and unwrap inside a house.
I know I may just make them movable, but I need them to be unmovable
does it have to do something in here?
house.cpp
and then here?
I am 99.999999% sure this is coded in cpp (which I don't know completely), anyone can help me with this one so it's not going to remove unmovable items?
Example: when I create a blueberry bush inside a house it will remove it after restart, and that's logical but I want to fix that so it will not remove it.
And that's because I got exercise dummies on my server that players can buy and unwrap inside a house.
I know I may just make them movable, but I need them to be unmovable
Post automatically merged:
does it have to do something in here?
house.cpp
C++:
ItemList moveList;
for(HouseTileList::iterator it = houseTiles.begin(); it != houseTiles.end(); ++it)
{
for(uint32_t i = 0; i < (*it)->getThingCount(); ++i)
{
if(!(item = (*it)->__getThing(i)->getItem()))
continue;
if(item->isPickupable())
moveList.push_back(item);
else if((tmpContainer = item->getContainer()))
{
for(ItemList::const_iterator it = tmpContainer->getItems(); it != tmpContainer->getEnd(); ++it)
moveList.push_back(*it);
}
}
}
and then here?
C++:
else
{
for(ItemList::iterator it = moveList.begin(); it != moveList.end(); ++it)
g_game.internalRemoveItem(NULL, (*it), (*it)->getItemCount(), false, FLAG_NOLIMIT);
}
return true;
}
Last edited: