add DisableRoad GameplayOption

This commit is contained in:
wish
2023-05-28 07:29:10 +10:00
parent 99919d0243
commit e814bfec68
3 changed files with 9 additions and 2 deletions

View File

@@ -50,7 +50,8 @@
"GZennyMultiplier": 1.00, "GZennyMultiplier": 1.00,
"MaterialMultiplier": 1.00, "MaterialMultiplier": 1.00,
"EnableHiganjimaEvent": false, "EnableHiganjimaEvent": false,
"EnableNierEvent": false "EnableNierEvent": false,
"DisableRoad": false
}, },
"Discord": { "Discord": {
"Enabled": false, "Enabled": false,

View File

@@ -80,6 +80,7 @@ type GameplayOptions struct {
MaterialMultiplier float32 // Adjusts the multiplier of Monster Materials rewarded for quest completion MaterialMultiplier float32 // Adjusts the multiplier of Monster Materials rewarded for quest completion
EnableHiganjimaEvent bool // Enables the Higanjima event in the Rasta Bar EnableHiganjimaEvent bool // Enables the Higanjima event in the Rasta Bar
EnableNierEvent bool // Enables the Nier event in the Rasta Bar EnableNierEvent bool // Enables the Nier event in the Rasta Bar
DisableRoad bool // Disables the Hunting Road
} }
// Discord holds the discord integration config. // Discord holds the discord integration config.

View File

@@ -192,7 +192,6 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
{ID: 1149, Value: 20}, {ID: 1149, Value: 20},
{ID: 1152, Value: 1130}, {ID: 1152, Value: 1130},
{ID: 1154, Value: 0}, {ID: 1154, Value: 0},
{ID: 1155, Value: 0},
{ID: 1158, Value: 1}, {ID: 1158, Value: 1},
{ID: 1160, Value: 300}, {ID: 1160, Value: 300},
{ID: 1162, Value: 1}, {ID: 1162, Value: 1},
@@ -516,6 +515,12 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
tuneValues = append(tuneValues, tuneValue{1153, 0}) tuneValues = append(tuneValues, tuneValue{1153, 0})
} }
if s.server.erupeConfig.GameplayOptions.DisableRoad {
tuneValues = append(tuneValues, tuneValue{1155, 1})
} else {
tuneValues = append(tuneValues, tuneValue{1155, 0})
}
for i := uint16(0); i < 13; i++ { for i := uint16(0); i < 13; i++ {
tuneValues = append(tuneValues, tuneValue{i + 3026, uint16(s.server.erupeConfig.GameplayOptions.GRPMultiplier * 100)}) tuneValues = append(tuneValues, tuneValue{i + 3026, uint16(s.server.erupeConfig.GameplayOptions.GRPMultiplier * 100)})
} }