예제 #1
0
 public void On_InBattleMsg_OpenForm(CUIEvent uiEvent)
 {
     CPlayerBehaviorStat.Plus(CPlayerBehaviorStat.BehaviorType.Battle_Signal_Textmsg);
     if (this.m_shortcutChat != null)
     {
         this.m_shortcutChat.OpenForm(this.m_formScript, uiEvent, true);
     }
 }
예제 #2
0
    public void On_InBattleMsg_ListElement_Click(CUIEvent uiEvent)
    {
        this.Show(false);
        int srcWidgetIndexInBelongedList = uiEvent.m_srcWidgetIndexInBelongedList;

        if ((srcWidgetIndexInBelongedList >= 0) && (srcWidgetIndexInBelongedList < Singleton <InBattleMsgMgr> .instance.inbatEntList.Count))
        {
            TabElement element = Singleton <InBattleMsgMgr> .instance.inbatEntList[srcWidgetIndexInBelongedList];
            if (element != null)
            {
                Player hostPlayer = Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer();

                if (hostPlayer != null)
                {
                    ResInBatMsgCfg cfgData = Singleton <InBattleMsgMgr> .instance.GetCfgData(element.cfgId);

                    DebugHelper.Assert(cfgData != null, "InbattleMsgView cfg_data == null");
                    if (cfgData != null)
                    {
                        SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext();

                        if (curLvelContext != null)
                        {
                            if (!Singleton <InBattleMsgMgr> .instance.ShouldBeThroughNet(curLvelContext))
                            {
                                if ((element.cfgId >= 1) && (element.cfgId <= 15))
                                {
                                    CPlayerBehaviorStat.Plus((CPlayerBehaviorStat.BehaviorType)element.cfgId);
                                }
                                this.InnerHandle_InBat_PreConfigMsg((COM_INBATTLE_CHAT_TYPE)cfgData.bShowType, hostPlayer.CaptainId, element.cfgId, hostPlayer.PlayerUId);
                            }
                            else
                            {
                                if ((element.cfgId >= 1) && (element.cfgId <= 15))
                                {
                                    CPlayerBehaviorStat.Plus((CPlayerBehaviorStat.BehaviorType)element.cfgId);
                                }
                                InBattleMsgNetCore.SendInBattleMsg_PreConfig(element.cfgId, (COM_INBATTLE_CHAT_TYPE)cfgData.bShowType, hostPlayer.CaptainId);
                            }
                            if (this.m_cdButton != null)
                            {
                                ResInBatChannelCfg dataByKey = GameDataMgr.inBattleChannelDatabin.GetDataByKey((uint)cfgData.bInBatChannelID);
                                if (dataByKey != null)
                                {
                                    this.m_cdButton.StartCooldown(dataByKey.dwCdTime, null);
                                }
                                else
                                {
                                    this.m_cdButton.StartCooldown(0xfa0, null);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
예제 #3
0
        private void OnSignalButtonClicked(CUIEvent uiEvent)
        {
            if (Singleton <CBattleGuideManager> .instance.bPauseGame)
            {
                return;
            }
            if (!this.m_useSignalButton)
            {
                return;
            }
            int tag = uiEvent.m_eventParams.tag;

            if (tag == 2)
            {
                CPlayerBehaviorStat.Plus(CPlayerBehaviorStat.BehaviorType.Battle_Signal_2);
            }
            else if (tag == 3)
            {
                CPlayerBehaviorStat.Plus(CPlayerBehaviorStat.BehaviorType.Battle_Signal_3);
            }
            else if (tag == 4)
            {
                CPlayerBehaviorStat.Plus(CPlayerBehaviorStat.BehaviorType.Battle_Signal_4);
            }
            CSignalButton singleButton = this.GetSingleButton(tag);

            if (singleButton != null && !singleButton.IsInCooldown())
            {
                if (singleButton.m_signalInfo.bSignalType == 0)
                {
                    if (this.m_selectedSignalID != tag)
                    {
                        if (this.m_selectedSignalID >= 0)
                        {
                            CSignalButton singleButton2 = this.GetSingleButton(this.m_selectedSignalID);
                            if (singleButton2 != null)
                            {
                                singleButton2.SetHighLight(false);
                            }
                        }
                        this.m_selectedSignalID = tag;
                        singleButton.SetHighLight(true);
                    }
                }
                else
                {
                    this.SendCommand_SignalBtn_Position((byte)tag, VInt3.zero);
                }
            }
        }
예제 #4
0
 private void OnBigMap_Open_BigMap(CUIEvent uievent)
 {
     CPlayerBehaviorStat.Plus(CPlayerBehaviorStat.BehaviorType.Battle_OpenBigMap);
     this.Switch(EMapType.Big);
     this.RefreshMapPointers();
 }
예제 #5
0
    public void Send_Config_Chat(int index)
    {
        if (this.m_cdButton == null || this.m_cdButton.startCooldownTimestamp != 0uL)
        {
            return;
        }
        if (index < 0 || index >= Singleton <InBattleMsgMgr> .get_instance().inbatEntList.get_Count())
        {
            return;
        }
        if (Singleton <InBattleMsgMgr> .get_instance().inbatEntList.get_Count() == 0)
        {
            Singleton <InBattleMsgMgr> .get_instance().BuildInBatEnt();
        }
        TabElement tabElement = Singleton <InBattleMsgMgr> .get_instance().inbatEntList.get_Item(index);

        if (tabElement == null)
        {
            return;
        }
        Player hostPlayer = Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer();

        if (hostPlayer == null)
        {
            return;
        }
        ResInBatMsgCfg cfgData = Singleton <InBattleMsgMgr> .get_instance().GetCfgData(tabElement.cfgId);

        DebugHelper.Assert(cfgData != null, "InbattleMsgView cfg_data == null");
        if (cfgData == null)
        {
            return;
        }
        SLevelContext curLvelContext = Singleton <BattleLogic> .get_instance().GetCurLvelContext();

        if (curLvelContext == null)
        {
            return;
        }
        if (!Singleton <InBattleMsgMgr> .get_instance().ShouldBeThroughNet(curLvelContext))
        {
            if (tabElement.cfgId >= 1u && tabElement.cfgId <= 15u)
            {
                CPlayerBehaviorStat.Plus((CPlayerBehaviorStat.BehaviorType)tabElement.cfgId);
            }
            this.InnerHandle_InBat_PreConfigMsg(cfgData.bShowType, hostPlayer.CaptainId, tabElement.cfgId, hostPlayer.PlayerUId);
        }
        else
        {
            if (tabElement.cfgId >= 1u && tabElement.cfgId <= 15u)
            {
                CPlayerBehaviorStat.Plus((CPlayerBehaviorStat.BehaviorType)tabElement.cfgId);
            }
            InBattleMsgNetCore.SendInBattleMsg_PreConfig(tabElement.cfgId, cfgData.bShowType, hostPlayer.CaptainId);
        }
        if (this.m_cdButton != null)
        {
            ResInBatChannelCfg dataByKey = GameDataMgr.inBattleChannelDatabin.GetDataByKey((uint)cfgData.bInBatChannelID);
            if (dataByKey != null)
            {
                this.m_cdButton.StartCooldown(dataByKey.dwCdTime, null);
            }
            else
            {
                this.m_cdButton.StartCooldown(4000u, null);
            }
        }
    }