Im trying with this code to block height items stack when i try move theys one floor to the other...
I'll try to explain my problem with 2 imagens.
This is actually in my server
Imgur
now i can stack height items when i use stairs and holes for example
what i need? and trying to do
Imgur
i need add return RETURNVALUE_NOTENOUGHROOM in this case.
this is my code on Tile.cpp tested but no work :/
anyone knows what is wrong in this code?
I'll try to explain my problem with 2 imagens.
This is actually in my server
Imgur
now i can stack height items when i use stairs and holes for example
what i need? and trying to do
Imgur
i need add return RETURNVALUE_NOTENOUGHROOM in this case.
this is my code on Tile.cpp tested but no work :/
C++:
if (fromTile) {
const Position& fromPosition = creature->getPosition();
if (fromPosition.z == getPosition().z) {
int32_t height = getHeight();
int32_t fromHeight = fromTile->getHeight();
if (fromHeight < height) {
if (std::abs(fromHeight - height) != 1) {
return RETURNVALUE_NOTENOUGHROOM;
}
}
}
}