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); }
public bool LoadTalents() { Talents = SHGlobal.Deserialize <SHTalentsXml>(SHGlobal.GetServerSystemFolder() + "\\talent.xml", Encoding.UTF8); return(Talents.Compile()); }