bool Houses:

ayRent(Player* player, House* house, uint32_t bid, time_t _time/* = 0*/)
{
if(rentPeriod == RENTPERIOD_NEVER || !house->getHouseOwner() ||
house->getPaidUntil() > _time || !house->getRent() ||
player->hasCustomFlag(PlayerCustomFlag_IgnoreHouseRent))
return true;
Town* town = Towns::getInstance().getTown(house->getTownId());
if(!town)
return false;
bool paid = false;
uint32_t amount = house->getRent() + bid;
if(g_config.getBool(ConfigManager::BANK_SYSTEM) && player->balance >= amount)
{
player->balance -= amount;
paid = true;
}
else if(Depot* depot = player->getDepot(town->getTownID(), true))
paid = g_game.removeMoney(depot, amount, FLAG_NOLIMIT);
if(!paid)
return false;