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


C# WorldClient.Send方法代码示例

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


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

示例1: HandleGetGuildInFactRequest

 public static void HandleGetGuildInFactRequest(GuildFactsRequestMessage message, WorldClient client)
 {
     GuildRecord guild = GuildRecord.GetGuild((int)message.guildId);
     if (guild == null)
         return;
     AllianceRecord alliance = AllianceProvider.GetAllianceFromGuild(guild.Id);
     List<CharacterMinimalInformations> membersMinimalInfos = new List<CharacterMinimalInformations>();
     foreach (GuildMember member in CharacterGuildRecord.GetMembers(guild.Id))
     {
         membersMinimalInfos.Add(new CharacterMinimalInformations(member.id, member.level, member.name));
     }
     if (alliance == null)
         client.Send(new GuildFactsMessage(new GuildFactSheetInformations((uint)guild.Id, guild.Name, guild.GetEmblemObject(), (uint)GuildProvider.GetLeader(guild.Id).CharacterId, (byte)guild.Level, (ushort)CharacterGuildRecord.GetMembers(guild.Id).Count()), 0, 0, true, (IEnumerable<CharacterMinimalInformations>)membersMinimalInfos));
     else
         client.Send(new GuildInAllianceFactsMessage(new GuildFactSheetInformations((uint)guild.Id, guild.Name, guild.GetEmblemObject(), (uint)GuildProvider.GetLeader(guild.Id).CharacterId, (byte)guild.Level, (ushort)CharacterGuildRecord.GetMembers(guild.Id).Count()),0,0,true, (IEnumerable<CharacterMinimalInformations>)membersMinimalInfos,new BasicNamedAllianceInformations((uint)alliance.Id,alliance.Tag,alliance.Name)));
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:16,代码来源:AllianceHandler.cs

示例2: HandleGuildCreationRequest

 public static void HandleGuildCreationRequest(GuildCreationValidMessage message, WorldClient client)
 {
     if (GuildProvider.Instance.HasGuild(client.Character.Id))
     {
         client.Send(new GuildCreationResultMessage((sbyte)GuildCreationResultEnum.GUILD_CREATE_ERROR_ALREADY_IN_GUILD));
         return;
     }
     if (GuildRecord.CanCreateGuild(message.guildName))
     {
         GuildRecord newGuild = GuildProvider.Instance.CreateGuild(client.Character, message);
         client.Send(new GuildCreationResultMessage((sbyte)GuildCreationResultEnum.GUILD_CREATE_OK));
     }
     else
     {
         client.Send(new GuildCreationResultMessage((sbyte)GuildCreationResultEnum.GUILD_CREATE_ERROR_NAME_ALREADY_EXISTS));
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:17,代码来源:GuildHandler.cs

示例3: HandleAllianceCreationRequest

        public static void HandleAllianceCreationRequest(AllianceCreationValidMessage message, WorldClient client)
        {
            if (!AllianceProvider.CanCreateAlliance(client, message))
                return;

            client.Send(new AllianceCreationResultMessage((sbyte)GuildCreationResultEnum.GUILD_CREATE_OK));
            AllianceProvider.CreateAlliance(client.Character.GetGuild(), message.allianceTag, message.allianceName, message.allianceEmblem);
        }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:8,代码来源:AllianceHandler.cs

示例4: Handle

 public static void Handle(WorldClient client,InteractiveRecord ele)
 {
     var interaction = InteractiveActionsManager.FirstOrDefault(x => x.Key ==ele.ActionType.ToLower());
     if (interaction.Value != null)
     {
         client.Send(new InteractiveUsedMessage((uint)client.Character.Id,(uint) ele.ElementId,(ushort)ele.SkillId,30));
         client.Send(new InteractiveUseEndedMessage((uint)ele.ElementId,(ushort) ele.SkillId));
         try
         {
             interaction.Value(client, ele);
         }
         catch (Exception ex)
         {
             client.Character.NotificationError( ele.ActionType + ": " + ex.Message);
         }
     }
     else
         client.Character.Reply("[Interactives] Unable to handle (" +ele.ActionType + ")",System.Drawing.Color.Red);
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:19,代码来源:InteractiveActionProvider.cs

示例5: HandleDungeonPartyFinder

 public static void HandleDungeonPartyFinder(DungeonPartyFinderAvailableDungeonsRequestMessage message, WorldClient client)
 {
     List<DungeonsIdRecord> record = DungeonsIdRecord.DungeonsId;
     List<ushort> ids = new List<ushort>();
     foreach(DungeonsIdRecord dj in record)
     {
         ids.Add((ushort)dj.Id);
     }
     client.Send(new DungeonPartyFinderAvailableDungeonsMessage((IEnumerable<ushort>)ids));
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:10,代码来源:PartyHandler.cs

示例6: HandleDungeonPartyFinderRegister

 public static void HandleDungeonPartyFinderRegister(DungeonPartyFinderRegisterRequestMessage message, WorldClient client)
 {
     if (DungeonPartyProvider.Instance.GetDPCByCharacterId(client.Character.Id) != null)
     {
         DungeonPartyProvider.Instance.UpdateCharacter(client.Character, message.dungeonIds.ToList());
     }
     else
     {
         DungeonPartyProvider.Instance.AddCharacter(client.Character, message.dungeonIds.ToList());
     }
     client.Send(new DungeonPartyFinderRegisterSuccessMessage((IEnumerable<ushort>)message.dungeonIds));
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:12,代码来源:PartyHandler.cs

示例7: HandePlayerStatusChangeRequest

 public static void HandePlayerStatusChangeRequest(PlayerStatusUpdateRequestMessage message, WorldClient client)
 {
     client.Character.PlayerStatus = message.status;
     if((PlayerStatusEnum)message.status.statusId == PlayerStatusEnum.PLAYER_STATUS_AFK || (PlayerStatusEnum)message.status.statusId == PlayerStatusEnum.PLAYER_STATUS_PRIVATE || (PlayerStatusEnum)message.status.statusId == PlayerStatusEnum.PLAYER_STATUS_SOLO)
     {
         if(DungeonPartyProvider.Instance.GetDPCByCharacterId(client.Character.Id) != null)
         {
             DungeonPartyProvider.Instance.RemoveCharacter(client.Character);
         }
     }
     client.Send(new PlayerStatusUpdateMessage(client.Character.Record.AccountId, (uint)client.Character.Id, message.status));
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:12,代码来源:ContextRolePlayHandler.cs

示例8: HandleLeaveDialog

 public static void HandleLeaveDialog(LeaveDialogRequestMessage message, WorldClient client)
 {
     if (client.Character.CurrentDialogType == DialogTypeEnum.DIALOG_EXCHANGE)
     {
         client.Character.LeaveExchange();
     }
     if (client.Character.CurrentDialogType != null)
     {
         client.Send(new LeaveDialogMessage((sbyte)client.Character.CurrentDialogType));
         client.Character.CurrentDialogType = null;
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:12,代码来源:ContextRolePlayHandler.cs

示例9: CreateGuildCommand

 public static void CreateGuildCommand(string value, WorldClient client)
 {
     if(!client.Character.HasGuild)
         client.Send(new GuildCreationStartedMessage());
     else
         client.Send(new GuildCreationResultMessage((sbyte)GuildCreationResultEnum.GUILD_CREATE_ERROR_ALREADY_IN_GUILD));
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:7,代码来源:CommandsHandler.cs

示例10: CreateAllianceCommand

 public static void CreateAllianceCommand(string value, WorldClient client)
 {
     if(!client.Character.HasGuild)
         client.Send(new AllianceCreationResultMessage((sbyte)GuildCreationResultEnum.GUILD_CREATE_ERROR_REQUIREMENT_UNMET));
     if (!client.Character.HasAlliance)
         client.Send(new AllianceCreationStartedMessage());
     else if (GuildProvider.GetLeader(client.Character.GuildId).CharacterId != client.Character.Id)
         client.Send(new AllianceCreationResultMessage((sbyte)GuildCreationResultEnum.GUILD_CREATE_ERROR_REQUIREMENT_UNMET));
     else if(client.Character.HasAlliance)
         client.Send(new AllianceCreationResultMessage((sbyte)GuildCreationResultEnum.GUILD_CREATE_ERROR_ALREADY_IN_GUILD));
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:11,代码来源:CommandsHandler.cs

示例11: AddItemCommand

 public static void AddItemCommand(string value, WorldClient client)
 {
     client.Character.Inventory.Add(ushort.Parse(value), 1);
     client.Send(new ObtainedItemMessage(ushort.Parse(value), 1));
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:5,代码来源:CommandsHandler.cs

示例12: SendGuildInformationsGeneral

        public static void SendGuildInformationsGeneral(WorldClient client)
        {
            GuildRecord guild = GuildRecord.GetGuild(client.Character.GuildId);

            ulong expFloor = ExperienceRecord.GetExperienceForGuild((ushort)(guild.Level));

            ulong expNextFloor = ExperienceRecord.GetExperienceForGuild((ushort)(guild.Level + 1));

            client.Send(new GuildInformationsGeneralMessage(true, false,
                (byte)guild.Level, expFloor, guild.Experience, expNextFloor, 0,
                (ushort)CharacterGuildRecord.MembersCount(guild.Id),
                (ushort)GuildProvider.Instance.ConnectedMembersCount(guild.Id)));
        }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:13,代码来源:GuildHandler.cs

示例13: Document

 static void Document(WorldClient client,InteractiveRecord ele)
 {
     client.Send(new DocumentReadingBeginMessage(ushort.Parse(ele.OptionalValue1)));
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:4,代码来源:InteractiveActionProvider.cs

示例14: HandleChallengeRequest

        public static void HandleChallengeRequest(GameRolePlayPlayerFightRequestMessage message, WorldClient client)
        {
            if (client.Character.Map != null && client.Character.Map.HaveZaap)
            {
                client.Character.Reply("Action impossible sur cette carte.");
                return;
            }
            WorldClient target = WorldServer.Instance.GetOnlineClient((int)message.targetId);
            if (target.Character.Busy)
            {
                client.Character.Reply("Impossible car le joueur est occupé.");
                return;
            }
            if (message.friendly)
            {

                FightDual fight = FightProvider.Instance.CreateDualFight(client.Character.Map, client.Character.Record.CellId, message.targetCellId);
                fight.InitiatorId = client.Character.Id;
                fight.AcceptorId = target.Character.Id;
                Message sMessage = new GameRolePlayPlayerFightFriendlyRequestedMessage(fight.Id, (uint)client.Character.Id, message.targetId);
                client.Send(sMessage);
                target.Send(sMessage);
            }
        }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:24,代码来源:FightPreparationHandler.cs

示例15: SrambadCommand

 public static void SrambadCommand(string value, WorldClient client)
 {
     client.Send(new CinematicMessage(12));
     client.Character.Teleport(138674176, 338);
     client.Character.ShowNotification("Bienvenu a srambad, cette zone est en cours de debug...");
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:6,代码来源:CommandsHandler.cs


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