How to show how many tiles there is in the house on look the door, just like in this img:
With some help from people from this forum i changed:
From:
Fir3element/3777 (https://github.com/Fir3element/3777/blob/master/src/house.cpp)
To:
But it's not working 100%
its only working with houses who had iteract with players
if some player had !buyhouse, !leavehouse, !sellhouse, it is showing right:
But houses who players never had buy or sell, never interact, it's not showing how many tiles the house have (if a player buy the house it starts to shows)
how to fix it?
With some help from people from this forum i changed:
Code:
void House::updateDoorDescription(std::string _name/* = ""*/)
From:
Fir3element/3777 (https://github.com/Fir3element/3777/blob/master/src/house.cpp)
To:
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 it's not working 100%
its only working with houses who had iteract with players
if some player had !buyhouse, !leavehouse, !sellhouse, it is showing right:
Code:
It belongs to house 'Unnamed House #1'. Maikao owns this house. It has 39 tiles.
Code:
It belongs to house 'Unnamed House #1'. Nobody owns this house. It costs 3900000 gold coins. It has 39 tiles.
But houses who players never had buy or sell, never interact, it's not showing how many tiles the house have (if a player buy the house it starts to shows)
Code:
It belongs to house 'Unnamed House #3'. Nobody owns this house. It costs 2500000 gold coins.
how to fix it?