Esempio n. 1
0
    void OnEnable()
    {
        m_Instance = this;

        InitOpenTime();
        Init();
    }
        public uint Execute(PacketDistributed ipacket)
        {
            GC_SYNC_JUYI_INFO packet = (GC_SYNC_JUYI_INFO)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            GameManager.gameManager.PlayerDataPool.JuYiCount = packet.JuYiCount;
            if (JuYiYiTangWindow.Instance() != null)
            {
                JuYiYiTangWindow.Instance().Init();
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Esempio n. 3
0
 void OnDisable()
 {
     m_Instance = null;
 }
Esempio n. 4
0
 void OnDestroy()
 {
     m_Instance = null;
 }
Esempio n. 5
0
 void Awake()
 {
     m_Instance = this;
 }
        void OnCommonDataChange(int nIndex, int nValue)
        {
            if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_COPYSCENE_QUITTIME)
            {
                if (FunctionButtonLogic.Instance() != null)
                {
                    FunctionButtonLogic.Instance().ExitTime = nValue;
                }
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_CJG_SWEEP_CD)
            {
                GameManager.gameManager.PlayerDataPool.CJGSweepCDTime = nValue;
                if (DungeonWindow.Instance() != null)
                {
                    DungeonWindow.Instance().UpdateTabInfo();
                }
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_COPYSCENE_SWEEP_CD)
            {
                GameManager.gameManager.PlayerDataPool.CopyeSceneSweepCDTime = nValue;
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_JXZ ||
                     nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_YZW ||
                     nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_ZLQJ ||
                     nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_YWGM ||
                     nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_NHCJ ||
                     nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_SSS)
            {
                if (DungeonWindow.Instance() != null)
                {
                    DungeonWindow.Instance().UpdateTabInfo();
                }
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_SHARE_NANGUA_CODE_REWARD_COUNT)
            {
                if (ShareRootWindow.Instance() != null)
                {
                    ShareRootWindow.Instance().UpdateRewardCount();
                }
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_WISHINGWELL_TOTAL ||
                     nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_WISHINGWELL_FETCH)
            {
                if (ChargeActivityLogic_XY.Instance() != null)
                {
                    ChargeActivityLogic_XY.Instance().UpdateData();
                }
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_MONEYTREE)
            {
                if (MoneyTreeLogic.Instance() != null)
                {
                    MoneyTreeLogic.Instance().UpdateVipTip();
                }
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_PAOSHANG_GOTTEN_NUM)
            {
                if (MenuBarLogic.Instance() != null)
                {
                    MenuBarLogic.Instance().UpdateGuildAndMasterReserveMember();
                }
                if (PlayerFrameLogic.Instance() != null)
                {
                    PlayerFrameLogic.Instance().UpdateRemainNum();
                }
//                if (GuildWindow.Instance() != null)
//                {
//                    GuildWindow.Instance().UpdatePaoShangTip();
//                }
//                if (GuildPaoShang.Instance() != null)
//                {
//                    GuildPaoShang.Instance().UpdateMemTimesOneDay();
//                }
            }
//            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_HONGBAO_SCORE)
//            {
//                if (MakeHongBaoWindow.Instance() != null )
//                {
//                    MakeHongBaoWindow.Instance().Score = nValue;
//                }
//            }
            else if (nIndex == (int)USER_COMMONDATA.CD_GUILDMISSION_DAILYDATA)
            {
//                if (GuildMission.Instance() != null)
//                {
//                    GuildMission.Instance().MisionData = nValue;
//                }
            }
//			else if (nIndex == (int)USER_COMMONDATA.CD_GIVEROSE_NUMBER
//			         || nIndex == (int)USER_COMMONDATA.CD_RECEIVEROSE_NUMBER )
//			{
//				if (LoverFlowerWindow.Instance() != null)
//				{
//					LoverFlowerWindow.Instance().UpdateRankNumber();
//				}
//			}
            else if (nIndex == (int)USER_COMMONDATA.CD_JUYIYITANG_GETAWARD)
            {
                if (JuYiYiTangWindow.Instance() != null)
                {
                    JuYiYiTangWindow.Instance().Init();
                }
            }
            else if (nIndex == (int)USER_COMMONDATA.CD_TRAINING_LEVEL ||
                     nIndex == (int)USER_COMMONDATA.CD_TRAINING_CHOICEDATA1 ||
                     nIndex == (int)USER_COMMONDATA.CD_TRAINING_CHOICEDATA2 ||
                     nIndex == (int)USER_COMMONDATA.CD_TRAINING_CHOICEDATA3)
            {
                if (TrainingLogic.Instance() != null)
                {
                    TrainingLogic.Instance().HandleUpdateTrainingLevel();
                }
            }
            else if (nIndex == (int)USER_COMMONDATA.CD_TRAINING_EXP)
            {
                if (TrainingLogic.Instance() != null)
                {
                    TrainingLogic.Instance().HandleUpdateTrainingExp();
                }
            }
            //else if (nIndex == (int)USER_COMMONDATA.CD_NEWSERVERACTIVITY)
            //{
            //    if (NewFunctionLogic.Instance() != null)
            //    {
            //        NewFunctionLogic.Instance().ShowNewServerActivity();
            //    }
            //}
        }