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


C# Proxy.HookPacket方法代码示例

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


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

示例1: Initialize

 public void Initialize(Proxy proxy)
 {
     proxy.HookPacket(PacketType.UPDATE, OnUpdate);
     proxy.HookPacket(PacketType.NEWTICK, OnUpdate);
     proxy.ClientConnected += (client) => _fame.Add(client, -1);
     proxy.ClientDisconnected += (client) => _fame.Remove(client);
 }
开发者ID:Zeroeh,项目名称:K_Relay,代码行数:7,代码来源:FameNotifier.cs

示例2: Initialize

 public void Initialize(Proxy proxy)
 {
     proxy.HookPacket<HelloPacket>(OnHelloPacket);
     proxy.HookPacket<MapInfoPacket>(OnMapInfoPacket);
     proxy.HookPacket<UpdatePacket>(OnUpdatePacket);
     proxy.HookPacket<NewTickPacket>(OnNewTickPacket);
 }
开发者ID:Zeroeh,项目名称:K_Relay,代码行数:7,代码来源:Plugin.cs

示例3: Initialize

 public void Initialize(Proxy proxy)
 {
     proxy.HookPacket(PacketType.UPDATE, OnUpdate);
     proxy.HookPacket(PacketType.MAPINFO, GetMapInfo);
     proxy.HookPacket(PacketType.CREATESUCCESS, OnEnterMap);
     initialized = false;
 }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:7,代码来源:MapCacher.cs

示例4: Initialize

 public void Initialize(Proxy proxy)
 {
     _proxy = proxy;
     proxy.HookPacket(PacketType.RECONNECT, OnReconnect);
     proxy.HookPacket(PacketType.CREATESUCCESS, OnCreateSuccess);
     proxy.HookCommand("connect", OnConnectCommand);
     proxy.HookCommand("recon", OnReconnectCommand);
     proxy.HookCommand("drecon", OnDReconnectCommand);
 }
开发者ID:PixelZerg,项目名称:DungeonNotif,代码行数:9,代码来源:ReconnectHandler.cs

示例5: Initialize

        public void Initialize(Proxy proxy)
        {
            proxy.ClientConnected += (c) => _states.Add(c, new LootState());
            proxy.ClientDisconnected += (c) => _states.Remove(c);

            proxy.HookPacket(PacketType.MOVE, OnMove);
            proxy.HookPacket(PacketType.UPDATE, OnUpdate);
            proxy.HookPacket(PacketType.NEWTICK, OnNewTick);
            proxy.HookPacket(PacketType.QUESTOBJID, OnQuestObjId);
            proxy.HookCommand("loothelper", OnLootHelperCommand);
        }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:11,代码来源:LootHelper.cs

示例6: Attach

        public void Attach(Proxy proxy)
        {
            _proxy = proxy;
            proxy.HookPacket<CreateSuccessPacket>(OnCreateSuccess);
            proxy.HookPacket<ReconnectPacket>(OnReconnect);
            proxy.HookPacket<HelloPacket>(OnHello);

            proxy.HookCommand("con", OnConnectCommand);
            proxy.HookCommand("connect", OnConnectCommand);
            proxy.HookCommand("server", OnConnectCommand);
            proxy.HookCommand("recon", OnReconCommand);
            proxy.HookCommand("drecon", OnDreconCommand);
        }
开发者ID:Zeroeh,项目名称:K_Relay,代码行数:13,代码来源:ReconnectHandler.cs

示例7: Initialize

        public void Initialize(Proxy proxy)
        {
            _classes = (short[])Enum.GetValues(typeof(Classes));

            proxy.ClientConnected += (c) => _states.Add(c, new TeleportState());
            proxy.ClientDisconnected += (c) => _states.Remove(c);

            proxy.HookPacket(PacketType.NEWTICK, OnNewTick);
            proxy.HookPacket(PacketType.UPDATE, OnUpdate);
            proxy.HookPacket(PacketType.QUESTOBJID, OnQuestObjId);
            proxy.HookCommand("tq", OnTQCommand);
            proxy.HookCommand("tp", OnTPCommand);
        }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:13,代码来源:TeleportTools.cs

示例8: Attach

 public void Attach(Proxy proxy)
 {
     _proxy = proxy;
     proxy.HookPacket<CreateSuccessPacket>(OnCreateSuccess);
     proxy.HookPacket<MapInfoPacket>(OnMapInfo);
     proxy.HookPacket<UpdatePacket>(OnUpdate);
     proxy.HookPacket<NewTickPacket>(OnNewTick);
     proxy.HookPacket<PlayerShootPacket>(OnPlayerShoot);
     proxy.HookPacket<MovePacket>(OnMove);
 }
开发者ID:Zeroeh,项目名称:K_Relay,代码行数:10,代码来源:StateManager.cs

示例9: Initialize

 public void Initialize(Proxy proxy)
 {
     proxy.ClientConnected += (client) => _incHolders.Clear();
     proxy.HookPacket(PacketType.UPDATE, OnUpdate);
     proxy.HookCommand("wc", OnWCCommand);
 }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:6,代码来源:IncFinder.cs

示例10: Initialize

 public void Initialize(Proxy proxy)
 {
     proxy.HookPacket(PacketType.UPDATE, OnUpdate);
     proxy.HookCommand("amispecial", OnSpecialCommand);
 }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:5,代码来源:Glow.cs

示例11: Initialize

 public void Initialize(Proxy proxy)
 {
     proxy.HookPacket(PacketType.USEITEM, OnUseItem);
     proxy.HookPacket(PacketType.UPDATEACK, OnUpdateAck);
     proxy.HookCommand("worldedit", OnWorldEditCommand);
 }
开发者ID:Zeroeh,项目名称:K_Relay,代码行数:6,代码来源:WorldEdit.cs

示例12: Initialize

 public void Initialize(Proxy proxy)
 {
     proxy.HookPacket(PacketType.CLIENTSTAT, OnClientStat);
 }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:4,代码来源:ClientStatAnnouncer.cs

示例13: Initialize

 public void Initialize(Proxy proxy)
 {
     RebuildCache();
     proxy.HookPacket(PacketType.UPDATE, OnUpdate);
     proxy.HookCommand("mapfilter", OnMapFilterCommand);
 }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:6,代码来源:MapFilter.cs

示例14: Initialize

        public void Initialize(Proxy proxy)
        {
            GameData.Enemies.Map
                .ForEach(enemy => {
                    // armor piercing
                    if (enemy.Value.Projectiles.Any(p => p.ArmorPiercing)) {
                        Bullet.piercing[enemy.Value.ID] = new List<int>();
                        enemy.Value.Projectiles.ForEach(proj => {
                            if (proj.ArmorPiercing)
                                Bullet.piercing[enemy.Value.ID].Add(proj.ID);
                        });
                    }

                    // armor break
                    if (enemy.Value.Projectiles.Any(p => p.StatusEffects.ContainsKey(ConditionEffectIndex.ArmorBroken))) {
                        Bullet.breaking[enemy.Value.ID] = new List<int>();
                        enemy.Value.Projectiles.ForEach(proj => {
                            if (proj.StatusEffects.ContainsKey(ConditionEffectIndex.ArmorBroken))
                                Bullet.breaking[enemy.Value.ID].Add(proj.ID);
                        });
                    }
                });
            PluginUtils.Log("Auto Nexus", "Found {0} armor-piercing projectiles from {1} enemies.", Bullet.piercing.Sum(e => e.Value.Count), Bullet.piercing.Count);
            PluginUtils.Log("Auto Nexus", "Found {0} armor-breaking projectiles from {1} enemies.", Bullet.breaking.Sum(e => e.Value.Count), Bullet.breaking.Count);

            clients = new Dictionary<Client, ClientState>();

            proxy.HookCommand("autonexus", OnCommand);

            proxy.ClientConnected += OnConnect;
            proxy.ClientDisconnected += OnDisconnect;

            proxy.HookPacket(PacketType.UPDATE, OnPacket);
            proxy.HookPacket(PacketType.NEWTICK, OnPacket);
            proxy.HookPacket(PacketType.ENEMYSHOOT, OnPacket);
            proxy.HookPacket(PacketType.PLAYERHIT, OnPacket);
            proxy.HookPacket(PacketType.AOE, OnPacket);
            proxy.HookPacket(PacketType.MAPINFO, OnPacket);
            proxy.HookPacket(PacketType.GROUNDDAMAGE, OnPacket);
        }
开发者ID:Zeroeh,项目名称:K_Relay,代码行数:40,代码来源:AutoNexus.cs

示例15: Initialize

 public void Initialize(Proxy proxy)
 {
     proxy.HookCommand("chatassist", OnChatAssistCommand);
     proxy.HookPacket(PacketType.TEXT, OnText);
 }
开发者ID:Zeroeh,项目名称:K_Relay,代码行数:5,代码来源:ChatAssist.cs


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