本文整理汇总了C#中MabiPacket.PutByte方法的典型用法代码示例。如果您正苦于以下问题:C# MabiPacket.PutByte方法的具体用法?C# MabiPacket.PutByte怎么用?C# MabiPacket.PutByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MabiPacket
的用法示例。
在下文中一共展示了MabiPacket.PutByte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChangeTitleResponse
public static void ChangeTitleResponse(Client client, MabiCreature creature, bool titleSuccess, bool optionTitleSuccess)
{
var packet = new MabiPacket(Op.ChangeTitleR, creature.Id);
packet.PutByte(titleSuccess);
packet.PutByte(optionTitleSuccess);
client.Send(packet);
}
示例2: ChangesStance
public static void ChangesStance(MabiCreature creature, byte unk = 1)
{
var packet = new MabiPacket(Op.ChangesStance, creature.Id);
packet.PutByte(creature.BattleState);
packet.PutByte(unk);
WorldManager.Instance.Broadcast(packet, SendTargets.Range, creature);
}
示例3: 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);
}
示例4: CharacterInfo
/// <summary>
/// Sends character info (5209). Response is negative if character is null.
/// </summary>
/// <param name="client"></param>
/// <param name="character"></param>
public static void CharacterInfo(Client client, MabiPC character)
{
var packet = new MabiPacket(Op.WorldCharInfoRequestR, Id.World);
if (character != null)
{
packet.PutByte(true);
packet.AddCreatureInfo(character, CreaturePacketType.Private);
}
else
{
packet.PutByte(false);
}
client.Send(packet);
}
示例5: ConvertGpConfirmR
/// <summary>
/// Sends ConvertGpConfirmR to creature's client.
/// </summary>
public static void ConvertGpConfirmR(MabiCreature creature, bool success)
{
var packet = new MabiPacket(Op.ConvertGpConfirmR, creature.Id);
packet.PutByte(success);
creature.Client.Send(packet);
}
示例6: GuildDonateR
/// <summary>
/// Sends GuildDonateR to creature's client.
/// </summary>
public static void GuildDonateR(MabiCreature creature, bool success)
{
var packet = new MabiPacket(Op.GuildDonateR, creature.Id);
packet.PutByte(success);
creature.Client.Send(packet);
}
示例7: DisconnectResponse
/// <summary>
/// Sends disconnect info response.
/// </summary>
/// <param name="client"></param>
public static void DisconnectResponse(Client client)
{
var packet = new MabiPacket(Op.WorldDisconnectR, Id.World);
packet.PutByte(0);
client.Send(packet);
}
示例8: Close
public virtual void Close(WorldClient client, string message = "<end/>")
{
var p = new MabiPacket(Op.NPCTalkEndR, client.Character.Id);
p.PutByte(1);
p.PutLong(client.NPCSession.Target.Id);
p.PutString(message);
client.Send(p);
}
示例9: ConvertGpR
/// <summary>
/// Sends ConvertGpR to creature's client.
/// </summary>
public static void ConvertGpR(MabiCreature creature, bool success, uint amount)
{
var packet = new MabiPacket(Op.ConvertGpR, creature.Id);
packet.PutByte(success);
packet.PutInt(amount);
creature.Client.Send(packet);
}
示例10: 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);
}
示例11: 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);
}
示例12: Chat
public static void Chat(MabiCreature creature, byte type, string format, params object[] args)
{
var packet = new MabiPacket(Op.Chat, creature.Id);
packet.PutByte(type);
packet.PutString(creature.Name);
packet.PutString(format, args);
WorldManager.Instance.Broadcast(packet, SendTargets.Range, creature);
}
示例13: ItemAmount
/// <summary>
/// Sends ItemAmount to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="item"></param>
public static void ItemAmount(MabiCreature creature, MabiItem item)
{
var packet = new MabiPacket(Op.ItemAmount, creature.Id);
packet.PutLong(item.Id);
packet.PutShort(item.Info.Amount);
packet.PutByte(2); // ? (related to the 2 in move item?)
creature.Client.Send(packet);
}
示例14: DyePickColorR
/// <summary>
/// Sends DyePickColorR to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="success"></param>
public static void DyePickColorR(MabiCreature creature, bool success)
{
var packet = new MabiPacket(Op.DyePickColorR, creature.Id);
packet.PutByte(success);
if (success)
packet.PutBin(creature.Temp.DyeCursors);
creature.Client.Send(packet);
}
示例15: 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);
}