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

[HELP] Houses

perdigs

New Member
Joined
Aug 22, 2010
Messages
114
Reaction score
1
Im try change in house.cpp the value that is shown when we look in the dorr


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 platinum coins.", tmp.c_str(), name.c_str(), tmp.c_str(), price);

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

in this line

Code:
sprintf(houseDescription, "It belongs to %s '%s'. %s owns this %s.", tmp.c_str(), name.c_str(), _name.c_str(), tmp.c_str());
	}
	else

I can not make the value of %d is divided by 100
how could I do that?

Plz help me
 
Code:
sprintf(houseDescription, "It belongs to %s '%s'. Nobody owns this %s. It costs %d platinum coins.", tmp.c_str(), name.c_str(), tmp.c_str(), (int) price / 100);
 

Similar threads

Back
Top