本文整理汇总了C#中Server.MirObjects.PlayerObject.GetMarket方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerObject.GetMarket方法的具体用法?C# PlayerObject.GetMarket怎么用?C# PlayerObject.GetMarket使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.MirObjects.PlayerObject
的用法示例。
在下文中一共展示了PlayerObject.GetMarket方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessSpecial
private void ProcessSpecial(PlayerObject player, NPCPage page)
{
List<UserItem> allGoods = new List<UserItem>();
switch (page.Key.ToUpper())
{
case BuyKey:
for (int i = 0; i < Goods.Count; i++)
player.CheckItem(Goods[i]);
player.Enqueue(new S.NPCGoods { List = Goods, Rate = Info.PriceRate });
break;
case SellKey:
player.Enqueue(new S.NPCSell());
break;
case BuySellKey:
for (int i = 0; i < Goods.Count; i++)
player.CheckItem(Goods[i]);
player.Enqueue(new S.NPCGoods { List = Goods, Rate = Info.PriceRate });
player.Enqueue(new S.NPCSell());
break;
case RepairKey:
player.Enqueue(new S.NPCRepair { Rate = Info.PriceRate });
break;
case SRepairKey:
player.Enqueue(new S.NPCSRepair { Rate = Info.PriceRate });
break;
case RefineKey:
if (player.Info.CurrentRefine != null)
{
player.ReceiveChat("You're already refining an item.", ChatType.System);
player.Enqueue(new S.NPCRefine { Rate = (Settings.RefineCost), Refining = true });
break;
}
else
player.Enqueue(new S.NPCRefine { Rate = (Settings.RefineCost), Refining = false });
break;
case RefineCheckKey:
player.Enqueue(new S.NPCCheckRefine());
break;
case RefineCollectKey:
player.CollectRefine();
break;
case ReplaceWedRingKey:
player.Enqueue(new S.NPCReplaceWedRing { Rate = Settings.ReplaceWedRingCost });
break;
case StorageKey:
player.SendStorage();
player.Enqueue(new S.NPCStorage());
break;
case BuyBackKey:
if (!BuyBack.ContainsKey(player.Name)) BuyBack[player.Name] = new List<UserItem>();
for (int i = 0; i < BuyBack[player.Name].Count; i++)
{
player.CheckItem(BuyBack[player.Name][i]);
}
player.Enqueue(new S.NPCGoods { List = BuyBack[player.Name], Rate = Info.PriceRate });
break;
case BuyUsedKey:
for (int i = 0; i < UsedGoods.Count; i++)
player.CheckItem(UsedGoods[i]);
player.Enqueue(new S.NPCGoods { List = UsedGoods, Rate = Info.PriceRate });
break;
case ConsignKey:
player.Enqueue(new S.NPCConsign());
break;
case MarketKey:
player.UserMatch = false;
player.GetMarket(string.Empty, ItemType.Nothing);
break;
case ConsignmentsKey:
player.UserMatch = true;
player.GetMarket(string.Empty, ItemType.Nothing);
break;
case GuildCreateKey:
if (player.Info.Level < Settings.Guild_RequiredLevel)
{
player.ReceiveChat(String.Format("You have to be at least level {0} to create a guild.", Settings.Guild_RequiredLevel), ChatType.System);
}
if (player.MyGuild == null)
{
player.CanCreateGuild = true;
player.Enqueue(new S.GuildNameRequest());
}
else
player.ReceiveChat("You are already part of a guild.", ChatType.System);
break;
case RequestWarKey:
if (player.MyGuild != null)
{
if (player.MyGuildRank != player.MyGuild.Ranks[0])
{
player.ReceiveChat("You must be the leader to request a war.", ChatType.System);
return;
}
player.Enqueue(new S.GuildRequestWar());
//.........这里部分代码省略.........
示例2: ProcessPage
private void ProcessPage(PlayerObject player, NPCPage page)
{
player.NPCID = ObjectID;
player.NPCPage = page;
player.NPCSuccess = page.Check(player);
switch (page.Key)
{
case BuyKey:
for (int i = 0; i < Goods.Count; i++)
player.CheckItemInfo(Goods[i]);
player.Enqueue(new S.NPCGoods {List = GoodsIndex, Rate = Info.PriceRate});
break;
case SellKey:
player.Enqueue(new S.NPCSell());
break;
case RepairKey:
player.Enqueue(new S.NPCRepair { Rate = Info.PriceRate });
break;
case SRepairKey:
player.Enqueue(new S.NPCSRepair { Rate = Info.PriceRate });
break;
case StorageKey:
player.SendStorage();
player.Enqueue(new S.NPCStorage());
break;
case BuyBackKey:
break;
case ConsignKey:
player.Enqueue(new S.NPCConsign());
break;
case MarketKey:
player.UserMatch = false;
player.GetMarket(string.Empty, ItemType.Nothing);
break;
case ConsignmentsKey:
player.UserMatch = true;
player.GetMarket(string.Empty, ItemType.Nothing);
break;
}
}