本文整理汇总了C#中System.Proxy.HookCommand方法的典型用法代码示例。如果您正苦于以下问题:C# Proxy.HookCommand方法的具体用法?C# Proxy.HookCommand怎么用?C# Proxy.HookCommand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Proxy
的用法示例。
在下文中一共展示了Proxy.HookCommand方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: 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);
}
示例3: 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);
}
示例4: 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);
}
示例5: Initialize
public void Initialize(Proxy proxy)
{
proxy.ClientConnected += (client) => _incHolders.Clear();
proxy.HookPacket(PacketType.UPDATE, OnUpdate);
proxy.HookCommand("wc", OnWCCommand);
}
示例6: Initialize
public void Initialize(Proxy proxy)
{
proxy.HookPacket(PacketType.UPDATE, OnUpdate);
proxy.HookCommand("amispecial", OnSpecialCommand);
}
示例7: Initialize
public void Initialize(Proxy proxy)
{
proxy.HookCommand("chatassist", OnChatAssistCommand);
proxy.HookPacket(PacketType.TEXT, OnText);
}
示例8: Initialize
public void Initialize(Proxy proxy)
{
proxy.HookPacket(PacketType.USEITEM, OnUseItem);
proxy.HookPacket(PacketType.UPDATEACK, OnUpdateAck);
proxy.HookCommand("worldedit", OnWorldEditCommand);
}
示例9: Initialize
public void Initialize(Proxy proxy)
{
RebuildCache();
proxy.HookPacket(PacketType.UPDATE, OnUpdate);
proxy.HookCommand("mapfilter", OnMapFilterCommand);
}
示例10: 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);
}
示例11: Initialize
public void Initialize(Proxy proxy)
{
proxy.HookCommand("/dn", OnC);
proxy.HookPacket(PacketType.TEXT, T);
#region Code Generated With PixelZerg's WebScraper
#region Pirate Cave
Data.Entries.Add(new Data.Entry
{
Name = "Pirate Cave",
Difficulty = 1,
Enabled = true, //Default
ImageURL = "https://i.imgur.com/mpQLemW.png",
KeyWords = new string[] {
"pcave",
"pirate cave",
}
});
#endregion
#region Forest Maze
Data.Entries.Add(new Data.Entry
{
Name = "Forest Maze",
Difficulty = 1,
Enabled = true, //Default
ImageURL = "https://i.imgur.com/sb8e4YJ.png",
KeyWords = new string[] {
"maze",
}
});
#endregion
#region Spider Den
Data.Entries.Add(new Data.Entry
{
Name = "Spider Den",
Difficulty = 1,
Enabled = true, //Default
ImageURL = "https://i.imgur.com/H88LAt4.png",
KeyWords = new string[] {
"den",
}
});
#endregion
#region Snake Pit
Data.Entries.Add(new Data.Entry
{
Name = "Snake Pit",
Difficulty = 1,
Enabled = true, //Default
ImageURL = "https://i.imgur.com/z7KMqgq.gif",
KeyWords = new string[] {
"snack pot",
"pit",
}
});
#endregion
#region Beachzone
Data.Entries.Add(new Data.Entry
{
Name = "Beachzone",
Difficulty = 1,
Enabled = true, //Default
ImageURL = "http://static.drips.pw/rotmg/wiki/Environment/Portals/Beachzone%20Portal.png",
KeyWords = new string[] {
"beach",
}
});
#endregion
#region Forbidden Jungle
Data.Entries.Add(new Data.Entry
{
Name = "Forbidden Jungle",
Difficulty = 2,
Enabled = true, //Default
ImageURL = "https://i.imgur.com/5NmNR0l.png",
KeyWords = new string[] {
"jungle",
"forbidden",
}
});
#endregion
#region Sprite World
Data.Entries.Add(new Data.Entry
{
Name = "Sprite World",
Difficulty = 2,
Enabled = true, //Default
ImageURL = "https://i.imgur.com/tvILM8B.png",
KeyWords = new string[] {
"sprite",
"dex world",
}
});
#endregion
#region Candyland Hunting Grounds
Data.Entries.Add(new Data.Entry
{
Name = "Candyland Hunting Grounds",
Difficulty = 3,
//.........这里部分代码省略.........