add customisable tune values

This commit is contained in:
wish
2023-05-14 15:34:33 +10:00
parent 9aae992f64
commit 9dd9931176
3 changed files with 30 additions and 17 deletions

View File

@@ -42,7 +42,9 @@
"BonusQuestAllowance": 3,
"DailyQuestAllowance": 1,
"MezfesSoloTickets": 10,
"MezfesGroupTickets": 4
"MezfesGroupTickets": 4,
"GUrgentRate": 10,
"EnableHiganjimaEvent": false
},
"Discord": {
"Enabled": false,

View File

@@ -61,17 +61,19 @@ 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
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
EnableHiganjimaEvent bool // Enables the Higanjima event
}
// Discord holds the discord integration config.

View File

@@ -107,15 +107,17 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
}
return nil
})
if err != nil || totalCount == 0 {
if err != nil {
doAckBufSucceed(s, pkt.AckHandle, make([]byte, 18))
return
}
tuneValues := []struct {
type tuneValue struct {
ID uint16
Value uint16
}{
}
tuneValues := []tuneValue{
{ID: 20, Value: 1},
{ID: 26, Value: 1},
{ID: 27, Value: 1},
@@ -141,7 +143,6 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
{ID: 1026, Value: 999},
{ID: 1027, Value: 100},
{ID: 1028, Value: 100},
{ID: 1029, Value: 30},
{ID: 1030, Value: 8},
{ID: 1031, Value: 100},
{ID: 1046, Value: 99},
@@ -185,7 +186,6 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
{ID: 1103, Value: 2},
{ID: 1104, Value: 10},
{ID: 1106, Value: 0},
{ID: 1144, Value: 0},
{ID: 1145, Value: 200},
{ID: 1146, Value: 0},
{ID: 1147, Value: 0},
@@ -580,6 +580,15 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
{ID: 3583, Value: 0},
{ID: 3584, Value: 0},
}
tuneValues = append(tuneValues, tuneValue{1029, s.server.erupeConfig.GameplayOptions.GUrgentRate})
if s.server.erupeConfig.GameplayOptions.EnableHiganjimaEvent {
tuneValues = append(tuneValues, tuneValue{1144, 1})
} else {
tuneValues = append(tuneValues, tuneValue{1144, 0})
}
offset := uint16(time.Now().Unix())
bf.WriteUint16(offset)
bf.WriteUint16(uint16(len(tuneValues)))