本文整理匯總了C#中RS2.Server.player.Player.getShopSession方法的典型用法代碼示例。如果您正苦於以下問題:C# Player.getShopSession方法的具體用法?C# Player.getShopSession怎麽用?C# Player.getShopSession使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類RS2.Server.player.Player
的用法示例。
在下文中一共展示了Player.getShopSession方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: handleEnterAmount
//.........這裏部分代碼省略.........
case 762: // Bank - X.
player.getBank().setLastXAmount(amount);
player.getBank().withdraw(var.getSlot(), amount);
player.getBank().refreshBank();
break;
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:
示例2: 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;
//.........這裏部分代碼省略.........
示例3: handleClickThree
private void handleClickThree(Player player, Packet packet)
{
int interfaceId = packet.readUShort();
int child = packet.readUShort();
int slot = packet.readUShort();
Console.WriteLine("InterfaceOption 3: interfaceId: " + interfaceId);
switch (interfaceId)
{
case 154: // Craft normal leather.
Leather.craftNormalLeather(player, child, player.getInventory().getItemAmount(1741), true);
break;
case 542: // Glassblowing.
int totalGlass = player.getInventory().getItemAmount(1775);
switch (child)
{
case 40: // Make all beer glass.
Glass.craftGlass(player, totalGlass, 0, true);
break;
case 41: // Make all candle lantern.
Glass.craftGlass(player, totalGlass, 1, true);
break;
case 42: // Make all oil lamp.
Glass.craftGlass(player, totalGlass, 2, true);
break;
case 38: // Make all vial.
Glass.craftGlass(player, totalGlass, 3, true);
break;
case 44: // Make all Fishbowl
Glass.craftGlass(player, totalGlass, 4, true);
break;
case 39: // Make all orb.
Glass.craftGlass(player, totalGlass, 5, true);
break;
case 43: // Make all lantern lens
Glass.craftGlass(player, totalGlass, 6, true);
break;
case 45: // Make all dorgeshuun light orb.
Glass.craftGlass(player, totalGlass, 7, true);
break;
}
break;
case 763: // Bank inventory - 10.
player.getBank().deposit(slot, 10);
player.getBank().refreshBank();
break;
case 762: // Bank - 10.
player.getBank().withdraw(slot, 10);
player.getBank().refreshBank();
break;
case 336: // Trade/stake inventory - trade 10.
if (player.getTrade() != null)
{
player.getTrade().tradeItem(slot, 10);
break;
}
if (player.getDuel() != null)
{
player.getDuel().stakeItem(slot, 10);
break;
}
break;
case 335: // Trade interface - remove 10.
player.getTrade().removeItem(slot, 10);
break;
case 631: // Duel interface - remove 10.
if (player.getDuel() != null)
{
player.getDuel().removeItem(slot, 5);
break;
}
break;
case 620: // Shop - buy 5.
player.getShopSession().buyItem(slot, 5);
break;
case 621: // Shop - sell 5.
player.getShopSession().sellItem(slot, 5);
break;
case 590: // Clan chat setup
Clan clan = Server.getClanManager().getClanByOwner(player.getLoginDetails().getUsername());
if (clan == null)
{
player.getPackets().sendMessage("Please create your clan chat before changing settings.");
break;
}
//.........這裏部分代碼省略.........
示例4: handleClickFour
private void handleClickFour(Player player, Packet packet)
{
int interfaceId = packet.readUShort();
int child = packet.readUShort();
int slot = packet.readUShort();
Console.WriteLine("InterfaceOption 4: interfaceId: " + interfaceId);
switch (interfaceId)
{
case 763: // Bank inventory - Custom amount.
player.getBank().deposit(slot, player.getBank().getLastXAmount());
player.getBank().refreshBank();
break;
case 762: // Bank - Custom amount.
player.getBank().withdraw(slot, player.getBank().getLastXAmount());
player.getBank().refreshBank();
break;
case 154: // Craft normal leather.
player.getPackets().displayEnterAmount();
player.setTemporaryAttribute("interfaceVariable", new EnterVariable(154, child));
break;
case 542: // Glassblowing.
switch (child)
{
case 40: // Make X beer glass.
case 41: // Make X candle lantern.
case 42: // Make X oil lamp.
case 38: // Make X vial.
case 44: // Make X Fishbowl
case 39: // Make X orb.
case 43: // Make X lantern lens
case 45: // Make X dorgeshuun light orb.
player.getPackets().displayEnterAmount();
player.setTemporaryAttribute("interfaceVariable", new EnterVariable(542, child));
break;
}
break;
case 336: // Trade/stake inventory - trade all.
if (player.getTrade() != null)
{
player.getTrade().tradeItem(slot, player.getInventory().getItemAmount(player.getInventory().getItemInSlot(slot)));
break;
}
if (player.getDuel() != null)
{
player.getDuel().stakeItem(slot, player.getInventory().getItemAmount(player.getInventory().getItemInSlot(slot)));
break;
}
break;
case 335: // Trade interface - remove all.
player.getTrade().removeItem(slot, player.getTrade().getItemAmount(player.getTrade().getItemInSlot(slot)));
break;
case 631: // Duel interface - remove All
if (player.getDuel() != null)
{
player.getDuel().removeItem(slot, player.getDuel().getItemAmount(player.getDuel().getItemInSlot(slot)));
break;
}
break;
case 620: // Shop - buy 10.
player.getShopSession().buyItem(slot, 10);
break;
case 621: // Shop - sell 10.
player.getShopSession().sellItem(slot, 10);
break;
case 590: // Clan chat setup
Clan clan = Server.getClanManager().getClanByOwner(player.getLoginDetails().getUsername());
if (clan == null)
{
player.getPackets().sendMessage("Please create your clan chat before changing settings.");
break;
}
switch (child)
{
case 23: // "Who can enter chat" - corporal.
clan.setEnterRights(Clan.ClanRank.CORPORAL);
player.getPackets().modifyText(clan.getRankString(clan.getEnterRights()), 590, 23);
break;
case 24: // "Who can talk in chat" - corporal.
clan.setTalkRights(Clan.ClanRank.CORPORAL);
player.getPackets().modifyText(clan.getRankString(clan.getTalkRights()), 590, 24);
break;
case 25: // // "Who can kick in chat" - corporal.
clan.setKickRights(Clan.ClanRank.CORPORAL);
player.getPackets().modifyText(clan.getRankString(clan.getKickRights()), 590, 25);
break;
case 26: // "Who can share loot" - corporal.
clan.setLootRights(Clan.ClanRank.CORPORAL);
player.getPackets().modifyText(clan.getRankString(clan.getLootRights()), 590, 26);
//.........這裏部分代碼省略.........
示例5: handleClickFive
private void handleClickFive(Player player, Packet packet)
{
int interfaceId = packet.readUShort();
int child = packet.readUShort();
int slot = packet.readUShort();
Console.WriteLine("InterfaceOption 5: interfaceId: " + interfaceId);
switch (interfaceId)
{
case 763: // Bank inventory - X.
player.getPackets().displayEnterAmount();
player.setTemporaryAttribute("interfaceVariable", new EnterVariable(interfaceId, slot));
break;
case 762: // Bank - X.
player.getPackets().displayEnterAmount();
player.setTemporaryAttribute("interfaceVariable", new EnterVariable(interfaceId, slot));
break;
case 336: // Trade inventory - trade X.
player.getPackets().displayEnterAmount();
player.setTemporaryAttribute("interfaceVariable", new EnterVariable(interfaceId, slot));
break;
case 335: // Trade interface - remove X.
player.getPackets().displayEnterAmount();
player.setTemporaryAttribute("interfaceVariable", new EnterVariable(interfaceId, slot));
break;
case 631: // Duel interface - remove All
if (player.getDuel() != null)
{
player.getPackets().displayEnterAmount();
player.setTemporaryAttribute("interfaceVariable", new EnterVariable(interfaceId, slot));
break;
}
break;
case 620: // Shop - buy X/buy 50.
if (player.getShopSession().isInMainStock())
{
player.getPackets().displayEnterAmount();
player.setTemporaryAttribute("interfaceVariable", new EnterVariable(interfaceId, slot));
}
else
{
player.getShopSession().buyItem(slot, 50);
}
break;
case 621: // Shop - Sell 50.
player.getShopSession().sellItem(slot, 50);
break;
case 590: // Clan chat setup
Clan clan = Server.getClanManager().getClanByOwner(player.getLoginDetails().getUsername());
if (clan == null)
{
player.getPackets().sendMessage("Please create your clan chat before changing settings.");
break;
}
switch (child)
{
case 23: // "Who can enter chat" - sergeant.
clan.setEnterRights(Clan.ClanRank.SERGEANT);
player.getPackets().modifyText(clan.getRankString(clan.getEnterRights()), 590, 23);
break;
case 24: // "Who can talk in chat" - sergeant.
clan.setTalkRights(Clan.ClanRank.SERGEANT);
player.getPackets().modifyText(clan.getRankString(clan.getTalkRights()), 590, 24);
break;
case 25: // // "Who can kick in chat" - sergeant.
clan.setKickRights(Clan.ClanRank.SERGEANT);
player.getPackets().modifyText(clan.getRankString(clan.getKickRights()), 590, 25);
break;
case 26: // "Who can share loot" - sergeant.
clan.setLootRights(Clan.ClanRank.SERGEANT);
player.getPackets().modifyText(clan.getRankString(clan.getLootRights()), 590, 26);
break;
}
break;
}
}
示例6: handleActionButton
//.........這裏部分代碼省略.........
switch (buttonId)
{
case 55: // Character display.
player.getEquipment().displayEquipmentScreen();
break;
case 52: // Items kept on death.
ProtectedItems.displayItemsInterface(player);
break;
}
break;
case 274: // Quest tab.
switch (buttonId)
{
case 3: // Achievment diary toggle.
player.getPackets().sendTab(85, 259);
player.setAchievementDiaryTab(true);
break;
}
break;
case 259: // Achievment diary tab.
switch (buttonId)
{
case 8: // Quest tab toggle.
player.getPackets().sendTab(85, 274);
player.setAchievementDiaryTab(false);
break;
}
break;
case 620: // Shop interface.
if (player.getShopSession() == null)
{
return;
}
switch (buttonId)
{
case 26: // Player stock tab.
player.getShopSession().openPlayerShop();
break;
case 25: // Main stock tab.
player.getShopSession().openMainShop();
break;
case 23: // Value (main stock)
case 24: // Value (player stock)
player.getShopSession().valueItem(buttonId2, false);
break;
}
break;
case 621: // Shop inventory.
if (player.getShopSession() == null)
{
return;
}
switch (buttonId)
{
case 0: // Value (player stock)
player.getShopSession().valueItem(buttonId2, true);
break;
}
break;