當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。