add option to alter maximum Clan Members

This commit is contained in:
wish
2023-11-30 23:07:13 +11:00
parent 22a02f9291
commit 4bae0e5758
3 changed files with 28 additions and 25 deletions

View File

@@ -46,7 +46,8 @@
"DisableLoginBoost": false, "DisableLoginBoost": false,
"DisableBoostTime": false, "DisableBoostTime": false,
"BoostTimeDuration": 7200, "BoostTimeDuration": 7200,
"GuildMealDuration": 3600, "ClanMealDuration": 3600,
"ClanMemberLimits": [[0, 30], [3, 40], [7, 50], [10, 60]],
"BonusQuestAllowance": 3, "BonusQuestAllowance": 3,
"DailyQuestAllowance": 1, "DailyQuestAllowance": 1,
"MezfesSoloTickets": 10, "MezfesSoloTickets": 10,

View File

@@ -132,7 +132,8 @@ 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 // Second that the NetCafe Boost Time lasts BoostTimeDuration int // Second that the NetCafe Boost Time lasts
GuildMealDuration int // Second that a Guild Meal can be activated for after cooking ClanMealDuration int // Second that a Clan Meal can be activated for after cooking
ClanMemberLimits [][]uint8 // Array of maximum Clan Members -> [Rank, Members]
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
MezfesSoloTickets uint32 // Number of solo tickets given weekly MezfesSoloTickets uint32 // Number of solo tickets given weekly

View File

@@ -989,15 +989,16 @@ func handleMsgMhfInfoGuild(s *Session, p mhfpacket.MHFPacket) {
} }
bf.WriteUint32(guild.PugiOutfits) bf.WriteUint32(guild.PugiOutfits)
if guild.Rank() >= 3 { limit := s.server.erupeConfig.GameplayOptions.ClanMemberLimits[0][1]
bf.WriteUint8(40) for _, j := range s.server.erupeConfig.GameplayOptions.ClanMemberLimits {
} else if guild.Rank() >= 7 { if guild.Rank() >= uint16(j[0]) {
bf.WriteUint8(50) limit = j[1]
} else if guild.Rank() >= 10 {
bf.WriteUint8(60)
} else {
bf.WriteUint8(30)
} }
}
if limit > 100 {
limit = 100
}
bf.WriteUint8(limit)
bf.WriteUint32(55000) bf.WriteUint32(55000)
bf.WriteUint32(0) bf.WriteUint32(0)
@@ -1831,7 +1832,7 @@ 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)
startTime := TimeAdjusted().Add(time.Duration(s.server.erupeConfig.GameplayOptions.GuildMealDuration-3600) * time.Second) 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, startTime, 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 {