public override int writeToBuff(ref NetOutputBuffer buff) { //包内容, 10为包头偏移 [12/9/2011 ZL] buff.Write(ref szAccount, NET_DEFINE.MAX_ACCOUNT); buff.Write(ref szPassWord, NET_DEFINE.MAX_PASSWORD); buff.WriteInt(uVersion); return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { buff.WriteInt(m_nMissionIndex); buff.WriteByte(m_nMissionName); buff.Write(ref m_szMissionName, 260); buff.WriteByte(m_nMissionTarget); buff.Write(ref m_szMissionTarget, 260); buff.WriteByte(m_nMissionDesc); buff.Write(ref m_szMissionDesc, 260); return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { buff.WriteInt((int)Result); if (Result == NET_RESULT_DEFINE.ASKCHARLIST_RESULT.ASKCHARLIST_SUCCESS) { buff.Write(ref szAccount, NET_DEFINE.MAX_ACCOUNT); if (uCharNumber > NET_DEFINE.DB_CHAR_NUMBER) { int RealNumber = NET_DEFINE.DB_CHAR_NUMBER; buff.WriteByte((byte)RealNumber); for (int i = 0; i < RealNumber; i++) { CharList[i].writeToBuff(ref buff); } } else { buff.WriteByte(uCharNumber); for (byte i = 0; i < uCharNumber; i++) { //buff.WriteStruct(CharList[i]); CharList[i].writeToBuff(ref buff); } } } return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public int writeToBuff(ref NetOutputBuffer buff) { buff.WriteByte(m_NameSize); if (m_NameSize > 0) { buff.Write(ref m_szGuildName, m_NameSize); } buff.WriteByte(m_DescSize); if (m_DescSize > 0) { buff.Write(ref m_szGuildDesc, m_DescSize); } buff.WriteShort(m_Camp); return(getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { //包内容, 10为包头偏移 buff.Write(ref szAccount, NET_DEFINE.MAX_ACCOUNT); buff.WriteInt((int)Result); return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { buff.WriteInt((int)result); buff.WriteInt(serverPort); buff.Write(ref serverIP, NET_DEFINE.IP_SIZE); buff.WriteInt(key); return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { buff.Write(ref szAccount, NET_DEFINE.MAX_ACCOUNT); //包内容, 10为包头偏移 [12/9/2011 ZL] return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { //包内容, 10为包头偏移 buff.WriteInt(Result); buff.WriteInt(LoginPort); buff.Write(ref LoginIP, NET_DEFINE.IP_SIZE); return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { m_GUID.writeToBuff(ref buff); buff.WriteUint(m_idNpc); buff.WriteByte(m_byMessageSize); buff.Write(ref m_szMessage, m_byMessageSize); return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public int writeToBuff(ref NetOutputBuffer buff) { buff.WriteByte(m_GuildDescLength); if (m_GuildDescLength > 0) { buff.Write(ref m_GuildDesc, m_GuildDescLength); } return(getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { buff.WriteByte(m_CommandSize); if (m_CommandSize > 0 && m_CommandSize < 127) { buff.Write(ref m_Command, m_CommandSize); } return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public int writeToBuff(ref NetOutputBuffer buff) { buff.WriteInt(iPosNum); for (int i = 0; i < iPosNum; ++i) { buff.Write(ref m_PosList[i].m_PosName, GAMEDEFINE.MAX_GUILD_POS_NAME_SIZE); buff.WriteByte(m_PosList[i].m_PosID); } return(getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { buff.WriteInt(m_Key); buff.WriteInt(m_GUID); buff.WriteShort(m_ServerID); buff.Write(ref m_szAccount, NET_DEFINE.MAX_ACCOUNT); buff.WriteInt(m_nGender); buff.WriteInt(m_nCheckVer); return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { //包内容, 10为包头偏移 [12/9/2011 ZL] buff.WriteByte(m_ChatType); buff.WriteByte(m_ContexSize); buff.Write(ref m_Contex, m_ContexSize); switch ((ENUM_CHAT_TYPE)m_ChatType) { case ENUM_CHAT_TYPE.CHAT_TYPE_NORMAL: case ENUM_CHAT_TYPE.CHAT_TYPE_WORLD: case ENUM_CHAT_TYPE.CHAT_TYPE_LIE: case ENUM_CHAT_TYPE.CHAT_TYPE_SYSTEM: case ENUM_CHAT_TYPE.CHAT_TYPE_MAP: break; case ENUM_CHAT_TYPE.CHAT_TYPE_TEAM: buff.WriteShort(m_TeamID); break; case ENUM_CHAT_TYPE.CHAT_TYPE_TELL: buff.WriteByte(m_TargetSize); buff.Write(ref m_TargetName, m_TargetSize); break; case ENUM_CHAT_TYPE.CHAT_TYPE_CHANNEL: buff.WriteShort(m_ChannelID); break; case ENUM_CHAT_TYPE.CHAT_TYPE_GUILD: buff.WriteShort(m_GuildID); break; case ENUM_CHAT_TYPE.CHAT_TYPE_CAMP: buff.WriteByte(m_MenpaiID); break; default: break; } return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { m_GUID.writeToBuff(ref buff); buff.WriteShort(m_Flags.m_wFlags); buff.WriteByte(m_byNameSize); buff.Write(ref m_szName, m_byNameSize); buff.WriteInt(m_StrIncrement); buff.WriteInt(m_ConIncrement); buff.WriteInt(m_DexIncrement); buff.WriteInt(m_SprIncrement); buff.WriteInt(m_IntIncrement); return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public int writeToBuff(ref NetOutputBuffer buff) { buff.Write(ref m_GuildName, GAMEDEFINE.MAX_GUILD_NAME_SIZE); buff.Write(ref (m_GuildCreator), GAMEDEFINE.MAX_CHARACTER_NAME); buff.Write(ref (m_GuildChairMan), GAMEDEFINE.MAX_CHARACTER_NAME); buff.Write(ref (m_CityName), GAMEDEFINE_CITY.MAX_CITY_NAME_SIZE); buff.WriteByte(m_nLevel); buff.WriteInt((m_nPortSceneID)); buff.WriteInt((m_MemNum)); buff.WriteInt((m_Longevity)); buff.WriteInt((m_Contribute)); buff.WriteInt((m_Honor)); buff.WriteInt((m_FoundedMoney)); buff.WriteInt((m_nIndustryLevel)); buff.WriteInt((m_nAgrLevel)); buff.WriteInt((m_nComLevel)); buff.WriteInt((m_nDefLevel)); buff.WriteInt((m_nTechLevel)); buff.WriteInt((m_nAmbiLevel)); buff.WriteByte(m_bAccess); return(getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { buff.Write(ref m_Name, sizeof(byte) * NET_DEFINE.MAX_CHARACTER_NAME); buff.WriteByte(m_Sex); // [2010-12-14] by: cfp+ BOOL buff.WriteByte(m_HairColor); buff.WriteByte(m_FaceColor); buff.WriteByte(m_HairModel); buff.WriteByte(m_FaceModel); buff.WriteByte(m_HeadID); buff.WriteUint(m_GUID); buff.WriteShort(m_Camp); buff.WriteShort(m_MenPai); //包内容, 10为包头偏移 [12/9/2011 ZL] return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }
public int writeToBuff(ref NetOutputBuffer buff) { buff.WriteInt(m_ScriptID); buff.WriteByte(m_uFunNameSize); if (FunNameSize > 0) { buff.Write(ref m_szFunName, sizeof(byte) * (int)m_uFunNameSize); } buff.WriteByte(m_uParamCount); if (m_uParamCount > 0) { for (byte i = 0; i < m_uParamCount; i++) { buff.WriteInt(m_aParam[i]); } } return(getSize()); }
public override int writeToBuff(ref NetOutputBuffer buff) { buff.WriteInt(m_ObjID); buff.WriteInt((int)m_uFlags); if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_DATA_ID)) != 0) { buff.WriteShort(m_wDataID); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_NAME)) != 0) { buff.WriteByte(m_byNameSize); buff.Write(ref m_szName, sizeof(byte) * m_byNameSize); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_TITLE)) != 0) { buff.WriteByte(m_TitleType); buff.WriteByte(m_byTitleSize); buff.Write(ref m_szTitle, m_byTitleSize); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_LEVEL)) != 0) { buff.WriteByte(m_Level); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_HP_PERCENT)) != 0) { buff.WriteByte(m_HPPercent); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_MP_PERCENT)) != 0) { buff.WriteByte(m_MPPercent); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_RAGE)) != 0) { buff.WriteInt(m_nRage); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_STEALTH_LEVEL)) != 0) { buff.WriteInt(m_nStealthLevel); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_SIT)) != 0) { buff.WriteByte(m_cMoodState); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_MOVE_SPEED)) != 0) { buff.WriteInt((int)m_fMoveSpeed); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_ATTACK_SPEED)) != 0) { buff.WriteInt((int)m_fAttackSpeed); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_CAMP_ID)) != 0) { // int size = Marshal.SizeOf(m_CampData); // byte[] bytes = NET_DEFINE.StructToBytes(m_CampData); // buff.Write(ref bytes, size) ; //buff.WriteStruct(m_CampData); m_CampData.writeToBuff(ref buff); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_PORTRAIT_ID)) != 0) { buff.WriteInt(m_nPortraitID); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_MODEL_ID)) != 0) { buff.WriteInt(m_nModelID); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_MOUNT_ID)) != 0) { buff.WriteInt(m_nMountID); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_AITYPE)) != 0) { buff.WriteInt(m_nAIType); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ATT_PLAYER_DATA)) != 0) { buff.WriteInt(m_uPlayerData); buff.WriteUint(m_HairColor); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_IS_IN_STALL)) != 0) { buff.WriteByte(m_bStallIsOpen); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_STALL_NAME)) != 0) { buff.WriteByte(m_nStallNameSize); //Assert(m_nStallNameSize < MAX_STALL_NAME); buff.Write(ref m_szStallName, m_nStallNameSize); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_OCCUPANT)) != 0) { buff.WriteInt(m_OccupantGUID); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_OWNER)) != 0) { buff.WriteInt(m_OwnerID); } if ((m_uFlags & (1 << (int)ENUM_UPDATE_CHAR_ATT.UPDATE_CHAR_ISNPC)) != 0) { buff.WriteByte(m_IsNPC); } return(NET_DEFINE.PACKET_HEADER_SIZE + getSize()); }