Пример #1
0
 public override int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteShort(m_nSkillID);
     buff.WriteShort(m_nImpactID);
     buff.WriteInt(m_nSN);
     return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
 }
Пример #2
0
 public int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteShort(m_idMenpai);
     buff.WriteShort(m_idXinfa);
     buff.WriteShort(m_NowLevel);
     return(getSize());
 }
Пример #3
0
 public int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteInt(m_nSenderID);
     buff.WriteShort(m_nBuffID);
     buff.WriteShort(m_nSkillID);
     buff.WriteUint(m_nSN);
     buff.WriteInt(m_nContinuance);
     return(getSize());
 }
Пример #4
0
 public override int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteInt(m_nReceiverID);
     buff.WriteInt(m_nSenderID);
     buff.WriteShort(m_nSkillID);
     buff.WriteShort(m_nFlag);
     buff.WriteInt(m_nSenderLogicCount);
     return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
 }
 public override int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteInt(m_nOwnerID);
     buff.WriteShort(m_nNumOfImpacts);
     for (short i = 0; i < m_nNumOfImpacts; i++)
     {
         buff.WriteShort(m_aImpactID[i]);
     }
     return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
 }
Пример #6
0
        public override int writeToBuff(ref NetOutputBuffer buff)
        {
            buff.WriteShort(m_ServerID);
            buff.WriteShort(m_SceneID);
            //byte[] bytes = NET_DEFINE.StructToBytes(m_Position);
            m_Position.writeToBuff(ref buff);
            //buff.Write(ref bytes, bytes.Length);
            buff.WriteByte(m_Estate);

            return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
        }
Пример #7
0
        public override int writeToBuff(ref NetOutputBuffer buff)
        {
            buff.WriteByte(m_byRet);
            buff.WriteShort(m_nSceneID);
//             byte[] bytes = NET_DEFINE.StructToBytes(m_posWorld);
//             buff.Write(ref bytes, Marshal.SizeOf(m_posWorld));
            m_posWorld.writeToBuff(ref buff);
            buff.WriteInt(m_ObjID);
            buff.WriteByte(m_bIsCity);
            buff.WriteByte(m_nCityLevel);
            buff.WriteShort(m_nResID);

            return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
        }
Пример #8
0
 public override int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteInt(m_nReceiverID);
     buff.WriteShort(m_nBuffID);
     buff.WriteInt(m_bEnable);
     if (m_bEnable != 0)
     {
         buff.WriteInt(m_nSenderID);
         buff.WriteShort(m_nSkillID);
         buff.WriteInt(m_nSenderLogicCount);
         buff.WriteUint(m_nSN);
     }
     return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
 }
Пример #9
0
 public int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteByte(m_SortType);
     buff.WriteUShort(m_uStart);
     buff.WriteShort(m_Camp);
     return(getSize());
 }
Пример #10
0
 public int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteShort(m_GuildGUID);
     buff.WriteUint(m_CandidateGUID);
     buff.WriteByte(m_NewAuthority);
     return(getSize());
 }
 public override int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteUint(m_ObjID);
     buff.WriteUint(m_GUID);
     buff.WriteShort(m_SceneID);
     return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
 }
Пример #12
0
 public override int writeToBuff(ref NetOutputBuffer buff)
 {
     //包内容, 10为包头偏移
     buff.WriteShort(TurnNumber);
     buff.WriteInt((int)ClientStatus);
     return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
 }
Пример #13
0
        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());
        }
Пример #14
0
 public override int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteShort(m_Ability);
     buff.WriteInt(m_Prescription);
     buff.WriteUint(m_Platform);
     buff.WriteUint(m_SpecialFlag);
     return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
 }
Пример #15
0
        public override int writeToBuff(ref NetOutputBuffer buff)
        {
            buff.WriteInt(charGuid);
            buff.WriteShort(playerID);

            //包内容, 10为包头偏移 [12/9/2011 ZL]
            return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
        }
 public override int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteInt(m_ObjID);
     buff.WriteShort(m_wNumXinFa);
     for (short i = 0; i < m_wNumXinFa; i++)
     {
         m_aXinFa[i].writeToBuff(ref buff);
     }
     return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
 }
Пример #17
0
 public override int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteByte(m_isInBag);
     buff.WriteByte(m_EquipBagIndex);
     for (int i = 0; i < GAMEDEFINE.MAX_ITEM_GEM; i++)
     {
         buff.WriteShort(m_MatBagIndex[i]);
     }
     buff.WriteByte(m_petIndex);
     return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
 }
Пример #18
0
        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());
        }
Пример #19
0
 public override int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteInt(m_ObjID);
     buff.WriteShort(m_SkillDataID);
     m_posUser.writeToBuff(ref buff);
     buff.WriteInt(m_TargetID);
     m_posTarget.writeToBuff(ref buff);
     buff.WriteFloat(m_fDir);
     buff.WriteFloat(m_nTotalTime);
     return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
 }
Пример #20
0
        public override int writeToBuff(ref NetOutputBuffer buff)
        {
            buff.WriteByte(m_byEnterType);
            buff.WriteShort(m_nSceneID);
            //byte[] bytes = NET_DEFINE.StructToBytes(m_posWorld);
            //buff.Write(ref bytes, Marshal.SizeOf(m_posWorld));
            //buff.WriteStruct(m_posWorld);
            m_posWorld.writeToBuff(ref buff);

            return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
        }
Пример #21
0
        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());
        }
Пример #22
0
 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());
 }
Пример #23
0
    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());
    }
Пример #24
0
        public override int writeToBuff(ref NetOutputBuffer buff)
        {
            buff.WriteUint(m_ObjID);
            buff.WriteShort(m_wNumSkill);

            for (short i = 0; i < m_wNumSkill; i++)
            {
                m_aSkill[i].writeToBuff(ref buff);
            }

            for (short i = 0; i < m_wNumSkill; i++)
            {
                buff.WriteByte(m_aSkillLevel[i]);
            }

            return(NET_DEFINE.PACKET_HEADER_SIZE + getSize());
        }
Пример #25
0
 public int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteShort(m_Value);
     return(sizeof(short));
 }
Пример #26
0
 public override int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteShort(m_idCD);
     return NET_DEFINE.PACKET_HEADER_SIZE + getSize();
 }
Пример #27
0
 public int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteShort(m_Level);
     buff.WriteShort(m_Exp);
     return(getSize());
 }
Пример #28
0
        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());
        }
Пример #29
0
 public int writeToBuff(ref NetOutputBuffer buff)
 {
     buff.WriteShort(m_GuildGUID);
     buff.WriteByte(m_Type);
     return(getSize());
 }