diff --git a/config.example.json b/config.example.json index f2e429900..d0da91dc9 100644 --- a/config.example.json +++ b/config.example.json @@ -38,7 +38,7 @@ "DisableLoginBoost": false, "DisableBoostTime": false, "BoostTimeDuration": 120, - "GuildMealDuration": 60, + "ClanMealDuration": 3600, "BonusQuestAllowance": 3, "DailyQuestAllowance": 1 }, diff --git a/config/config.go b/config/config.go index 8f0e15916..49ef92431 100644 --- a/config/config.go +++ b/config/config.go @@ -69,7 +69,7 @@ type GameplayOptions struct { DisableLoginBoost bool // Disables the Login Boost system DisableBoostTime bool // Disables the daily NetCafe Boost Time BoostTimeDuration int // The number of minutes NetCafe Boost Time lasts for - GuildMealDuration int // The number of minutes a Guild Meal can be activated for after cooking + ClanMealDuration int // Seconds that a Clan Meal can be activated for after cooking BonusQuestAllowance uint32 // Number of Bonus Point Quests to allow daily DailyQuestAllowance uint32 // Number of Daily Quests to allow daily } diff --git a/config/config_test.go b/config/config_test.go index c7a70bfaf..1bce54ee2 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -501,7 +501,7 @@ func TestConfigCompleteStructure(t *testing.T) { MaximumRP: 65535, DisableLoginBoost: false, BoostTimeDuration: 60, - GuildMealDuration: 30, + ClanMealDuration: 1800, BonusQuestAllowance: 10, DailyQuestAllowance: 5, }, diff --git a/docs/configuration.md b/docs/configuration.md index b116ad2b1..0c5ebb404 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -105,7 +105,7 @@ This guide explains the important configuration sections in `config.json`. Use [ "DisableLoginBoost": false, "DisableBoostTime": false, "BoostTimeDuration": 120, - "GuildMealDuration": 60, + "ClanMealDuration": 3600, "BonusQuestAllowance": 3, "DailyQuestAllowance": 1 } @@ -120,7 +120,7 @@ This guide explains the important configuration sections in `config.json`. Use [ | `DisableLoginBoost` | boolean | Disable login boost system | | `DisableBoostTime` | boolean | Disable daily NetCafe boost time | | `BoostTimeDuration` | number | NetCafe boost time duration in minutes (default: 120) | -| `GuildMealDuration` | number | Guild meal activation duration in minutes (default: 60) | +| `ClanMealDuration` | number | Clan meal activation duration in seconds (default: 3600) | | `BonusQuestAllowance` | number | Daily Bonus Point Quest allowance | | `DailyQuestAllowance` | number | Daily Quest allowance | diff --git a/docs/gameplay-options.md b/docs/gameplay-options.md index c7bd2951c..e1bec3664 100644 --- a/docs/gameplay-options.md +++ b/docs/gameplay-options.md @@ -13,7 +13,7 @@ Gameplay modifiers and balance settings for Erupe. "DisableLoginBoost": false, "DisableBoostTime": false, "BoostTimeDuration": 120, - "GuildMealDuration": 60, + "ClanMealDuration": 3600, "BonusQuestAllowance": 3, "DailyQuestAllowance": 1 } @@ -30,7 +30,7 @@ Gameplay modifiers and balance settings for Erupe. | `DisableLoginBoost` | boolean | `false` | Disable login boost system entirely | | `DisableBoostTime` | boolean | `false` | Disable daily NetCafe boost time | | `BoostTimeDuration` | number | `120` | NetCafe boost time duration in minutes | -| `GuildMealDuration` | number | `60` | Guild meal activation duration in minutes | +| `ClanMealDuration` | number | `3600` | Clan meal activation duration in seconds | | `BonusQuestAllowance` | number | `3` | Daily Bonus Point Quest allowance | | `DailyQuestAllowance` | number | `1` | Daily Quest allowance | @@ -80,17 +80,17 @@ Daily time-limited boost that simulates NetCafe benefits: - `DisableBoostTime: false` - Boost time is active - `BoostTimeDuration: 120` - Lasts 120 minutes (2 hours) -### Guild Meals +### Clan Meals -Guild meals are buffs that guild members can activate: +Clan meals are buffs that clan members can activate and share: ```json { - "GuildMealDuration": 60 + "ClanMealDuration": 3600 } ``` -Duration in minutes after cooking before the meal expires. +Duration in seconds after cooking before the meal expires (3600 = 1 hour). ### Quest Allowances @@ -114,7 +114,7 @@ Set to `0` to disable limits entirely. "DisableLoginBoost": false, "DisableBoostTime": false, "BoostTimeDuration": 240, - "GuildMealDuration": 120, + "ClanMealDuration": 7200, "BonusQuestAllowance": 10, "DailyQuestAllowance": 5 } @@ -132,7 +132,7 @@ Set to `0` to disable limits entirely. "DisableLoginBoost": false, "DisableBoostTime": false, "BoostTimeDuration": 120, - "GuildMealDuration": 60, + "ClanMealDuration": 3600, "BonusQuestAllowance": 3, "DailyQuestAllowance": 1 } diff --git a/server/channelserver/handlers_guild.go b/server/channelserver/handlers_guild.go index a804932d0..7076fd866 100644 --- a/server/channelserver/handlers_guild.go +++ b/server/channelserver/handlers_guild.go @@ -1769,18 +1769,18 @@ 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().Add(time.Duration(s.server.erupeConfig.GameplayOptions.GuildMealDuration-60) * time.Minute) + startTime := TimeAdjusted().Add(time.Duration(s.server.erupeConfig.GameplayOptions.ClanMealDuration-3600) * time.Second) 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) + s.server.db.Exec("UPDATE guild_meals SET meal_id = $1, level = $2, created_at = $3 WHERE id = $4", pkt.MealID, pkt.Success, startTime, pkt.OverwriteID) } else { - s.server.db.QueryRow("INSERT INTO guild_meals (guild_id, meal_id, level, created_at) VALUES ($1, $2, $3, $4) RETURNING id", guild.ID, pkt.MealID, pkt.Success, currentTime).Scan(&pkt.OverwriteID) + s.server.db.QueryRow("INSERT INTO guild_meals (guild_id, meal_id, level, created_at) VALUES ($1, $2, $3, $4) RETURNING id", guild.ID, pkt.MealID, pkt.Success, startTime).Scan(&pkt.OverwriteID) } bf := byteframe.NewByteFrame() bf.WriteUint16(1) bf.WriteUint32(pkt.OverwriteID) bf.WriteUint32(uint32(pkt.MealID)) bf.WriteUint32(uint32(pkt.Success)) - bf.WriteUint32(uint32(currentTime.Unix())) + bf.WriteUint32(uint32(startTime.Unix())) doAckBufSucceed(s, pkt.AckHandle, bf.Data()) }