예제 #1
0
        public Dictionary <uint, string> GetArgList(ArgType argType, bool IsTran = false)
        {
            if (ArgDic.ContainsKey(argType))
            {
                if (IsTran)
                {
                    return(TranArgDic[argType]);
                }
                else
                {
                    return(ArgDic[argType]);
                }
            }

            return(null);
        }
예제 #2
0
        public string ArgParse(MapData mapData, ArgType argType, uint value, bool IsTran = false, bool IsEditor = false)
        {
            if (ArgDic.ContainsKey(argType))
            {
                if (ArgDic[argType].ContainsKey(value))
                {
                    Dictionary <ArgType, Dictionary <uint, string> > dic;

                    if (IsTran)
                    {
                        dic = TranArgDic;
                    }
                    else
                    {
                        dic = ArgDic;
                    }
                    if (dic[argType].ContainsKey(value))
                    {
                        return(dic[argType][value]);
                    }
                    else
                    {
                        return("");
                    }
                }
                else
                {
                    return(value.ToString());
                }
            }
            else
            {
                switch (argType)
                {
                case ArgType.UNIT:
                    if (mapData.IsCustomUnitName((int)value))
                    {
                        return(mapData.GetUnitName((int)value));
                    }
                    else
                    {
                        if (IsEditor)
                        {
                            return(mapData.GetEditorUnitName((int)value));
                        }
                        else
                        {
                            return(mapData.GetMapUnitName((int)value, IsTran));
                        }
                    }

                case ArgType.WAV:

                    break;

                case ArgType.LOCATION:

                    break;

                case ArgType.SWITCH:

                    break;
                }
            }



            return("");
        }
예제 #3
0
 public bool IsArgParseable(ArgType argType)
 {
     return(ArgDic.ContainsKey(argType));
 }