public static ISelector GetSelector(string description, int id, char param,string comparatorType)
        {
            ISelector selector;

            if (param == Const.CODE_COMPARATOR)
                selector = new ComparatorSelector(id, param,comparatorType);
            else if (description.StartsWith(Const.SELECTOR_QUESTTYPE))
                selector = new QuestSelector(id, param);
            else if (description.StartsWith(Const.SELECTOR_GAMELIVING) || description.StartsWith(Const.SELECTOR_GAMENPC))
                selector = new NPCSelector(id, param);
            else if (description.StartsWith(Const.SELECTOR_AREA))
                selector = new AreaSelector(id, param);
            else if (description.StartsWith(Const.SELECTOR_ITEM))
                selector = new ItemSelector(id, param);
            else if (description.StartsWith(Const.SELECTOR_WHIPSER))
                selector = new WhisperSelector(id, param);
            else if (description.StartsWith(Const.SELECTOR_REGION))
                selector = new RegionSelector(id, param);
            else if (description.StartsWith(Const.SELECTOR_ZONE))
                selector = new ZoneSelector(id, param);
            else if (description.StartsWith(Const.SELECTOR_TEXTTYPE))
                selector = new EnumerationSelector(id, param, typeof(eTextType).Name);
            else if (description.StartsWith(Const.SELECTOR_TEXT))
                selector = new TextSelector(id, param);
            else if (description.StartsWith(Const.SELECTOR_LOCATION))
                selector = new LocationSelector(id, param);
            else if (description.StartsWith(Const.SELECTOR_COMPARATOR))
                selector = new ComparatorSelector(id, param,comparatorType);
            else if (description.StartsWith(Const.SELECTOR_EMOTE))
                selector = new EnumerationSelector(id, param, typeof(eEmote).Name);
            else if (description.StartsWith(Const.SELECTOR_CHARACTERCLASS))
                selector = new EnumerationSelector(id, param, typeof(DOL.GS.eCharacterClass).Name);
            else
                selector = new BaseSelector(id, param);

            return selector;
        }
示例#2
0
        public static ISelector GetSelector(string description, int id, char param, string comparatorType)
        {
            ISelector selector;

            if (param == Const.CODE_COMPARATOR)
            {
                selector = new ComparatorSelector(id, param, comparatorType);
            }
            else if (description.StartsWith(Const.SELECTOR_QUESTTYPE))
            {
                selector = new QuestSelector(id, param);
            }
            else if (description.StartsWith(Const.SELECTOR_GAMELIVING) || description.StartsWith(Const.SELECTOR_GAMENPC))
            {
                selector = new NPCSelector(id, param);
            }
            else if (description.StartsWith(Const.SELECTOR_AREA))
            {
                selector = new AreaSelector(id, param);
            }
            else if (description.StartsWith(Const.SELECTOR_ITEM))
            {
                selector = new ItemSelector(id, param);
            }
            else if (description.StartsWith(Const.SELECTOR_WHIPSER))
            {
                selector = new WhisperSelector(id, param);
            }
            else if (description.StartsWith(Const.SELECTOR_REGION))
            {
                selector = new RegionSelector(id, param);
            }
            else if (description.StartsWith(Const.SELECTOR_ZONE))
            {
                selector = new ZoneSelector(id, param);
            }
            else if (description.StartsWith(Const.SELECTOR_TEXTTYPE))
            {
                selector = new EnumerationSelector(id, param, typeof(eTextType).Name);
            }
            else if (description.StartsWith(Const.SELECTOR_TEXT))
            {
                selector = new TextSelector(id, param);
            }
            else if (description.StartsWith(Const.SELECTOR_LOCATION))
            {
                selector = new LocationSelector(id, param);
            }
            else if (description.StartsWith(Const.SELECTOR_COMPARATOR))
            {
                selector = new ComparatorSelector(id, param, comparatorType);
            }
            else if (description.StartsWith(Const.SELECTOR_EMOTE))
            {
                selector = new EnumerationSelector(id, param, typeof(eEmote).Name);
            }
            else if (description.StartsWith(Const.SELECTOR_CHARACTERCLASS))
            {
                selector = new EnumerationSelector(id, param, typeof(DOL.GS.eCharacterClass).Name);
            }
            else
            {
                selector = new BaseSelector(id, param);
            }

            return(selector);
        }