TFS 0.X How to show how many tiles there is in the house on look the door

maikons

Member
Joined
Aug 1, 2015
Messages
199
Best answers
0
Reaction score
13
How to show how many tiles there is in the house on look the door, just like in this img:




The only where i found to change is on:
Fir3element/3777 (https://github.com/Fir3element/3777/blob/master/src/house.cpp)

Code:
void House::updateDoorDescription(std::string _name/* = ""*/)
Some people here on forum like @Mustafa1337 @Danger II @Stigma told me to do it:
Code:
void House::updateDoorDescription(std::string _name/* = ""*/)
{
    int32_t house_tiles = (price / g_config.getNumber(ConfigManager::HOUSE_PRICE));
    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. It has %d tiles.", tmp.c_str(), name.c_str(), _name.c_str(), tmp.c_str(), house_tiles);
    }
    else
        sprintf(houseDescription, "It belongs to %s '%s'. Nobody owns this %s. It costs %d gold coins. It has %d tiles.", tmp.c_str(), name.c_str(), tmp.c_str(), price, house_tiles);

    for(HouseDoorList::iterator it = doorList.begin(); it != doorList.end(); ++it)
        (*it)->setSpecialDescription(houseDescription);
}
But only shows how many tiles there is if someone buy the house

Code:
It belongs to house 'Unnamed House #1'. Nobody owns this house. It costs 3900000 gold coins. ItemID: [1221].
Code:
It belongs to house 'Unnamed House #1. Maikao owns this house. It has 32 tiles. ItemID: [1219].
Is anybody know why?
 
OP
M

maikons

Member
Joined
Aug 1, 2015
Messages
199
Best answers
0
Reaction score
13
and if you !leavehouse it will return back to not showing tiles?
Shows :S

Code:
17:37 You see a closed door.
It belongs to house 'Unnamed House #2'. Maikao owns this house. It has 32 tiles.


17:37 You see a closed door.
It belongs to house 'Unnamed House #2'. Nobody owns this house. It costs 3200000 gold coins. It has 32 tiles.

But all the others don't
Code:
17:39 You see a closed door. It belongs to house 'Unnamed House #1'. Nobody owns this house. It costs 3900000 gold coins.
 
Top