示例#1
0
    public static void Process(byte[] bytes)
    {
        MsgAttribs msg  = Utils.BytesToStruct <MsgAttribs>(bytes);
        Role       role = Core.Game.GetEntity(msg.id) as Role;

        if (role != null)
        {
            role.UpdateAttribs(msg.attribs);
        }
    }
示例#2
0
    public IEnumerator Process()
    {
        switch (type)
        {
        case Type.Event:
            MsgEvent.Process(m_bytes);
            break;

        case Type.CreatePlayer:
            MsgCreatePlayer.Process(m_bytes);
            break;

        case Type.Account:
            MsgAccount.Process(m_bytes);
            break;

        case Type.ChangeMap:
            yield return(MsgChangeMap.Process(m_bytes));

            break;

        case Type.EntityEnter:
            MsgEntityEnter.Process(m_bytes);
            break;

        case Type.EntityLeave:
            MsgEntityLeave.Process(m_bytes);
            break;

        case Type.Move:
            MsgMove.Process(m_bytes);
            break;

        case Type.Action:
            MsgAction.Process(m_bytes);
            break;

        case Type.Damage:
            MsgDamage.Process(m_bytes);
            break;

        case Type.Attribs:
            MsgAttribs.Process(m_bytes);
            break;

        case Type.Bag:
            MsgBag.Process(m_bytes);
            break;

        case Type.ItemOperation:
            MsgItemOperation.Process(m_bytes);
            break;

        case Type.Missions:
            MsgMissions.Process(m_bytes);
            break;

        default:
            break;
        }
    }