Exemple #1
0
        public static uint GetSkinIdByIndex(uint heroId, int index)
        {
            ListView <ResHeroSkin> availableSkinByHeroId = CSkinInfo.GetAvailableSkinByHeroId(heroId);

            if (availableSkinByHeroId != null && index >= 0 && index < availableSkinByHeroId.get_Count())
            {
                return(availableSkinByHeroId.get_Item(index).dwSkinID);
            }
            return(0u);
        }
Exemple #2
0
        public static int GetIndexBySkinId(uint heroId, uint skinId)
        {
            ListView <ResHeroSkin> availableSkinByHeroId = CSkinInfo.GetAvailableSkinByHeroId(heroId);

            if (availableSkinByHeroId != null)
            {
                for (int i = 0; i < availableSkinByHeroId.get_Count(); i++)
                {
                    if (availableSkinByHeroId.get_Item(i).dwSkinID == skinId)
                    {
                        return(i);
                    }
                }
            }
            return(-1);
        }
Exemple #3
0
 public static int GetHeroSkinCnt(uint heroId)
 {
     return(CSkinInfo.GetAvailableSkinByHeroId(heroId).get_Count());
 }