コード例 #1
0
            public List <DBUPGRADE> GetRange(DBSTRINGCOLLECTION abilIDs)
            {
                List <DBUPGRADE> list = new List <DBUPGRADE>(this.Count);

                foreach (DBUPGRADE u in this)
                {
                    if (abilIDs.Contains(u.codeID))
                    {
                        list.Add(u);
                    }
                }

                return(list);
            }
コード例 #2
0
            public static DBUPGRADE[] getUpgrades(IList <string> upgradeList)
            {
                DBSTRINGCOLLECTION dbc = new DBSTRINGCOLLECTION(upgradeList);

                ArrayList al = new ArrayList();

                foreach (string upgradeID in dbc)
                {
                    HabProperties hps = DHLOOKUP.hpcUpgradeData[upgradeID];

                    if (hps == null)
                    {
                        continue;
                    }

                    DBUPGRADE upgrade = new DBUPGRADE(hps);
                    al.Add(upgrade);
                }

                return((DBUPGRADE[])al.ToArray(typeof(DBUPGRADE)));
            }
コード例 #3
0
            public bool Contains(DBSTRINGCOLLECTION codeIDs)
            {
                foreach (string codeID in codeIDs)
                {
                    bool found = false;

                    foreach (DBUPGRADE upgrade in this)
                    {
                        if (upgrade.codeID == codeID)
                        {
                            found = true;
                            break;
                        }
                    }

                    if (found == false)
                    {
                        return(false);
                    }
                }

                return(true);
            }