public Bundle newCall(string methodName, UInt16 entitycomponentPropertyID = 0) { if (KBEngineApp.app.currserver == "loginapp") { Dbg.ERROR_MSG(className + "::newCall(" + methodName + "), currserver=!" + KBEngineApp.app.currserver); return(null); } ScriptModule module = null; if (!EntityDef.moduledefs.TryGetValue(className, out module)) { Dbg.ERROR_MSG(className + "::newCall: entity-module(" + className + ") error, can not find from EntityDef.moduledefs"); return(null); } Method method = null; if (isCell()) { method = module.cell_methods[methodName]; } else { method = module.base_methods[methodName]; } UInt16 methodID = method.methodUtype; newCall(); bundle.writeUint16(entitycomponentPropertyID); bundle.writeUint16(methodID); return(bundle); }
public void addToStreamEx(Bundle stream, FRIEND_INFO v) { stream.writeUint64(v.dbid); stream.writeUnicode(v.name); stream.writeUint16(v.level); stream.writeUint16(v.status); stream.writeUint16(v.icon); }
public void addToStreamEx(Bundle stream, PLAYER_INFOS v) { stream.writeInt32(v.id); stream.writeUnicode(v.name); stream.writeUint16(v.winCount); stream.writeUint16(v.loseCount); stream.writeInt8(v.isReady); stream.writeInt8(v.seatIndex); stream.writeInt8(v.isRoomMaster); }
public override void addToStream(Bundle stream, object v) { UInt64 cid = 0; Int32 id = 0; UInt16 type = 0; UInt16 utype = 0; stream.writeUint64(cid); stream.writeInt32(id); stream.writeUint16(type); stream.writeUint16(utype); }
void downloadSDKFromServer() { downloadFiles = 0; if (Directory.Exists(sdkTempPath)) { Directory.Delete(sdkTempPath, true); } Directory.CreateDirectory(sdkTempPath); if (sdkFileStream != null) { sdkFileStream.reclaimObject(); sdkFileStream = null; } // kbcmd options string tool_options = "Unity"; string callbackIP = ""; UInt16 callbackPort = 0; int clientWindowSize = (int)KBEngineApp.app.getInitArgs().RECV_BUFFER_MAX; Bundle bundle = Bundle.createObject(); bundle.newMessage(Messages.messages["Loginapp_importClientSDK"]); bundle.writeString(tool_options); bundle.writeInt32(clientWindowSize); bundle.writeString(callbackIP); bundle.writeUint16(callbackPort); bundle.send(KBEngineApp.app.networkInterface()); }
public void addToStreamEx(Bundle stream, AVATAR_INFO v) { stream.writeUint64(v.dbid); stream.writeUnicode(v.name); stream.writeUint8(v.roleType); stream.writeUint16(v.level); }
public override void addToStream(Bundle stream, object v) { stream.writeUint16(Convert.ToUInt16(v)); }
public void addToStreamEx(Bundle stream, CITY_SELL_GOODS_INFO v) { stream.writeUint64(v.GoodsID); stream.writeUint16(v.GoodsBaseNum); }