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

TFS 0.X Shows how many tiles have in the house

maikons

Member
Joined
Aug 1, 2015
Messages
227
Reaction score
16
How to make house shows how many tiles have onlook the door like this img?

dEl0Soz.png


my house.cpp: Fir3element/3777 (https://github.com/Fir3element/3777/blob/master/src/house.cpp)

I think it's here:
Code:
void House::updateDoorDescription(std::string _name/* = ""*/)
{
    std::string tmp = "house";
    if(isGuild())
        tmp = "hall";

    char houseDescription[200];
    if(owner)
    {
        if(isGuild())
            IOGuild::getInstance()->getGuildById(_name, owner);
        else if(_name.empty())
            IOLoginData::getInstance()->getNameByGuid(owner, _name);

        sprintf(houseDescription, "It belongs to %s '%s'. %s owns this %s.", tmp.c_str(), name.c_str(), _name.c_str(), tmp.c_str());
    }
    else
        sprintf(houseDescription, "It belongs to %s '%s'. Nobody owns this %s. It costs %d gold coins.", tmp.c_str(), name.c_str(), tmp.c_str(), price);

    for(HouseDoorList::iterator it = doorList.begin(); it != doorList.end(); ++it)
        (*it)->setSpecialDescription(houseDescription);
}

But i have no idea how to make it done, is anyone can help?
 
How to make house shows how many tiles have onlook the door like this img?

dEl0Soz.png


my house.cpp: Fir3element/3777 (https://github.com/Fir3element/3777/blob/master/src/house.cpp)

I think it's here:
Code:
void House::updateDoorDescription(std::string _name/* = ""*/)
{
    std::string tmp = "house";
    if(isGuild())
        tmp = "hall";

    char houseDescription[200];
    if(owner)
    {
        if(isGuild())
            IOGuild::getInstance()->getGuildById(_name, owner);
        else if(_name.empty())
            IOLoginData::getInstance()->getNameByGuid(owner, _name);

        sprintf(houseDescription, "It belongs to %s '%s'. %s owns this %s.", tmp.c_str(), name.c_str(), _name.c_str(), tmp.c_str());
    }
    else
        sprintf(houseDescription, "It belongs to %s '%s'. Nobody owns this %s. It costs %d gold coins.", tmp.c_str(), name.c_str(), tmp.c_str(), price);

    for(HouseDoorList::iterator it = doorList.begin(); it != doorList.end(); ++it)
        (*it)->setSpecialDescription(houseDescription);
}

But i have no idea how to make it done, is anyone can help?
It was easy I just used ctrl + f and typed in size
 
Back
Top