public void addToStreamEx(Bundle stream, FRIENDLIST v) { stream.writeUint32((UInt32)v.Count); for (int i = 0; i < v.Count; ++i) { stream.writeUint64(v[i]); } ; }
public FRIENDLIST createFromStreamEx(MemoryStream stream) { UInt32 size = stream.readUint32(); FRIENDLIST datas = new FRIENDLIST(); while (size > 0) { --size; datas.Add(stream.readUint64()); } ; return(datas); }
public override void callPropertysSetMethods() { ScriptModule sm = EntityDef.moduledefs["Account"]; Dictionary <UInt16, Property> pdatas = sm.idpropertys; 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); } } } FRIENDLIST oldval_friendList = friendList; Property prop_friendList = pdatas[4]; if (prop_friendList.isBase()) { if (inited && !inWorld) { onFriendListChanged(oldval_friendList); } } else { if (inWorld) { if (prop_friendList.isOwnerOnly() && !isPlayer()) { } else { onFriendListChanged(oldval_friendList); } } } Int32 oldval_playerBean = playerBean; Property prop_playerBean = pdatas[5]; if (prop_playerBean.isBase()) { if (inited && !inWorld) { onPlayerBeanChanged(oldval_playerBean); } } else { if (inWorld) { if (prop_playerBean.isOwnerOnly() && !isPlayer()) { } else { onPlayerBeanChanged(oldval_playerBean); } } } ENTITYDATA oldval_playerData = playerData; Property prop_playerData = pdatas[6]; if (prop_playerData.isBase()) { if (inited && !inWorld) { onPlayerDataChanged(oldval_playerData); } } else { if (inWorld) { if (prop_playerData.isOwnerOnly() && !isPlayer()) { } else { onPlayerDataChanged(oldval_playerData); } } } UInt16 oldval_playerId = playerId; Property prop_playerId = pdatas[7]; if (prop_playerId.isBase()) { if (inited && !inWorld) { onPlayerIdChanged(oldval_playerId); } } else { if (inWorld) { if (prop_playerId.isOwnerOnly() && !isPlayer()) { } else { onPlayerIdChanged(oldval_playerId); } } } string oldval_playerName = playerName; Property prop_playerName = pdatas[8]; if (prop_playerName.isBase()) { if (inited && !inWorld) { onPlayerNameChanged(oldval_playerName); } } else { if (inWorld) { if (prop_playerName.isOwnerOnly() && !isPlayer()) { } else { onPlayerNameChanged(oldval_playerName); } } } Byte oldval_playerNew = playerNew; Property prop_playerNew = pdatas[9]; if (prop_playerNew.isBase()) { if (inited && !inWorld) { onPlayerNewChanged(oldval_playerNew); } } else { if (inWorld) { if (prop_playerNew.isOwnerOnly() && !isPlayer()) { } else { onPlayerNewChanged(oldval_playerNew); } } } POKERLIST oldval_playerPoker = playerPoker; Property prop_playerPoker = pdatas[10]; if (prop_playerPoker.isBase()) { if (inited && !inWorld) { onPlayerPokerChanged(oldval_playerPoker); } } else { if (inWorld) { if (prop_playerPoker.isOwnerOnly() && !isPlayer()) { } else { onPlayerPokerChanged(oldval_playerPoker); } } } 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_roomIndex = roomIndex; Property prop_roomIndex = pdatas[11]; if (prop_roomIndex.isBase()) { if (inited && !inWorld) { onRoomIndexChanged(oldval_roomIndex); } } else { if (inWorld) { if (prop_roomIndex.isOwnerOnly() && !isPlayer()) { } else { onRoomIndexChanged(oldval_roomIndex); } } } }
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 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: FRIENDLIST oldval_friendList = friendList; friendList = ((DATATYPE_FRIENDLIST)EntityDef.id2datatypes[24]).createFromStreamEx(stream); if (prop.isBase()) { if (inited) { onFriendListChanged(oldval_friendList); } } else { if (inWorld) { onFriendListChanged(oldval_friendList); } } break; case 3: Int32 oldval_playerBean = playerBean; playerBean = stream.readInt32(); if (prop.isBase()) { if (inited) { onPlayerBeanChanged(oldval_playerBean); } } else { if (inWorld) { onPlayerBeanChanged(oldval_playerBean); } } break; case 6: ENTITYDATA oldval_playerData = playerData; playerData = ((DATATYPE_ENTITYDATA)EntityDef.id2datatypes[25]).createFromStreamEx(stream); if (prop.isBase()) { if (inited) { onPlayerDataChanged(oldval_playerData); } } else { if (inWorld) { onPlayerDataChanged(oldval_playerData); } } break; case 2: UInt16 oldval_playerId = playerId; playerId = stream.readUint16(); if (prop.isBase()) { if (inited) { onPlayerIdChanged(oldval_playerId); } } else { if (inWorld) { onPlayerIdChanged(oldval_playerId); } } break; case 1: string oldval_playerName = playerName; playerName = stream.readUnicode(); if (prop.isBase()) { if (inited) { onPlayerNameChanged(oldval_playerName); } } else { if (inWorld) { onPlayerNameChanged(oldval_playerName); } } break; case 4: Byte oldval_playerNew = playerNew; playerNew = stream.readUint8(); if (prop.isBase()) { if (inited) { onPlayerNewChanged(oldval_playerNew); } } else { if (inWorld) { onPlayerNewChanged(oldval_playerNew); } } break; case 7: POKERLIST oldval_playerPoker = playerPoker; playerPoker = ((DATATYPE_POKERLIST)EntityDef.id2datatypes[23]).createFromStreamEx(stream); if (prop.isBase()) { if (inited) { onPlayerPokerChanged(oldval_playerPoker); } } else { if (inWorld) { onPlayerPokerChanged(oldval_playerPoker); } } 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 5: Byte oldval_roomIndex = roomIndex; roomIndex = stream.readUint8(); if (prop.isBase()) { if (inited) { onRoomIndexChanged(oldval_roomIndex); } } else { if (inWorld) { onRoomIndexChanged(oldval_roomIndex); } } break; case 40002: stream.readUint32(); break; default: break; } ; } }
public virtual void onFriendListChanged(FRIENDLIST oldValue) { }