project-topaz / topaz

Server emulator for FFXI
Other
161 stars 223 forks source link

Login campaign logic #1517

Closed kaincenteno closed 4 years ago

kaincenteno commented 4 years ago

I affirm:

Welcome to Login Points =)

I am really bad at English so I will try to explain everything as best as I can =)

settings.lua: 4 globals added that are needed for selecting the correct table of prices and the start and duration of the campaign. This is also so other servers can choose which login campaign they want to use (if they want to modify it) or disable it.

logincampaign.lua: tpz.logincampaign.table is to contain all tables for the logincampaign, I filled it with the campaign for NOVEMBER 2019 as I started using that one as an example.

tpz.logincampaign.points: is in charge of checking if point was given in a day, otherwise it gives the correct quantity, along with correct message.

tpz.logincampaign.check: Is to be used inside the Greeter_Moogle.lua when starting chat. This takes care of showing the correct list of items as needed along with their prices, this is needed as some campaigns dont carry as many items.

tpz.logincampaign.eventupdate: handles all eventupdates for Greeter_Moogle.lua. This shows the correct table of items that were selected from the list shown on tpz.logincampaign.check. It also takes charge of deleting the currency when an item is selected.

TODO:

Can this have its own feature branch as the TODO list still needs to be done.

Thank you :cat: I'm looking forward on this as it will help with retail accuracy on how Trusts and Mounts are attained.

PS: I would love to get feedback on if login campaign should be enabled by default on the latest campaign table available, or disabled on default.

zach2good commented 4 years ago

Targetted to feature/login-campaign