Esempio n. 1
0
    /// <summary>
    /// 客户端任务目标事件
    /// </summary>
    public void clientTaskEvent(int type, params int[] args)
    {
        TaskTypeConfig typeConfig = TaskTypeConfig.get(type);

        if (typeConfig == null)
        {
            me.warnLog("clientTaskEvent时,找不到目标配置", type);
            return;
        }

        if (CommonSetting.isClientDriveLogic)
        {
            taskEvent(type, args);
        }
        else
        {
            if (!typeConfig.isClientDrive)
            {
                me.warnLog("clientTaskEvent时,不可客户端驱动", type);
                return;
            }

            me.send(ClientTaskEventRequest.create(type, args));
        }
    }
Esempio n. 2
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static ClientTaskEventRequest create(int type, int[] args)
    {
        ClientTaskEventRequest re = (ClientTaskEventRequest)BytesControl.createRequest(dataID);

        re.type = type;
        re.args = args;
        return(re);
    }