mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-26 01:23:13 +01:00
fix(guild): rename GuildMealDuration to ClanMealDuration to match upstream 9.3
- Renamed config key from GuildMealDuration to ClanMealDuration - Changed unit from minutes to seconds (matching upstream convention) - Updated handler to use seconds-based calculation - Updated documentation and examples This fixes the bug where clan meals were not being shared between guild members when using a config.json with the upstream naming.
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
"DisableLoginBoost": false,
|
"DisableLoginBoost": false,
|
||||||
"DisableBoostTime": false,
|
"DisableBoostTime": false,
|
||||||
"BoostTimeDuration": 120,
|
"BoostTimeDuration": 120,
|
||||||
"GuildMealDuration": 60,
|
"ClanMealDuration": 3600,
|
||||||
"BonusQuestAllowance": 3,
|
"BonusQuestAllowance": 3,
|
||||||
"DailyQuestAllowance": 1
|
"DailyQuestAllowance": 1
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ type GameplayOptions struct {
|
|||||||
DisableLoginBoost bool // Disables the Login Boost system
|
DisableLoginBoost bool // Disables the Login Boost system
|
||||||
DisableBoostTime bool // Disables the daily NetCafe Boost Time
|
DisableBoostTime bool // Disables the daily NetCafe Boost Time
|
||||||
BoostTimeDuration int // The number of minutes NetCafe Boost Time lasts for
|
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
|
BonusQuestAllowance uint32 // Number of Bonus Point Quests to allow daily
|
||||||
DailyQuestAllowance uint32 // Number of Daily Quests to allow daily
|
DailyQuestAllowance uint32 // Number of Daily Quests to allow daily
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -501,7 +501,7 @@ func TestConfigCompleteStructure(t *testing.T) {
|
|||||||
MaximumRP: 65535,
|
MaximumRP: 65535,
|
||||||
DisableLoginBoost: false,
|
DisableLoginBoost: false,
|
||||||
BoostTimeDuration: 60,
|
BoostTimeDuration: 60,
|
||||||
GuildMealDuration: 30,
|
ClanMealDuration: 1800,
|
||||||
BonusQuestAllowance: 10,
|
BonusQuestAllowance: 10,
|
||||||
DailyQuestAllowance: 5,
|
DailyQuestAllowance: 5,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ This guide explains the important configuration sections in `config.json`. Use [
|
|||||||
"DisableLoginBoost": false,
|
"DisableLoginBoost": false,
|
||||||
"DisableBoostTime": false,
|
"DisableBoostTime": false,
|
||||||
"BoostTimeDuration": 120,
|
"BoostTimeDuration": 120,
|
||||||
"GuildMealDuration": 60,
|
"ClanMealDuration": 3600,
|
||||||
"BonusQuestAllowance": 3,
|
"BonusQuestAllowance": 3,
|
||||||
"DailyQuestAllowance": 1
|
"DailyQuestAllowance": 1
|
||||||
}
|
}
|
||||||
@@ -120,7 +120,7 @@ This guide explains the important configuration sections in `config.json`. Use [
|
|||||||
| `DisableLoginBoost` | boolean | Disable login boost system |
|
| `DisableLoginBoost` | boolean | Disable login boost system |
|
||||||
| `DisableBoostTime` | boolean | Disable daily NetCafe boost time |
|
| `DisableBoostTime` | boolean | Disable daily NetCafe boost time |
|
||||||
| `BoostTimeDuration` | number | NetCafe boost time duration in minutes (default: 120) |
|
| `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 |
|
| `BonusQuestAllowance` | number | Daily Bonus Point Quest allowance |
|
||||||
| `DailyQuestAllowance` | number | Daily Quest allowance |
|
| `DailyQuestAllowance` | number | Daily Quest allowance |
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Gameplay modifiers and balance settings for Erupe.
|
|||||||
"DisableLoginBoost": false,
|
"DisableLoginBoost": false,
|
||||||
"DisableBoostTime": false,
|
"DisableBoostTime": false,
|
||||||
"BoostTimeDuration": 120,
|
"BoostTimeDuration": 120,
|
||||||
"GuildMealDuration": 60,
|
"ClanMealDuration": 3600,
|
||||||
"BonusQuestAllowance": 3,
|
"BonusQuestAllowance": 3,
|
||||||
"DailyQuestAllowance": 1
|
"DailyQuestAllowance": 1
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,7 @@ Gameplay modifiers and balance settings for Erupe.
|
|||||||
| `DisableLoginBoost` | boolean | `false` | Disable login boost system entirely |
|
| `DisableLoginBoost` | boolean | `false` | Disable login boost system entirely |
|
||||||
| `DisableBoostTime` | boolean | `false` | Disable daily NetCafe boost time |
|
| `DisableBoostTime` | boolean | `false` | Disable daily NetCafe boost time |
|
||||||
| `BoostTimeDuration` | number | `120` | NetCafe boost time duration in minutes |
|
| `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 |
|
| `BonusQuestAllowance` | number | `3` | Daily Bonus Point Quest allowance |
|
||||||
| `DailyQuestAllowance` | number | `1` | Daily 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
|
- `DisableBoostTime: false` - Boost time is active
|
||||||
- `BoostTimeDuration: 120` - Lasts 120 minutes (2 hours)
|
- `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
|
```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
|
### Quest Allowances
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ Set to `0` to disable limits entirely.
|
|||||||
"DisableLoginBoost": false,
|
"DisableLoginBoost": false,
|
||||||
"DisableBoostTime": false,
|
"DisableBoostTime": false,
|
||||||
"BoostTimeDuration": 240,
|
"BoostTimeDuration": 240,
|
||||||
"GuildMealDuration": 120,
|
"ClanMealDuration": 7200,
|
||||||
"BonusQuestAllowance": 10,
|
"BonusQuestAllowance": 10,
|
||||||
"DailyQuestAllowance": 5
|
"DailyQuestAllowance": 5
|
||||||
}
|
}
|
||||||
@@ -132,7 +132,7 @@ Set to `0` to disable limits entirely.
|
|||||||
"DisableLoginBoost": false,
|
"DisableLoginBoost": false,
|
||||||
"DisableBoostTime": false,
|
"DisableBoostTime": false,
|
||||||
"BoostTimeDuration": 120,
|
"BoostTimeDuration": 120,
|
||||||
"GuildMealDuration": 60,
|
"ClanMealDuration": 3600,
|
||||||
"BonusQuestAllowance": 3,
|
"BonusQuestAllowance": 3,
|
||||||
"DailyQuestAllowance": 1
|
"DailyQuestAllowance": 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1769,18 +1769,18 @@ func handleMsgMhfLoadGuildCooking(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
func handleMsgMhfRegistGuildCooking(s *Session, p mhfpacket.MHFPacket) {
|
func handleMsgMhfRegistGuildCooking(s *Session, p mhfpacket.MHFPacket) {
|
||||||
pkt := p.(*mhfpacket.MsgMhfRegistGuildCooking)
|
pkt := p.(*mhfpacket.MsgMhfRegistGuildCooking)
|
||||||
guild, _ := GetGuildInfoByCharacterId(s, s.charID)
|
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 {
|
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 {
|
} 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 := byteframe.NewByteFrame()
|
||||||
bf.WriteUint16(1)
|
bf.WriteUint16(1)
|
||||||
bf.WriteUint32(pkt.OverwriteID)
|
bf.WriteUint32(pkt.OverwriteID)
|
||||||
bf.WriteUint32(uint32(pkt.MealID))
|
bf.WriteUint32(uint32(pkt.MealID))
|
||||||
bf.WriteUint32(uint32(pkt.Success))
|
bf.WriteUint32(uint32(pkt.Success))
|
||||||
bf.WriteUint32(uint32(currentTime.Unix()))
|
bf.WriteUint32(uint32(startTime.Unix()))
|
||||||
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user