當前位置: 首頁>>代碼示例>>C#>>正文


C# Player.getGESession方法代碼示例

本文整理匯總了C#中RS2.Server.player.Player.getGESession方法的典型用法代碼示例。如果您正苦於以下問題:C# Player.getGESession方法的具體用法?C# Player.getGESession怎麽用?C# Player.getGESession使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在RS2.Server.player.Player的用法示例。


在下文中一共展示了Player.getGESession方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: handleEnterAmount


//.........這裏部分代碼省略.........
                case 336: // Trade/stake inventory - trade X.
                    if (player.getTrade() != null)
                    {
                        player.getTrade().tradeItem(var.getSlot(), amount);
                        break;
                    }
                    if (player.getDuel() != null)
                    {
                        player.getDuel().stakeItem(var.getSlot(), amount);
                        break;
                    }
                    break;

                case 631:
                    if (player.getDuel() != null)
                    {
                        player.getDuel().removeItem(var.getSlot(), amount);
                        break;
                    }
                    break;

                case 335: // Trade/stake interface - remove X.
                    player.getTrade().removeItem(var.getSlot(), amount);
                    break;

                case 620: // Shop - buy X.
                    player.getShopSession().buyItem(var.getSlot(), amount);
                    break;

                case 105: //Grand Exchange custom quantity and price inputs.
                    switch (var.getSlot())
                    {
                        case 0: //custom enter quantity
                            player.getGESession().setCustomAmount(amount);
                            break;

                        case 1: //custom enter per price
                            player.getGESession().setCustomPrice(amount);
                            break;
                    }
                    break;

                case 305: // What would you like to make? - 4 options
                    if (player.getTemporaryAttribute("fletchType") == null)
                    {
                        return;
                    }
                    int logType = (int)player.getTemporaryAttribute("fletchType");
                    switch (var.getSlot())
                    {
                        case 0:
                            MakeBows.cutLog(player, amount, logType, 0, (player.getTemporaryAttribute("stringingBow") == null ? false : (bool)player.getTemporaryAttribute("stringingBow")), true);
                            break;

                        case 1:
                            MakeBows.cutLog(player, amount, logType, 1, (player.getTemporaryAttribute("stringingBow") == null ? false : (bool)player.getTemporaryAttribute("stringingBow")), true);
                            break;

                        case 2:
                            MakeBows.cutLog(player, amount, 0, 2, false, true);
                            break;

                        case 3:
                            MakeBows.cutLog(player, amount, 0, 3, false, true);
                            break;
                    }
開發者ID:ramatronics,項目名稱:rsps,代碼行數:67,代碼來源:InterfaceOptions.cs

示例2: handleGeSearch

 private void handleGeSearch(Player player, Packet packet)
 {
     int item = packet.readUShort();
     if (item < 0 || item > 16000)
     {
         return;
     }
     if (player.getGESession() == null)
     {
         // TODO close the search interface
         return;
     }
     player.getGESession().updateSearchItem(item);
 }
開發者ID:ramatronics,項目名稱:rsps,代碼行數:14,代碼來源:InterfaceOptions.cs

示例3: handleClickTwo

        private void handleClickTwo(Player player, Packet packet)
        {
            int interfaceId = packet.readUShort();
            int child = packet.readUShort();
            int slot = packet.readUShort();
            Console.WriteLine("InterfaceOption 2: interfaceId: " + interfaceId);
            switch (interfaceId)
            {
                case 105: // GE Interface
                    switch (child)
                    {
                        case 209: // "Collect" and "Collect-items" option
                            player.getGESession().collectSlot1(false);
                            break;

                        case 211: // Left box "Collect" option (coins)
                            player.getGESession().collectSlot2();
                            break;
                    }
                    break;

                case 154: // Craft normal leather.
                    Leather.craftNormalLeather(player, child, 5, true);
                    break;

                case 542: // Glassblowing.
                    switch (child)
                    {
                        case 40: // Make 5 beer glass.
                            Glass.craftGlass(player, 5, 0, true);
                            break;

                        case 41: // Make 5 candle lantern.
                            Glass.craftGlass(player, 5, 1, true);
                            break;

                        case 42: // Make 5 oil lamp.
                            Glass.craftGlass(player, 5, 2, true);
                            break;

                        case 38: // Make 5 vial.
                            Glass.craftGlass(player, 5, 3, true);
                            break;

                        case 44: // Make 5 Fishbowl
                            Glass.craftGlass(player, 5, 4, true);
                            break;

                        case 39: // Make 5 orb.
                            Glass.craftGlass(player, 5, 5, true);
                            break;

                        case 43: // Make 5 lantern lens
                            Glass.craftGlass(player, 5, 6, true);
                            break;

                        case 45: // Make 5 dorgeshuun light orb.
                            Glass.craftGlass(player, 5, 7, true);
                            break;
                    }
                    break;

                case 763: // Bank inventory - 5.
                    player.getBank().deposit(slot, 5);
                    player.getBank().refreshBank();
                    break;

                case 762: // Bank - 5.
                    player.getBank().withdraw(slot, 5);
                    player.getBank().refreshBank();
                    break;

                case 336: // Trade/stake inventory - trade 5.
                    if (player.getTrade() != null)
                    {
                        player.getTrade().tradeItem(slot, 5);
                        break;
                    }
                    if (player.getDuel() != null)
                    {
                        player.getDuel().stakeItem(slot, 5);
                        break;
                    }
                    break;

                case 631: // Duel interface - remove 5
                    if (player.getDuel() != null)
                    {
                        player.getDuel().removeItem(slot, 5);
                        break;
                    }
                    break;

                case 335: // Trade interface - remove 5.
                    player.getTrade().removeItem(slot, 5);
                    break;

                case 620: // Shop - buy 1.
                    player.getShopSession().buyItem(slot, 1);
                    break;
//.........這裏部分代碼省略.........
開發者ID:ramatronics,項目名稱:rsps,代碼行數:101,代碼來源:InterfaceOptions.cs

示例4: handleActionButton

        private void handleActionButton(Player player, Packet packet)
        {
            int interfaceId = packet.readUShort();
            ushort buttonId = packet.readUShort();
            ushort buttonId2 = 0;
            if (packet.getLength() >= 6)
            {
                buttonId2 = packet.readUShort();
            }
            if (buttonId2 == 65535)
            {
                buttonId2 = 0;
            }
            Console.WriteLine("button = " + interfaceId + " " + buttonId + " " + buttonId2);
            switch (interfaceId)
            {
                case 389: // GE Item Search
                    if (player.getGESession() != null)
                    {
                        if (player.getGESession().getCurrentOffer() != null)
                        {
                            if (player.getGESession().getCurrentOffer() is BuyOffer)
                            {
                                player.getPackets().sendInterface(0, 752, 6, 137); // Removes the item search
                            }
                        }
                    }
                    break;

                case 374: // Tzhaar fight pits viewing orb
                    Server.getMinigames().getFightPits().useOrb(player, buttonId);
                    break;

                case 107: // GE Sell inventory.
                    if (player.getGESession() == null)
                    {
                        break;
                    }
                    switch (buttonId)
                    {
                        case 18: // Offer
                            player.getGESession().offerSellItem(buttonId2);
                            break;
                    }
                    break;

                case 105: // GE interface
                    if (player.getGESession() == null)
                    {
                        break;
                    }
                    switch (buttonId)
                    {
                        case 209: // Collect-notes
                            player.getGESession().collectSlot1(true);
                            break;

                        case 203: // Abort offer
                            player.getGESession().abortOffer();
                            break;

                        case 31: // Sell, box 1
                            player.getGESession().newSellOffer(0);
                            break;

                        case 30: // Buy, box 1
                            player.getGESession().newBuyOffer(0);
                            break;

                        case 18: // Check status, box 1
                            player.getGESession().checkOffer(0);
                            break;

                        case 46: // Buy, box 2
                            player.getGESession().newBuyOffer(1);
                            break;

                        case 47: // Sell, box 2
                            player.getGESession().newSellOffer(1);
                            break;

                        case 34: // Check status, box 2
                            player.getGESession().checkOffer(1);
                            break;

                        case 62: // Buy, box 3
                            player.getGESession().newBuyOffer(2);
                            break;

                        case 63: // Sell, box 3
                            player.getGESession().newSellOffer(2);
                            break;

                        case 50: // Check status, box 3
                            player.getGESession().checkOffer(2);
                            break;

                        case 81: // Buy, box 4
                            player.getGESession().newBuyOffer(3);
                            break;
//.........這裏部分代碼省略.........
開發者ID:ramatronics,項目名稱:rsps,代碼行數:101,代碼來源:ActionButton.cs


注:本文中的RS2.Server.player.Player.getGESession方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。