代码优化

This commit is contained in:
hahwu 2024-12-31 14:38:22 +08:00
parent e27526c635
commit c310b60eca
4 changed files with 4 additions and 14 deletions

View File

@ -1,7 +1,7 @@
{
"AppID": 1,
"LogLevel": "debug",
"LogPath": "",
"LogPath": "./log",
"TCPAddr": ":3565",
"WSAddr": ":3566",
"MySqlAddr": "127.0.0.1",

View File

@ -49,6 +49,7 @@ func AdminPlayerInfo(args []interface{}) error {
res["Login"] = player.GetPlayerBaseMod().Data.LoginTime
res["Cumulative"] = player.PlayMod.getBaseMod().Cumulative
res["TodayCumulative"] = player.PlayMod.getBaseMod().TodayCumulative
res["Bonus"] = player.PlayMod.getLimitedTimeEventMod().Progress
OrderMap := make(map[int]interface{})
Index := 0
for k, v := range player.PlayMod.getOrderMod().OrderList {

View File

@ -20,17 +20,9 @@ func main() {
lconf.CenterAddr = conf.Server.CenterAddr
lconf.PendingWriteNum = conf.PendingWriteNum
// c := cron.New()
// c.AddFunc("@every 1s", func() {
// fmt.Println("tick every 1 second")
// })
// c.Start()
leaf.Run(
game.Module,
gate.Module,
// login.Module,
)
}

View File

@ -101,13 +101,10 @@ func NewDailyLog(now time.Time, strLevel string, pathname string, flag int) (*Lo
if pathname != "" {
// now := time.Now()
filename := fmt.Sprintf("%d%02d%02d_%02d_%02d_%02d.log",
filename := fmt.Sprintf("%d%02d%02d.log",
now.Year(),
now.Month(),
now.Day(),
now.Hour(),
now.Minute(),
now.Second())
now.Day())
file, err := os.Create(path.Join(pathname, filename))
if err != nil {