Exemple #1
0
    /// <summary>
    /// 팀편성창에서 쓰임.
    /// </summary>
    /// <param name="ItemInfo"></param>
    /// <param name="type"></param>
    public void SetIcon(CreatureItemInfo ItemInfo, enCreatureIcon_Type type)
    {
        if (m_ReinforceLevelLabel != null)
        {
            m_ReinforceLevelLabel.text = string.Format("{0}{1}", "+", ItemInfo.ForceCount);
        }
        if (m_LevelLabel != null)
        {
            m_LevelLabel.text = string.Format("{0}{1}", StringTableManager.GetData(12), ItemInfo.Level);
        }

        _CreatureTableData = UtilFunc.GetCreatureDataByTID(ItemInfo.Tid);

        //SetDefaultIcon(ItemInfo.m_Name, ItemInfo.m_icon, UtilFunc.IconSpriteName(ItemInfo.m_enCreatureArmy), ItemInfo.m_Grade);
        SetDefaultIcon(_CreatureTableData.iCreatureName, ItemInfo.IconName, ItemInfo.CreatureArmyType.ToString(), ItemInfo.Grade, ItemInfo.awake, ItemInfo.Quality);

        _CreatureKey     = ItemInfo.CreatureKey;
        m_iCreatureTID   = ItemInfo.Tid;
        m_iGrade         = ItemInfo.Grade;
        m_SellCheck      = ItemInfo.IsSell;
        m_Reinforce      = ItemInfo.ForceCount;
        m_szName         = ItemInfo.Name;
        m_szIcon         = ItemInfo.IconName;
        m_iLevel         = ItemInfo.Level;
        m_enCreatureArmy = ItemInfo.CreatureArmyType;
        m_iSellCost      = ItemInfo.SellCost;
        m_IsNew          = ItemInfo.IsNew;
        m_kLock          = ItemInfo.Lock;
    }
Exemple #2
0
    //===================================================================================
    //
    // Default Method
    //
    //===================================================================================

    //===================================================================================
    //
    // Method
    //
    //===================================================================================
    public bool SetIcon(ulong kCreatureUniqueIdx, enCreatureIcon_Type type)
    {
        ItemCreature myCreature = UserInfo.Instance.InventoryInfo.GetMyCreature(kCreatureUniqueIdx);

        if (myCreature == null)
        {
#if DEBUG_LOG
            Debug.Log(string.Format("<color=red>크리쳐 키 : {0} 에 해당하는 크리쳐가 인벤에 없다.</color>", kCreatureUniqueIdx));
#endif
            return(false);
        }

        _CreatureTableData = UtilFunc.GetCreatureDataByTID(myCreature.Index);
        if (_CreatureTableData == null)
        {
#if DEBUG_LOG
            Debug.Log("<color=red>DATA_CREATURE_NEWVER 테이블 정보 오류</color>");
#endif
            return(false);
        }

        m_CreatureIconType = type;
        _CreatureKey       = kCreatureUniqueIdx;

        if (m_ReinforceLevelLabel != null)
        {
            m_ReinforceLevelLabel.text = string.Format("{0}{1}", "+", myCreature.ForceCount);
        }
        if (m_LevelLabel != null)
        {
            m_LevelLabel.text = string.Format("{0}{1}", StringTableManager.GetData(12), myCreature.Level);
        }

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

        return(true);
    }
Exemple #3
0
    /// <summary>
    /// 강화정보와 레벨정보를 기본값으로 셋팅하려고 사용한다.
    /// </summary>
    /// <param name="iCreatureID"></param>
    /// <param name="type"></param>
    /// <returns></returns>
    public bool SetIcon(int iCreatureID, enCreatureIcon_Type type)
    {
        _CreatureTableData = UtilFunc.GetCreatureDataByTID(iCreatureID);
        if (_CreatureTableData == null)
        {
            // error
            return(false);
        }

        m_CreatureIconType = type;

        if (m_ReinforceLevelLabel != null)
        {
            m_ReinforceLevelLabel.text = "+ 0";
        }
        if (m_LevelLabel != null)
        {
            m_LevelLabel.text = string.Format("{0}{1}", StringTableManager.GetData(12), " 1");
        }

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

        return(true);
    }
Exemple #4
0
    private void MakeUseCreatureData()
    {
        InventoryInfo pInven = UserInfo.Instance.InventoryInfo;

        if (pInven == null)
        {
            return;
        }

        Dictionary <ulong, ItemCreature> pDicValue = pInven.MapInvenCreature;

        if (pDicValue == null)
        {
            return;
        }

        _CreatureList.Clear();

        // 등급순 -> 레벨순으로 정렬.
        foreach (KeyValuePair <ulong, ItemCreature> dicvalue in pDicValue.OrderByDescending((data) => data.Value.Grade).ThenByDescending((data) => data.Value.Level))
        {
            ulong kCreatureKey = dicvalue.Key;

            if (UtilFunc.IsDispatching(kCreatureKey) == true)                                    // 파견중인 크리쳐는 제낌.
            {
                continue;
            }

            ItemCreature         pMy           = UserInfo.Instance.InventoryInfo.GetMyCreature(kCreatureKey);
            DATA_CREATURE_NEWVER pCreatureData = UtilFunc.GetCreatureDataByTID(pMy.Index);

            if (pCreatureData.m_iGrade < (int)m_DispatchTableData.RequireGrade)      // 필요등급 검사
            {
                continue;
            }

            if (pMy.Level < m_DispatchTableData.RequireLevel)                  // 필요레벨 검사
            {
                continue;
            }

            if (UserInfo.Instance.CreatureTeam.HasTempCreatureAll(kCreatureKey))        // 팀에 속해있는지 검사
            {
                continue;
            }

            CreatureItemInfo info = new CreatureItemInfo();
            info.Init(kCreatureKey, pMy, pCreatureData);
            info.SetDispatchSelect(false, string.Empty);

            _CreatureList.Add(info);
        }

        // 전에 보냈던 크리쳐가 있으면 다시 정렬.
        for (int i = 0; i < m_DispatchRecvData.vCreatureKey.Count; i++)
        {
            foreach (CreatureItemInfo info in _CreatureList)
            {
                if (m_DispatchRecvData.vCreatureKey[i] == info.CreatureKey)
                {
                    CreatureItemInfo oldInfo = info;
                    _CreatureList.Remove(info);
                    _CreatureList.Insert(i, oldInfo);       // 전에 보냈던 순서대로 Insert
                    break;
                }
            }
        }
    }
Exemple #5
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);
    }