示例#1
0
        public override bool Build(SHXmlCore core)
        {
            if (!_bPassed)
            {
                return(false);
            }

            if (dataList.Count == 0)
            {
                return(Error("획득가능한 전리품이 없습니다."));
            }

            foreach (object obj in dataList)
            {
                if (obj.GetType() == typeof(SHLootSilver))
                {
                    SHLootSilver silver = (SHLootSilver)obj;
                    if (!silver.Build(core))
                    {
                        return(Error(silver.CompiledMessage));
                    }
                }
                else if (obj.GetType() == typeof(SHLootItem))
                {
                    SHLootItem item = (SHLootItem)obj;
                    if (!item.Build(core))
                    {
                        return(Error(item.CompiledMessage));
                    }
                }
                else if (obj.GetType() == typeof(SHLootSoul))
                {
                    SHLootSoul soul = (SHLootSoul)obj;
                    if (!soul.Build(core))
                    {
                        return(Error(soul.CompiledMessage));
                    }
                }
            }

            return(_bPassed);
        }
示例#2
0
        public override bool Compile()
        {
            _bPassed = true;

            if (!idSpecified)
            {
                _szCompiled = "ID가 명시되지 않은 개체입니다.";
                _bPassed    = false;
            }

            foreach (object obj in dataList)
            {
                if (obj.GetType() == typeof(SHLootSilver))
                {
                    SHLootSilver silver = (SHLootSilver)obj;
                    if (!silver.Compile())
                    {
                        return(Error(silver.CompiledMessage));
                    }
                }
                else if (obj.GetType() == typeof(SHLootItem))
                {
                    SHLootItem item = (SHLootItem)obj;
                    if (!item.Compile())
                    {
                        return(Error(item.CompiledMessage));
                    }
                }
                else if (obj.GetType() == typeof(SHLootSoul))
                {
                    SHLootSoul soul = (SHLootSoul)obj;
                    if (!soul.Compile())
                    {
                        return(Error(soul.CompiledMessage));
                    }
                }
            }

            return(_bPassed);
        }
示例#3
0
 public void Add(SHLootSoul i)
 {
     dataList.Add(i);
 }