Example #1
0
    private void CreateFriendCreatureIcon()
    {
        _vFriend vFriends = UserInfo.Instance.FriendInfo.vFriends;

        if (vFriends == null)
        {
            return;
        }

        DestroyFriendCreatureIcon();

        for (int i = 0; i < vFriends.Count; ++i)
        {
            CFriend friendInfo = vFriends[i];
            if (friendInfo == null)
            {
                continue;
            }

            DATA_CREATURE_NEWVER pCreatureData = CDATA_CREATURE_NEWVER.Get(friendInfo.kCreatureID);
            if (pCreatureData.m_iGrade < (int)m_DispatchTableData.RequireGrade)      // 필요등급 검사
            {
                continue;
            }

            DispatchTeamItemFriend friendItem = UIResourceMgr.CreatePrefab <DispatchTeamItemFriend>(BUNDLELIST.PREFABS_UI_DISPATCH, m_FriendListGrid.transform, "DispatchTeamItemFriend");
            friendItem.Init(friendInfo, pCreatureData);
            UIEventListener.Get(friendItem.gameObject).onClick = OnClickFriendItem;

            _FriendList.Add(friendItem);
        }

        FriendListResetPosition();
    }
    [SerializeField] private UISprite _MeSprite;        // 내 케릭터다.

    //===================================================================================
    //
    // Variable
    //
    //===================================================================================

    //===================================================================================
    //
    // Default Method
    //
    //===================================================================================

    //===================================================================================
    //
    // Method
    //
    //===================================================================================
    public void Init(CGuildRaidUserRankInfo info)
    {
        if (CDATA_CREATURE_NEWVER.GetCount() < 1)
        {
            CDATA_CREATURE_NEWVER.Load();
        }

        if (CDATA_VIP.GetCount() < 1)
        {
            CDATA_VIP.Load();
        }

        _RankLabel.text = string.Format(StringTableManager.GetData(3412), info.kUserRank);

        DATA_CREATURE_NEWVER CreatureTable = CDATA_CREATURE_NEWVER.Get(info.kCreatureID);

        _LeaderCreatureSprite.sprite2D = UIResourceMgr.CreateSprite(BUNDLELIST.TEXTURE_ICON_CREATUREHEAD, CreatureTable.m_szIcon);

        _VipRankSprite.spriteName = CDATA_VIP.Get(info.kCharVIPLevel).szGradeImg;
        _VipRankLabel.text        = string.Format(StringTableManager.GetData(4984), (int)info.kCharVIPLevel);

        _LevelLabel.text = string.Format("{0}{1}", StringTableManager.GetData(12), (int)info.kCharLevel);

        _NameLabel.text = info.kCharName;

        _EnterCountLabel.text = info.kGuildRaidPlayCount.ToString();

        _guildRaidScore.text = info.kGuildRaidScore.ToString();

        _MeSprite.gameObject.SetActive(string.Equals(info.kCharName, UserInfo.Instance.NickName));
    }
    public void InitCreature(CCreatureDetail creature)
    {
        _wealthIcon.gameObject.SetActive(false);
        _itemIcon.gameObject.SetActive(false);

        foreach (Transform tr in _creatureIcon.GetComponentsInChildren <Transform>(true))
        {
            tr.gameObject.SetActive(true);
        }

        int iCreatureTID = CDATA_CREATURE_NEWVER.Get(creature.kCreatureID).m_iCreatureTID;

        _creatureIcon.SetIcon(iCreatureTID, enCreatureIcon_Type.GuildRaidReward);

        //_wealthParent.SetActive(false);
        //_itemParent.SetActive(false);

        //foreach (Transform tr in _creatureParent.GetComponentsInChildren<Transform>(true))
        //{
        //    tr.gameObject.SetActive(true);
        //}

        //int iCreatureTID = CDATA_CREATURE_NEWVER.Get(creature.kCreatureID).m_iCreatureTID;
        //DATA_CREATURE_NEWVER CreatureTable = UtilFunc.GetCreatureDataByTID(iCreatureTID);

        //_creatureSprite.sprite2D = UIResourceMgr.CreateSprite(BUNDLELIST.TEXTURE_ICON_CREATUREHEAD, CreatureTable.m_szIcon);
        //_creatureGradeSprite.spriteName = string.Format("{0}{1}", "comm_thumbnailStar0", CreatureTable.m_iGrade);
        //_creatureClassSprite.spriteName = string.Format("{0}{1}", "UI_", CreatureTable.m_enCreatureArmy.ToString());

        //_IconNameLabel.text = StringTableManager.GetData(CreatureTable.iCreatureName);
    }
    /// <summary>
    /// 모델 생성
    /// </summary>
    private MainMenuCreatureContainer CreateModel(_stCreatureIDTeamMember CreatureIDTeamMember, Transform trParent)
    {
        MainMenuCreatureContainer pCreature = new MainMenuCreatureContainer();

        DATA_CREATURE_NEWVER creatureTable = CDATA_CREATURE_NEWVER.Get(CreatureIDTeamMember.kCreatureID);

        string objName = "CREATURE_" + creatureTable.m_szResourceName;

        if (pCreature.LoadCreatureModel(creatureTable.m_szResourceName, objName, trParent) == false)
        {
            return(null);
        }

        pCreature.SetCreatureTableData(creatureTable);

        pCreature.baseGameObject.transform.localPosition = Vector3.zero;
        pCreature.baseGameObject.transform.Rotate(Vector3.up, 180);

        pCreature.SetActiveCharPanel(true);
        pCreature.SetEnableCharPanel(true);

        pCreature.SetCharPanelShadowTexture("Texture/Rim/shadow");
        pCreature.SetCharPanelShader("Mobile/Transparent/Alpha Blended");

        pCreature.SetCharacterShader();

        pCreature.CreateTranscendenceEffect(enRenderLayer.EFFECT, creatureTable.m_enGrade, CreatureIDTeamMember.kCreatureAwake);

        return(pCreature);
    }
Example #5
0
    private void SetCreatureData(CreatureIcon selectIcon, PvPCreatureInfo info)
    {
        DATA_CREATURE_NEWVER creatureTable = CDATA_CREATURE_NEWVER.Get(info.enID);

        int level = info.Level;

        CCreatureAbility creatureStat = BattleRule.CreatureAbilityUI(
            creatureTable,
            BattleRule.AddCreatureStatAbility(level, info.forceCount, creatureTable),
            BattleRule.PvPCreatureItemAbility(info.items));

        CCreatureAbilityUI.SetValues(creatureStat, _statValueTitle);

        CreateItemIcon(info.items);

        _passiveSkill = creatureTable.m_PassiveSkill_0;
        _skill0       = creatureTable.m_Skill_0;
        _activeSkill  = creatureTable.m_Skill_1;

        SetSkillInfo();

        foreach (CreatureIcon icon in _creatureIconList)
        {
            icon.SetActiveSelect(false);
        }

        selectIcon.SetActiveSelect(true);
    }
Example #6
0
    public void SetIcon(BookCreatureInfo bookInfo, enCreatureIcon_Type type)
    {
        if (m_Creature2DSprite != null)
        {
            m_Creature2DSprite.gameObject.SetActive(false);
        }
        if (m_ReinforceLevelLabel != null)
        {
            m_ReinforceLevelLabel.gameObject.SetActive(false);
        }
        if (m_LevelLabel != null)
        {
            m_LevelLabel.gameObject.SetActive(false);
        }

        if (_BookBgParentObj != null)
        {
            _BookBgParentObj.SetActive(true);
        }

        if (bookInfo == default(BookCreatureInfo))
        {
            if (m_CreatureNameLabel != null)
            {
                m_CreatureNameLabel.gameObject.SetActive(false);
            }
            if (m_ClassSprite != null)
            {
                m_ClassSprite.gameObject.SetActive(false);
            }
            if (m_StartSprite != null)
            {
                m_StartSprite.gameObject.SetActive(false);
            }
            if (_transcendnceStarSprite != null)
            {
                _transcendnceStarSprite.gameObject.SetActive(false);
            }

            EnableBoxCollider(false);
            SetActiveAll(false);
            SetActiveBookBg(true);
        }
        else
        {
            _CreatureTableData = CDATA_CREATURE_NEWVER.Get(bookInfo.m_enCreature);
            if (_CreatureTableData == null)
            {
                // error
                return;
            }

            EnableBoxCollider(true);
            SetDefaultIcon(_CreatureTableData.iCreatureName, _CreatureTableData.m_szIcon, _CreatureTableData.m_enCreatureArmy.ToString(), _CreatureTableData.m_iGrade, 0, _CreatureTableData.m_iQuality);
        }
    }
Example #7
0
    public bool SetIcon(DATA_CREATURE_NEWVER._enIndex iCreatureID, enCreatureIcon_Type type)
    {
        _CreatureTableData = CDATA_CREATURE_NEWVER.Get(iCreatureID);
        if (_CreatureTableData == null)
        {
            // error
            return(false);
        }

        m_CreatureIconType = type;

        SetDefaultIcon(_CreatureTableData.iCreatureName, _CreatureTableData.m_szIcon, _CreatureTableData.m_enCreatureArmy.ToString(), _CreatureTableData.m_iGrade, 0, _CreatureTableData.m_iQuality);

        return(true);
    }
Example #8
0
    private void CreateCreatureIcon(PvPCreaturesData creatureInfos)
    {
        ClearCreatureIcon();

        for (int i = 0; i < creatureInfos.Count; i++)
        {
            PvPCreatureInfo info = creatureInfos[i];

            CreatureIcon icon  = UIResourceMgr.CreatePrefab <CreatureIcon>(BUNDLELIST.PREFABS_UI_COMMON, _creatureIconTransforms[i], "CreatureIcon");
            int          Level = info.Level;
            icon.SetIcon(Level, info.forceCount, info.awake, CDATA_CREATURE_NEWVER.Get(info.enID), enCreatureIcon_Type.PvpDetail);
            icon.CreatureKey = info.key;
            icon.RemoveDragScrollView();
            UIEventListener.Get(icon.gameObject).onClick = OnClickIcon;

            _creatureIconList.Add(icon);
        }
    }
    /// <summary>
    /// 유저정보 셋팅.
    /// </summary>
    private void SetOtherUserInfo(_stCharSimpleInfo kCharSimpleInfo)
    {
        m_UserNameLbl.text = kCharSimpleInfo.kDestCharName;
        m_LevLbl.text      = string.Format("{0} {1}", StringTableManager.GetData(12), kCharSimpleInfo.kDestCharLevel);

        float fResult = UtilFunc.GetUserExpPercent(kCharSimpleInfo.kDestCharExp, kCharSimpleInfo.kDestCharExp);

        m_ExpImg.fillAmount  = fResult;
        m_ExpPercentLbl.text = string.Format("{0:F2} {1}", (fResult * 100), "%");

        // 대표 크리쳐 셋팅.
        string cretureName = CDATA_CREATURE_NEWVER.Get(kCharSimpleInfo.kDestCharLearderCreatureID).m_szIcon;

        m_MainCharImg.sprite2D = UIResourceMgr.CreateSprite(BUNDLELIST.TEXTURE_ICON_CREATUREHEAD, cretureName);

#if VIP_SYSTEM
        DATA_VIP datavip = CDATA_VIP.Get(kCharSimpleInfo.kDestCharVIPLevel);
        if (datavip != null)
        {
            m_SprVipGrade.spriteName = datavip.szGradeImg;
            m_LabelVipGrade.text     = string.Format(StringTableManager.GetData(4984), (int)kCharSimpleInfo.kDestCharVIPLevel);
        }
#endif
    }
Example #10
0
    //===================================================================================
    //
    // Method
    //
    //===================================================================================
    public void Init(enGuildInfo_WindowType type, ulong kGuildKey, CGuildMember member)
    {
        m_DelegationButtonLabel.text = StringTableManager.GetData(6294);     // 6294	길드장 위임
        m_AppointButtonLabel.text    = StringTableManager.GetData(6298);     // 6298	부길드장 임명

        m_BgMeSprite.gameObject.SetActive(false);
        m_CaptainCrown.gameObject.SetActive(false);
        m_SubCaptainCrown.gameObject.SetActive(false);

        m_kGuildKey  = kGuildKey;
        m_MemberInfo = member;

        m_NameLabel.text = m_MemberInfo.kCharName;

        m_LevelLabel.text = string.Format("{0} {1}", StringTableManager.GetData(12), m_MemberInfo.kCharLevel);  // 12번 텍스트 LV

        DATA_VIP VipData = CDATA_VIP.Get(m_MemberInfo.kCharVIPLevel);

        if (VipData != null)
        {
            m_VipRankSprite.spriteName = VipData.szGradeImg;
        }
        m_VipRankLabel.text = string.Format(StringTableManager.GetData(4984), (int)m_MemberInfo.kCharVIPLevel);

        DATA_CREATURE_NEWVER CreatureData = CDATA_CREATURE_NEWVER.Get(m_MemberInfo.kLeaderCreatureID);

        if (CreatureData != null)
        {
            int iCreatureTID = CDATA_CREATURE_NEWVER.Get(m_MemberInfo.kLeaderCreatureID).m_iCreatureTID;
            DATA_CREATURE_NEWVER pCreatureData = UtilFunc.GetCreatureDataByTID(iCreatureTID);
            m_CreatureSprite.sprite2D = UIResourceMgr.CreateSprite(BUNDLELIST.TEXTURE_ICON_CREATUREHEAD, pCreatureData.m_szIcon);
        }

        // 공물형태가 무엇인지?
        {
            // 6856	무료 공물
            _GoddnessTributeFreeLabel.text = StringTableManager.GetData(6856);
            _GoddnessTributeFreeObj.SetActive(false);
            _GoddnessTributeGoodObj.SetActive(false);
            _GoddnessTributeExtraObj.SetActive(false);

            _attendanceReward.state = ButtonState.Off;

            DateTime MemberAttendanceTime = m_MemberInfo.kGuildAttendanceTime.GetDateTime();
            if (MemberAttendanceTime.Date >= TimeManager.Instance.GetServerTime().Date&&
                (m_MemberInfo.kBuffKind != DATA_GUILD_TRIBUTE._enTributeEnum.None && m_MemberInfo.kBuffKind != DATA_GUILD_TRIBUTE._enTributeEnum._enTributeEnum_Max))
            {
                _attendanceReward.state = ButtonState.On;

                DATA_GUILD_TRIBUTE._enTributeEnum GuildBuffKind = m_MemberInfo.kBuffKind;
                DATA_GUILD_TRIBUTE GuildTributeData             = CDATA_GUILD_TRIBUTE.Get(GuildBuffKind);
                if (GuildTributeData == null)
                {
                    return;     // error
                }
                _attendanceReward.SetOnLabel(string.Format(StringTableManager.GetData(8679), GuildTributeData.iKeyAmount));

                int iCount = CDATA_GUILD_MAIN.GetCount();
                for (int i = 0; i < iCount; ++i)
                {
                    DATA_GUILD_MAIN GuildMainData = CDATA_GUILD_MAIN.GetByIndex(i);
                    if (GuildMainData == null)
                    {
                        continue;
                    }

                    if (GuildMainData.enTributeFree == GuildBuffKind)
                    {
                        _GoddnessTributeFreeObj.SetActive(true);
                        break;
                    }
                    else if (GuildMainData.enTributeGood == GuildBuffKind)
                    {
                        _GoddnessTributeGoodObj.SetActive(true);
                        break;
                    }
                    else if (GuildMainData.enTributeExtra == GuildBuffKind)
                    {
                        _GoddnessTributeExtraObj.SetActive(true);
                        break;
                    }
                }
            }
        }

        if (type == enGuildInfo_WindowType.MyGuild)
        {
            _ContributionTitleLabel.gameObject.SetActive(true);
            _ContributionPointLabel.gameObject.SetActive(true);
            _attendanceReward.gameObject.SetActive(true);

            // 6905    기여도
            _ContributionTitleLabel.text = StringTableManager.GetData(6905);
            _ContributionPointLabel.text = m_MemberInfo.kUserTributeExp.ToString();     // 기여도 점수.
        }
        else
        {
            _ContributionTitleLabel.gameObject.SetActive(false);
            _ContributionPointLabel.gameObject.SetActive(false);
            _attendanceReward.gameObject.SetActive(false);
        }

        if (m_MemberInfo.kAccessState == _enGuildMemberAccessState.eAccess_Yes)
        {
            _MemberLogOffObj.SetActive(false);

            // 3473	접속중
            m_LastConnectLabel.text = string.Format(StringTableManager.GetData(3473));
        }
        else
        {
            if (UserInfo.Instance.CharNo == m_MemberInfo.kCharNo)
            {
                _MemberLogOffObj.SetActive(false);

                // 3473	접속중
                m_LastConnectLabel.text = string.Format(StringTableManager.GetData(3473));
            }
            else
            {
                if (m_kGuildKey == UserInfo.Instance.GuildKey)
                {
                    // 내가 속한 길드일때만 길드원의 접속여부를 확인한다.
                    _MemberLogOffObj.SetActive(true);
                }
                else
                {
                    _MemberLogOffObj.SetActive(false);
                }

                System.TimeSpan timeresult = TimeManager.Instance.GetServerTime() - m_MemberInfo.kLastLogonTime.GetDateTime();
                if (timeresult.Days > 0)
                {
                    // 6589    {0} 일 전.
                    m_LastConnectLabel.text = string.Format(StringTableManager.GetData(6589), timeresult.Days);
                }
                else if (timeresult.Hours > 0)
                {
                    // 6590    {0} 시간 전.
                    m_LastConnectLabel.text = string.Format(StringTableManager.GetData(6590), timeresult.Hours);
                }
                else
                {
                    // 6591    {0} 시간 미만.
                    m_LastConnectLabel.text = string.Format(StringTableManager.GetData(6591), "1");
                }
            }
        }

        if (m_MemberInfo.kMemberState == _enGuildMemberState.eGuildMemberState_Captain)
        {
            m_CaptainCrown.gameObject.SetActive(true);
        }
        else if (m_MemberInfo.kMemberState == _enGuildMemberState.eGuildMemberState_SubCaptain || m_MemberInfo.kMemberState == _enGuildMemberState.eGuildMemberState_AbleSubCaptain)
        {
            m_SubCaptainCrown.gameObject.SetActive(true);
        }

        bool IsMine = false;        // 내 캐릭인지

        if (m_MemberInfo.kCharNo == UserInfo.Instance.CharNo)
        {
            m_BgMeSprite.gameObject.SetActive(true);
            IsMine = true;
        }

        SetButton(type, m_MemberInfo.kMemberState, IsMine);
    }