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