• 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!

DOORS RESET AFTER SERVER RESTART

Mauzim

Member
Joined
Jan 3, 2011
Messages
568
Reaction score
9
I HAVE PROBLEM IN MY SERVER DOORS WON'T SAVE ALL ITEMS IN HOUSE SAVED THIS IN INSIDE DOOR TOO BUT AFTER RESTART I SEE CLOSED DOOR LIKE IN MAP SAVED

Bez tytułu.png
 
Last edited:
dude its otx u think it will be working? i guess not
this guy from otx support just write to me i have reset house cache i just want to know how to do that and problem will be solved

bump

BUMP
 
Last edited by a moderator:
maybe something here?
Code:
////////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
////////////////////////////////////////////////////////////////////////
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////
#include "otpch.h"
#include "housetile.h"

#include "house.h"
#include "game.h"
#include "configmanager.h"

extern ConfigManager g_config;
extern Game g_game;

HouseTile::HouseTile(int32_t x, int32_t y, int32_t z, House* _house):
    DynamicTile(x, y, z)
{
    house = _house;
    setFlag(TILESTATE_HOUSE);
}

void HouseTile::__addThing(Creature* actor, int32_t index, Thing* thing)
{
    Tile::__addThing(actor, index, thing);
    if(!thing->getParent())
        return;

    if(Item* item = thing->getItem())
        updateHouse(item);
}

void HouseTile::__internalAddThing(uint32_t index, Thing* thing)
{
    Tile::__internalAddThing(index, thing);
    if(!thing->getParent())
        return;

    if(Item* item = thing->getItem())
        updateHouse(item);
}

void HouseTile::updateHouse(Item* item)
{
    if(item->getTile() != this)
        return;

    if(Door* door = item->getDoor())
    {
        if(door->getDoorId() != 0)
            house->addDoor(door);
    }
    else if(BedItem* bed = item->getBed())
        house->addBed(bed);
}

ReturnValue HouseTile::__queryAdd(int32_t index, const Thing* thing, uint32_t count, uint32_t flags, Creature* actor/* = NULL*/) const
{
    if(const Creature* creature = thing->getCreature())
    {
        if(const Player* player = creature->getPlayer())
        {
            if(!house->isInvited(player) && !player->hasCustomFlag(PlayerCustomFlag_CanMoveAnywhere))
                return RET_PLAYERISNOTINVITED;
        }
        else
            return RET_NOTPOSSIBLE;
    }
    else if(thing->getItem())
    {
        const uint32_t itemLimit = g_config.getNumber(ConfigManager::HOUSE_TILE_LIMIT);
        if(itemLimit && getItemCount() > itemLimit)
            return RET_TILEISFULL;

        if(actor && g_config.getBool(ConfigManager::HOUSE_PROTECTION))
        {
            if(const Player* player = actor->getPlayer())
            {
                if(!house->isInvited(player) && !player->hasCustomFlag(PlayerCustomFlag_CanThrowAnywhere))
                    return RET_PLAYERISNOTINVITED;
            }
        }
    }

    return Tile::__queryAdd(index, thing, count, flags, actor);
}

ReturnValue HouseTile::__queryRemove(const Thing* thing, uint32_t count, uint32_t flags, Creature* actor/* = NULL*/) const
{
    if(thing->getItem() && actor && g_config.getBool(ConfigManager::HOUSE_PROTECTION))
    {
        if(const Player* player = actor->getPlayer())
        {
            if(!house->isInvited(player) && !player->hasCustomFlag(PlayerCustomFlag_CanThrowAnywhere))
                return RET_PLAYERISNOTINVITED;
        }
    }

    return Tile::__queryRemove(thing, count, flags, actor);
}

Cylinder* HouseTile::__queryDestination(int32_t& index, const Thing* thing, Item** destItem, uint32_t& flags)
{
    if(const Creature* creature = thing->getCreature())
    {
        if(const Player* player = creature->getPlayer())
        {
            if(!house->isInvited(player) && !player->hasCustomFlag(PlayerCustomFlag_CanMoveAnywhere))
            {
                Tile* destTile = g_game.getTile(house->getEntry());
                if(!destTile)
                {
                    std::clog << "[Error - HouseTile::__queryDestination] Tile at house entry position for house: "
                        << house->getName() << " (" << house->getId() << ") does not exist." << std::endl;
                    destTile = g_game.getTile(player->getMasterPosition());
                    if(!destTile)
                        destTile = &(Tile::nullTile);
                }

                index = -1;
                *destItem = NULL;
                return destTile;
            }
        }
    }

    return Tile::__queryDestination(index, thing, destItem, flags);
}
 
i dont have this problem with OTX 290SE 10.35

house cache.. i think you can find it in your database "house_data" "houses" tile_store" "tiles"
 
i dont have this problem with OTX 290SE 10.35

house cache.. i think you can find it in your database "house_data" "houses" tile_store" "tiles"
and u got this problem
> WARNING: MYSQL Lost connection, attempting to reconnect...>> Running Database
Manager ?????

i delete all house cache tiles tile_store tile_items houses house_data and still have this fucking problem :( using 870 otx se
it is something with loading unomveable items in house where the hell in source i can find that what is function to do this

i need help with this
"
delete house cache is possible this are the error u need confirm it:
for example if you make one house and to next edit u add one table u need delete cache it is include on CipBia if one town are edited all housed from this town are deleted.
"

but i dont think its is solution of this problem
 
Last edited by a moderator:
This error no reproduce.
Check your map with mapEditor and set on correct for this house or all house similar to.

Is possible need delete houseCache: http://otland.net/threads/doors-reset-after-server-restart.210306/page-2#post-2024862
but when i open door in otx and save server then i open same db in tfs 4.0 i see opened door
and if i open again in otx i see closed door
it looks like otx don't load someting
all gouses are corrects
i deleted all caches and problem is still
 
Last edited:
no use tfs 04
i jsut check where is problem and test in 0.4 and in otx in otx i have this bug idk how its possible?

ahh in tfs config i have

houseDataStorage = "relational"
and saveGlobalStorage = false
but idk its important

in otx i cannot use ralational
 
I still dont understand what is your problem..
Isn't there a default state that things go when the server starts?
Just dont put objects on the door tile, done.
I just dont get what the problem is.
 
results??
100% tested i tested it in my server with other db and map
but after this i decide to download clan data with forgotten map and otx 2.9 and 2.9 se 64bit and there is problem in source 100% because problem is in normal otx data with normal config map etc

ITS SOURCE PROBLEM WITH LOADING UNMOVEABLE ITEMS

// dude btw can u make unmoveable item in your house and after restart in your server u will have it i guess in 871 otx 2.9 or 2.9 se it gone

Help someone please!!! ;d
 
bump
maybe problem is here?
Code:
void HouseTile::updateHouse(Item* item)
{
    if(item->getTile() != this)
        return;

    if(Door* door = item->getDoor())
    {
        if(door->getDoorId() != 0)
            house->addDoor(door);
    }
    else if(BedItem* bed = item->getBed())
        house->addBed(bed);
}
 
Back
Top