public uint Execute(PacketDistributed ipacket) { GC_MONEYTREE_YUANBAOAWARD_FACTOR packet = (GC_MONEYTREE_YUANBAOAWARD_FACTOR )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic if (MoneyTreeLogic.Instance()) { MoneyTreeLogic.Instance().YuanbaoFactor = packet.Factor / 100; } return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
public void HandlePacket(GC_MONEYTREE_VIP_RET packet) { if (packet.Ret == 1) { if (BackCamerControll.Instance() != null) { BackCamerControll.Instance().PlaySceneEffect(96); } if (null != GameManager.gameManager.SoundManager) { GameManager.gameManager.SoundManager.PlaySoundEffect(129); //pickup_coin } // 直接更新界面吧 if (MoneyTreeLogic.Instance() != null) { MoneyTreeLogic.Instance().UpdateVipTip(); } } }
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(); // } //} }