1.UserHandler.cs的create中
session.write(2, 0, 3, (object) BizUtil.user.create(accId, createDto.name, createDto.job));//本意是給對(duì)應(yīng)鍵的部分增加2個(gè)值,而現(xiàn)在卻查不到鍵
就三個(gè)參數(shù),很好理解的?
2.f11進(jìn)到UserBizImpl.cs中的create,playerModelArray中存放著我期待的數(shù)據(jù)。
?
3.前3次注冊(cè)都沒(méi)有問(wèn)題:
4.第4次注冊(cè),成功跳出文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-837387.html
?5.第19行的list是讀取,第32行的put是寫(xiě)入,put的代碼如下所示:好幾個(gè)TryAdd文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-837387.html
public void put(string accId, PlayerModel model)
{
if (this.userPlayerIds.ContainsKey(accId))
{
List<string> stringList;
this.userPlayerIds.TryGetValue(accId, out stringList);
stringList.Add(model.id);
}
else
this.userPlayerIds.TryAdd(accId, new List<string>()
{
model.id
});
this.players.TryAdd(model.id, model);
}
到了這里,關(guān)于unity學(xué)習(xí)(47)——服務(wù)器三次注冊(cè)限制以及數(shù)據(jù)庫(kù)化角色信息2--數(shù)據(jù)流程的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!