add customisable tune values

This commit is contained in:
wish
2023-05-14 15:50:11 +10:00
parent 9dd9931176
commit 2a7454d0ad
3 changed files with 10 additions and 3 deletions

View File

@@ -44,7 +44,8 @@
"MezfesSoloTickets": 10, "MezfesSoloTickets": 10,
"MezfesGroupTickets": 4, "MezfesGroupTickets": 4,
"GUrgentRate": 10, "GUrgentRate": 10,
"EnableHiganjimaEvent": false "EnableHiganjimaEvent": false,
"EnableNierEvent": false
}, },
"Discord": { "Discord": {
"Enabled": false, "Enabled": false,

View File

@@ -73,7 +73,8 @@ type GameplayOptions struct {
MezfesSoloTickets uint32 // Number of solo tickets given weekly MezfesSoloTickets uint32 // Number of solo tickets given weekly
MezfesGroupTickets uint32 // Number of group tickets given weekly MezfesGroupTickets uint32 // Number of group tickets given weekly
GUrgentRate uint16 // Adjusts the rate of G Urgent quests spawning GUrgentRate uint16 // Adjusts the rate of G Urgent quests spawning
EnableHiganjimaEvent bool // Enables the Higanjima event EnableHiganjimaEvent bool // Enables the Higanjima event in the Rasta Bar
EnableNierEvent bool // Enables the Nier event in the Rasta Bar
} }
// Discord holds the discord integration config. // Discord holds the discord integration config.

View File

@@ -191,7 +191,6 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
{ID: 1147, Value: 0}, {ID: 1147, Value: 0},
{ID: 1149, Value: 20}, {ID: 1149, Value: 20},
{ID: 1152, Value: 1130}, {ID: 1152, Value: 1130},
{ID: 1153, Value: 0},
{ID: 1154, Value: 0}, {ID: 1154, Value: 0},
{ID: 1155, Value: 0}, {ID: 1155, Value: 0},
{ID: 1158, Value: 1}, {ID: 1158, Value: 1},
@@ -589,6 +588,12 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
tuneValues = append(tuneValues, tuneValue{1144, 0}) tuneValues = append(tuneValues, tuneValue{1144, 0})
} }
if s.server.erupeConfig.GameplayOptions.EnableNierEvent {
tuneValues = append(tuneValues, tuneValue{1153, 1})
} else {
tuneValues = append(tuneValues, tuneValue{1153, 0})
}
offset := uint16(time.Now().Unix()) offset := uint16(time.Now().Unix())
bf.WriteUint16(offset) bf.WriteUint16(offset)
bf.WriteUint16(uint16(len(tuneValues))) bf.WriteUint16(uint16(len(tuneValues)))