diff --git a/core/AEGS_methods.go b/core/AEGS_methods.go index ec01da8..f1d000a 100644 --- a/core/AEGS_methods.go +++ b/core/AEGS_methods.go @@ -345,7 +345,6 @@ func (tx *transaction) UpdateCharInfo(charSlotId int32, raw map[string]interface options.FindOne().SetProjection(bson.M{"charInfo.$": 1})) var info map[string]interface{} - if q == nil { info = raw info["slotId"] = charSlotId diff --git a/core/AeGameServer.go b/core/AeGameServer.go index 0314b59..b07b96c 100644 --- a/core/AeGameServer.go +++ b/core/AeGameServer.go @@ -3,6 +3,7 @@ package core import ( "anvil/shared" "bytes" + "flag" "fmt" "io" "io/ioutil" @@ -77,6 +78,9 @@ func (gs *AeGameServer) Version() string { // New : func New() (*AeGameServer, error) { + if !flag.Parsed() { + flag.Parse() + } logfilename := fmt.Sprintf("AEGS_%s.log", time.Now().Format("2006-01-02T15-04-05")) logFile, err := os.OpenFile(logfilename, os.O_CREATE|os.O_WRONLY|os.O_CREATE, 0666)