Ejemplo n.º 1
0
        public static List <CashItem> GetPackageItems(int itemId)
        {
            if (CashPackages.ContainsKey(itemId))
            {
                return(CashPackages[itemId]);
            }
            List <CashItem>    packageItems = new List <CashItem>();
            IMapleDataProvider dataProvider = MapleDataProviderFactory.GetDataProvider("Etc.wz");
            IMapleData         a            = dataProvider.GetData("CashPackage.img");

            foreach (var b in a.Children)
            {
                if (itemId == int.Parse(b.Name))
                {
                    foreach (var c in b.Children)
                    {
                        foreach (var d in c.Children)
                        {
                            int sn = MapleDataTool.GetInt("" + int.Parse(d.Name), c);
                            packageItems.Add(GetItem(sn));
                        }
                    }
                    break;
                }
            }

            if (CashPackages.ContainsKey(itemId))
            {
                CashPackages[itemId] = packageItems;
            }
            else
            {
                CashPackages.Add(itemId, packageItems);
            }

            return(packageItems);
        }
Ejemplo n.º 2
0
 public MapleMapFactory(IMapleDataProvider source, IMapleDataProvider stringSource)
 {
     m_mSource   = source;
     m_mNameData = stringSource.GetData("Map.img");
 }