当前位置: 首页>>代码示例>>C#>>正文


C# Interfaces.SendAgate方法代码示例

本文整理汇总了C#中Interfaces.SendAgate方法的典型用法代码示例。如果您正苦于以下问题:C# Interfaces.SendAgate方法的具体用法?C# Interfaces.SendAgate怎么用?C# Interfaces.SendAgate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Interfaces的用法示例。


在下文中一共展示了Interfaces.SendAgate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UseItem


//.........这里部分代码省略.........
                            client.Inventory.Add(720028, 0, 1);//dbscroll
                            client.Inventory.Add(720836, 0, 1);//accessores
                            client.Inventory.Add(723693, 0, 1);//legandRefineryPack
                            client.Inventory.Add(723912, 0, 1);//ArenaExp
                            //client.Inventory.Add(723864, 0, 1);//Steed+6
                        }
                        else
                        {
                            client.Send(new Message("you must have 6 space in you inventory to take prize", Color.Green, 2005));
                        }

                        break;
                    }
                #endregion
                #endregion
                #region NewItems
                case 724002://SmallLotteryTicketPack
                    {
                        client.Inventory.Add(711504, 0, 3);
                        client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
                        break;
                    }
                #endregion
                #region MemoryAgate
                case 720828:
                    {
                        if (ServerBase.Constants.revnomap.Contains(client.Entity.MapID))
                        {
                            client.Send(new Message("You Can't record here !", System.Drawing.Color.Tan, Message.TopLeft));
                            return;
                        }
                        else
                        {
                            item.SendAgate(client);
                        }

                        break;
                    }
                #endregion
                #region Medicine
                case 1000000:
                case 1000010:
                case 1000020:
                case 1000030:
                case 1002000:
                case 1002010:
                case 1002020:
                case 1002050:
                case 1000040:
                case 725065:
                    {
                        //Console.WriteLine("ss");
                        if (client.Entity.NoDrugsTime > 0)
                        {
                            if (Time32.Now > client.Entity.NoDrugsStamp.AddSeconds(client.Entity.NoDrugsTime))
                            {
                                client.Entity.NoDrugsTime = 0;
                            }
                            else
                            {
                                return;
                            }
                        }
                        if (client.Entity.Hitpoints == client.Entity.MaxHitpoints)
                        {
                            // Console.WriteLine("ss2");
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:67,代码来源:PacketHandler.cs

示例2: UseItem

        static void UseItem(Interfaces.IConquerItem item, Client.GameState client)
        {
            Database.ConquerItemInformation infos = new Database.ConquerItemInformation(item.ID, 0);

            switch (item.ID)
            {
                #region MemoryAgate
                case 720828:
                    {
                        if (client.Entity.MapID == 1038 || client.Entity.MapID == 1090 || client.Entity.MapID == 1858
                            || client.Entity.MapID == 1068 || client.Entity.MapID == 1730 || client.Entity.MapID == 1731
                            || client.Entity.MapID == 1732 || client.Entity.MapID == 1733 || client.Entity.MapID == 1505
                            || client.Entity.MapID == 1506 || client.Entity.MapID == 1507 || client.Entity.MapID == 1508
                            || client.Entity.MapID == 1525 || client.Entity.MapID == 1526 || client.Entity.MapID == 1527
                            || client.Entity.MapID == 1528 || client.Entity.MapID >= 10000 || client.Entity.MapID == 1950)
                        {
                            client.Send(new Message("Yyou Can't record here !", System.Drawing.Color.Tan, Message.TopLeft));
                            return;
                        }
                        else
                        {
                            item.SendAgate(client);
                        }

                        break;
                    }
                #endregion
                #region Medicine
                case 1000000:
                case 1000010:
                case 1000020:
                case 1000030:
                case 1002000:
                case 1002010:
                case 1002020:
                case 1002050:
                case 725065:
                    {
                        if (client.Entity.NoDrugsTime > 0)
                        {
                            if (Time32.Now > client.Entity.NoDrugsStamp.AddSeconds(client.Entity.NoDrugsTime))
                            {
                                client.Entity.NoDrugsTime = 0;
                            }
                            else
                            {
                                return;
                            }
                        }
                        if (client.Entity.Hitpoints == client.Entity.MaxHitpoints)
                            return;
                        client.Inventory.Remove(item, Game.Enums.ItemUse.Delete);
                        client.Entity.Hitpoints = Math.Min(client.Entity.Hitpoints + infos.BaseInformation.ItemHP, client.Entity.MaxHitpoints);
                        break;
                    }
                case 1001000:
                case 1001010:
                case 1001020:
                case 1001030:
                case 1001040:
                case 1002030:
                case 1002040:
                case 725066:
                    {
                        if (client.Entity.NoDrugsTime > 0)
                        {
                            if (Time32.Now > client.Entity.NoDrugsStamp.AddSeconds(client.Entity.NoDrugsTime))
                            {
                                client.Entity.NoDrugsTime = 0;
                            }
                            else
                            {
                                return;
                            }
                        }
                        if (client.Entity.Mana == client.Entity.MaxMana)
                            return;
                        client.Inventory.Remove(item, Game.Enums.ItemUse.Delete);
                        client.Entity.Mana = (ushort)Math.Min(client.Entity.Mana + infos.BaseInformation.ItemMP, client.Entity.MaxMana);
                        break;
                    }
                #endregion
                #region Gates
                case 1060020:
                    {
                        if (client.Entity.MapID == 601 || client.Map.BaseID == 700) return;
                        if (client.Map.BaseID == 6000 || client.Map.BaseID == 6001)
                        {
                            client.Send(ServerBase.Constants.JailItemUnusable);
                            return;
                        }
                        client.Inventory.Remove(item, Game.Enums.ItemUse.Delete);
                        client.Entity.Teleport(1002, 429, 378);
                        break;
                    }
                case 1060021:
                    {
                        if (client.Entity.MapID == 601 || client.Map.BaseID == 700) return;
                        if (client.Map.BaseID == 6000 || client.Map.BaseID == 6001)
                        {
//.........这里部分代码省略.........
开发者ID:faresali,项目名称:co-pserver,代码行数:101,代码来源:PacketHandler.cs


注:本文中的Interfaces.SendAgate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。