示例#1
0
        void SendServerInfo(Table_Skill skill, UpdateServerInfoEnum type)
        {
            string t   = GetServerInfoType(type);
            string url = string.Format("{0}{1}{2}", ActionEventConfig.SERVER_URL, ActionEventConfig.SERVER_SKILL_ACTION_URL, t);

            switch (type)
            {
            case UpdateServerInfoEnum.INSERT:
            case UpdateServerInfoEnum.UPDATE:
                EditorCoroutineRunner.StartEditorCoroutine(SendInfo(url, SendUpdateInfo(skill)));
                break;

            case UpdateServerInfoEnum.DELETE:
                EditorCoroutineRunner.StartEditorCoroutine(SendInfo(url, SendDeleteInfo(skill.id)));
                break;
            }
        }
示例#2
0
        void SendServerInfo(Table_Client_Action_Res ar, UpdateServerInfoEnum type)
        {
            string t   = GetServerInfoType(type);
            string url = string.Format("{0}{1}{2}", ActionEventConfig.SERVER_URL, ActionEventConfig.SERVER_RES_URL, t);

            switch (type)
            {
            case UpdateServerInfoEnum.INSERT:
            case UpdateServerInfoEnum.UPDATE:
                EditorCoroutineRunner.StartEditorCoroutine(SendInfo(url, SendUpdateInfo(ar)));
                break;

            case UpdateServerInfoEnum.DELETE:
                EditorCoroutineRunner.StartEditorCoroutine(SendInfo(url, SendDeleteInfo(ar.id)));
                break;
            }
        }
示例#3
0
        /// <summary>
        /// 获取服务器信息数据类型
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        string GetServerInfoType(UpdateServerInfoEnum type)
        {
            string t = null;

            switch (type)
            {
            case UpdateServerInfoEnum.LIST:
                t = ActionEventConfig.LIST;
                break;

            case UpdateServerInfoEnum.INSERT:
                t = ActionEventConfig.INSERT;
                break;

            case UpdateServerInfoEnum.UPDATE:
                t = ActionEventConfig.UPDATE;
                break;

            case UpdateServerInfoEnum.DELETE:
                t = ActionEventConfig.DELETE;
                break;
            }
            return(t);
        }