Feature - Implemented VIP room tree

Continued from my not-a-bug-report:
That is correct. If you visit the lounge and there is not a present waiting, it will visit the tree to find out how many days you have to wait.

Mafia is checking the VIP tree to figure out how many days remain before I can get a gift. But, it doesn't output this number to me. And it rechecks this value every time I enter the VIP room (which tends to be multiple times per session).
I can only assume that it is storing this number somewhere (otherwise there'd really be no point in checking) so maybe have it only check once per session or day (upon discovering that there is indeed a tree). Save a few (or a lot) of server hits, and the gCLI from clutter.

And to Bale: Sorry about "annoying." I wasn't aware that was taboo here. Will avoid in the future.
 

heeheehee

Developer
Staff member
I'd also like to suggest storing in a preference the date that the next gift is expected, and check once per session if that date is today or more recent (or if the preference is unset). Presumably the check would be done the first time the player enters the VIP room in a given session if the aforementioned conditions are met, but this solution seems a bit complicated to code. Not only that, but it'd probably require multiple preferences, which seems a bit kludgy. Unless, of course, we have multiple pieces of information stored in the same preference (e.g. expected date + date preference was set)
 
An expected date should be enough, actually. There is no mechanism by which you could get the gift -earlier-, so it wouldn't need to check if the date hasn't come to pass yet. If the date has passed or is unset, then it could check again.
 

heeheehee

Developer
Staff member
But then how do you get it to check once per session? That's the part that I'm somewhat iffy about.
 

Veracity

Developer
Staff member
Use a variable in KoLCharacter. Initialize it to false when you log in a new character. Set it to true when you've successfully examined a Crimbo tree. Don't bother looking at the Crimbo tree again if it is true.
 

HippoKing

Member
I'm not sure it needs to tell you that it's doing it. It seems slightly unnecessary to have it logged, since there is nothing I can really do with that information.
 
Top