Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void House::updateDoorDescription(std::string _name/* = ""*/, Door* door/* = NULL*/)
- {
- int32_t house_tiles = (price / g_config.getNumber(ConfigManager::HOUSE_PRICE));
- std::string tmp = "house";
- if(isGuild())
- tmp = "hall";
- char houseDescription[250];
- 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);
- if(!door)
- {
- for(HouseDoorList::iterator it = doorList.begin(); it != doorList.end(); ++it)
- (*it)->setSpecialDescription(houseDescription);
- }
- else
- door->setSpecialDescription(houseDescription);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement