public bool IsLicensable(SHItemsXml Items, SHTalentsXml Talents)
        {
            foreach (SHItemString itemstring in dataList)
            {
                foreach (int itemID in itemstring.ItemIDList)
                {
                    if (Items.IsValid(itemID) == false)
                    {
                        continue;
                    }

                    SHItem item = Items[itemID];
                    if (item.usable_type == "talent_train")
                    {
                        int talentid = Convert.ToInt32(item.usable_param);
                        if (Talents.IsValid(talentid) == false)
                        {
                            continue;
                        }

                        SHTalent talentinfo = Talents[talentid];
                        if (talentinfo.style == "license")
                        {
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
Exemple #2
0
 public bool LoadTalents()
 {
     Talents = SHGlobal.Deserialize <SHTalentsXml>(SHGlobal.GetServerSystemFolder() + "\\talent.xml", Encoding.UTF8);
     return(Talents.Compile());
 }