Пример #1
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_GAIN_TITLE packet = (GC_GAIN_TITLE)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            int    nTitleIndex  = packet.TitleIndex;
            int    nTitleID     = packet.TitleID;
            int    nGainTime    = packet.HasGainTime ? packet.GainTime : GlobeVar.INVALID_ID;
            int    nActiveTitle = packet.ActiveTitle;
            string strUserDef   = "";

            if (packet.HasUserDefFullTitleName)
            {
                strUserDef = packet.UserDefFullTitleName;
            }
            GameManager.gameManager.PlayerDataPool.TitleInvestitive.HandleGainTitle(nTitleIndex, nTitleID, nGainTime, strUserDef, nActiveTitle);
            if (null != Singleton <ObjManager> .GetInstance().MainPlayer)
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.ShowPlayerTitleInvestitive();
            }

            if (TitleInvestitiveLogic.Instance() != null)
            {
                TitleInvestitiveLogic.Instance().HandleGainTitle();
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
 public void ChooseTitleInvestitive()
 {
     if (null != TitleInvestitiveLogic.Instance())
     {
         TitleInvestitiveLogic.Instance().ChooseTitleInvestitive(m_Index, m_TitleID, m_TitleClass, m_GainTime);
     }
 }
Пример #3
0
 // Use this for initialization
 void OnEnable()
 {
     m_Instance = this;
     UpdateLockButton();
     Init();
     SelectCurTitle();
 }
        public uint Execute(PacketDistributed ipacket)
        {
            GC_RET_LOCK_TITLE packet = (GC_RET_LOCK_TITLE)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            GameManager.gameManager.PlayerDataPool.IsLockPriorTitle = packet.IsLock == 1 ? true : false;
            if (TitleInvestitiveLogic.Instance() != null)
            {
                TitleInvestitiveLogic.Instance().UpdateLockButton();
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
        public uint Execute(PacketDistributed ipacket)
        {
            GC_ACTIVE_TITLE packet = (GC_ACTIVE_TITLE )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            int nActiveTitle = packet.TitleIndex;

            GameManager.gameManager.PlayerDataPool.TitleInvestitive.ChangeTitle(nActiveTitle);
            if (Singleton <ObjManager> .Instance.MainPlayer)
            {
                Singleton <ObjManager> .Instance.MainPlayer.ShowPlayerTitleInvestitive();
            }
            if (TitleInvestitiveLogic.Instance() != null)
            {
                TitleInvestitiveLogic.Instance().HandleActiveTitle();
            }

            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Пример #6
0
 void OnDisable()
 {
     m_Instance = null;
 }