public static bool IsPossessSkin(this ModelManager mmng, int skinId) { if (mmng.GetSummSkinList() == null) { return(false); } SummSkinData summSkinData = mmng.GetSummSkinList().Find((SummSkinData obj) => obj.SkinId == skinId); return(summSkinData != null); }
public static void GetNewHeroSkin(this ModelManager mmng, int skinId) { SysHeroSkinVo dataById = BaseDataMgr.instance.GetDataById <SysHeroSkinVo>(skinId.ToString()); if (dataById == null) { ClientLogger.Error("Skin Model: SkinId Illegal."); return; } SummSkinData item = new SummSkinData { SkinId = skinId, NpcId = dataById.npc_id, SummId = 0L }; mmng.GetSummSkinList().Add(item); }
private void UpdateHeroView_(heroTypeBtn type) { this.HeroinOrder.Clear(); CharacterDataMgr.instance.UpdateHerosData(); List <string> allData = new List <string>(); if (type == heroTypeBtn.All) { allData = CharacterDataMgr.instance.AllHeros; } allData = CharacterDataMgr.instance.AllHeros; this.HeroinOrder.AddRange(this.GetData(allData, heroDataType.Owned)); this.HeroinOrder.AddRange(this.GetData(allData, heroDataType.Free)); this.HeroinOrder.AddRange(this.GetData(allData, heroDataType.Non_Owned)); this.sacrificialCenter.UpdateView(this.GetData(allData, heroDataType.Owned), this.GetData(allData, heroDataType.Free), this.GetData(allData, heroDataType.Non_Owned)); SummSkinData summSkinData = new SummSkinData(); summSkinData.SkinId = 0; summSkinData.NpcId = string.Empty; summSkinData.SummId = 0L; }
public override void SetData() { if (base.RepeatList.Exists((DropItemData x) => x.itemCount == this.ItemCount)) { MobaMessageManagerTools.GetItems_Exchange(ItemType.HeroSkin, base.ItemCount.ToString(), true); } else { MobaMessageManagerTools.GetItems_HeroSkin(base.ItemCount); } SummSkinData temp = new SummSkinData { NpcId = BaseDataMgr.instance.GetDataById <SysHeroSkinVo>(base.ItemCount.ToString()).npc_id, SkinId = base.ItemCount, SummId = base.UserDATA.SummonerId }; if (ModelManager.Instance.GetSummSkinList().Find((SummSkinData obj) => obj.SkinId == temp.SkinId) == null) { ModelManager.Instance.GetSummSkinList().Add(temp); } }