Well my idea is that the clan who wants a CH need another type of currency other than adena to keep, for example I of 30 items (3436) and the CH holds that only 30 days.
For this, eh cast changes are:
ThreadPoolManager.getInstance().scheduleGeneral(new FeeTask(), _paidUntil - _time);
return;
}
L2Clan Clan = ClanTable.getInstance().getClan(getOwnerId());
- if (ClanTable.getInstance().getClan(getOwnerId()).getWarehouse().getAdena() >= getLease())
+ if (ClanTable.getInstance().getClan(getOwnerId()).getWarehouse().getDonacion() >= getLease())
{
if (_paidUntil != 0)
{
while (_paidUntil <= _time)
_paidUntil += _chRate;
}
else
_paidUntil = _time + _chRate;
- ClanTable.getInstance().getClan(getOwnerId()).getWarehouse().destroyItemByItemId("CH_rental_fee", 57, getLease(), null, null);
+ ClanTable.getInstance().getClan(getOwnerId()).getWarehouse().destroyItemByItemId("CH_rental_fee", 3436, getLease(), null, null);
if (Config.DEBUG)
_log.warning("deducted " + getLease() + " adena from " + getName() + " owner's cwh for ClanHall _paidUntil: " + _paidUntil);
ThreadPoolManager.getInstance().scheduleGeneral(new FeeTask(), _paidUntil - _time);
_paid = true;
updateDb();
}
else
{
_paid = false;
if (_time > _paidUntil + _chRate)
{
if (ClanHallManager.getInstance().loaded())
{
AuctionManager.getInstance().initNPC(getId());
ClanHallManager.getInstance().setFree(getId());
Clan.broadcastToOnlineMembers(SystemMessage.getSystemMessage(SystemMessageId.THE_CLAN_HALL_FEE_IS_ONE_WEEK_OVERDUE_THEREFORE_THE_CLAN_HALL_OWNERSHIP_HAS_BEEN_REVOKED));
}
else
ThreadPoolManager.getInstance().scheduleGeneral(new FeeTask(), 3000);
}
else
{
updateDb();
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.PAYMENT_FOR_YOUR_CLAN_HALL_HAS_NOT_BEEN_MADE_PLEASE_MAKE_PAYMENT_TO_YOUR_CLAN_WAREHOUSE_BY_S1_TOMORROW);
sm.addNumber(getLease());
Clan.broadcastToOnlineMembers(sm);
if (_time + (1000 * 60 * 60 * 24) <= _paidUntil + _chRate)
ThreadPoolManager.getInstance().scheduleGeneral(new FeeTask(), _time + (1000 * 60 * 60 * 24));
else
ThreadPoolManager.getInstance().scheduleGeneral(new FeeTask(), (_paidUntil + _chRate) - _time);
}
}
}
GetDonacion add here that would be the verification of my item inside the Wherehouse 3436
################################################################################
/L2J_Server/java/com/l2jserver/gameserver/model/itemcontainer/ItemContainer.java
################################################################################
+ public long getDonacion()
+ {
+ long count = 0;
+
+ for (L2ItemInstance item : _items)
+ {
+ if (item != null && item.getItemId() == 3436)
+ {
+ count = item.getCount();
+ return count;
+ }
+ }
+ }
Obviously also change the table "ClanHall" so that all lines in "Lease" this would have (1) a daily quota q need to keep the CH.
Well after I get these constantly changes the sign of devotion and never pay deducts the item from werehouse 3436.
Disclaimer: I did the item stackeable 3436.
--Any contribution is well recieved and thanks in advance
--Sorry for my English.