mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-21 23:22:34 +01:00
feat(channelserver): implement monthly guild item claim tracking
Players could never claim monthly guild items because the handler always returned 0x01 (claimed). Now tracks per-character per-type (standard/HLC/EXC) claim timestamps in the stamps table, comparing against the current month boundary to determine claim eligibility. Adds MonthStart() to gametime, extends StampRepo with GetMonthlyClaimed/SetMonthlyClaimed, and includes schema migration 31-monthly-items.sql.
This commit is contained in:
@@ -31,6 +31,12 @@ func WeekNext() time.Time {
|
||||
return WeekStart().Add(time.Hour * 24 * 7)
|
||||
}
|
||||
|
||||
// MonthStart returns the first day of the current month at midnight in JST.
|
||||
func MonthStart() time.Time {
|
||||
midnight := Midnight()
|
||||
return time.Date(midnight.Year(), midnight.Month(), 1, 0, 0, 0, 0, midnight.Location())
|
||||
}
|
||||
|
||||
// GameAbsolute returns the current position within the 5760-second (96-minute)
|
||||
// in-game day/night cycle, offset by 2160 seconds.
|
||||
func GameAbsolute() uint32 {
|
||||
|
||||
Reference in New Issue
Block a user