示例#1
0
 /// <summary>
 /// 其他获得途径.
 /// </summary>
 /// <param name="show">If set to <c>true</c> show.</param>
 private void ShowAnotherFrom(bool show = true)
 {
     if (show)
     {
         int    soldierId = SoldierM.GetSoldierStarID(m_itemInfo.id);
         string DropDesc  = SoldierM.GetHeroDropDesc(soldierId);
         MyHead.LblGetDes.text = DropDesc;
     }
     MyHead.LblGetDes.gameObject.SetActive(show);
 }
示例#2
0
    // isSoul是为了兼容闪亮登场界面的信息。
    public static ItemIconInfo GetIconInfo(IconType iconType, int id, bool isSoul, bool isBook)
    {
        ItemIconInfo iconInfo = new ItemIconInfo();

        if (iconType == IconType.IconType_Fragment)
        {
            if (isSoul)
            {
                int soldierTypeId       = SoldierM.GetSoldierStarID(id);
                s_soldier_typeInfo info = SoldierM.GetSoldierType(soldierTypeId);
                if (info == null)
                {
                    NGUIUtil.DebugLog("s_soldiertype id = " + id + " 静态表数据未配置!");
                    return(null);
                }
                else
                {
                    iconType = IconType.IconType_Soldier;
                    id       = info.modeltype;
                }
            }
            else if (isBook)
            {
                iconType = IconType.IconType_Captain;
                int godSkillType = GodSkillM.GetGodSkillType(id);
                id = GodSkillM.GetCaptainID(godSkillType);
            }
        }

        if (iconType == IconType.IconType_Soldier)        //英雄整卡
        {
            s_soldier_typeInfo info = SoldierM.GetSoldierType(id);
            if (info == null)
            {
                NGUIUtil.DebugLog("s_soldiertype id = " + id + " 静态表数据未配置!");
                return(null);
            }
            else
            {
                iconInfo.mType = iconType;
                iconInfo.mName = info.name;
                iconInfo.mID   = info.modeltype;
            }
        }
        else if (iconType == IconType.IconType_Fragment)        //道具/碎片
        {
            s_itemtypeInfo info = ItemM.GetItemInfo(id);
            if (info == null)
            {
                NGUIUtil.DebugLog("s_itemtype id = " + id + " 静态表数据未配置!");
                return(null);
            }
            else
            {
                iconInfo.mType = iconType;
                iconInfo.mName = info.name;
                int soldierTypeId = SoldierM.GetSoldierStarID(id);
                iconInfo.mID = info.gid;
            }
        }
        else if (iconType == IconType.IconType_Bulding)        //陷阱
        {
            s_building_typeInfo buildinfo = buildingM.GetBuildType(id);

            iconInfo.mType = iconType;
            iconInfo.mName = buildinfo.name;
            iconInfo.mID   = buildinfo.modeltype;
        }
        else if (iconType == IconType.IconType_Captain)        //黑科技
        {
            iconInfo.mType = iconType;
            CaptionInfo captionInfo = new CaptionInfo();
            GodSkillM.GetCaption(id, ref captionInfo);
            GodSkillInfo godSkillInfo = new GodSkillInfo();
            GodSkillM.GetGodSkill(captionInfo.m_godskilltype1, 1, ref godSkillInfo);
            iconInfo.mName = godSkillInfo.m_name;
            iconInfo.mID   = id;
        }
        iconInfo.mIsSoul = isSoul;
        iconInfo.mIsBook = isBook;
        return(iconInfo);
    }