• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Parcel trap 8.6 - 0.4

zabuzo

Well-Known Member
Joined
Jun 10, 2016
Messages
238
Reaction score
54
What i need to search/change in my sources to make parcel traps like was on old tibia

Should be amazing play anothers 8.60 having it :D

Example like was on 7.4 (what i want put in my 8.60)
 
Solution
Game.cpp:

Code:
ReturnValue Game::internalMoveCreature(Creature* actor, Creature* creature, Cylinder* fromCylinder, Cylinder* toCylinder, uint32_t flags/* = 0*/)
{
    //check if we can move the creature to the destination
    ReturnValue ret = toCylinder->__queryAdd(0, creature, 1, flags);
    if(ret != RET_NOERROR)
        return ret;

    //height check
    Tile* toTile = toCylinder->getTile();
    Tile* fromTile = fromCylinder->getTile();
    if(toTile->getHeight() - fromTile->getHeight() >= 2) {
        return RET_NOTPOSSIBLE;
    }
   
    fromCylinder->getTile()->moveCreature(actor, creature, toCylinder);
   
    if(creature->getParent() != toCylinder)
        return RET_NOERROR;

    Item* toItem = NULL;
    Cylinder* subCylinder...
Code:
int32_t Tile::getHeight() {
    int32_t height = 0;
    if(ground) {
        if(ground->hasProperty(HASHEIGHT)) {
            ++height;
        }
    }

    if(const TileItemVector* items = getItemList()) {
        for(ItemVector::const_iterator it = items->begin(); it != items->end(); ++it) {
            if((*it)->hasProperty(HASHEIGHT)) {
                ++height;
            }
        }
    }

    return std::min(height, 4);
}


TYYYYYYYY
 
Back
Top