This commit is contained in:
shoopea 2020-01-02 23:53:54 +08:00
parent 52ff68fb1f
commit daa659e7a4
2 changed files with 10 additions and 2 deletions

8
obj.go
View File

@ -29,28 +29,36 @@ var (
func initCache() {
var err error
log.Println("Caching obj_type ..")
err = loadObjType()
logOnError(err, "initCache : caching obj_type")
log.Println("Caching obj_sub_type ..")
err = loadObjSubType()
logOnError(err, "initCache : caching obj_sub_type")
log.Println("Filling message parsing rules...")
resetMsgParsingRules()
msgParsingRules, err = loadMsgParsingRules()
logOnError(err, "initCache : message parsing rules")
log.Println("Caching castles ..")
err = loadObjCastle()
logOnError(err, "initCache : caching castles")
log.Println("Caching guilds ..")
err = loadObjGuild()
logOnError(err, "initCache : caching guilds")
log.Println("Caching users ..")
err = loadObjUser()
logOnError(err, "initCache : caching user")
log.Println("Caching items ..")
err = loadObjItem()
logOnError(err, "initCache : caching items")
log.Println("Caching messages ..")
err = loadObjMsg()
logOnError(err, "initCache : caching msgs")

View File

@ -2,7 +2,7 @@ package main
import (
"encoding/json"
"fmt"
"log"
"regexp"
)
@ -66,7 +66,7 @@ func resetMsgParsingRules() error {
}
fmt.Printf("resetMsgParsingRules : %d rules loaded.\n", count)
log.Printf("%d rules loaded.\n", count)
return nil