[이민우] 캐릭터 생성 제한 구현 (대신 커밋)
This commit is contained in:
13
core/api.go
13
core/api.go
@ -403,11 +403,13 @@ func (caller apiCaller) lockcreatecharAPI(w http.ResponseWriter, r *http.Request
|
||||
return err
|
||||
}
|
||||
|
||||
curregion, _ := gocommon.ReadStringFormValue(r.Form, "region")
|
||||
haschr, _ := gocommon.ReadStringFormValue(r.Form, "haschr")
|
||||
|
||||
locked := map[string]any{
|
||||
"lock": false,
|
||||
}
|
||||
locked := make(map[string]any)
|
||||
if haschr == "true" {
|
||||
locked["lock"] = false
|
||||
} else {
|
||||
curregion, _ := gocommon.ReadStringFormValue(r.Form, "region")
|
||||
|
||||
for _, regioninfo := range mg {
|
||||
region := regioninfo["divisions"].(primitive.M)
|
||||
@ -415,6 +417,9 @@ func (caller apiCaller) lockcreatecharAPI(w http.ResponseWriter, r *http.Request
|
||||
if idx == curregion {
|
||||
if rl.(primitive.M)["lockcreatechar"].(bool) {
|
||||
locked["lock"] = true
|
||||
} else {
|
||||
locked["lock"] = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user