本文整理汇总了C#中Aura.World.Network.WorldClient.Send方法的典型用法代码示例。如果您正苦于以下问题:C# WorldClient.Send方法的具体用法?C# WorldClient.Send怎么用?C# WorldClient.Send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aura.World.Network.WorldClient
的用法示例。
在下文中一共展示了WorldClient.Send方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NPCTalkPartnerStartResponse
public static void NPCTalkPartnerStartResponse(WorldClient client, bool success, ulong id, string partnerName)
{
var packet = new MabiPacket(Op.NPCTalkPartnerR, client.Character.Id);
packet.PutByte(success);
if (success)
{
packet.PutLong(id);
packet.PutString(client.Character.Name + "'s " + partnerName);
packet.PutString(client.Character.Name + "'s " + partnerName);
client.Send(packet);
}
client.Send(packet);
}
示例2: AgeIncrease
/// <summary>
/// Sends Age Increase Packet
/// </summary>
/// <param name="client"></param>
/// <param name="creature"></param>
/// <param name="age"></param>
public static void AgeIncrease(WorldClient client, MabiPC player, ushort age)
{
var p = new MabiPacket(Op.AgeIncrease, player.Id);
p.PutShort(age);
client.Send(p);
}
示例3: NPCTalkKeywordResponse
public static void NPCTalkKeywordResponse(WorldClient client, bool success, string keyword)
{
var packet = new MabiPacket(Op.NPCTalkKeywordR, client.Character.Id);
packet.PutByte(success);
if (success)
packet.PutString(keyword);
client.Send(packet);
}
示例4: ConfirmMailRecipentResponse
public static void ConfirmMailRecipentResponse(WorldClient client, bool success, ulong recipientId)
{
var packet = new MabiPacket(Op.ConfirmMailRecipentR, client.Character.Id);
packet.PutByte(success);
if (success)
packet.PutLong(recipientId);
client.Send(packet);
}
示例5: NPCTalkStartResponse
public static void NPCTalkStartResponse(WorldClient client, bool success, ulong npcId)
{
var packet = new MabiPacket(Op.NPCTalkStartR, client.Character.Id);
packet.PutByte(success);
if (success)
packet.PutLong(npcId);
client.Send(packet);
}
示例6: GetMailsResponse
public static void GetMailsResponse(WorldClient client, IEnumerable<MabiMail> mails)
{
var p = new MabiPacket(Op.GetMailsR, client.Character.Id);
foreach (var mail in mails)
p.Add(mail);
p.PutLong(0);
client.Send(p);
}
示例7: RecallMailResponse
public static void RecallMailResponse(WorldClient client, bool success, ulong mailId)
{
var packet = new MabiPacket(Op.RecallMailR, client.Character.Id);
packet.PutByte(success);
if (success)
{
packet.PutByte(success);
packet.PutLong(mailId);
}
client.Send(packet);
}
示例8: OpenMailbox
protected void OpenMailbox(WorldClient client)
{
client.Send(new MabiPacket(Op.OpenMail, client.Character.Id).PutLong(this.NPC.Id));
}
示例9: Command_set_inventory
private CommandResult Command_set_inventory(WorldClient client, MabiCreature creature, string[] args, string msg)
{
if (args.Length < 2)
return CommandResult.WrongParameter;
if (args[1] != "/c")
{
Send.ServerMessage(client, creature, Localization.Get("gm.si_param"), args[1]); // Unknown paramter '{0}'.
return CommandResult.Fail;
}
byte pocket = 2;
if (args.Length >= 3)
{
var match = Regex.Match(args[2], "/p:(?<id>[0-9]+)");
if (!match.Success)
{
Send.ServerMessage(client, creature, Localization.Get("gm.si_param_pocket"), args[2]); // Unknown paramter '{0}', please specify a pocket.
return CommandResult.Fail;
}
if (!byte.TryParse(match.Groups["id"].Value, out pocket) || pocket > (byte)Pocket.Max - 1)
{
Send.ServerMessage(client, creature, Localization.Get("gm.si_pocket")); // Invalid pocket.
return CommandResult.Fail;
}
}
var toRemove = new List<MabiItem>();
foreach (var item in creature.Items)
{
if (item.Info.Pocket == pocket)
toRemove.Add(item);
}
foreach (var item in toRemove)
{
creature.Items.Remove(item);
client.Send(PacketCreator.ItemRemove(creature, item));
}
Send.ServerMessage(client, creature, Localization.Get("gm.si_cleared"), ((Pocket)pocket), toRemove.Count); // Cleared pocket '{0}'. (Deleted items: {1})
return CommandResult.Okay;
}
示例10: ViewEquipmentResponse
/// <summary>
/// Sends view equipment to client. Response is negative if items is null.
/// </summary>
/// <param name="client"></param>
/// <param name="targetId"></param>
/// <param name="items"></param>
public static void ViewEquipmentResponse(WorldClient client, ulong targetId, IEnumerable<MabiItem> items)
{
var packet = new MabiPacket(Op.ViewEquipmentR, client.Character.Id);
if (items != null)
{
packet.PutByte(true);
packet.PutLong(targetId);
packet.PutInt((ushort)items.Count());
foreach (var item in items)
packet.AddItemInfo(item, ItemPacketType.Private);
}
else
{
packet.PutByte(false);
}
client.Send(packet);
}
示例11: ItemShopInfo
/// <summary>
/// Enables item shop button.
/// </summary>
/// <param name="client"></param>
public static void ItemShopInfo(WorldClient client)
{
var packet = new MabiPacket(Op.ItemShopInfo, client.Character.Id);
packet.PutByte(0);
client.Send();
}
示例12: NewKeyword
public static void NewKeyword(WorldClient client, ushort keywordId)
{
var pp = new MabiPacket(Op.NewKeyword, client.Character.Id);
pp.PutShort(keywordId);
client.Send(pp);
}
示例13: GMCPInvisibilityResponse
public static void GMCPInvisibilityResponse(WorldClient client, bool success)
{
var packet = new MabiPacket(Op.GMCPInvisibilityR, client.Character.Id);
packet.PutByte(success);
client.Send(packet);
}
示例14: GMCPOpen
/// <summary>
/// Opens GM Control Panel.
/// </summary>
/// <param name="client"></param>
public static void GMCPOpen(WorldClient client)
{
var packet = new MabiPacket(Op.GMCPOpen, client.Character.Id);
client.Send(packet);
}
示例15: CutsceneStart
public static void CutsceneStart(WorldClient client, MabiCutscene cutscene)
{
var p = new MabiPacket(Op.CutsceneStart, Id.World);
p.PutLongs(client.Character.Id, cutscene.Leader.Id);
p.PutString(cutscene.Name);
p.PutSInt(cutscene.Actors.Count);
foreach (var a in cutscene.Actors)
{
p.PutString(a.Item1);
p.PutShort((ushort)a.Item2.Length);
p.PutBin(a.Item2);
}
p.PutInt(1);
p.PutLong(client.Character.Id);
client.Send(p);
}