pet_home_server/src/server/conf/notification/notification_cfg.go
2026-02-25 17:24:24 +08:00

44 lines
1.0 KiB
Go

package notification_cfg
import "server/gamedata"
const (
CFG_NOTIFICATION = "Notification"
)
func init() {
gamedata.InitCfg(CFG_NOTIFICATION)
}
func GetFriendApplyNotificationCooldown() int {
data, err := gamedata.GetDataByIntKey(CFG_NOTIFICATION, 2)
if err != nil {
return 0
}
return gamedata.GetIntValue(data, "Cooldown")
}
func GetPetroomGameNotificationCooldown() (int, int) {
data, err := gamedata.GetDataByIntKey(CFG_NOTIFICATION, 1)
if err != nil {
return 0, 0
}
return gamedata.GetIntValue(data, "Cooldown"), gamedata.GetIntValue(data, "DailyLimit")
}
func GetPetroomGameNotificationMsg() (string, string) {
data, err := gamedata.GetDataByIntKey(CFG_NOTIFICATION, 1)
if err != nil {
return "", ""
}
return gamedata.GetStringValue(data, "TitleKey"), gamedata.GetStringValue(data, "InfoKey")
}
func GetFriendApplyNotificationMsg() (string, string) {
data, err := gamedata.GetDataByIntKey(CFG_NOTIFICATION, 2)
if err != nil {
return "", ""
}
return gamedata.GetStringValue(data, "TitleKey"), gamedata.GetStringValue(data, "InfoKey")
}