Esempio n. 1
0
 void ItemThrow()
 {
     if (m_Item != null && m_Item.IsValid())
     {
         MessageBoxLogic.OpenOKCancelBox(3274, 1000, ItemThrowOK);
     }
 }
        public void ReqChangeGuildMemberJob(List <UInt64> approver, int nJobID)
        {
            //无帮会无法申请
            if (GameManager.gameManager.PlayerDataPool.GuildInfo.GuildGuid == GlobeVar.INVALID_GUID)
            {
                return;
            }

            //被修改者GUID判断
            for (int i = 0; i < approver.Count; i++)
            {
                if (approver[i] == GlobeVar.INVALID_GUID)
                {
                    return;
                }
            }

            //职位判断
            if (nJobID < 0 || nJobID >= (int)Games.GlobeDefine.GameDefine_Globe.GUILD_JOB.MAX)
            {
                return;
            }

            m_approverGuid.Clear();
            for (int i = 0; i < approver.Count; i++)
            {
                m_approverGuid.Add(approver[i]);
            }
            m_jobID = nJobID;
            //确定对该玩家进行任命?
            MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{3220}"), "", MsgBoxChangeGuildMemberJobOK, MsgBoxChangeGuildMemberJobCancel);
        }
Esempio n. 3
0
    void OnMapItemClick(GameObject button)
    {
        m_curShowSceneID = -1;

        for (int index = 0; index < m_MapTexs.Length; index++)
        {
            if (m_MapTexs[index].name == button.name)
            {
                m_curShowSceneID = m_MapIDs[index];
                //m_MapTexs[index].SetActive(false);
                break;
            }
        }
        if (m_curShowSceneID >= 0 && Singleton <ObjManager> .GetInstance().MainPlayer != null && m_curShowSceneID != GameManager.gameManager.RunningScene)
        {
            if (TeleportPoint.IsCanPK(m_curShowSceneID) && !TeleportPoint.IsIncPKValue(m_curShowSceneID))
            {
                MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{2672}"), "", EnterNonePKValueSceneOK);
            }
            else
            {
                EnterNonePKValueSceneOK();
            }
        }
        else
        {
            //MessageBoxLogic.OpenOKBox(2214, 1000);
        }
    }
Esempio n. 4
0
    void OnEquipClick()
    {
        // 新手指引
        if (m_NewPlayerGuide_Step == 1)
        {
            NewPlayerGuidLogic.CloseWindow();
            m_NewPlayerGuide_Step = -1;
        }

        if (m_EquipBuffer.Count > 0 && null != m_EquipBuffer[0] && m_EquipBuffer[0].IsValid())
        {
            GameItem m_RealEquip = GameManager.gameManager.PlayerDataPool.BackPack.GetItemByGuid(m_EquipBuffer[0].Guid);
            if (m_RealEquip != null && m_RealEquip.IsValid())
            {
                if (m_RealEquip.BindFlag == false && m_RealEquip.GetBindType() != 0)
                {
                    MessageBoxLogic.OpenOKCancelBox(3028, 1000, OnEquipClick_OK, null);
                }
                else
                {
                    OnEquipClick_OK();
                }
            }
            else
            {
                GUIData.AddNotifyData2Client(false, StrDictionary.GetClientDictionaryString("#{3286}"));
                CloseCurEquip();
            }
        }
        else
        {
            GUIData.AddNotifyData2Client(false, StrDictionary.GetClientDictionaryString("#{3286}"));
            ClearData();
        }
    }
Esempio n. 5
0
    void ClickChallenge()
    {
        if (null != MenuOp)
        {
            MenuOp.SetActive(false);
        }

        Obj_MainPlayer mainPlayer = Singleton <ObjManager> .Instance.MainPlayer;

        if (null == mainPlayer)
        {
            return;
        }
        if (mainPlayer.IsInJianYu())
        {
            mainPlayer.SendNoticMsg(false, "#{2216}");
            return;
        }

        if (GameManager.gameManager.RunningScene != (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_WUDAOZHIDIAN)
        {
            string str = StrDictionary.GetClientDictionaryString("#{5043}");
            MessageBoxLogic.OpenOKCancelBox(str, "", SendChallenge);
        }
    }
Esempio n. 6
0
    // 这貌似是共鸣。。。
    public void OnClickClose()
    {
        if (BelleInfoWindow.Instance() != null)
        {
            Tab_Belle belleTab = BelleInfoWindow.Instance().CurSellectedBelleData;
            if (belleTab == null)
            {
                return;
            }
        }

        Tab_BelleCloseCost curCost = TableManager.GetBelleCloseCostByID(BelleData.dayCloseTime, 0);

        if (null == curCost)
        {
            return;
        }

        if (curCost.YuanBaoCost > 0)
        {
            string tip = StrDictionary.GetClientDictionaryString("#{5292}", curCost.YuanBaoCost);
            MessageBoxLogic.OpenOKCancelBox(tip, "", DoBelleClose);
        }
        else
        {
            DoBelleClose();
        }
    }
Esempio n. 7
0
    // 接任务
    void MissionOpt()
    {
        int nMissionID = MisionData % 10000;

        if (nMissionID <= 0)
        {
            return;
        }
        bool isHaveMission = GameManager.gameManager.MissionManager.IsHaveMission(nMissionID);

        if (isHaveMission)
        {
            MissionState state = (MissionState)GameManager.gameManager.MissionManager.GetMissionState(nMissionID);
            if (state == MissionState.Mission_Accepted)
            {
                // 放弃任务
                string str = Utils.GetDicByID(5440);
                MessageBoxLogic.OpenOKCancelBox(str, null, OnAbandonMessageOK, OnCancelClick);
            }
            else if (state == MissionState.Mission_Completed)
            {
                GameManager.gameManager.SoundManager.PlaySoundEffect(136);  //get_reward
                GameManager.gameManager.MissionManager.CompleteMission(nMissionID);
            }
        }
        else
        {
            GameManager.gameManager.SoundManager.PlaySoundEffect(135);  //yes
            GameManager.gameManager.MissionManager.AcceptMission(nMissionID);
        }
    }
Esempio n. 8
0
    void OnClickJoinGuildBtn()
    {
        if (null == Singleton <ObjManager> .GetInstance().MainPlayer)
        {
            return;
        }

        if (GameManager.gameManager.PlayerDataPool.GuildInfo.PreserveGuildGuid.Count >= GlobeVar.GUILD_PLAYERRESERVE_MAX)
        {
            GUIData.AddNotifyData("#{10384}");
            return;
        }

        if (!m_canBeJoined)
        {
            if (m_applyListIsFull)
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{3180}");

                return;
            }
            Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{1774}");

            return;
        }

        //玩家等级判断
        if (Singleton <ObjManager> .GetInstance().MainPlayer.BaseAttr.Level < GlobeVar.JOIN_GUILD_LEVEL)
        {
            GUIData.AddNotifyData("#{1780}"); //你的人物等级不足20级,无法创建帮会
            return;
        }

        MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{10383}", GameManager.gameManager.PlayerDataPool.GuildInfo.PreserveGuildGuid.Count), "", ReqJoinGuildOK);
    }
Esempio n. 9
0
    void OnKillModleClick()
    {
        if (m_nNewPlayerGuideIndex == 1)
        {
            m_nNewPlayerGuideIndex = -1;
            NewPlayerGuidLogic.CloseWindow();
        }

        Obj_MainPlayer _mainPlayer = Singleton <ObjManager> .GetInstance().MainPlayer;

        if (_mainPlayer == null)
        {
            return;
        }
        if (_mainPlayer.BaseAttr.Level < 30)
        {
            _mainPlayer.SendNoticMsg(false, "#{1111}");
            return;
        }
        if (_mainPlayer.PkModle == (int)CharacterDefine.PKMODLE.KILL && m_nPKCDTime < 0)
        {
            _mainPlayer.SendNoticMsg(false, "#{1107}");
            return;
        }
        //弹出确认框
        string _strNotice = StrDictionary.GetClientDictionaryString("#{1106}");

        MessageBoxLogic.OpenOKCancelBox(_strNotice, "", SwitchKillModeOnOk, SwitchKillModeOnCancel);
        m_IsModeClick = true;
    }
Esempio n. 10
0
    /// <summary>
    /// 发送元宝领取
    /// </summary>
    public void SendRewardClick()
    {
        int curIndex = GameManager.gameManager.PlayerDataPool.m_ActivityRewardIndex;

        if (!GameManager.gameManager.PlayerDataPool.OnActivityRewardTable.ContainsKey(curIndex))
        {
            return;
        }
        ActivityRewardData rewardData = GameManager.gameManager.PlayerDataPool.OnActivityRewardTable[curIndex];

        // 弹出提示元宝足或不足
        int nYuanBaoCount = GameManager.gameManager.PlayerDataPool.Money.GetMoney_YuanBao() + GameManager.gameManager.PlayerDataPool.Money.GetMoney_YuanBaoBind();

        if (nYuanBaoCount < rewardData.BindYuanbao)
        {
            // 钱不够,弹,充值
            MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1848}"), "", DoPay, null);
        }
        else
        {
            //发送消息给服务器要求不领
            CG_RECEIVE_ACTIVITYREWARD msg = (CG_RECEIVE_ACTIVITYREWARD)PacketDistributed.CreatePacket(MessageID.PACKET_CG_RECEIVE_ACTIVITYREWARD);
            msg.SetRewardIndex(rewardData.Index);
            msg.SetIsreplacement(1);
            msg.SendPacket();
        }
    }
Esempio n. 11
0
    //卡死处理
    public void OnBlindClick()
    {
        //string dicStr = "确定回到场景入口";
        string dicStr = StrDictionary.GetClientDictionaryString("#{11335}");

        MessageBoxLogic.OpenOKCancelBox(dicStr, "", OnBlindOK, OnMessageBoxNO);
    }
Esempio n. 12
0
    public void OnSweepClick()
    {
        if (GameDefine_Globe.CopyScene_PlayType.SINGLE != CopyScenePlayerMode)
        {
            return;
        }
        if (Singleton <ObjManager> .Instance.MainPlayer.IsInJianYu())
        {
            Singleton <ObjManager> .Instance.MainPlayer.SendNoticMsg(false, "#{2216}");

            return;
        }
        int _Sweep = GameManager.gameManager.PlayerDataPool.CommonData.GetCommonData((int)Games.UserCommonData.USER_COMMONDATA.CD_COPYSCENE_CANGJINGGE_SWEEP);
        int nMul   = GameManager.gameManager.PlayerDataPool.CommonData.GetCopySceneMultiple(CopySceneId);

        if (_Sweep >= nMul * 3)  //超上限了
        {
            Singleton <ObjManager> .Instance.MainPlayer.SendNoticMsg(false, "#{2084}");

            return;
        }
        if (_Sweep >= nMul)
        {
            //string dicStr = "扣除10元宝确定么?";
            string dicStr = StrDictionary.GetClientDictionaryString("#{2790}");
            MessageBoxLogic.OpenOKCancelBox(dicStr, "", OnSweepOK, OnSweepNO);
            return;
        }

        OnSweepOK();
    }
Esempio n. 13
0
    //切换角色
    public void OnPlayerClick()
    {
        //string dicStr = "确定切换角色";
        string dicStr = StrDictionary.GetClientDictionaryString("#{2898}");

        MessageBoxLogic.OpenOKCancelBox(dicStr, "", OnPlayerOK, OnMessageBoxNO);
    }
Esempio n. 14
0
    public void CreateBelle()
    {
        if (BelleInfoWindow.Instance() != null)
        {
            Tab_Belle belleTab = BelleInfoWindow.Instance().CurSellectedBelleData;

            if (null == belleTab)
            {
                LogModule.ErrorLog("BelleInfoWindow.Instance().CurSellectedBelleData is null!");
                return;
            }

            int belleSubItemId     = belleTab.BelleItemID;
            int belleTotalSubCount = belleTab.BelleItemCount;
            int belleSubItemCount  = GameManager.gameManager.PlayerDataPool.BackPack.GetItemCountByDataId(belleSubItemId);

            //数量不够显示获取界面
            if (belleTotalSubCount > 0 && belleSubItemCount < belleTotalSubCount)
            {
                //提示数量不够
            }
            else if (belleTotalSubCount > 0 && belleSubItemCount >= belleTotalSubCount)
            {
                //合成,发送消息包
                ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////合成美人发送消息包。
                Tab_CommonItem commonItemTab = TableManager.GetCommonItemByID(belleSubItemId, 0);
                if (commonItemTab != null)
                {
                    string tip = StrDictionary.GetClientDictionaryString("#{10257}", commonItemTab.Name, belleTotalSubCount);
                    //定义一个激活美人消息包
                    MessageBoxLogic.OpenOKCancelBox(tip, "", DoGetBelle);
                }
            }
        }
    }
Esempio n. 15
0
    void EquipUse()
    {
        if (m_Equip != null && m_Equip.IsValid())
        {
            int nPlayerLevel = Singleton <ObjManager> .GetInstance().MainPlayer.BaseAttr.Level;

            if (nPlayerLevel < m_Equip.GetMinLevelRequire())
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{1255}");

                return;
            }

            int nPlayerProfession = Singleton <ObjManager> .Instance.MainPlayer.Profession;
            if (nPlayerProfession != m_Equip.GetProfessionRequire() && m_Equip.GetProfessionRequire() != -1)
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{1256}");

                return;
            }

            if (m_Equip.BindFlag == false && m_Equip.GetBindType() != 0)
            {
                MessageBoxLogic.OpenOKCancelBox(3028, 1000, EquipUseOK, null);
            }
            else
            {
                EquipUseOK();
            }
        }
    }
        public uint Execute(PacketDistributed ipacket)
        {
            GC_RET_AUTOTEAM packet = (GC_RET_AUTOTEAM)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            GameManager.gameManager.PlayerDataPool.AutoTeamState = packet.Result == (int)GC_RET_AUTOTEAM.RESULTTYPE.TYPE_WAIT;
            if (packet.HasSceneid)
            {
                GameManager.gameManager.PlayerDataPool.AutoTeamCopySceneId = packet.Sceneid;
            }
            if (packet.HasDifficult)
            {
                GameManager.gameManager.PlayerDataPool.AutoTeamCopySceneDifficult = packet.Difficult;
            }
            if (DungeonWindow.Instance() != null)
            {
                DungeonWindow.Instance().OnButtonAutoTeamLabel();
            }
            if (FunctionButtonLogic.Instance() != null)
            {
                FunctionButtonLogic.Instance().UpdateAutoTeamCue();
            }
            if (ActivityController.Instance() != null)
            {
                ActivityController.Instance().UpdateAutoTeam();
            }
            if (CangJingGeWindow.Instance() != null)
            {
                CangJingGeWindow.Instance().UpdateButtonAutoTeamLabel();
            }
            if (packet.Result == (int)GC_RET_AUTOTEAM.RESULTTYPE.TYPE_FINISH)
            {
                /*if (packet.Sceneid == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_FOURVILLAIN)
                 * {
                 *  //四大恶人副本在组队平台组好队伍之后,不直接开启副本
                 *  return (uint)PACKET_EXE.PACKET_EXE_CONTINUE;
                 * }*/

                if (packet.HasSceneid)
                {
                    m_nSceneID = packet.Sceneid;
                }
                if (packet.HasDifficult)
                {
                    m_nDifficult = packet.Difficult;
                }
                Tab_SceneClass pSceneClass = TableManager.GetSceneClassByID(m_nSceneID, 0);
                if (pSceneClass != null)
                {
                    string strNaDu = StrDictionary.GetClientDictionaryString("#{" + CharacterDefine.COPYSCENE_DIFFICULTY[m_nDifficult - 1].ToString() + "}");
                    string dicStr  = StrDictionary.GetClientDictionaryString("#{2958}", strNaDu, pSceneClass.Name);
                    MessageBoxLogic.OpenOKCancelBox(dicStr, "", OpenCopySceneOK, OpenCopySceneNO);
                }
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Esempio n. 17
0
    void YuanBaoTipBox()
    {
        int nTotalYuanBao = 0;

        for (int i = 0; i < DailyMissionData.MAX_DAILYMISSION_KINDS; i++)
        {
            DailyMission rMission = GameManager.gameManager.PlayerDataPool.DailyMissionData.GetDailyMissionByKind(i);
            if (rMission.MissionID < 0)
            {
                continue;
            }
            bool IsHaveMission = GameManager.gameManager.MissionManager.IsHaveMission(rMission.MissionID);
            if (IsHaveMission)
            {
                continue;
            }
            Tab_MissionBase MissionBase = TableManager.GetMissionBaseByID(rMission.MissionID, 0);
            if (MissionBase == null)
            {
                return;
            }
            Tab_DailyMission DailyMission = TableManager.GetDailyMissionByID(MissionBase.DalityMissionTabID, 0);
            if (DailyMission == null)
            {
                return;
            }
            nTotalYuanBao += DailyMission.ConsumeBangdedYuanBao;
        }
        string str = "";

        str = StrDictionary.GetClientDictionaryString("#{1538}", nTotalYuanBao);
        MessageBoxLogic.OpenOKCancelBox(str, null, OnMessageOK, OnCancelClick);
    }
Esempio n. 18
0
    // 开启帮会任务
    void OpenGuildMission()
    {
        // 没有帮会
        PlayerData MyPlayerData = GameManager.gameManager.PlayerDataPool;

        if (MyPlayerData == null)
        {
            return;
        }
        if (MyPlayerData.GuildInfo == null)
        {
            return;
        }
        if (false == MyPlayerData.IsHaveGuild())
        {
            return;
        }

        if (false == MyPlayerData.IsGuildChief())
        {
            return;
        }

        Tab_GuildMissionGuild guildMisGuild = TableManager.GetGuildMissionGuildByID(MyPlayerData.GuildInfo.GuildLevel, 0);

        if (guildMisGuild == null)
        {
            LogModule.ErrorLog("Can not find guidMissionGuid {0}", MyPlayerData.GuildInfo.GuildLevel);
            return;
        }

        string str = StrDictionary.GetClientDictionaryString("#{5432}", guildMisGuild.ConsumeWealth, guildMisGuild.CanAcceptTimesOnce);

        MessageBoxLogic.OpenOKCancelBox(str, null, OnOpenGuildMisMessageOK, OnCancelClick);
    }
Esempio n. 19
0
    void OnReqJoinGuildClick()
    {
        if (null == Singleton <ObjManager> .GetInstance().MainPlayer)
        {
            return;
        }
        if (m_Guid == Singleton <ObjManager> .Instance.MainPlayer.GUID)
        {
            return;
        }

        if (GameManager.gameManager.PlayerDataPool.GuildInfo.GuildGuid != GlobeVar.INVALID_GUID)
        {
            GuildMember mySelfGuildInfo = GameManager.gameManager.PlayerDataPool.GuildInfo.GetMainPlayerGuildInfo();
            if (null != mySelfGuildInfo)
            {
                if (mySelfGuildInfo.Job == (int)Games.GlobeDefine.GameDefine_Globe.GUILD_JOB.RESERVE)
                {
                    //只能同时申请一个帮会,将替换原来的请求,是否继续?
                    string dicStr = StrDictionary.GetClientDictionaryString("#{1861}");
                    MessageBoxLogic.OpenOKCancelBox(dicStr, "", AgreeChangeJoinGuildRequest, null);
                    return;
                }
            }
            //你当前已经有帮会,无法申请。
            Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{3094}");

            return;
        }
        Singleton <ObjManager> .GetInstance().MainPlayer.ReqJoinOtherPlayerGuild(m_Guid, m_Name);

        gameObject.SetActive(false);
    }
Esempio n. 20
0
    /// <summary>
    /// 请求获取物品
    /// </summary>
    public void OnReceiveClick()
    {
        if (GameManager.gameManager.PlayerDataPool.m_ActivityRewardIndex <= 0)
        {
            //
            GUIData.AddNotifyData("#{5137}");
            return;
        }

        int curIndex = GameManager.gameManager.PlayerDataPool.m_ActivityRewardIndex;

        if (!GameManager.gameManager.PlayerDataPool.OnActivityRewardTable.ContainsKey(curIndex))
        {
            return;
        }
        ActivityRewardData rewardData = GameManager.gameManager.PlayerDataPool.OnActivityRewardTable[curIndex];

        //获取当前物品状态
        if (rewardData.State == AcitivityRewardState.EXPIRED) //已过期状态
        {
            string fortip = StrDictionary.GetClientDictionaryString("#{4703}", rewardData.BindYuanbao);
            MessageBoxLogic.OpenOKCancelBox(fortip, "", SendRewardClick, null);
        }
        else if (rewardData.State == AcitivityRewardState.RECEIVE)
        {
            CG_RECEIVE_ACTIVITYREWARD msg = (CG_RECEIVE_ACTIVITYREWARD)PacketDistributed.CreatePacket(MessageID.PACKET_CG_RECEIVE_ACTIVITYREWARD);
            msg.SetRewardIndex(curIndex);
            msg.SetIsreplacement(0);
            msg.SendPacket();
        }
    }
Esempio n. 21
0
    public void HandleRetTrail(int nSceneClass, int nSceneInst, int nPosX, int nPosZ)
    {
        m_TrailSceneClass = nSceneClass;
        m_TrailSceneInst  = nSceneInst;
        m_TrailPosX       = nPosX;
        m_TrailPosZ       = nPosZ;

        string         strContent    = "";
        Tab_SceneClass tabSceneClass = TableManager.GetSceneClassByID(nSceneClass, 0);

        if (tabSceneClass != null)
        {
            if (tabSceneClass.Type != (int)Games.GlobeDefine.GameDefine_Globe.SCENE_TYPE.SCENETYPE_COPYSCENE &&
                nSceneClass != (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_JIANYU)
            {
                strContent = StrDictionary.GetClientDictionaryString("#{3071}", tabSceneClass.Name, nSceneInst + 1);
                MessageBoxLogic.OpenOKCancelBox(strContent, "", TrailOK, TrailCancel);
            }
            else
            {
                strContent = StrDictionary.GetClientDictionaryString("#{3075}", tabSceneClass.Name, nSceneInst + 1);
                MessageBoxLogic.OpenOKCancelBox(strContent, "", TrailCancel);
            }
        }
    }
Esempio n. 22
0
    // 回血NPC对话相关
    void DoRecover()
    {
        Obj_MainPlayer mainPlayer = Singleton <ObjManager> .Instance.MainPlayer;

        if (mainPlayer == null)
        {
            return;
        }
        int nCurHP = mainPlayer.BaseAttr.HP;
        int nMaxHp = mainPlayer.BaseAttr.MaxHP;
        int nCurMP = mainPlayer.BaseAttr.MP;
        int nMaxMP = mainPlayer.BaseAttr.MaxMP;

        if (nCurHP >= nMaxHp && nCurMP >= nMaxMP)
        {
            mainPlayer.SendNoticMsg(false, "#{3291}");
            return;
        }
        else
        {
            int nTempNeedMoney = ((nMaxHp - nCurHP) * 7 + (nMaxMP - nCurMP) * 77) * 115;
            int nNeedMoney     = nTempNeedMoney / 100000 + (nTempNeedMoney > 0 ? 1 : 0);
            if (nNeedMoney < 0)
            {
                return;
            }

            string strTip = StrDictionary.GetClientDictionaryString("#{3292}", nNeedMoney);
            MessageBoxLogic.OpenOKCancelBox(strTip, null, OnRecoverOk, OnCloseClick);
        }
    }
    //购买物品
    public void BuyItem()
    {
        Obj_MainPlayer _mainPlayer = Singleton <ObjManager> .GetInstance().MainPlayer;

        if (_mainPlayer == null)
        {
            return;
        }
        if (m_nSelBuyIndex >= 0 && m_nSelBuyIndex < m_buyItemInfo.Count)
        {
            //金钱是否足够
            int nMoney = GameManager.gameManager.PlayerDataPool.Money.GetMoney_YuanBao();
            if (nMoney < m_buyItemInfo[m_nSelBuyIndex].Price)
            {
                // 元宝不足
                MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1848}"), "", BuyChargeOK, BuyChargeCancel);
                return;
            }
            //发包购买
            CG_BUY_CONSIGNSALEITEMINFO buyPak = (CG_BUY_CONSIGNSALEITEMINFO)PacketDistributed.CreatePacket(MessageID.PACKET_CG_BUY_CONSIGNSALEITEMINFO);
            buyPak.SetSearchclass(m_nSearchClass);
            buyPak.SetSearchsubclass(m_nSearchSubClass);
            buyPak.SetSearchquality(m_nSearchQuality);
            buyPak.SetSortclass(m_nSortClass);
            buyPak.SetSorttype(m_nSortType);
            buyPak.SetKeyword(m_keyWord);
            buyPak.SetPage(m_nCurBuyPage);
            buyPak.SetItemguid(m_buyItemInfo[m_nSelBuyIndex].ItemInfo.Guid);
            buyPak.SendPacket();
        }
    }
Esempio n. 24
0
    //提交
    public void OnReferClick()
    {
        //string dicStr = "目前没有实现";
        string dicStr = StrDictionary.GetClientDictionaryString("#{2900}");

        MessageBoxLogic.OpenOKCancelBox(dicStr, "", OnAccountOK, OnMessageBoxNO);
    }
Esempio n. 25
0
    void OnClickGetReWard()
    {
        if (GameManager.gameManager.PlayerDataPool.CurSelectedDayIndex > GameManager.gameManager.PlayerDataPool.NowDayIndex)
        {
            return;
        }
        DaySignInItem Signitem;

        DataSignInInfoList.TryGetValue(m_currentSelectedIndex, out Signitem);
        if (m_currentSelectedIndex == GameManager.gameManager.PlayerDataPool.NowDayIndex && Signitem.ItemStatus == (int)DaySignInStates.NORMALSIGNED)
        {
            return;
        }
        if (Signitem.ItemStatus == (int)DaySignInStates.VIPSIGNEDHALF)
        {
            DealWithVipLimit(false);
            return;
        }
        // 如果是补签,需要提示   4703
        if (GameManager.gameManager.PlayerDataPool.NowDayIndex > GameManager.gameManager.PlayerDataPool.CurSelectedDayIndex)
        {
            // 如果是vip补签
            if (currentSelectedItem.SupplyCost > 0)
            {
                string fortip = StrDictionary.GetClientDictionaryString("#{4703}", currentSelectedItem.SupplyCost);
                MessageBoxLogic.OpenOKCancelBox(fortip, "", SureToSupply, CancelPay);
            }
            else
            {
                SureToSupply();
            }
        }
        else if (GameManager.gameManager.PlayerDataPool.NowDayIndex == GameManager.gameManager.PlayerDataPool.CurSelectedDayIndex)
        {
            // 如果是vip双倍的奖励,不足者弹出充值提示,不去充值的话,直接领取单倍奖励
            bool bIsSignedToday = GameManager.gameManager.PlayerDataPool.CommonData.GetCommondFlag((int)USER_COMMONFLAG.CF_SIGNIN_EVERYDAY_FALG);
            if (bIsSignedToday)
            {
                // 如果是vip补签
                if (currentSelectedItem.SupplyCost > 0)
                {
                    string fortip = StrDictionary.GetClientDictionaryString("#{4703}", currentSelectedItem.SupplyCost);
                    MessageBoxLogic.OpenOKCancelBox(fortip, "", SureToSupply, CancelPay);
                }
                else
                {
                    SureToSupply();
                }
            }
            else
            {
                DealWithVipLimit();
            }
        }
        else
        {
            DealWithVipLimit(true);
        }
    }
Esempio n. 26
0
 // 删除好友
 public void onDeleteFriend()
 {
     //if( m_ItemType  ==  PlayerListItemType.FriendInfo)
     {
         string dicStr = StrDictionary.GetClientDictionaryString("#{5251}");
         MessageBoxLogic.OpenOKCancelBox(dicStr, "", DelFriendOK, DelFriendNO);
     }
 }
Esempio n. 27
0
 void OnLevelupClick()
 {
     if (IsCanLevelUpSkill(m_nCurSkillId))
     {
         //MessageBoxLogic.OpenOKCancelBox("是否升级"+m_LabelCurSkillName.text, "", DoLevelUp);
         MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{2808}", m_LabelCurSkillName.text), "", DoLevelUp);
     }
 }
Esempio n. 28
0
    //切换账号
    public void OnAccountClick()
    {
        //Application.LoadLevel((int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_LOGIN);
        //string dicStr = "确定切换账号";
        string dicStr = StrDictionary.GetClientDictionaryString("#{2897}");

        MessageBoxLogic.OpenOKCancelBox(dicStr, "", OnAccountOK, OnMessageBoxNO);
    }
Esempio n. 29
0
    void DelFromShoppingCart()
    {
        if (m_Type != PresentRootLogic.TAB_INDEX.TAB_SHOPPINGCART)
        {
            return;
        }

        MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{4793}"), "", DelOK);
    }
Esempio n. 30
0
    void OnTeamTransClick()
    {
        if (m_Name == "")
        {
            return;
        }

        MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{10283}", m_Name), "", OnTeamTransOK);
    }