add some gameplay options

This commit is contained in:
wish
2023-03-09 18:51:36 +11:00
parent ee4d2ab705
commit 1f349a342e
4 changed files with 22 additions and 11 deletions

View File

@@ -130,7 +130,7 @@ func handleMsgMhfGetKeepLoginBoostStatus(s *Session, p mhfpacket.MHFPacket) {
var loginBoosts []loginBoost
rows, err := s.server.db.Queryx("SELECT week_req, expiration, reset FROM login_boost WHERE char_id=$1 ORDER BY week_req", s.charID)
if err != nil {
if err != nil || s.server.erupeConfig.GameplayOptions.DisableLoginBoost {
doAckBufSucceed(s, pkt.AckHandle, make([]byte, 35))
return
}

View File

@@ -1772,7 +1772,7 @@ func handleMsgMhfLoadGuildCooking(s *Session, p mhfpacket.MHFPacket) {
func handleMsgMhfRegistGuildCooking(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfRegistGuildCooking)
guild, _ := GetGuildInfoByCharacterId(s, s.charID)
currentTime := TimeAdjusted()
currentTime := TimeAdjusted().Add(time.Duration(s.server.erupeConfig.GameplayOptions.GuildMealDuration-60) * time.Minute)
if pkt.OverwriteID != 0 {
s.server.db.Exec("UPDATE guild_meals SET meal_id = $1, level = $2, created_at = $3 WHERE id = $4", pkt.MealID, pkt.Success, currentTime, pkt.OverwriteID)
} else {