Issue information

Issue ID
#8209
Status
Working as Intended
Severity
None
Started
N e s s
May 21, 2014 12:50
Last Post
Haru
Aug 2, 2014 13:05
Confirmation
N/A

N e s s - May 21, 2014 12:50

example:

1. any card (rent item)
2. put card in in armor example tao gunka card (rent item)
3. use card remover
4. then poof expiration day of the card is gone

malufett - May 21, 2014 17:03

hmm..at the first place rent items should not have slot right? cause compounded cards will be lost when expired,...

:meow:

Dastgir - May 21, 2014 17:12

[quote name="malufett" timestamp="1400691831"]
hmm..at the first place rent items should not have slot right? cause compounded cards will be lost when expired,...

:meow:[/quote]

I think, he meant , he rented a Card and compounded and uncompounded before expiration.

N e s s - May 21, 2014 17:16

yes sir malufett that's what i meant :) sorry for not explaining it thoroughly :)

This post has been edited by N e s s on May 21, 2014 17:17

N e s s - May 21, 2014 17:20

another thing sir even if you did not uncompound the card before it expires. the card will also be in permanent status :)

Enhance - Jul 4, 2014 21:07

Cards are not meant to be rental. Putting it into an equipment piece removes the card item itself (along with rental time) and simply sets card id in the equipment item. Decarding equipment creates a new card item (non-rental, obviously). If you want a "rental card" mechanic on your server (retaining the rental data even after being compounded into equipment, and disappearing from an equipment after expiration, you'll need to modify your source for that.

Also, not a script issue.

Ridley - Jul 4, 2014 21:31

You can add a check to the decarder to prevent this. Same goes for the item signer btw

[code=auto:0] if(getequipisidentify(@part)) goto L_CHECK2; L_CHECK2: if (getequipexpiretick(@part)) { mes "Sorry. I don't sign rental items."; emotion e_sry; close; } [/code]

This post has been edited by Ridley on Jul 4, 2014 21:35

Enhance - Jul 4, 2014 23:44

That only checks the equipment itself for being rented; The problem here is that [b]rental cards[/b] inserted into items are no longer "rental" in the meaning of the word.

Ridley - Jul 5, 2014 4:34

Regarding the post of N e s s, the problem is the rental item (card or equip) will become a regular/permanent one if you decard (or sign) it.
The check prohibits to do this so it would solve the problem.

Edit: okay sorry now i see your point for checking the rental status of the card :|

This post has been edited by Ridley on Jul 5, 2014 6:38

Haru - Aug 2, 2014 13:05

Closing this, since it's not really a bug in Hercules, but rather an incomplete implementation of custom code. In Hercules it is not possible to preserve the rental expiration time of cards once they're compounded (such feature doesn't exist in official servers), and it would be extremely wasteful in terms of resources if we were to implement it.

If you want to have such feature, the steps you need to go through are roughly (on top of my mind, I might be forgetting parts here):

- Modify struct item to include four extra expiration fields, one for each card slot.
- Modify the inventory, cart_inventory, storage, guild_storage, mail, auction, picklog tables to add the above four fields.
- Modify all code that creates, saves, loads or otherwise modifies items, to be aware of (and preserve) those fields.
- Modify all code related to rental item expiration, to also consider the newly added fields, if you want expired cards to actually disappear even when they're compounded to an item.