From c80afa60058a741ab5e02c91bc98cd1da9e45615 Mon Sep 17 00:00:00 2001 From: wish Date: Sat, 29 Jul 2023 17:15:53 +1000 Subject: [PATCH] add customisable Raviente max players --- config.json | 5 +++ config/config.go | 51 ++++++++++++++------------ server/channelserver/handlers_quest.go | 15 +++++++- 3 files changed, 47 insertions(+), 24 deletions(-) diff --git a/config.json b/config.json index 83d1ee480..6d519c763 100644 --- a/config.json +++ b/config.json @@ -47,6 +47,11 @@ "DailyQuestAllowance": 1, "MezfesSoloTickets": 10, "MezfesGroupTickets": 4, + "RegularRavienteMaxPlayers": 8, + "ViolentRavienteMaxPlayers": 8, + "BerserkRavienteMaxPlayers": 32, + "ExtremeRavienteMaxPlayers": 32, + "SmallBerserkRavienteMaxPlayers": 8, "GUrgentRate": 10, "GCPMultiplier": 1.00, "GRPMultiplier": 1.00, diff --git a/config/config.go b/config/config.go index b8b52ee06..f084e3e5e 100644 --- a/config/config.go +++ b/config/config.go @@ -121,29 +121,34 @@ type SaveDumpOptions struct { // GameplayOptions has various gameplay modifiers type GameplayOptions struct { - FeaturedWeapons int // Number of Active Feature weapons to generate daily - MaximumNP int // Maximum number of NP held by a player - MaximumRP uint16 // Maximum number of RP held by a player - 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 - BonusQuestAllowance uint32 // Number of Bonus Point Quests to allow daily - DailyQuestAllowance uint32 // Number of Daily Quests to allow daily - MezfesSoloTickets uint32 // Number of solo tickets given weekly - MezfesGroupTickets uint32 // Number of group tickets given weekly - GUrgentRate uint16 // Adjusts the rate of G Urgent quests spawning - GCPMultiplier float32 // Adjusts the multiplier of GCP rewarded for quest completion - GRPMultiplier float32 // Adjusts the multiplier of G Rank Points rewarded for quest completion - GSRPMultiplier float32 // Adjusts the multiplier of G Skill Rank Points rewarded for quest completion - GZennyMultiplier float32 // Adjusts the multiplier of G Zenny rewarded for quest completion - MaterialMultiplier float32 // Adjusts the multiplier of Monster Materials rewarded for quest completion - ExtraCarves uint16 // Grant n extra chances to carve ALL carcasses - DisableHunterNavi bool // Disables the Hunter Navi - EnableHiganjimaEvent bool // Enables the Higanjima event in the Rasta Bar - EnableNierEvent bool // Enables the Nier event in the Rasta Bar - DisableRoad bool // Disables the Hunting Road - SeasonOverride bool // Overrides the Quest Season with the current Mezeporta Season + FeaturedWeapons int // Number of Active Feature weapons to generate daily + MaximumNP int // Maximum number of NP held by a player + MaximumRP uint16 // Maximum number of RP held by a player + 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 + BonusQuestAllowance uint32 // Number of Bonus Point Quests to allow daily + DailyQuestAllowance uint32 // Number of Daily Quests to allow daily + MezfesSoloTickets uint32 // Number of solo tickets given weekly + MezfesGroupTickets uint32 // Number of group tickets given weekly + RegularRavienteMaxPlayers uint8 + ViolentRavienteMaxPlayers uint8 + BerserkRavienteMaxPlayers uint8 + ExtremeRavienteMaxPlayers uint8 + SmallBerserkRavienteMaxPlayers uint8 + GUrgentRate uint16 // Adjusts the rate of G Urgent quests spawning + GCPMultiplier float32 // Adjusts the multiplier of GCP rewarded for quest completion + GRPMultiplier float32 // Adjusts the multiplier of G Rank Points rewarded for quest completion + GSRPMultiplier float32 // Adjusts the multiplier of G Skill Rank Points rewarded for quest completion + GZennyMultiplier float32 // Adjusts the multiplier of G Zenny rewarded for quest completion + MaterialMultiplier float32 // Adjusts the multiplier of Monster Materials rewarded for quest completion + ExtraCarves uint16 // Grant n extra chances to carve ALL carcasses + DisableHunterNavi bool // Disables the Hunter Navi + EnableHiganjimaEvent bool // Enables the Higanjima event in the Rasta Bar + EnableNierEvent bool // Enables the Nier event in the Rasta Bar + DisableRoad bool // Disables the Hunting Road + SeasonOverride bool // Overrides the Quest Season with the current Mezeporta Season } // Discord holds the discord integration config. diff --git a/server/channelserver/handlers_quest.go b/server/channelserver/handlers_quest.go index 754a4ce28..64041d8a5 100644 --- a/server/channelserver/handlers_quest.go +++ b/server/channelserver/handlers_quest.go @@ -156,7 +156,20 @@ func makeEventQuest(s *Session, rows *sql.Rows) ([]byte, error) { bf.WriteUint32(id) bf.WriteUint32(0) bf.WriteUint8(0) // Indexer - bf.WriteUint8(maxPlayers) + switch questType { + case 16: + bf.WriteUint8(s.server.erupeConfig.GameplayOptions.RegularRavienteMaxPlayers) + case 22: + bf.WriteUint8(s.server.erupeConfig.GameplayOptions.ViolentRavienteMaxPlayers) + case 40: + bf.WriteUint8(s.server.erupeConfig.GameplayOptions.BerserkRavienteMaxPlayers) + case 50: + bf.WriteUint8(s.server.erupeConfig.GameplayOptions.ExtremeRavienteMaxPlayers) + case 51: + bf.WriteUint8(s.server.erupeConfig.GameplayOptions.SmallBerserkRavienteMaxPlayers) + default: + bf.WriteUint8(maxPlayers) + } bf.WriteUint8(questType) bf.WriteUint8(0) bf.WriteUint16(0)