本文整理汇总了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);
}
示例2: Initialize
public void Initialize(Proxy proxy)
{
proxy.HookPacket<HelloPacket>(OnHelloPacket);
proxy.HookPacket<MapInfoPacket>(OnMapInfoPacket);
proxy.HookPacket<UpdatePacket>(OnUpdatePacket);
proxy.HookPacket<NewTickPacket>(OnNewTickPacket);
}
示例3: Initialize
public void Initialize(Proxy proxy)
{
proxy.HookPacket(PacketType.UPDATE, OnUpdate);
proxy.HookPacket(PacketType.MAPINFO, GetMapInfo);
proxy.HookPacket(PacketType.CREATESUCCESS, OnEnterMap);
initialized = false;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例9: Initialize
public void Initialize(Proxy proxy)
{
proxy.ClientConnected += (client) => _incHolders.Clear();
proxy.HookPacket(PacketType.UPDATE, OnUpdate);
proxy.HookCommand("wc", OnWCCommand);
}
示例10: Initialize
public void Initialize(Proxy proxy)
{
proxy.HookPacket(PacketType.UPDATE, OnUpdate);
proxy.HookCommand("amispecial", OnSpecialCommand);
}
示例11: Initialize
public void Initialize(Proxy proxy)
{
proxy.HookPacket(PacketType.USEITEM, OnUseItem);
proxy.HookPacket(PacketType.UPDATEACK, OnUpdateAck);
proxy.HookCommand("worldedit", OnWorldEditCommand);
}
示例12: Initialize
public void Initialize(Proxy proxy)
{
proxy.HookPacket(PacketType.CLIENTSTAT, OnClientStat);
}
示例13: Initialize
public void Initialize(Proxy proxy)
{
RebuildCache();
proxy.HookPacket(PacketType.UPDATE, OnUpdate);
proxy.HookCommand("mapfilter", OnMapFilterCommand);
}
示例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);
}
示例15: Initialize
public void Initialize(Proxy proxy)
{
proxy.HookCommand("chatassist", OnChatAssistCommand);
proxy.HookPacket(PacketType.TEXT, OnText);
}