mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 16:04:38 +01:00
add customisable tune values
This commit is contained in:
@@ -42,7 +42,9 @@
|
|||||||
"BonusQuestAllowance": 3,
|
"BonusQuestAllowance": 3,
|
||||||
"DailyQuestAllowance": 1,
|
"DailyQuestAllowance": 1,
|
||||||
"MezfesSoloTickets": 10,
|
"MezfesSoloTickets": 10,
|
||||||
"MezfesGroupTickets": 4
|
"MezfesGroupTickets": 4,
|
||||||
|
"GUrgentRate": 10,
|
||||||
|
"EnableHiganjimaEvent": false
|
||||||
},
|
},
|
||||||
"Discord": {
|
"Discord": {
|
||||||
"Enabled": false,
|
"Enabled": false,
|
||||||
|
|||||||
@@ -61,17 +61,19 @@ type SaveDumpOptions struct {
|
|||||||
|
|
||||||
// GameplayOptions has various gameplay modifiers
|
// GameplayOptions has various gameplay modifiers
|
||||||
type GameplayOptions struct {
|
type GameplayOptions struct {
|
||||||
FeaturedWeapons int // Number of Active Feature weapons to generate daily
|
FeaturedWeapons int // Number of Active Feature weapons to generate daily
|
||||||
MaximumNP int // Maximum number of NP held by a player
|
MaximumNP int // Maximum number of NP held by a player
|
||||||
MaximumRP uint16 // Maximum number of RP held by a player
|
MaximumRP uint16 // Maximum number of RP held by a player
|
||||||
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 // The number of minutes NetCafe Boost Time lasts for
|
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
|
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
|
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
|
||||||
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
|
||||||
|
EnableHiganjimaEvent bool // Enables the Higanjima event
|
||||||
}
|
}
|
||||||
|
|
||||||
// Discord holds the discord integration config.
|
// Discord holds the discord integration config.
|
||||||
|
|||||||
@@ -107,15 +107,17 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
if err != nil || totalCount == 0 {
|
if err != nil {
|
||||||
doAckBufSucceed(s, pkt.AckHandle, make([]byte, 18))
|
doAckBufSucceed(s, pkt.AckHandle, make([]byte, 18))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
tuneValues := []struct {
|
type tuneValue struct {
|
||||||
ID uint16
|
ID uint16
|
||||||
Value uint16
|
Value uint16
|
||||||
}{
|
}
|
||||||
|
|
||||||
|
tuneValues := []tuneValue{
|
||||||
{ID: 20, Value: 1},
|
{ID: 20, Value: 1},
|
||||||
{ID: 26, Value: 1},
|
{ID: 26, Value: 1},
|
||||||
{ID: 27, Value: 1},
|
{ID: 27, Value: 1},
|
||||||
@@ -141,7 +143,6 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
{ID: 1026, Value: 999},
|
{ID: 1026, Value: 999},
|
||||||
{ID: 1027, Value: 100},
|
{ID: 1027, Value: 100},
|
||||||
{ID: 1028, Value: 100},
|
{ID: 1028, Value: 100},
|
||||||
{ID: 1029, Value: 30},
|
|
||||||
{ID: 1030, Value: 8},
|
{ID: 1030, Value: 8},
|
||||||
{ID: 1031, Value: 100},
|
{ID: 1031, Value: 100},
|
||||||
{ID: 1046, Value: 99},
|
{ID: 1046, Value: 99},
|
||||||
@@ -185,7 +186,6 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
{ID: 1103, Value: 2},
|
{ID: 1103, Value: 2},
|
||||||
{ID: 1104, Value: 10},
|
{ID: 1104, Value: 10},
|
||||||
{ID: 1106, Value: 0},
|
{ID: 1106, Value: 0},
|
||||||
{ID: 1144, Value: 0},
|
|
||||||
{ID: 1145, Value: 200},
|
{ID: 1145, Value: 200},
|
||||||
{ID: 1146, Value: 0},
|
{ID: 1146, Value: 0},
|
||||||
{ID: 1147, Value: 0},
|
{ID: 1147, Value: 0},
|
||||||
@@ -580,6 +580,15 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
{ID: 3583, Value: 0},
|
{ID: 3583, Value: 0},
|
||||||
{ID: 3584, 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())
|
offset := uint16(time.Now().Unix())
|
||||||
bf.WriteUint16(offset)
|
bf.WriteUint16(offset)
|
||||||
bf.WriteUint16(uint16(len(tuneValues)))
|
bf.WriteUint16(uint16(len(tuneValues)))
|
||||||
|
|||||||
Reference in New Issue
Block a user