Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改服务端的def文件以后,客户端第一次登录账号失败 #4

Open
ccyr119 opened this issue Jul 2, 2018 · 2 comments

Comments

@ccyr119
Copy link

ccyr119 commented Jul 2, 2018

当修改服务端的def文件以后,客户端第一次登录账号失败。
关掉客户端,在登录就可以了,失败的位置在:Client_onCreatedProxies,解析的参数有问题,
eid,是一个非常大的值,entityType不是字符串,是一个整数

@ccyr119
Copy link
Author

ccyr119 commented Jul 3, 2018

找到原因的了,loginapp和baseapp的类型utype值不一样。
例如:
loginapp的string类型的utype=1 (这个在客户端代码中写死,没有接口请求)
baseapp的string类型的utype=9 (请求EntityDef的时候会先下发所有的类型,包括alias)
kbengine_unity3d_lua_plugins少了一个EntityDef文件,里面有几个重新绑定类型定义的代码,
需要在resetmessages时候调用EntityDef.cear() 这个函数里面会进行重新绑定,将类型绑定到loginapp的规范,然后在客户端请求baseapp的EntityDef的时候会重新映射新的类型规范,这个时候loginapp的方法的参数类型描述都已经正确取到。

@Anndy-Han
Copy link

请问,每次服务端生成的SDK是要把替换下吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants