public void addToStreamEx(Bundle stream, TING_PAI_LIST v) { stream.writeUint32((UInt32)v.Count); for (int i = 0; i < v.Count; ++i) { itemType.addToStreamEx(stream, v[i]); } ; }
//显示听牌信息 public void showTingPaiInfo() { heidAllJT(); if (account == null) { account = (Account)KBEngineApp.app.player(); } TING_PAI_LIST d = account.TingPaiList; if (d.Count == 0) { return; } Dictionary <string, string> data = new Dictionary <string, string>(); List <Dictionary <int, int> > fanshu = new List <Dictionary <int, int> >(); List <Dictionary <string, string> > d1 = new List <Dictionary <string, string> >(); List <int> noUsePai = new List <int>(); List <NoUsePai> no = new List <NoUsePai>(); Dictionary <string, NoUsePai> no1 = new Dictionary <string, NoUsePai>(); for (int i = 0; i < d.Count; i++) { TING_PAI_DIC ff = d[i]; string pai = ff.nousepai; string P = ff.pai; string fan = ff.fan; if (!no1.ContainsKey(pai)) { //!hasPai_IN_nousePai(pai,no1) NoUsePai _no = new NoUsePai(); _no.pai = pai + ""; _no.tingPaiList.Add(P); _no.tingPaiFans.Add(fan); no1.Add(pai, _no); } else { NoUsePai _no = no1[pai]; if (!_no.tingPaiList.Contains(P)) { _no.tingPaiList.Add(P); _no.tingPaiFans.Add(fan); } } } _NoUsePai = no1; for (int i = 0; i < holdsRoot.childCount; i++) { Transform tr = holdsRoot.GetChild(i); if (no1.ContainsKey(tr.name)) { tr.Find("jt").gameObject.SetActive(true); } } }
public TING_PAI_LIST createFromStreamEx(MemoryStream stream) { UInt32 size = stream.readUint32(); TING_PAI_LIST datas = new TING_PAI_LIST(); while (size > 0) { --size; datas.Add(itemType.createFromStreamEx(stream)); } ; return(datas); }
public override void hasTing(TING_PAI_LIST arg1) { MonoBehaviour.print("有听牌信息了"); showTingPaiInfo(); }
public abstract void hasTing(TING_PAI_LIST arg1);
public override void callPropertysSetMethods() { ScriptModule sm = EntityDef.moduledefs["Account"]; Dictionary <UInt16, Property> pdatas = sm.idpropertys; TING_PAI_LIST oldval_TingPaiList = TingPaiList; Property prop_TingPaiList = pdatas[4]; if (prop_TingPaiList.isBase()) { if (inited && !inWorld) { onTingPaiListChanged(oldval_TingPaiList); } } else { if (inWorld) { if (prop_TingPaiList.isOwnerOnly() && !isPlayer()) { } else { onTingPaiListChanged(oldval_TingPaiList); } } } PLAYER_ACTION_DIC oldval_actionData = actionData; Property prop_actionData = pdatas[5]; if (prop_actionData.isBase()) { if (inited && !inWorld) { onActionDataChanged(oldval_actionData); } } else { if (inWorld) { if (prop_actionData.isOwnerOnly() && !isPlayer()) { } else { onActionDataChanged(oldval_actionData); } } } Vector3 oldval_direction = direction; Property prop_direction = pdatas[2]; if (prop_direction.isBase()) { if (inited && !inWorld) { onDirectionChanged(oldval_direction); } } else { if (inWorld) { if (prop_direction.isOwnerOnly() && !isPlayer()) { } else { onDirectionChanged(oldval_direction); } } } MJ_LIST oldval_holds = holds; Property prop_holds = pdatas[6]; if (prop_holds.isBase()) { if (inited && !inWorld) { onHoldsChanged(oldval_holds); } } else { if (inWorld) { if (prop_holds.isOwnerOnly() && !isPlayer()) { } else { onHoldsChanged(oldval_holds); } } } Byte oldval_isNewPlayer = isNewPlayer; Property prop_isNewPlayer = pdatas[7]; if (prop_isNewPlayer.isBase()) { if (inited && !inWorld) { onIsNewPlayerChanged(oldval_isNewPlayer); } } else { if (inWorld) { if (prop_isNewPlayer.isOwnerOnly() && !isPlayer()) { } else { onIsNewPlayerChanged(oldval_isNewPlayer); } } } Byte oldval_isReady = isReady; Property prop_isReady = pdatas[8]; if (prop_isReady.isBase()) { if (inited && !inWorld) { onIsReadyChanged(oldval_isReady); } } else { if (inWorld) { if (prop_isReady.isOwnerOnly() && !isPlayer()) { } else { onIsReadyChanged(oldval_isReady); } } } UInt16 oldval_playerID = playerID; Property prop_playerID = pdatas[9]; if (prop_playerID.isBase()) { if (inited && !inWorld) { onPlayerIDChanged(oldval_playerID); } } else { if (inWorld) { if (prop_playerID.isOwnerOnly() && !isPlayer()) { } else { onPlayerIDChanged(oldval_playerID); } } } UInt16 oldval_playerID_base = playerID_base; Property prop_playerID_base = pdatas[10]; if (prop_playerID_base.isBase()) { if (inited && !inWorld) { onPlayerID_baseChanged(oldval_playerID_base); } } else { if (inWorld) { if (prop_playerID_base.isOwnerOnly() && !isPlayer()) { } else { onPlayerID_baseChanged(oldval_playerID_base); } } } string oldval_playerName = playerName; Property prop_playerName = pdatas[11]; if (prop_playerName.isBase()) { if (inited && !inWorld) { onPlayerNameChanged(oldval_playerName); } } else { if (inWorld) { if (prop_playerName.isOwnerOnly() && !isPlayer()) { } else { onPlayerNameChanged(oldval_playerName); } } } string oldval_playerName_base = playerName_base; Property prop_playerName_base = pdatas[12]; if (prop_playerName_base.isBase()) { if (inited && !inWorld) { onPlayerName_baseChanged(oldval_playerName_base); } } else { if (inWorld) { if (prop_playerName_base.isOwnerOnly() && !isPlayer()) { } else { onPlayerName_baseChanged(oldval_playerName_base); } } } Vector3 oldval_position = position; Property prop_position = pdatas[1]; if (prop_position.isBase()) { if (inited && !inWorld) { onPositionChanged(oldval_position); } } else { if (inWorld) { if (prop_position.isOwnerOnly() && !isPlayer()) { } else { onPositionChanged(oldval_position); } } } Byte oldval_roomSeatIndex = roomSeatIndex; Property prop_roomSeatIndex = pdatas[13]; if (prop_roomSeatIndex.isBase()) { if (inited && !inWorld) { onRoomSeatIndexChanged(oldval_roomSeatIndex); } } else { if (inWorld) { if (prop_roomSeatIndex.isOwnerOnly() && !isPlayer()) { } else { onRoomSeatIndexChanged(oldval_roomSeatIndex); } } } }
public override void onUpdatePropertys(MemoryStream stream) { ScriptModule sm = EntityDef.moduledefs["Account"]; Dictionary <UInt16, Property> pdatas = sm.idpropertys; while (stream.length() > 0) { UInt16 _t_utype = 0; UInt16 _t_child_utype = 0; { if (sm.usePropertyDescrAlias) { _t_utype = stream.readUint8(); _t_child_utype = stream.readUint8(); } else { _t_utype = stream.readUint16(); _t_child_utype = stream.readUint16(); } } Property prop = null; if (_t_utype == 0) { prop = pdatas[_t_child_utype]; } else { Property pComponentPropertyDescription = pdatas[_t_utype]; switch (pComponentPropertyDescription.properUtype) { default: break; } return; } switch (prop.properUtype) { case 10: TING_PAI_LIST oldval_TingPaiList = TingPaiList; TingPaiList = ((DATATYPE_TING_PAI_LIST)EntityDef.id2datatypes[29]).createFromStreamEx(stream); if (prop.isBase()) { if (inited) { onTingPaiListChanged(oldval_TingPaiList); } } else { if (inWorld) { onTingPaiListChanged(oldval_TingPaiList); } } break; case 9: PLAYER_ACTION_DIC oldval_actionData = actionData; actionData = ((DATATYPE_PLAYER_ACTION_DIC)EntityDef.id2datatypes[27]).createFromStreamEx(stream); if (prop.isBase()) { if (inited) { onActionDataChanged(oldval_actionData); } } else { if (inWorld) { onActionDataChanged(oldval_actionData); } } break; case 40001: Vector3 oldval_direction = direction; direction = stream.readVector3(); if (prop.isBase()) { if (inited) { onDirectionChanged(oldval_direction); } } else { if (inWorld) { onDirectionChanged(oldval_direction); } } break; case 8: MJ_LIST oldval_holds = holds; holds = ((DATATYPE_MJ_LIST)EntityDef.id2datatypes[22]).createFromStreamEx(stream); if (prop.isBase()) { if (inited) { onHoldsChanged(oldval_holds); } } else { if (inWorld) { onHoldsChanged(oldval_holds); } } break; case 5: Byte oldval_isNewPlayer = isNewPlayer; isNewPlayer = stream.readUint8(); if (prop.isBase()) { if (inited) { onIsNewPlayerChanged(oldval_isNewPlayer); } } else { if (inWorld) { onIsNewPlayerChanged(oldval_isNewPlayer); } } break; case 7: Byte oldval_isReady = isReady; isReady = stream.readUint8(); if (prop.isBase()) { if (inited) { onIsReadyChanged(oldval_isReady); } } else { if (inWorld) { onIsReadyChanged(oldval_isReady); } } break; case 4: UInt16 oldval_playerID = playerID; playerID = stream.readUint16(); if (prop.isBase()) { if (inited) { onPlayerIDChanged(oldval_playerID); } } else { if (inWorld) { onPlayerIDChanged(oldval_playerID); } } break; case 2: UInt16 oldval_playerID_base = playerID_base; playerID_base = stream.readUint16(); if (prop.isBase()) { if (inited) { onPlayerID_baseChanged(oldval_playerID_base); } } else { if (inWorld) { onPlayerID_baseChanged(oldval_playerID_base); } } break; case 3: string oldval_playerName = playerName; playerName = stream.readUnicode(); if (prop.isBase()) { if (inited) { onPlayerNameChanged(oldval_playerName); } } else { if (inWorld) { onPlayerNameChanged(oldval_playerName); } } break; case 1: string oldval_playerName_base = playerName_base; playerName_base = stream.readUnicode(); if (prop.isBase()) { if (inited) { onPlayerName_baseChanged(oldval_playerName_base); } } else { if (inWorld) { onPlayerName_baseChanged(oldval_playerName_base); } } break; case 40000: Vector3 oldval_position = position; position = stream.readVector3(); if (prop.isBase()) { if (inited) { onPositionChanged(oldval_position); } } else { if (inWorld) { onPositionChanged(oldval_position); } } break; case 6: Byte oldval_roomSeatIndex = roomSeatIndex; roomSeatIndex = stream.readUint8(); if (prop.isBase()) { if (inited) { onRoomSeatIndexChanged(oldval_roomSeatIndex); } } else { if (inWorld) { onRoomSeatIndexChanged(oldval_roomSeatIndex); } } break; case 40002: stream.readUint32(); break; default: break; } ; } }
public virtual void onTingPaiListChanged(TING_PAI_LIST oldValue) { }
public override void onRemoteMethodCall(MemoryStream stream) { ScriptModule sm = EntityDef.moduledefs["Account"]; UInt16 methodUtype = 0; UInt16 componentPropertyUType = 0; if (sm.useMethodDescrAlias) { componentPropertyUType = stream.readUint8(); methodUtype = stream.readUint8(); } else { componentPropertyUType = stream.readUint16(); methodUtype = stream.readUint16(); } Method method = null; if (componentPropertyUType == 0) { method = sm.idmethods[methodUtype]; } else { Property pComponentPropertyDescription = sm.idpropertys[componentPropertyUType]; switch (pComponentPropertyDescription.properUtype) { default: break; } return; } switch (method.methodUtype) { case 20: Byte OnReqCreateAvatar_arg1 = stream.readUint8(); OnReqCreateAvatar(OnReqCreateAvatar_arg1); break; case 23: game_begin_push(); break; case 26: game_chupai_push(); break; case 28: SByte game_mopai_push_arg1 = stream.readInt8(); game_mopai_push(game_mopai_push_arg1); break; case 34: TING_PAI_LIST hasTing_arg1 = ((DATATYPE_TING_PAI_LIST)method.args[0]).createFromStreamEx(stream); hasTing(hasTing_arg1); break; case 25: has_action(); break; case 31: UInt32 onGang_arg1 = stream.readUint32(); SByte onGang_arg2 = stream.readInt8(); string onGang_arg3 = stream.readUnicode(); onGang(onGang_arg1, onGang_arg2, onGang_arg3); break; case 22: ROOM_PUBLIC_INFO onGetRoomInfo_arg1 = ((DATATYPE_ROOM_PUBLIC_INFO)method.args[0]).createFromStreamEx(stream); onGetRoomInfo(onGetRoomInfo_arg1); break; case 32: UInt32 onHu_arg1 = stream.readUint32(); Byte onHu_arg2 = stream.readUint8(); SByte onHu_arg3 = stream.readInt8(); onHu(onHu_arg1, onHu_arg2, onHu_arg3); break; case 27: UInt32 onPlayCard_arg1 = stream.readUint32(); SByte onPlayCard_arg2 = stream.readInt8(); onPlayCard(onPlayCard_arg1, onPlayCard_arg2); break; case 33: UInt32 onPlayCardOver_arg1 = stream.readUint32(); SByte onPlayCardOver_arg2 = stream.readInt8(); onPlayCardOver(onPlayCardOver_arg1, onPlayCardOver_arg2); break; case 29: UInt32 otherPlayerMopai_arg1 = stream.readUint32(); otherPlayerMopai(otherPlayerMopai_arg1); break; case 30: UInt32 peng_notify_push_arg1 = stream.readUint32(); SByte peng_notify_push_arg2 = stream.readInt8(); peng_notify_push(peng_notify_push_arg1, peng_notify_push_arg2); break; case 21: playerLevelRoom(); break; case 24: ROOM_PUBLIC_INFO upDataClientRoomInfo_arg1 = ((DATATYPE_ROOM_PUBLIC_INFO)method.args[0]).createFromStreamEx(stream); upDataClientRoomInfo(upDataClientRoomInfo_arg1); break; default: break; } ; }