void OnClickMemberItem()
 {
     if (GUIData.delMasterMemberSelectChange != null)
     {
         GUIData.delMasterMemberSelectChange(m_MasterMember.Guid, m_MasterMember.MemberName);
     }
 }
示例#2
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();
        }
    }
示例#3
0
    /// <summary>
    /// 选择好宝宝
    /// </summary>
    public void OnPartnerChooseOKClick(Fellow fellow)
    {
        m_BabyFellowBuffer = fellow;
        if (m_BabyFellowBuffer.ProcreateCount <= 0)
        {
            GUIData.AddNotifyData("#{10337}");
            return;
        }

        if (m_BabyFellowBuffer.Called)
        {
            GUIData.AddNotifyData("#{10344}");
            return;
        }

        m_BabyFellow  = m_BabyFellowBuffer;
        m_FellowIndex = m_FellowIndexBuffer;

        UpdateChooseFellowModel();

        m_PartnerChooseWindow.SetActive(false);
        m_PushPartnerButton.SetActive(false);
        m_PlayerTips.SetActive(false);
        m_OpButtons.SetActive(true);
        m_LookForBreedingButton.GetComponent <UIImageButton>().isEnabled = true;
    }
示例#4
0
    void OnRebirthOKClick()
    {
        if (m_FellowBuffer == null)
        {
            return;
        }

        if (false == m_FellowBuffer.IsValid())
        {
            return;
        }

        if (m_FellowBuffer.Called)
        {
            GUIData.AddNotifyData("#{10325}");
            return;
        }

        CG_FELLOW_REBIRTH pak = (CG_FELLOW_REBIRTH)PacketDistributed.CreatePacket(MessageID.PACKET_CG_FELLOW_REBIRTH);

        pak.SetGuid(m_FellowBuffer.Guid);
        pak.SendPacket();
        rebirthFellowGuid = m_FellowBuffer.Guid;
        OnRebirthCancelClick();
    }
示例#5
0
    /// <summary>
    /// 点击添加宝宝
    /// </summary>
    void OnChoosePartnerClick()
    {
        NewPlayerGuidLogic.CloseWindow();
        FellowContainer container = GameManager.gameManager.PlayerDataPool.FellowContainer;

        if (container == null)
        {
            return;
        }

        List <Fellow> babylist = FellowTool.FellowCanBreedingFilter(container);

        //List<Fellow> babylist = FellowTool.FellowBabyFilter(container);

        if (babylist.Count <= 0)
        {
            GUIData.AddNotifyData("#{10330}");
            return;
        }

        m_FellowIndexBuffer = m_FellowIndex;

        m_PartnerChooseWindow.SetActive(true);
        ShowChooseBabyFellow(babylist);
    }
示例#6
0
    void OnRestaurantClick(GameObject value)
    {
        if (!GameManager.gameManager.PlayerDataPool.IsServerFlagOpen(SERVER_FLAGS_ENUM.FLAG_KEJIYUAN))
        {
            GUIData.AddNotifyData("#{10830}");
            return;
        }
        bool bRet = GameManager.gameManager.PlayerDataPool.CommonData.GetCommondFlag((int)USER_COMMONFLAG.CF_RESTAURANTFUNCTION_OPENFLAG);

        if (bRet == false)
        {
            GUIData.AddNotifyData("#{10830}");
            return;
        }
//         if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level < (int)GameDefine_Globe.NEWBUTTON_LEVEL.FARM)
//         {
//             GUIData.AddNotifyData("#{10830}");
//             return;
//         }
        NewPlayerGuidLogic.CloseWindow();
        if (m_NewButton != null && m_NewButton == value)
        {
            StopNewButtonEffect();
        }
        RestaurantController.OpenWindow(true);
    }
示例#7
0
    void OnBiographyClick()
    {
        GUIData.AddNotifyData("#{10830}");
        return;

        //if (!m_Demo30) UIManager.ShowUI(UIInfo.Biography);
    }
        public uint Execute(PacketDistributed ipacket)
        {
            GC_GUILD_CHANGE_JOBNAME packet = (GC_GUILD_CHANGE_JOBNAME)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            if (false == GameManager.gameManager.PlayerDataPool.IsHaveGuild())
            {
                return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
            }

            if (packet.GuildJobId >= (int)GameDefine_Globe.GUILD_JOB.CHIEF && packet.GuildJobId < (int)GameDefine_Globe.GUILD_JOB.MAX)
            {
                GameManager.gameManager.PlayerDataPool.GuildInfo.GuildJobName[packet.GuildJobId] = packet.GuildJobName;
            }

            if (GuildAuthorityWindowLogic.Instance() != null)
            {
                GuildAuthorityWindowLogic.Instance().HandleChangeJobName();
            }

            if (null != GUIData.delGuildDataUpdate)
            {
                GUIData.delGuildDataUpdate();
            }

            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
示例#9
0
    void OnLockBreedingClick()
    {
        if (m_BabyFellow == null)
        {
            GUIData.AddNotifyData("#{10331}");
            return;
        }

        if (false == GameManager.gameManager.PlayerDataPool.IsHaveTeam() ||
            GameManager.gameManager.PlayerDataPool.TeamInfo.GetTeamMemberCount() != 2)
        {
            GUIData.AddNotifyData("#{10333}");
            return;
        }

        if (m_LockBreeding)
        {
            return;
        }

        //发包同步
        CG_FELLOW_BREEDING_LOCK pak = (CG_FELLOW_BREEDING_LOCK)PacketDistributed.CreatePacket(MessageID.PACKET_CG_FELLOW_BREEDING_LOCK);

        pak.SetGuid(m_BabyFellow.Guid);
        pak.SendPacket();
    }
示例#10
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);
    }
示例#11
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_GUILD_LEAVE packet = (GC_GUILD_LEAVE )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }

            //离开帮会,清空个人帮会信息
            GameManager.gameManager.PlayerDataPool.GuildInfo.CleanUp();
            //更新帮会界面(如果未打开,则不处理)
            if (null != GUIData.delGuildDataUpdate)
            {
                GUIData.delGuildDataUpdate();
            }

            if (ChatInfoLogic.Instance() != null)
            {
                ChatInfoLogic.Instance().UpdateGuildChannel();
            }

            UIManager.CloseUI(UIInfo.GuildRoot);
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
示例#12
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_TEAM_LEAVE packet = (GC_TEAM_LEAVE)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }

            //直接调用MainPlayer的离队操作
            if (null != Singleton <ObjManager> .GetInstance().MainPlayer)
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.LeaveTeam();
            }

            //更新组队界面(如果未打开,则在UpdateTeamInfo中会不处理)
            if (null != GUIData.delFriendDataUpdate)
            {
                GUIData.delFriendDataUpdate();
            }

            if (ChatInfoLogic.Instance() != null)
            {
                ChatInfoLogic.Instance().UpdateTeamChannel();
            }

            if (MissionDialogAndLeftTabsLogic.Instance() != null)
            {
                MissionDialogAndLeftTabsLogic.Instance().UpdateButtonTeamFollow();
            }


            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
示例#13
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_GUILD_RET_LIST packet = (GC_GUILD_RET_LIST)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }

            if (null != GameManager.gameManager.PlayerDataPool.guildList)
            {
                GameManager.gameManager.PlayerDataPool.GuildInfo.PreserveGuildGuid.Clear();
                for (int i = 0; i < packet.preserveGuildGuidCount; i++)
                {
                    if (packet.preserveGuildGuidList[i] != GlobeVar.INVALID_GUID)
                    {
                        GameManager.gameManager.PlayerDataPool.GuildInfo.PreserveGuildGuid.Add(packet.preserveGuildGuidList[i]);
                    }
                }
                GameManager.gameManager.PlayerDataPool.guildList.UpdateData(packet);
            }

            //更新帮会界面(如果未打开,则不处理)
            if (null != GUIData.delGuildDataUpdate)
            {
                GUIData.delGuildDataUpdate();
            }

            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
示例#14
0
    // 帮主开启按钮
    void ButtonOpen()
    {
        if (!GameManager.gameManager.PlayerDataPool.IsHaveGuild())
        {
            return;
        }

        Guild info = GameManager.gameManager.PlayerDataPool.GuildInfo;

        GuildMember mainPlayerGuildInfo = info.GetMainPlayerGuildInfo();

        if (false == mainPlayerGuildInfo.IsValid())
        {
            return;
        }

        if (false == info.IsHaveAuthority(mainPlayerGuildInfo.Job, (int)GameDefine_Globe.GUILD_ROUTINE.GUILD_ROUTINE_OPEN_ACTIVITY))
        {
            return;
        }
        if (info.GuildLevel < 2)
        {
            GUIData.AddNotifyData("#{3938}");
            return;
        }

        CG_ASSIGN_PAOSHANG_TIME assignpak = (CG_ASSIGN_PAOSHANG_TIME)PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASSIGN_PAOSHANG_TIME);

        assignpak.Nopara = 0;
        assignpak.SendPacket();
    }
示例#15
0
    public void OnClickDream()
    {
        if (m_CurClickItemId != GlobeVar.INVALID_ID)
        {
            // GameManager.gameManager.FlyWingMananger.DreamFlyWing(m_CurClickItemId);
            if (!isHasDreamFlyWing(m_CurClickItemId))
            {
                GUIData.AddNotifyData("#{11043}");
                return;
            }
            if (GameManager.gameManager.FlyWingMananger.CurDreamFlyWingId == m_CurClickItemId)
            {
                CG_ASK_EQUIPFLYWING PACK = (CG_ASK_EQUIPFLYWING)PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_EQUIPFLYWING);
                PACK.SetFlyWingType((int)GlobeVar.FLY_SOCKET_TYPE.FLY_SOCKET_CANCEL_DREAM);
                PACK.SendPacket();
            }

            else
            {
                CG_ASK_EQUIPFLYWING PACK = (CG_ASK_EQUIPFLYWING)PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_EQUIPFLYWING);
                PACK.SetFlyWingType((int)GlobeVar.FLY_SOCKET_TYPE.FLY_SOCKET_DREAM);
                PACK.SetFlyWingId1(m_CurClickItemId);
                PACK.SendPacket();
            }
        }
    }
示例#16
0
    void OnOkClick()
    {
        OnInputSubmit();
        if (!GameManager.gameManager.PlayerDataPool.IsServerFlagOpen(SERVER_FLAGS_ENUM.FLAG_LOVERFLOWER))
        {
            GUIData.AddNotifyData("#{5138}");
            return;
        }
        if (m_LabelName.text == null || m_FriendGuid == 0)
        {
            GUIData.AddNotifyData("#{5087}");
            return;
        }
        if (GameManager.gameManager.PlayerDataPool.BackPack.GetBindItemCountByDataId(RoseDataId1) == 0 ||
            m_curNum > GameManager.gameManager.PlayerDataPool.BackPack.GetBindItemCountByDataId(RoseDataId1))
        {
            GUIData.AddNotifyData("#{5074}");
            return;
        }

        CG_ASK_USEROSE userose = (CG_ASK_USEROSE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_USEROSE);

        userose.SetType(1);
        userose.SetSendGuild(m_FriendGuid);
        userose.SetNumber(m_curNum);
        userose.SendPacket();
        OnCloseWindow();
    }
示例#17
0
    void ShowBuySuitDialog(GameObject go)
    {
        if (!GameManager.gameManager.PlayerDataPool.IsServerFlagOpen(SERVER_FLAGS_ENUM.FLAG_FLYWING) &&
            m_CurTab == (int)FashionType.TYPE_WING)
        {
            GUIData.AddNotifyData("#{10830}");
            return;
        }
        Tab_FashionData tabFashionData = TableManager.GetFashionDataByID(m_curChooseFashion, 0);

        if (tabFashionData != null)
        {
            if (tabFashionData.FashionType == (int)FashionType.TYPE_WING)
            {
                if (!GameManager.gameManager.PlayerDataPool.CommonData.GetCommondFlag((int)USER_COMMONFLAG.CF_OPEN_FLYWING))
                {
                    GUIData.AddNotifyData("#{10830}");
                    return;
                }
            }
        }

        //if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level < 45 && m_CurTab == (int)FashionType.TYPE_WING)
        //{
        //    GUIData.AddNotifyData("#{10830}");
        //    return;
        //}
        lblBuyTitle.text = StrDictionary.GetClientDictionaryString("#{11132}");
        lblBuyDesc.text  = StrDictionary.GetClientDictionaryString("#{11131}", mCurFashion.Name);
        buyOptions.ChangeTab("Op1");
        lblBuyCost.text = mCurFashion.PriceWeek.ToString();
        buySuitDialog.SetActive(true);
    }
示例#18
0
    void AddTrainingStart()
    {
        if (m_TrainingLevel >= GlobeVar.TRAININGLEVEL_MAX)
        {
            GUIData.AddNotifyData("#{5505}", true);
            return;
        }

        Tab_TrainingBook tabTraining = TableManager.GetTrainingBookByID(m_TrainingLevel, 0);

        if (tabTraining == null)
        {
            return;
        }

        if (Singleton <ObjManager> .Instance.MainPlayer == null)
        {
            return;
        }

        if (Singleton <ObjManager> .Instance.MainPlayer.BaseAttr.Level < tabTraining.LimitLevel)
        {
            GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{5507}", tabTraining.LimitLevel));
            return;
        }

        if (m_TrainingExp >= m_TrainingMax)
        {
            GUIData.AddNotifyData("#{5536}", true);
            return;
        }

        m_AddTraining   = true;
        m_MinusTraining = false;
    }
示例#19
0
    void onSelectOneRoleItem(int index)
    {
        if (index == 2)//弓箭手
        {
            GUIData.AddNotifyData("#{10012}");
            return;
        }
        if (IsClickSelectRole == true)
        {
            return;
        }
        IsClickSelectRole = true;
        NGUITools.SetActive(bgButton1Obj, false);
        NGUITools.SetActive(bgButton2Obj, true);

        tweenPlayer.tweenGroup = 1;
        tweenPlayer.Play(true);

        //Debug.Log("curselectinde " + index);

//        NGUITools.SetActive(m_FirstStepObj, false);
        m_CurRoleIndex = index;
        SetRoleProfessional(m_CurRoleIndex);
        FreshNewName();
        Invoke("ShowNextStep", 0.7f);
    }
示例#20
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_RET_FRIEND_USERINFO packet = (GC_RET_FRIEND_USERINFO)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }

            //enter your logic
            if (null != GameManager.gameManager.PlayerDataPool.FriendList)
            {
                for (int i = 0; i < packet.guidCount; ++i)
                {
                    Relation _relation = new Relation();
                    _relation.Guid       = packet.guidList[i];
                    _relation.Level      = packet.LevelList[i];
                    _relation.Profession = packet.ProfList[i];
                    _relation.CombatNum  = packet.CombatList[i];
                    _relation.State      = packet.StateList[i];
                    _relation.Name       = packet.NameList[i];
                    _relation.TimeInfo   = packet.TimeInfoList[i];

                    GameManager.gameManager.PlayerDataPool.FriendList.UpdateRelationUserInfo(_relation);
                }
            }

            //更新好友界面(如果未打开,则UpdateFriendList不处理)
            if (null != GUIData.delFriendDataUpdate)
            {
                GUIData.delFriendDataUpdate();
            }

            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
        public uint Execute(PacketDistributed ipacket)
        {
            GC_PLAY_YANHUA packet = (GC_PLAY_YANHUA)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }

            int nEffectID = packet.Effectid;

            if (BackCamerControll.Instance() != null)
            {
                BackCamerControll.Instance().PlaySceneEffect(nEffectID);
            }
            Tab_CommonItem TabItem = TableManager.GetCommonItemByID(packet.Itemid, 0);

            if (TabItem != null)
            {
                string strMsg = StrDictionary.GetClientDictionaryString("#{3050}", packet.Username, TabItem.Name);
                GUIData.AddNotifyData(strMsg);
            }

            //enter your logic
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
示例#22
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_NOTICE packet = (GC_NOTICE)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            if (packet.HasNotice)
            {
                bool IsFilterRepeat = false;
                if (packet.HasFilterRepeat)
                {
                    IsFilterRepeat = packet.FilterRepeat == 1? true:false;
                }

                GUIData.AddNotifyData(packet.Notice, IsFilterRepeat);
                if (packet.Notice == "#{2129}")
                {
                    UIManager.CloseUI(UIInfo.RankRoot);
                }
            }

            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
 void OnClickMaster()
 {
     if (GUIData.delMasterSelectChange != null)
     {
         GUIData.delMasterSelectChange(m_MasterGuid);
     }
 }
    // 全部上菜
    void OnServingAllClick()
    {
        //Singleton<ObjManager>.GetInstance().MainPlayer.ReqViewOtherPlayer(Singleton<ObjManager>.GetInstance().MainPlayer.GUID, OtherRoleViewLogic.OPEN_TYPE.OPEN_TYPE_LASTSPEAKER);

        if (!m_bSelfData)
        {
            GUIData.AddNotifyData("#{2017}");
            return;
        }

        m_curOperationDesk = null;

        bool isAvailable = false;

        for (int i = 0; i < m_Desks.Length; i++)
        {
            if (m_Desks[i].GetComponent <RestaurantDesk>().IsAvailable())
            {
                isAvailable = true;
                break;
            }
        }

        if (!isAvailable)
        {
            GUIData.AddNotifyData("#{11379}");
            return;
        }

        if (m_FoodWindow != null)
        {
            m_FoodWindow.SetActive(true);
            m_FoodWindow.GetComponent <RestaurantFoodWindow>().FilterFood(false);
        }
    }
示例#25
0
        public override void Init(Game game, GUIData data)
        {
            Color = Color.White;

            var skin = new Skin(data.GreyImageMap, data.GreyMap);
            var text = new Text(data.GreySpriteFont, Color.Black);

            //Simply subscribe to the events demonstrated below
            Gui = new Gui(game, skin, text);
            Gui.CharacterPress   += CharacterPress;
            Gui.KeyDown          += KeyDown;
            Gui.KeyUp            += KeyUp;
            Gui.MouseDoubleClick += MouseDoubleClick;
            Gui.MouseDown        += MouseDown;
            Gui.MouseUp          += MouseUp;
            Gui.MouseWheel       += MouseWheel;

            Gui.AddWidget(_hasMouse = new Label(100, 10 + 30 * 0, "HasMouse"));

            Gui.AddWidget(_charEntered = new Label(100, 10 + 30 * 1, "CharEntered"));
            Gui.AddWidget(_keyDown     = new Label(100, 10 + 30 * 2, "KeyDown"));
            Gui.AddWidget(_keyUp       = new Label(100, 10 + 30 * 3, "KeyUp"));

            Gui.AddWidget(_doubleClick = new Label(100, 10 + 30 * 4, "MouseDoubleClick"));
            Gui.AddWidget(_mouseDown   = new Label(100, 10 + 30 * 5, "MouseDown"));
            Gui.AddWidget(_mouseUp     = new Label(100, 10 + 30 * 6, "MouseUp"));

            Gui.AddWidget(_mouseWheel = new Label(100, 10 + 30 * 7, "MouseWheel"));
        }
    // 全部结账
    void OnBillingAllClick()
    {
        if (null == m_curRestaurant)
        {
            return;
        }

        bool bCanBilling = false;

        foreach (RestaurantData.DeskInfo curDesk in m_curRestaurant.m_Desks)
        {
            if (curDesk.m_IsActive && curDesk.m_DestState == RestaurantData.DeskState.WaitBilling)
            {
                bCanBilling = true;
                break;
            }
        }

        if (!bCanBilling)
        {
            // 没有可以结账的餐桌
            GUIData.AddNotifyData("#{1980}");
            return;
        }

        CG_RESTAURANT_BILLINGALL packet = (CG_RESTAURANT_BILLINGALL)PacketDistributed.CreatePacket(MessageID.PACKET_CG_RESTAURANT_BILLINGALL);

        packet.None = 0;
        if (!m_bSelfData)
        {
            packet.FriendGuid = RestaurantData.m_FriendRestaurantInfo.m_FrinedGuid;
        }
        packet.SendPacket();
    }
示例#27
0
    void OnActiveDesk()
    {
        if (null == m_curDestData)
        {
            LogModule.ErrorLog("OnActiveDesk:: m_curDestData is null");
            return;
        }
        if (null == m_curTabDesk)
        {
            LogModule.ErrorLog("OnActiveDesk:: m_curTabDesk is null");
            return;
        }
        int nCostValue         = m_curTabDesk.OpenConditionValue;
        int nPlayerYuanBao     = GameManager.gameManager.PlayerDataPool.Money.GetMoney_YuanBao();
        int nPlayerBindYuanBao = GameManager.gameManager.PlayerDataPool.Money.GetMoney_YuanBaoBind();
        int nTotalYuanBao      = nPlayerBindYuanBao + nPlayerYuanBao;

        if (nTotalYuanBao < nCostValue)
        {
            GUIData.AddNotifyData("#{1018}");
            return;
        }
        CG_RESTAURANT_ACTIVEDESK packet = (CG_RESTAURANT_ACTIVEDESK)PacketDistributed.CreatePacket(MessageID.PACKET_CG_RESTAURANT_ACTIVEDESK);

        packet.SetDeskIndex(m_curDeskIndex);
        packet.SendPacket();
    }
示例#28
0
        public static CompiledOutputData run(GISData gis, GUIData gui)
        {
            PVSAMV1Settings           pvss       = GISAdapter.getSettings(gis);
            float                     arraypower = pvss.modules_per_string * pvss.strings_in_parallel * pvss.module_model.getRatedPower();
            DatasheetInverterSettings inverter   = new DatasheetInverterSettings("default", arraypower * 1.15f);

            pvss.inverter_model = inverter;

            PVSAMV1Output pvo = (PVSAMV1Output)ModuleRunner.runModule(pvss);

            UtilityRateSettings urs = GUIAdapter.getUtilityRateSettings(gui);

            urs.setValuesFromPriorOutput(pvo);
            UtilityRateOutput uro = (UtilityRateOutput)ModuleRunner.runModule(urs);


            SizeAndCostSettings sc = GUIAdapter.getSizeAndCostSettings(gui);

            sc.setValuesFromPriorOutput(pvo);

            CashLoanSettings cls = GUIAdapter.getCashLoanSettings(gui);

            cls.setValuesFromPriorOutput(sc, uro);
            CashLoanOutput clo = (CashLoanOutput)ModuleRunner.runModule(cls);

            return(new CompiledOutputData(pvo, uro, clo, sc));
        }
示例#29
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();
        }
    }
    /// <summary>
    /// 打开选择学习技能书界面
    /// </summary>
    /// <param name="go"></param>
    void OpenChooseSkillBookDialog(GameObject go)
    {
        Utils.CleanGrid(m_SkillChooseGrid);

        List <Tab_CabalFellowElementSkillBook> FellowSkillBookList = GameManager.gameManager.PlayerDataPool.BackPack.GetSkillLearnBooksByElementType(m_Fellow.ElementAttr);

        if (FellowSkillBookList.Count <= 0)
        {
            GUIData.AddNotifyData("#{11500}");
            return;
        }
        //选择技能书界面
        m_SkillChooseWindow.SetActive(true);

        int index = 0;

        //foreach (Tab_CabalFellowElementSkillBook book in GameManager.gameManager.PlayerDataPool.BackPack.GetSkillLearnBooksByElementType(m_Fellow.ElementAttr))
        foreach (Tab_CabalFellowElementSkillBook book in FellowSkillBookList)
        {
            if (m_Fellow.IsHaveSkillId(book.SkillId))
            {
                continue;
            }
            Tab_CabalFellowElementSkill tabSkill = TableManager.GetCabalFellowElementSkillByID(book.SkillId, 0);
            if (tabSkill == null)
            {
                continue;
            }

            Tab_SkillEx tabSkillEx = TableManager.GetSkillExByID(book.SkillId, 0);
            if (tabSkillEx == null)
            {
                continue;
            }

            Tab_SkillBase tabBase = TableManager.GetSkillBaseByID(tabSkillEx.BaseId, 0);
            if (tabBase == null)
            {
                continue;
            }
            string     itemName  = index < 10 ? "0" + index.ToString() : index.ToString();
            GameObject SkillItem = Utils.BindObjToParent(m_SkillChooseItem, m_SkillChooseGrid, itemName);
            if (SkillItem != null && SkillItem.GetComponent <PartnerSkillChooseItemLogic>() != null)
            {
                SkillItem.GetComponent <PartnerSkillChooseItemLogic>().Init(book);
            }
            index += 1;
        }

        if (m_SkillChooseGrid.GetComponent <UIGrid>() != null)
        {
            m_SkillChooseGrid.GetComponent <UIGrid>().Reposition();
        }

        if (PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step == 4)
        {
            PartnerFrameLogic.Instance().NewPlayerGuide(5);
        }
    }
 void Awake()
 {
     returnActive = false;
     gData = GameObject.Find("Data").GetComponent<GUIData>();
     aoiScaleFactor = gData.AoiScaleFactor;
     gazeRotationSpeed = gData.GazeSensitivity;
     maxScale = Screen.height / 2;
     mouseSensitivity = gData.MouseSensitivity;
     upDownRange = gData.TopBottomRange;
     leftRightRange = gData.LeftRightRange;
     Filler = GameObject.Find("Data").GetComponent<TextureData>().aoiFiller;
     areAOIsVisible = GameObject.Find("Data").GetComponent<ControlOptions>().AOIVisible;
 }
示例#32
0
        private void toolStripDropDownButton4_Click(object sender, EventArgs e)
        {
            try
            {
                SaveFileDialog save = new SaveFileDialog();
                var c = save.ShowDialog();

                if (c == DialogResult.OK)
                {
                    GUIData data = new GUIData();
                    foreach (var widget in Singleton<GUI>.INSTANCE.widgets)
                    {
                        data.widgets.Add(widget.ToWidgetData());
                    }

                    //SharpSerializer s = new SharpSerializer();
                    //s.Serialize(data, save.FileName);

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }