public void addToStreamEx(Bundle stream, PLAYER_ACTION_DIC v) { stream.writeInt8(v.pai); stream.writeUint8(v.hu); stream.writeUint8(v.peng); stream.writeUint8(v.gang); gangpai_DataType.addToStreamEx(stream, v.gangpai); }
public PLAYER_ACTION_DIC createFromStreamEx(MemoryStream stream) { PLAYER_ACTION_DIC datas = new PLAYER_ACTION_DIC(); datas.pai = stream.readInt8(); datas.hu = stream.readUint8(); datas.peng = stream.readUint8(); datas.gang = stream.readUint8(); datas.gangpai = gangpai_DataType.createFromStreamEx(stream); return(datas); }
public virtual void onActionDataChanged(PLAYER_ACTION_DIC oldValue) { }
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; } ; } }