• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Clients.WorldClient类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



WorldClient类属于Symbioz.Network.Clients命名空间,在下文中一共展示了WorldClient类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: HandleEffects

 public static bool HandleEffects(WorldClient client, CharacterItemRecord item)
 {
     bool remove = false;
     if (!ConditionProvider.ParseAndEvaluate(client,item.GetTemplate().Criteria))
     {
         client.Character.Reply("Vous ne possédez pas les critères nécessaires pour utiliser cet objet.");
         return remove;
     }
     var effects = item.GetEffects();
     foreach (var effect in effects)
     {
         var function = Functions.ToList().Find(x => x.Key == (EffectsEnum)effect.actionId);
         if (function.Value != null)
         {
             try
             {
                 if (function.Value(client, effect, item.UID))
                     remove = true;
             }
             catch (Exception ex)
             {
                 client.Character.NotificationError(ex.Message);
             }
         }
         else
         {
             client.Character.NotificationError((EffectsEnum)effect.actionId + " is not handled");
         }
     }
     return remove;
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:31,代码来源:ItemUseEffectsProvider.cs


示例2: HandleAttackRequest

        public static void HandleAttackRequest(GameRolePlayAttackMonsterRequestMessage message, WorldClient client)
        {
            if (client.Character.Map == null)
                return;
            if (client.Character.CancelMonsterAgression)
            {
                client.Character.CancelMonsterAgression = false;
                return;
            }
            if (!client.Character.Map.IsValid())
            {
                client.Character.Reply("Unable to start placement,this map is not valid");
                return;
            }
            var group = client.Character.Map.Instance.GetMapMonsterGroup(message.monsterGroupId);
            if (group != null)
            {
                FightPvM fight = FightProvider.Instance.CreatePvMFight(group, client.Character.Map, (short)group.CellId);

                fight.BlueTeam.AddFighter(client.Character.CreateFighter(fight.BlueTeam)); // on ajoute le perso

                group.Monsters.ForEach(x => fight.RedTeam.AddFighter(x.CreateFighter(fight.RedTeam))); // on ajoute les monstres

                fight.StartPlacement();
            }
            else
            {
                client.Character.NotificationError("Unable to fight, MonsterGroup dosent exist...");
            }
        }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:30,代码来源:FightPreparationHandler.cs


示例3: HandleShortcutBarAdd

        public static void HandleShortcutBarAdd(ShortcutBarAddRequestMessage message, WorldClient client)
        {
            switch ((ShortcutBarEnum)message.barType)
            {
                case ShortcutBarEnum.GENERAL_SHORTCUT_BAR:
                    if (message.shortcut is ShortcutObjectItem)
                    {
                        ShortcutObjectItem shortcutObj = (ShortcutObjectItem)message.shortcut;
                        GeneralShortcutRecord.AddShortcut(client.Character.Id, shortcutObj.slot, ShortcutObjectItem.Id, shortcutObj.itemUID, shortcutObj.itemGID);
                    }
                    if (message.shortcut is ShortcutSmiley)
                    {
                        ShortcutSmiley shortcutSmiley = (ShortcutSmiley)message.shortcut;
                        GeneralShortcutRecord.AddShortcut(client.Character.Id, shortcutSmiley.slot, ShortcutSmiley.Id, shortcutSmiley.smileyId, 0);
                    }
                    if (message.shortcut is ShortcutEmote)
                    {
                        ShortcutEmote shortcutEmote = (ShortcutEmote)message.shortcut;
                        GeneralShortcutRecord.AddShortcut(client.Character.Id, shortcutEmote.slot, ShortcutEmote.Id, shortcutEmote.emoteId, 0);
                    }
                    break;

                case ShortcutBarEnum.SPELL_SHORTCUT_BAR:
                    ShortcutSpell shortcut = (ShortcutSpell)message.shortcut;
                    SpellShortcutRecord.AddShortcut(client.Character.Id, shortcut.slot, shortcut.spellId);
                    break;
            }
            client.Character.RefreshShortcuts();
        }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:29,代码来源:ContextRolePlayHandler.cs


示例4: HandleAllianceKickRequest

 public static void HandleAllianceKickRequest(AllianceKickRequestMessage message, WorldClient client)
 {
     if(client.Character.HasAlliance && AllianceProvider.GetLeader(client.Character.AllianceId).Id == client.Character.GuildId && GuildProvider.GetLeader(client.Character.GuildId).CharacterId == client.Character.Id)
     {
         AllianceRecord.GetAlliance(client.Character.AllianceId).KickFromAlliance((int)message.kickedId, client);
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:7,代码来源:AllianceHandler.cs


示例5: Eval

 public override bool Eval(WorldClient client)
 {
     if (client.Character.Record.Breed == sbyte.Parse(ConditionValue))
         return true;
     else
         return false;
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:7,代码来源:BreedCondition.cs


示例6: HandlePartyInvitationDungeonRequest

 public static void HandlePartyInvitationDungeonRequest(PartyInvitationDungeonRequestMessage message, WorldClient client)
 {
     WorldClient target = WorldServer.Instance.GetOnlineClient(message.name);
     Party p;
     if (client.Character.PartyMember == null)
     {
         WorldServer.Instance.Parties.OrderBy(x => x.Id);
         int partyId = 0;
         if (WorldServer.Instance.Parties.Count > 0)
         {
             partyId = WorldServer.Instance.Parties.Last().Id + 1;
         }
         else
         {
             partyId = 1;
         }
         p = new Party(partyId, client.Character.Id, "");
     }
     else
     {
         p = WorldServer.Instance.Parties.Find(x => x.Id == client.Character.PartyMember.Party.Id);
     }
     if (p == null)
         return;
     p.SetName(DungeonsIdRecord.DungeonsId.Find(x => x.Id == message.dungeonId).Name, client);
     p.CreateInvitation(client, target, PartyTypeEnum.PARTY_TYPE_DUNGEON, message.dungeonId);
     if (p.Members.Count == 0)
     {
         p.BossCharacterId = client.Character.Id;
         p.NewMember(client);
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:32,代码来源:PartyHandler.cs


示例7: HandleChallengeAnswer

        public static void HandleChallengeAnswer(GameRolePlayPlayerFightFriendlyAnswerMessage message, WorldClient client)
        {
            if (client.Character.IsFighting)
                return;
            FightDual fight = FightProvider.Instance.GetFight(message.fightId) as FightDual;
            var sMessage = new GameRolePlayPlayerFightFriendlyAnsweredMessage(message.fightId, (uint)client.Character.Id, (uint)fight.InitiatorId, false);

            if (client.Character.Id == fight.InitiatorId)
            {
                var acceptor = WorldServer.Instance.GetOnlineClient(fight.AcceptorId);
                acceptor.Send(sMessage);
                return;
            }
            WorldClient target = WorldServer.Instance.GetOnlineClient((fight.InitiatorId));
            if (message.accept)
            {

                sMessage.accept = true;
                target.Send(sMessage);
                fight.BlueTeam.AddFighter(client.Character.CreateFighter(fight.BlueTeam));
                fight.RedTeam.AddFighter(target.Character.CreateFighter(fight.RedTeam));
                fight.StartPlacement();
            }
            else
            {
                target.Send(sMessage);
                FightProvider.Instance.RemoveFight(message.fightId);
            }
        }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:29,代码来源:FightPreparationHandler.cs


示例8: GuildInvitationDialog

 public GuildInvitationDialog(WorldClient recruter, WorldClient recruted)
 {
     this.Recruter = recruter;
     this.Recruted = recruted;
     this.Recruter.Character.GuildInvitationDialog = this;
     this.Recruted.Character.GuildInvitationDialog = this;
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:7,代码来源:GuildInvitationDialog.cs


示例9: 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


示例10: Eval

 public override bool Eval(WorldClient client)
 {
     if (client.Character.HasGuild)
     {
         return true;
     }
     return false;
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:8,代码来源:GuildsCondition.cs


示例11: HandleObjectUseMultiple

 public static void HandleObjectUseMultiple(ObjectUseMultipleMessage message, WorldClient client)
 {
     var item = client.Character.Inventory.GetItem(message.objectUID);
     for (int i = 0; i < message.quantity; i++)
     {
         ItemUseEffectsProvider.HandleEffects(client, item);
     }
     client.Character.Inventory.RemoveItem(item.UID, message.quantity);
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:9,代码来源:InventoryHandler.cs


示例12: PlayerTradeExchange

 public PlayerTradeExchange(WorldClient client, WorldClient target)
 {
     this.Client = client;
     this.SecondTrader = target;
     this.SecondTrader.Character.CurrentDialogType = DialogTypeEnum.DIALOG_EXCHANGE;
     this.Client.Character.CurrentDialogType = DialogTypeEnum.DIALOG_EXCHANGE;
     this.Client.Character.ExchangeType = ExchangeType;
     this.SecondTrader.Character.ExchangeType = ExchangeType;
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:9,代码来源:PlayerTradeExchange.cs


示例13: 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


示例14: Character

        public Character(CharacterRecord record, WorldClient client)
        {
            this.Client = client;
            this.Record = record;
            this.Look = ContextActorLook.Parse(Record.Look);
            this.HumanOptions = new List<HumanOption>();

            this.Inventory = new Inventory(this);

            this.PlayerStatus = new PlayerStatus((sbyte)PlayerStatusEnum.PLAYER_STATUS_AVAILABLE);
        }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:11,代码来源:Character.cs


示例15: HandleGuildChangeMemberParameters

 public static void HandleGuildChangeMemberParameters(GuildChangeMemberParametersMessage message, WorldClient client)
 {
     CharacterGuildRecord member = CharacterGuildRecord.GetCharacterGuild((int)message.memberId);
     member.ChangeParameters(client, message.rank, message.experienceGivenPercent, message.rights);
     SendGuildInformationsMembers(client);
     if (WorldServer.Instance.IsConnected(member.CharacterId))
     {
         WorldClient c = WorldServer.Instance.GetOnlineClient(member.CharacterId);
         c.Send(new GuildMembershipMessage(c.Character.GetGuild().GetGuildInformations(),message.rights,true));
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:11,代码来源:GuildHandler.cs


示例16: 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


示例17: 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


示例18: 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


示例19: HandleFriendJoin

 public static void HandleFriendJoin(FriendJoinRequestMessage message,WorldClient client)
 {
     WorldClient target = WorldServer.Instance.GetOnlineClient(message.name);
     if (target != null)
     {
         client.Character.Teleport(target.Character.Record.MapId, target.Character.Record.CellId);
         client.Character.Reply("Vous avez été téléporté a " + message.name);
     }
     else
     {
         client.Character.Reply("Le personnage n'éxiste pas ou n'est pas connécté.");
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:13,代码来源:ContextRolePlayHandler.cs


示例20: HandleArenaAnswer

 public static void HandleArenaAnswer(GameRolePlayArenaFightAnswerMessage message, WorldClient client)
 {
     if (client.Character.IsFighting)
     {
         client.Character.ReplyError("Impossible de répondre au kolizeum en combat, le combat a été annulé.");
         message.accept = false;
     }
     if (client.Character.Map != null && client.Character.Map.DugeonMap)
     {
         client.Character.ReplyError("Impossible de répondre au kolizeum en donjon.");
         message.accept = false;
     }
     ArenaProvider.Instance.Answer(client, message.accept);
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:14,代码来源:ArenaHandler.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SymbolTable.Scope类代码示例发布时间:2022-05-26
下一篇:
C# Utils.BufferedBinaryReader类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap