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


C# Client.SendScreenSpawn方法代码示例

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


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

示例1: HandlePacket


//.........这里部分代码省略.........
                                                    info.Fill(client.Partners[gData.dwParam]);
                                                    if (client.Partners[gData.dwParam].Client.Guild != null)
                                                        client.Partners[gData.dwParam].Client.Guild.SendName(client);
                                                    client.Send(info);
                                                }
                                            }
                                            break;
                                        }
                                    case Data.EndFly:
                                        client.Entity.RemoveFlag(Update.Flags.Fly);
                                        break;
                                    case Data.EndTransformation:
                                        client.Entity.Untransform();
                                        break;
                                    case Data.XPListEnd:
                                    case Data.Die:
                                        break;
                                    case Data.Confiscator:
                                        client.Send(packet);
                                        break;
                                    case Data.OwnBooth:
                                        {
                                            client.Booth = new PhoenixProject.Game.ConquerStructures.Booth(client, gData);
                                            client.Send(new Data(true) { ID = Data.ChangeAction, UID = client.Entity.UID, dwParam = 0 });
                                            break;
                                        }

                                    case Data.Away:
                                        {
                                            if (client.Entity.Away == 0)
                                                client.Entity.Away = 1;
                                            else
                                                client.Entity.Away = 0;
                                            client.SendScreenSpawn(client.Entity, false);
                                            break;
                                        }
                                    case Data.DeleteCharacter:
                                        {
                                            if ((client.WarehousePW == null || client.WarehousePW == "" || client.WarehousePW == "0" && gData.dwParam == 0) || (client.WarehousePW == gData.dwParam.ToString()))
                                            {
                                                client.Account.TempID = 400;

                                                client.Disconnect();
                                            }
                                            break;
                                        }

                                    case Data.TeamSearchForMember:
                                        {
                                            if (client.Team != null)
                                            {
                                                Client.GameState Client = null;
                                                if (!client.Team.IsTeammate(gData.UID))
                                                    return;
                                                if (Kernel.GamePool.TryGetValue(gData.UID, out Client))
                                                {
                                                    // Console.WriteLine(" " + gData.dwParam + "");
                                                    gData.wParam1 = Client.Entity.X;
                                                    gData.wParam2 = Client.Entity.Y;
                                                    gData.Send(client);
                                                }
                                            }
                                            break;
                                        }
                                    default:
                                        if (client.Account.State == PhoenixProject.Database.AccountTable.AccountState.ProjectManager || client.Account.State == PhoenixProject.Database.AccountTable.AccountState.Coder)
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:67,代码来源:PacketHandler.cs

示例2: DropMoney

        static void DropMoney(ItemUsage itemUsage, Client.GameState client)
        {
            if (client.Entity.Money >= itemUsage.UID)
            {
                ushort X = client.Entity.X, Y = client.Entity.Y;
                if (client.Map.SelectCoordonates(ref X, ref Y))
                {
                    uint ItemID = MoneyItemID(itemUsage.UID);
                    FloorItem floorItem = new FloorItem(true);
                    floorItem.ValueType = FloorItem.FloorValueType.Money;
                    floorItem.Value = itemUsage.UID;
                    floorItem.ItemID = ItemID;
                    floorItem.MapID = client.Map.ID;
                    floorItem.MapObjType = Game.MapObjectType.Item;
                    floorItem.X = X;
                    floorItem.Y = Y;
                    floorItem.Type = FloorItem.Drop;
                    floorItem.OnFloor = Time32.Now;
                    floorItem.UID = FloorItem.FloorUID.Next;
                    while (client.Map.Npcs.ContainsKey(floorItem.UID))
                        floorItem.UID = FloorItem.FloorUID.Next;
                    client.SendScreenSpawn(floorItem, true);
                    client.Map.AddFloorItem(floorItem);
                    client.Entity.Money -= itemUsage.UID;

                }
            }
        }
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:28,代码来源:PacketHandler.cs

示例3: DropItem

        static void DropItem(ItemUsage itemUsage, Client.GameState client)
        {
            if (client.Booth != null)
            {
                Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Sorry you cant drop items while you in Booth");
                npc.OptionID = 255;
                client.Send(npc.ToArray());
                return;
            }
            Interfaces.IConquerItem item = null;
            if (client.Inventory.TryGetItem(itemUsage.UID, out item))
            {
                if (item.ID == 0)
                    return;
                Database.ConquerItemInformation infos = new Database.ConquerItemInformation(item.ID, 0);
                if (item.Lock != 0 || item.Suspicious)
                    return;
                if (infos.BaseInformation.Type == Database.ConquerItemBaseInformation.ItemType.Dropable && !item.Bound)
                {
                    ushort X = client.Entity.X, Y = client.Entity.Y;
                    if (client.Map.SelectCoordonates(ref X, ref Y))
                    {
                        FloorItem floorItem = new FloorItem(true);
                        floorItem.Item = item;
                        floorItem.ItemID = item.ID;
                        floorItem.ItemColor = item.Color;
                        floorItem.MapID = client.Map.ID;
                        floorItem.MapObjType = Game.MapObjectType.Item;
                        floorItem.X = X;
                        floorItem.Y = Y;
                        floorItem.Type = FloorItem.Drop;
                        floorItem.OnFloor = Time32.Now;
                        floorItem.UID = FloorItem.FloorUID.Next;
                        while (client.Map.Npcs.ContainsKey(floorItem.UID))
                            floorItem.UID = FloorItem.FloorUID.Next;
                        client.SendScreenSpawn(floorItem, true);
                        client.Map.AddFloorItem(floorItem);
                        client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);

                        /* #region DropLog
                         var dt = DateTime.Now;
                         string date = dt.Year + "-" + dt.Month + "//";
                         string datess = +dt.Day + "//";
                         if (!Directory.Exists(System.Windows.Forms.Application.StartupPath + ServerBase.Constants.Unhandledgmlog))
                             Directory.CreateDirectory(System.Windows.Forms.Application.StartupPath + "\\" + ServerBase.Constants.Unhandledgmlog);

                         if (!Directory.Exists(System.Windows.Forms.Application.StartupPath + ServerBase.Constants.Unhandledgmlog + "\\Drop"))
                             Directory.CreateDirectory(System.Windows.Forms.Application.StartupPath + "\\" + ServerBase.Constants.Unhandledgmlog + "\\Drop");

                         if (!Directory.Exists(System.Windows.Forms.Application.StartupPath + "\\" + ServerBase.Constants.Unhandledgmlog + "\\Drop\\" + date + ""))
                             Directory.CreateDirectory(System.Windows.Forms.Application.StartupPath + "\\" + ServerBase.Constants.Unhandledgmlog + "\\Drop\\" + date + "");
                         if (!File.Exists(System.Windows.Forms.Application.StartupPath + "\\" + ServerBase.Constants.Unhandledgmlog + "\\Drop\\" + date + "\\" + dt.Day + ".txt"))
                             File.CreateText(System.Windows.Forms.Application.StartupPath + "\\" + ServerBase.Constants.Unhandledgmlog + "\\Drop\\" + date + "\\" + dt.Day + ".txt");

                         File.WriteAllText(System.Windows.Forms.Application.StartupPath + "\\" + ServerBase.Constants.Unhandledgmlog + "\\Drop\\" + date + "\\" + dt.Day + ".txt",
             File.ReadAllText(System.Windows.Forms.Application.StartupPath + "\\" + ServerBase.Constants.Unhandledgmlog + "\\Drop\\" + date + "\\" + dt.Day + ".txt") +
             "\r\n" + client.Entity.Name + " Droped item: [" + Database.ConquerItemInformation.BaseInformations[item.ID].Name + "] item UID: [" + item.UID + "] Plus: [" + item.Plus + "]");
                         #endregion*/
                    }
                }
                else
                    client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
            }
        }
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:64,代码来源:PacketHandler.cs

示例4: CheckCommand


//.........这里部分代码省略.........
                                    Writer.WriteString(client.Entity.Name, 48, data2);
                                    Writer.WriteString(client.Entity.Name, 64, data2);
                                    client.Send(data2);
                                    // client.Send(new Message("Test Channel Mesaage!", System.Drawing.Color.Red, uint.Parse(Data[1])));
                                    //client.Entity.ClanSharedBp = 4;
                                    // Game.KimoCarnaval.Load();
                                    /*NpcInitial initial = new NpcInitial
                                    {
                                        Identifier = 1,
                                        Lookface = (num != 0x2008) ? ((ushort)0x1a) : ((ushort)3),
                                        Mode = PhoenixProject.Network.GamePackets.NpcInitial.NpcModes.Place,
                                        Furniture = num
                                    };
                                    client.Send((byte[])initial);*/
                                    break;
                                }
                            case "600":
                                {
                                    Game.Map Map = ServerBase.Kernel.Maps[client.Entity.MapID];
                                    Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true);

                                    floorItem.MapObjType = Game.MapObjectType.Item;
                                    floorItem.ItemID = uint.Parse(Data[1]);
                                    floorItem.MapID = client.Entity.MapID;

                                    floorItem.X = ushort.Parse(Data[2]);
                                    floorItem.Y = ushort.Parse(Data[3]);
                                    floorItem.Type = 10;
                                    floorItem.OnFloor = Time32.Now.AddHours(24);
                                    floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
                                    while (Map.Npcs.ContainsKey(floorItem.UID))
                                        floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
                                    Map.AddFloorItem(floorItem);
                                    client.SendScreenSpawn(floorItem, true);
                                    client.Effect = true;
                                    /* _String str = new _String(true);
                                     str.UID = client.Entity.UID;
                                     str.TextsCount = 2;
                                     str.Type = _String.Sound;
                                     str.Texts.Add("sound");
                                     str.Texts.Add("gethp.wav");
                                     client.Send(str);*/

                                    // client.Entity.TitlePacket.dwParam2 = (byte)PhoenixProject.Game.Tournaments.top_typ.GoldenRacer;
                                    break;
                                }
                            case "quiz":
                                {
                                    //PhoenixProject.Game.ConquerStructures.QuizShow.Start();
                                    // client.Send(GamePackets.QuizInfo.tempQuestionBuffer());
                                    //Game.ConquerStructures.QuizShow.Start();
                                    Game.ConquerStructures.QuizShow.Start2();
                                    Program.QuizStamp = Time32.Now;
                                    break;
                                }
                            case "me":
                                {
                                    /* MessageTick m = new MessageTick();
                                     m.Identifier = client.Entity.UID;
                                     m.Response = client.Entity.UID;
                                     client.Send(m);*/

                                    MapStatus mbox = new MapStatus();
                                    mbox.BaseID = 1002;
                                    client.Send(mbox);
                                    break;
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:67,代码来源:PacketHandler.cs

示例5: HandlePacket


//.........这里部分代码省略.........
                            case Data.EndFly:
                                client.Entity.RemoveFlag(Update.Flags.Fly);
                                break;
                            case Data.EndTransformation:
                                client.Entity.Untransform();
                                break;
                            case Data.XPListEnd:
                            case Data.Die:
                                break;
                            case Data.OwnBooth:
                                {

                                    //client.Entity.TransformationTime = 3600;
                                    if (client.WarehouseOpen == true)
                                    {
                                        client.Send(new Message("you cant booth when you open warehose", Color.AntiqueWhite, 2005));

                                        return;
                                    }
                                    else
                                    {
                                        client.Booth = new Conquer_Online_Server.Game.ConquerStructures.Booth(client, gData);
                                        client.Send(new Data(true) { ID = Data.ChangeAction, UID = client.Entity.UID, dwParam = 0 });

                                    }
                                    break;
                                }
                            case Data.Away:
                                {
                                    if (client.Entity.Away == 0)
                                        client.Entity.Away = 1;
                                    else
                                        client.Entity.Away = 0;
                                    client.SendScreenSpawn(client.Entity, false);
                                    break;
                                }
                            case Data.DeleteCharacter:
                                {
                                    if ((client.WarehousePW == null || client.WarehousePW == "" || client.WarehousePW == "0" && gData.dwParam == 0) || (client.WarehousePW == gData.dwParam.ToString()))
                                    {
                                        client.Account.EntityID = 0;
                                        client.Account.Save();
                                        client.Disconnect();
                                    }
                                    break;
                                }
                            case Data.TeamSearchForMember:
                                {
                                    if (client.Team != null)
                                    {
                                        Client.GameState Client = null;
                                        if (!client.Team.IsTeammate(gData.UID))
                                            return;
                                        if (Kernel.GamePool.TryGetValue(gData.UID, out Client))
                                        {
                                            gData.wParam1 = Client.Entity.X;
                                            gData.wParam2 = Client.Entity.Y;
                                            gData.Send(client);
                                        }
                                    }
                                    break;
                                }
                            default:
                                if (client.Account.State == Conquer_Online_Server.Database.AccountTable.AccountState.ProjectManager)
                                    client.Send(new Message("Unknown generaldata id: " + gData.ID, System.Drawing.Color.CadetBlue, Message.Talk));
                                break;
开发者ID:faresali,项目名称:co-pserver,代码行数:67,代码来源:PacketHandler.cs

示例6: DropItem

 static void DropItem(ItemUsage itemUsage, Client.GameState client)
 {
     Interfaces.IConquerItem item = null;
     if (client.Inventory.TryGetItem(itemUsage.UID, out item))
     {
         if (item.ID == 0)
             return;
         Database.ConquerItemInformation infos = new Database.ConquerItemInformation(item.ID, 0);
         if (item.Lock != 0 || item.Suspicious)
             return;
         if (infos.BaseInformation.Type == Database.ConquerItemBaseInformation.ItemType.Dropable && !item.Bound)
         {
             ushort X = client.Entity.X, Y = client.Entity.Y;
             if (client.Map.SelectCoordonates(ref X, ref Y))
             {
                 FloorItem floorItem = new FloorItem(true);
                 floorItem.Item = item;
                 floorItem.ItemID = item.ID;
                 floorItem.ItemColor = item.Color;
                 floorItem.MapID = client.Map.ID;
                 floorItem.MapObjType = Game.MapObjectType.Item;
                 floorItem.X = X;
                 floorItem.Y = Y;
                 floorItem.Type = FloorItem.Drop;
                 floorItem.OnFloor = Time32.Now;
                 floorItem.UID = FloorItem.FloorUID.Next;
                 while (client.Map.Npcs.ContainsKey(floorItem.UID))
                     floorItem.UID = FloorItem.FloorUID.Next;
                 client.SendScreenSpawn(floorItem, true);
                 client.Map.AddFloorItem(floorItem);
                 ushort stack = item.StackSize;
                 item.StackSize = 0;
                 client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
                 item.StackSize = stack;
             }
         }
         else
             client.Inventory.Remove(item, Game.Enums.ItemUse.Delete);
     }
 }
开发者ID:faresali,项目名称:co-pserver,代码行数:40,代码来源:PacketHandler.cs


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