How to make house shows how many tiles have onlook the door like this img?
my house.cpp: Fir3element/3777 (https://github.com/Fir3element/3777/blob/master/src/house.cpp)
I think it's here:
But i have no idea how to make it done, is anyone can help?
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?