public void HandlePacket(GC_RET_GETREWARDFORSIGNIN packet) { int nFlag = packet.Ret; if (nFlag == 0) { m_bDayAwardFlag = true; } else { m_bDayAwardFlag = false; } GameManager.gameManager.PlayerDataPool.AlreadySingedCount = packet.AlreadySingDays; if (null != AwardLogic.Instance() && AwardLogic.Instance().m_DaySignInAwardRoot != null) { //AwardLogic.Instance().UpdateTip(); if (AwardLogic.Instance().m_DaySignInAwardRoot.gameObject.activeSelf) { if (m_bDayAwardFlag) { AwardLogic.Instance().m_DaySignInAwardRoot.GainRewardSucessfully(true); } else { AwardLogic.Instance().m_DaySignInAwardRoot.GainRewardSucessfully(false); // 弹出提示:签到失败 } } } }
public void HandlePacket(GC_DAYAWARD_DATA packet) { m_nWeekDay = packet.WeekDay; int nFlag = packet.Flag; if (nFlag == 0) { m_bDayAwardFlag = false; } else { m_bDayAwardFlag = true; } // 通知UI按钮 显示提醒 if (null != FunctionButtonLogic.Instance()) { FunctionButtonLogic.Instance().UpdateButtonAwardTips(); } if (null != AwardLogic.Instance() && AwardLogic.Instance().m_DayAwardRoot != null) { AwardLogic.Instance().UpdateTip(); if (AwardLogic.Instance().m_DayAwardRoot.gameObject.activeSelf) { AwardLogic.Instance().m_DayAwardRoot.ButtonDayAward(); AwardLogic.Instance().m_DayAwardRoot.PlayEffect(m_nWeekDay, m_bDayAwardFlag); } } }
public static void ShowSNSWindow(bool bSuccess, object param) { if (bSuccess) { if (AwardLogic.Instance() != null) { //AwardLogic.Instance().ShowSNSWindow(); AwardLogic.Instance().SetAfterStartDelegateSNS(); } } }
public uint Execute(PacketDistributed ipacket) { GC_RET_ACCUMULATESIGNININFO packet = (GC_RET_ACCUMULATESIGNININFO )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic GameManager.gameManager.PlayerDataPool.AlreadySingedCount = packet.AlreadySignedCount; if (packet.GetIndex(0) == 1) // 第一个说明重新发送,清理缓存 { GameManager.gameManager.PlayerDataPool.ClearAccuItemListCache(); } for (int i = 0; i < packet.indexCount; i++) { AccumulateSignInfo Item = new AccumulateSignInfo(); Item.ItemIndex = packet.GetIndex(i); Item.ItemStatus = packet.GetStatus(i); Item.Exp = packet.GetExp(i); Item.Money = packet.GetMoney(i); Item.BindYuanbao = packet.GetBindYuanbao(i); //Item.ItemDataID = packet.GetItemDataID(i); //Item.ItemCount = packet.GetItemCount(i); Item.ItemDataID1 = packet.GetItemDataID1(i); Item.ItemCount1 = packet.GetItemCount1(i); Item.ItemDataID2 = packet.GetItemDataID2(i); Item.ItemCount2 = packet.GetItemCount2(i); Item.ItemDataID3 = packet.GetItemDataID3(i); Item.ItemCount3 = packet.GetItemCount3(i); Item.ItemDataID4 = packet.GetItemDataID4(i); Item.ItemCount4 = packet.GetItemCount4(i); Item.ItemDataID5 = packet.GetItemDataID5(i); Item.ItemCount5 = packet.GetItemCount5(i); GameManager.gameManager.PlayerDataPool.AddDaySignInfo(Item); } //GameManager.gameManager.PlayerDataPool.IsHaveNewSignCanDraw (); if (packet.indexCount > 1 && FunctionButtonLogic.Instance() != null) { FunctionButtonLogic.Instance().UpdateButtonAwardTips(); if (AwardLogic.Instance()) { AwardLogic.Instance().RefreshDaySignInUI(); } } return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
void RefreshTotalCounts() { // int totalCounts = GameManager.gameManager.PlayerDataPool.GetTotalSignedCountThisMounth (); //AllSignedCountsMounth.text = StrDictionary.GetClientDictionaryString("#{4641}",totalCounts,GameManager.gameManager.PlayerDataPool.NowDayIndex); // 更新脑壳上的tips if (FunctionButtonLogic.Instance() != null) { FunctionButtonLogic.Instance().UpdateButtonAwardTips(); } if (null != AwardLogic.Instance()) { AwardLogic.Instance().UpdateTip(); } }
public uint Execute(PacketDistributed ipacket) { GC_RET_SIGNININFO packet = (GC_RET_SIGNININFO )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic GameManager.gameManager.PlayerDataPool.NowDayIndex = packet.CurNaturalIndex; GameManager.gameManager.PlayerDataPool.DefaultFirstSignIndex = packet.FirstCanSignIndex; GameManager.gameManager.PlayerDataPool.CurSelectedDayIndex = packet.FirstCanSignIndex; GameManager.gameManager.PlayerDataPool.CurMounthId = packet.CurMounthIndex; if (packet.GetIndex(0) == 1) // 第一个说明重新发送,清理缓存 { GameManager.gameManager.PlayerDataPool.ClearSignInItemListInCache(); } for (int i = 0; i < packet.indexCount; i++) { DaySignInItem Item = new DaySignInItem(); Item.ItemIndex = packet.GetIndex(i); Item.ItemStatus = packet.GetStatus(i); Item.vipLimit = packet.GetRequiredVip(i); Item.Exp = packet.GetExp(i); Item.Money = packet.GetMoney(i); Item.BindYuanbao = packet.GetBindYuanbao(i); Item.Item1DataID = packet.GetItem1DataID(i); Item.Item1Count = packet.GetItem1Count(i); Item.Item2DataID = packet.GetItem2DataID(i); Item.Item2count = packet.GetItem2count(i); Item.SupplyCost = packet.GetSupplySignCost(i); GameManager.gameManager.PlayerDataPool.AddDaySignInfo(Item); } //GameManager.gameManager.PlayerDataPool.IsHaveNewSignCanDraw (); if (packet.indexCount > 1 && FunctionButtonLogic.Instance() != null) { FunctionButtonLogic.Instance().UpdateButtonAwardTips(); if (AwardLogic.Instance()) { AwardLogic.Instance().RefreshDaySignInUI(); } } return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
/// <summary> /// 领取月度签到宝箱之后 /// </summary> /// <param name="packet"></param> public void HandlePacket(GC_RET_GETREWARDFORACCUMULATESIGNIN packet) { if (GameManager.gameManager.PlayerDataPool.DaySignInfo.m_AccumateSignDic.ContainsKey(m_CurMonthBoxIndex)) { AccumulateSignInfo newItem = GameManager.gameManager.PlayerDataPool.DaySignInfo.m_AccumateSignDic[m_CurMonthBoxIndex]; newItem.ItemStatus = 1; GameManager.gameManager.PlayerDataPool.DaySignInfo.m_AccumateSignDic[m_CurMonthBoxIndex] = newItem; if (null != AwardLogic.Instance() && AwardLogic.Instance().m_DaySignInAwardRoot != null) { if (AwardLogic.Instance().m_DaySignInAwardRoot.gameObject.activeSelf) { AwardLogic.Instance().m_DaySignInAwardRoot.OpenBoxResult(packet.Ret == 0); } } m_CurMonthBoxIndex = -1; } }
public void ActiveChangeState(DaySignInStates itemStatus) { AwardLogic.Instance().m_AccSignPopUpBox.UpdateBackGroundSignCount(); m_ItemStatus = itemStatus; SetOtherMask(m_ItemIndex, itemStatus); switch (itemStatus) { case DaySignInStates.NORMALSIGNED: m_HaveAwardSprite.gameObject.SetActive(true); if (m_lblBuQian != null) { m_lblBuQian.SetActive(false); } //if (vipChooseSpriteInstead)//有vip双倍奖励。 //{ // m_bInFrozenState = false; // ChangeAllWidgetsToColor(m_NormalColor); //} //else//无VIP双倍奖励并且已经领过,说明这个签到ITEM没有其他可以操作的了。 { m_bInFrozenState = true; ChangeAllWidgetsToColor(m_GrayColor); } if (m_vipBuQian != null) { m_vipBuQian.SetActive(false); } break; case DaySignInStates.VIPSIGNEDHALF: ChangeAllWidgetsToColor(m_NormalColor); if (m_vipBuQian != null) { m_vipBuQian.SetActive(true); } if (m_lblBuQian != null) { m_lblBuQian.SetActive(false); } SetSignInItemHalfVipRewarded(true); break; } }
public uint Execute(PacketDistributed ipacket) { GC_ASK_COMMONFLAG_RET packet = (GC_ASK_COMMONFLAG_RET )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic GameManager.gameManager.PlayerDataPool.CommonData.HandlePacket(packet); if (null != AwardLogic.Instance()) { AwardLogic.Instance().UpdateTip(); } if (null != FunctionButtonLogic.Instance()) { FunctionButtonLogic.Instance().UpdateButtonAwardTips(); } if (null != PlayerFrameLogic.Instance()) { PlayerFrameLogic.Instance().UpdateRemainNum(); } if (null != MenuBarLogic.Instance()) { MenuBarLogic.Instance().UpdateSystemCountTip(); MenuBarLogic.Instance().UpdateRoleCountTip(); } if (null != SystemAndAutoFightLogic.Instance()) { SystemAndAutoFightLogic.Instance().updateRemindPoint(); } if (null != AutoFightLogic.Instance()) { AutoFightLogic.Instance().updateRemindPoint(); } if (null != RoleViewLogic.Instance()) { RoleViewLogic.Instance().updateGemRemindPoint(); } if (null != GemLogic.Instance()) { GemLogic.Instance().updateGemRemindPoint(); } return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
public void HandlePacket(GC_NEWSERVERAWARD_DATA packet) { m_nNewServerDays = packet.Day; // m_nStartTime = packet.StartTime; // m_nEndTime = packet.EndTime; for (int i = 0; i < packet.flagCount && i < MaxNewServerDays; i++) { int nFlag = packet.GetFlag(i); if (nFlag == 0) { m_bNewServerAwardFlag[i] = false; } else { m_bNewServerAwardFlag[i] = true; } } GotExtraFlag = packet.GetFlag(7) == 0 ? false : true; // 通知UI按钮 显示提醒 if (null != FunctionButtonLogic.Instance()) { FunctionButtonLogic.Instance().UpdateButtonAwardTips(); } if (null != AwardLogic.Instance() && AwardLogic.Instance().m_NewServerAwardRoot != null) { AwardLogic.Instance().UpdateTip(); if (AwardLogic.Instance().m_NewServerAwardRoot.gameObject.activeSelf) { AwardLogic.Instance().m_NewServerAwardRoot.ButtonNewServerAward(); AwardLogic.Instance().m_NewServerAwardRoot.PlayEffect(m_nNewServerDays); //if (AwardLogic.Instance().m_NewServerAwardRoot.YellowDotVisibal()) //{ //} } } if (null != QianDaoController.Instance()) { } }
public void HandlePacket(GC_NEWONLINEAWARD_DATA packet) { m_nNewOnlineAwardID = packet.NewOnlineAwardID; NewLeftTime = packet.NewleftTime; m_bNewOnlineAwardStart = packet.IsStart > 0; // 通知UI按钮 显示提醒 if (null != FunctionButtonLogic.Instance()) { FunctionButtonLogic.Instance().UpdateButtonAwardTips(); } if (null != AwardLogic.Instance() && AwardLogic.Instance().m_NewOnlineAwardRoot != null) { AwardLogic.Instance().UpdateTip(); if (AwardLogic.Instance().m_NewOnlineAwardRoot.gameObject.activeSelf) { AwardLogic.Instance().m_NewOnlineAwardRoot.ButtonOnlineAward(); AwardLogic.Instance().m_NewOnlineAwardRoot.PlayEffect(m_nNewOnlineAwardID); } } }
void OnClickBox() { if (m_bIsOpend) { return; } if (AwardLogic.Instance() != null) { PlayerData.DaySignInInfoData DataSignInInfo = GameManager.gameManager.PlayerDataPool.DaySignInfo; if (DataSignInInfo != null && DataSignInInfo.m_AccumateSignDic != null) { if (DataSignInInfo.m_AccumateSignDic.ContainsKey(m_Index + 1)) { AccumulateSignInfo info = DataSignInInfo.m_AccumateSignDic[m_Index + 1]; AwardLogic.Instance().m_AccSignPopUpBox.UpdateChestRewards(info, m_Index + 1, this); } } //if (OnClickBoxWithIndex != null) //{ // OnClickBoxWithIndex(m_Index); //} } }
//天道酬勤 public void HandlePacket(GC_CONTINUELOGINAWARD_DATA packet) { // m_nNewServerDays = packet.Day; m_nContinueLoginDay = packet.NDays; for (int i = 0; i < packet.flagCount; i++) { int nFlag = packet.GetFlag(i); if (nFlag == 0) { m_bContinueAwardFlag[i] = false; } else { m_bContinueAwardFlag[i] = true; } } // 通知UI按钮 显示提醒 if (null != FunctionButtonLogic.Instance()) { FunctionButtonLogic.Instance().UpdateButtonAwardTips(); } if (null != AwardLogic.Instance() && AwardLogic.Instance().m_TianDaoRoot != null) { AwardLogic.Instance().UpdateTip(); if (AwardLogic.Instance().m_TianDaoRoot.gameObject.activeSelf) { AwardLogic.Instance().m_TianDaoRoot.ButtonNewServerAward(); AwardLogic.Instance().m_TianDaoRoot.PlayEffect(m_nContinueLoginDay); } } if (null != QianDaoController.Instance()) { } }
public uint Execute(PacketDistributed ipacket) { GC_GAMESERVER_CONFIG packet = (GC_GAMESERVER_CONFIG)ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic bool bRankFlagOrTime = false; if (packet.HasUsercostrankopenflag) { GlobalData.IsOpenConsumeRank = packet.Usercostrankopenflag > 0 ? true : false; bRankFlagOrTime = true; } if (packet.HasChristmasopenflag) { GlobalData.IsOpenChristmas = packet.Christmasopenflag > 0 ? true : false; bRankFlagOrTime = true; } if (packet.HasChongzhirankopenflag) { GlobalData.IsOpenChongZhiRank = packet.Chongzhirankopenflag > 0 ? true : false; bRankFlagOrTime = true; } if (packet.HasChongzhistarttime) { GlobalData.ChongZhiStartTime = packet.Chongzhistarttime; bRankFlagOrTime = true; } if (packet.HasChongzhiendtime) { GlobalData.ChongZhiEndTime = packet.Chongzhiendtime; bRankFlagOrTime = true; } if (packet.HasSpchongzhirankopenflag) { GlobalData.IsOpenSpChongZhiRank = packet.Spchongzhirankopenflag > 0 ? true : false; bRankFlagOrTime = true; } if (packet.HasSpchongzhistarttime) { GlobalData.SpChongZhiStartTime = packet.Spchongzhistarttime; bRankFlagOrTime = true; } if (packet.HasSpchongzhiendtime) { GlobalData.SpChongZhiEndTime = packet.Spchongzhiendtime; bRankFlagOrTime = true; } if (packet.HasChristmasstarttime) { GlobalData.ChristmasStartTime = packet.Christmasstarttime; bRankFlagOrTime = true; } if (packet.HasChristmasendtime) { GlobalData.ChristmasEndTime = packet.Christmasendtime; bRankFlagOrTime = true; } if (packet.HasVillainOpenFlag) { GlobalData.IsOpenVillain = packet.VillainOpenFlag > 0 ? true : false; } if (packet.HasVillainstarttime1) { GlobalData.VillainStartTimeOne = packet.Villainstarttime1; } if (packet.HasVillainendtime1) { GlobalData.VillainEndTimeOne = packet.Villainendtime1; } if (packet.HasVillainstarttime2) { GlobalData.VillainStartTimeTwo = packet.Villainstarttime2; } if (packet.HasVillainendtime2) { GlobalData.VillainEndTimeTwo = packet.Villainendtime2; } if (packet.HasVillainOpenFlag || packet.HasVillainstarttime1 || packet.HasVillainendtime1 || packet.HasVillainstarttime2 || packet.HasVillainendtime2) { if (ActivityController.Instance() != null) { ActivityController.Instance().UpdateVillainTime(); } } if (packet.HasLoverflowerstarttime) { GlobalData.LoverFlowerStartTime = packet.Loverflowerstarttime; } if (packet.HasLoverflowerendtime) { GlobalData.LoverFlowerEndTime = packet.Loverflowerendtime; } if (packet.HasLoverthingstarttime) { GlobalData.LoverThingStartTime = packet.Loverthingstarttime; } if (packet.HasLoverthingendtime) { GlobalData.LoverThingEndTime = packet.Loverthingendtime; } // ºì°üÏà¹Ø if (packet.HasNHongBaoOpenFlag) { GlobalData.IsOpenHongBao = (packet.NHongBaoOpenFlag == 1?true:false); bRankFlagOrTime = true; } // if (packet.HasNHongBaoStarttime && packet.HasNHongBaoEndtime && packet.HasNHongBaoRankEndtime) // { // GlobalData.HongBaoStartTime = packet.NHongBaoStarttime; // GlobalData.HongBaoEndTime = packet.NHongBaoEndtime; // GlobalData.HongBaoRankEndTime = packet.NHongBaoRankEndtime; // bRankFlagOrTime = true; // if (HongBaoWindow.Instance()) // { // HongBaoWindow.Instance().UpdateActTime(); // } // } if (packet.HasNianShouOpenFlag) { if (packet.NianShouOpenFlag == 1) { GlobalData.IsOpenNianShou = true; } else if (packet.NianShouOpenFlag == -1) { GlobalData.IsOpenNianShou = false; } } if (packet.HasNianShoustarttime1) { GlobalData.NianShouStartTimeOne = packet.NianShoustarttime1; } if (packet.HasNianShouendtime1) { GlobalData.NianShouEndTimeOne = packet.NianShouendtime1; } if (packet.HasNianShoustarttime2) { GlobalData.NianShouStartTimeTwo = packet.NianShoustarttime2; } if (packet.HasNianShouendtime2) { GlobalData.NianShouEndTimeTwo = packet.NianShouendtime2; } if (packet.HasWulinOpenFlag) { GlobalData.IsOpenWuLinFlag = packet.WulinOpenFlag == 1; } if (packet.HasWulinOpenWeek1) { GlobalData.WuLinOpenWeek1 = packet.WulinOpenWeek1; } if (packet.HasWulinOpenTime1) { GlobalData.WuLinOpenTime1 = packet.WulinOpenTime1; } if (packet.HasWulinCloseTime1) { GlobalData.WuLinCloseTime1 = packet.WulinCloseTime1; } if (packet.HasWulinOpenWeek2) { GlobalData.WuLinOpenWeek2 = packet.WulinOpenWeek2; } if (packet.HasWulinOpenTime2) { GlobalData.WuLinOpenTime2 = packet.WulinOpenTime2; } if (packet.HasWulinCloseTime2) { GlobalData.WuLinCloseTime2 = packet.WulinCloseTime2; } if (packet.HasIsOpenHeroReturn) { GlobalData.IsOpenHeroReturn = (packet.IsOpenHeroReturn == 1 ? true : false); } if (packet.HasHeroReturnOpenTime) { GlobalData.HeroReturnOpenTime = packet.HeroReturnOpenTime; } if (packet.HasHeroReturnCloseTime) { GlobalData.HeroReturnCloseTime = packet.HeroReturnCloseTime; } if (packet.HasLoudSpeakeropenflag) { GlobalData.IsOpenLoudSpeakerRankFlag = (packet.LoudSpeakeropenflag == 1 ? true : false); bRankFlagOrTime = true; } if (packet.HasCharmopenflag) { GlobalData.IsOpenCharmRankFlag = (packet.Charmopenflag == 1 ? true : false); bRankFlagOrTime = true; } if (bRankFlagOrTime && RankWindow.Instance() != null) { RankWindow.Instance().OnRankOpenFlagChange(); } if (packet.HasEnterAutoCombatTime) { GlobalData.EnterAutoCombatTime = packet.EnterAutoCombatTime; } if (packet.HasNewSrverAwardFlag) { GlobalData.IsOpenNewServerAwardFlag = (packet.NewSrverAwardFlag == 1); } if (packet.HasNewServerAwardOpenTime) { GameManager.gameManager.PlayerDataPool.NStartTime = packet.NewServerAwardOpenTime; } if (packet.HasNewServerAwardEndTime) { GameManager.gameManager.PlayerDataPool.NEndTime = packet.NewServerAwardEndTime; if (AwardLogic.Instance() != null) { AwardLogic.Instance().UpdateTabButton(AwardLogic.TabType.NewServerAward, GlobalData.IsOpenNewServerAwardFlag); } } if (packet.HasCarnivalOpenFlag) { GlobalData.IsOpenSevenDaysRewardFlag = (packet.CarnivalOpenFlag == 1); } if (FunctionButtonLogic.Instance() != null) { FunctionButtonLogic.Instance().UpdateNewFunctionButtonState(FunctionButtonLogic.DynamicLogo.SevenDays); } if (packet.HasContinuLoginFlag) { GlobalData.IsOpenContinueLoginAwardFlag = (packet.ContinuLoginFlag == 1); if (AwardLogic.Instance() != null) { AwardLogic.Instance().UpdateTabButton(AwardLogic.TabType.TianDao, GlobalData.IsOpenContinueLoginAwardFlag); } } return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
protected override void ItemClick(GameObject value) { int nItemType = -1; int nItemID = -1; int nCount = 0; for (int i = 0; i < m_ItemGrid.Length && i < m_ItemDataID.Length; i++) { if (m_ItemGrid[i].name == value.name) { nItemType = m_ItemType[i]; nItemID = m_ItemDataID[i]; nCount = m_ItemCount[i]; break; } } //Frozen状态只显示TIPS没有其他操作 if (m_bInFrozenState) { if (nItemType == (int)ItemType.ITEM_ITEM) { if (nItemID <= -1) { return; } GameItem item = new GameItem(); item.DataID = nItemID; MonthSignItemIntroduce.ShowMoneyTip(MoneyTipsLogic.MoneyType.ITEM_NONE, nItemID); if (item.IsEquipMent()) { //EquipTooltipsLogic.ShowEquipTooltip(item, EquipTooltipsLogic.ShowType.Info); } else { //ItemTooltipsLogic.ShowItemTooltip(item, ItemTooltipsLogic.ShowType.Info); } } else { MoneyTipsLogic.MoneyType tpye = MoneyTipsLogic.MoneyType.ITEM_NONE; switch ((ItemType)nItemType) { case ItemType.ITEM_EXP: tpye = MoneyTipsLogic.MoneyType.ITEM_EXP; break; case ItemType.ITEM_MONEY: tpye = MoneyTipsLogic.MoneyType.ITEM_MONEY; break; case ItemType.ITEM_YUANBAO: tpye = MoneyTipsLogic.MoneyType.ITEM_YUANBAO; break; } //MoneyTipsLogic.ShowMoneyTip(tpye, nCount); MonthSignItemIntroduce.ShowMoneyTip(tpye, nCount); } } else { int nowdayv = GameManager.gameManager.PlayerDataPool.DaySignInfo.m_nowDayIndex; if (nowdayv > m_ItemIndex) { System.Collections.Generic.Dictionary <int, Games.AwardActivity.DaySignInItem> m_DaySignInfoList = GameManager.gameManager.PlayerDataPool.DaySignInfo.m_DaySignInfoList; Games.AwardActivity.DaySignInItem daysignitem; if (m_DaySignInfoList.TryGetValue(m_ItemIndex, out daysignitem)) { // DaySignInStates states = (DaySignInStates)daysignitem.ItemStatus; if (daysignitem.ItemStatus == (int)DaySignInStates.NOTSIGNEN) { for (int i = 1; i < m_ItemIndex; ++i) { if (m_DaySignInfoList.TryGetValue(i, out daysignitem) && daysignitem.ItemStatus == (int)DaySignInStates.NOTSIGNEN) { GUIData.AddNotifyData2Client(false, "#{11515}"); return; } } } else if (daysignitem.ItemStatus == (int)DaySignInStates.VIPSIGNEDHALF) { for (int i = 1; i < m_ItemIndex; ++i) { if (m_DaySignInfoList.TryGetValue(i, out daysignitem) && (daysignitem.ItemStatus == (int)DaySignInStates.NOTSIGNEN || daysignitem.ItemStatus == (int)DaySignInStates.VIPSIGNEDHALF)) { GUIData.AddNotifyData2Client(false, "#{11515}"); return; } } } } } if (AwardLogic.Instance() != null) { AwardLogic.Instance().m_PopUpBox.AddItem((RewardAwardItem.ItemType)nItemType, nItemID, nCount, m_ItemIndex, (int)m_ItemStatus, vipLevel: m_nVipLevel, sureAction: ChangeChooseItem, isDefaultCanDoSign: m_bCanDoNormalSign); } } }
public void OnShowAwardRoot(bool bSuccess, object param) { AwardLogic.Instance().m_OnlineAwardRoot.ButtonOnlineAward(); }
public void AddItem(RewardAwardItem.ItemType nItemType, int nItemID, int nItemCount, int itemIndex = 0, int itemStatus = 0, int vipLevel = 0, IChooseItem ins = null, Action sureAction = null, bool isDefaultCanDoSign = false) { m_RewardItem.AddItem(nItemType, nItemID, nItemCount, itemIndex, (int)DaySignInStates.NOTSIGNEN, vipLevel); if (sureAction != null) { m_SureAction = sureAction; } Tab_CommonItem tabItem = TableManager.GetCommonItemByID(nItemID, 0); if (tabItem != null) { m_lblItemName.text = tabItem.Name; } else { switch (nItemType) { case RewardAwardItem.ItemType.ITEM_MONEY: m_lblItemName.text = StrDictionary.GetClientDictionaryString("#{10921}"); break; case RewardAwardItem.ItemType.ITEM_EXP: m_lblItemName.text = StrDictionary.GetClientDictionaryString("#{10849}"); break; case RewardAwardItem.ItemType.ITEM_YUANBAO: m_lblItemName.text = StrDictionary.GetClientDictionaryString("#{2913}"); break; default: m_lblItemName.text = ""; break; } } if (AwardLogic.Instance() == null || AwardLogic.Instance().m_DaySignInAwardRoot == null) { return; } DaySignInItem Signitem = AwardLogic.Instance().m_DaySignInAwardRoot.GetDaySignInItemWithIndex(itemIndex); if (vipLevel > 0) { //达到VIP{0}可补领额外奖励 if ((DaySignInStates)itemStatus == DaySignInStates.NOTSIGNEN) { m_ConditionStr = StrDictionary.GetClientDictionaryString("#{11239}", vipLevel); m_BtnStr = StrDictionary.GetClientDictionaryString("#{4638}"); } //显示达到vipxx 奖励翻倍 else if ((DaySignInStates)itemStatus == DaySignInStates.NORMALSIGNED || (DaySignInStates)itemStatus == DaySignInStates.VIPSIGNEDHALF) { m_ConditionStr = StrDictionary.GetClientDictionaryString("#{11240}", Signitem.vipLimit); m_BtnStr = StrDictionary.GetClientDictionaryString("#{4638}"); } } //消费xxx点券可以补签 else { //当前是默认可签到的第一个 if (isDefaultCanDoSign) { m_ConditionStr = ""; } else { m_ConditionStr = StrDictionary.GetClientDictionaryString("#{4703}", Signitem.SupplyCost); } m_BtnStr = StrDictionary.GetClientDictionaryString("#{4638}"); } ShowUIDuePopUpType(); gameObject.SetActive(true); }
void Start() { AwardLogic.Instance().m_AccSignPopUpBox.UpdateBackGroundSignCount(); }
// 物品点击 protected virtual void ItemClick(GameObject value) { int nItemType = -1; int nItemID = -1; int nCount = 0; for (int i = 0; i < m_ItemGrid.Length && i < m_ItemDataID.Length; i++) { if (m_ItemGrid[i].name == value.name) { nItemType = m_ItemType[i]; nItemID = m_ItemDataID[i]; nCount = m_ItemCount[i]; break; } } //Frozen状态只显示TIPS没有其他操作 if (m_bInFrozenState) { if (nItemType == (int)ItemType.ITEM_ITEM) { if (nItemID <= -1) { return; } GameItem item = new GameItem(); item.DataID = nItemID; if (item.IsEquipMent()) { EquipTooltipsLogic.ShowEquipTooltip(item, EquipTooltipsLogic.ShowType.Info); } else { ItemTooltipsLogic.ShowItemTooltip(item, ItemTooltipsLogic.ShowType.Info); } } else { MoneyTipsLogic.MoneyType tpye = MoneyTipsLogic.MoneyType.ITEM_NONE; switch ((ItemType)nItemType) { case ItemType.ITEM_EXP: tpye = MoneyTipsLogic.MoneyType.ITEM_EXP; break; case ItemType.ITEM_MONEY: tpye = MoneyTipsLogic.MoneyType.ITEM_MONEY; break; case ItemType.ITEM_YUANBAO: tpye = MoneyTipsLogic.MoneyType.ITEM_YUANBAO; break; } MoneyTipsLogic.ShowMoneyTip(tpye, nCount); } } else { if (AwardLogic.Instance() != null) { AwardLogic.Instance().m_PopUpBox.AddItem((RewardAwardItem.ItemType)nItemType, nItemID, nCount, m_ItemIndex, (int)m_ItemStatus, vipLevel: m_nVipLevel, sureAction: ChangeChooseItem, isDefaultCanDoSign: m_bCanDoNormalSign); } } }