本文整理汇总了C#中Aura.Shared.Network.Packet.PutByte方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.PutByte方法的具体用法?C# Packet.PutByte怎么用?C# Packet.PutByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aura.Shared.Network.Packet
的用法示例。
在下文中一共展示了Packet.PutByte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EquipmentMoved
/// <summary>
/// Broadcasts EquipmentMoved in creature's range.
/// </summary>
/// <param name="creature"></param>
/// <param name="from"></param>
public static void EquipmentMoved(Creature creature, Pocket from)
{
var packet = new Packet(Op.EquipmentMoved, creature.EntityId);
packet.PutByte((byte)from);
packet.PutByte(1);
creature.Region.Broadcast(packet, creature);
}
示例2: HomesteadEnterRequestR
/// <summary>
/// Sends negative HomesteadEnterRequestR dummy to creature's client.
/// </summary>
/// <param name="creature"></param>
public static void HomesteadEnterRequestR(Creature creature)
{
var packet = new Packet(Op.HomesteadEnterRequestR, creature.EntityId);
packet.PutByte(false);
packet.PutByte((byte)HomesteadEnterRequestResponse.FailedToEnter);
creature.Client.Send(packet);
}
示例3: SkillCancel
/// <summary>
/// Sends SkillCancel to creature's client.
/// </summary>
/// <param name="creature"></param>
public static void SkillCancel(Creature creature)
{
var packet = new Packet(Op.SkillCancel, creature.EntityId);
packet.PutByte(0);
packet.PutByte(1);
creature.Client.Send(packet);
}
示例4: ChangeStance
/// <summary>
/// Broadcasts ChangeStance in range of creature.
/// </summary>
/// <param name="creature"></param>
public static void ChangeStance(Creature creature)
{
var packet = new Packet(Op.ChangeStance, creature.EntityId);
packet.PutByte(creature.IsInBattleStance);
packet.PutByte(1);
creature.Region.Broadcast(packet, creature);
}
示例5: HomesteadInfoRequestR
/// <summary>
/// Sends HomesteadInfoRequestR to creature's client.
/// </summary>
/// <param name="creature"></param>
public static void HomesteadInfoRequestR(Creature creature)
{
var packet = new Packet(Op.HomesteadInfoRequestR, creature.EntityId);
packet.PutByte(0);
packet.PutByte(0);
packet.PutByte(1);
creature.Client.Send(packet);
}
示例6: PetActionEffect
/// <summary>
/// Broadcasts PetAction in range of pet.
/// </summary>
/// <param name="pet"></param>
/// <param name="action"></param>
public static void PetActionEffect(Creature pet, PetAction action)
{
var packet = new Packet(Op.Effect, pet.EntityId);
packet.PutInt(E.PetAction);
packet.PutLong(pet.Master.EntityId);
packet.PutByte((byte)action);
packet.PutByte(0);
pet.Region.Broadcast(packet, pet);
}
示例7: Weather
/// <summary>
/// Sends empty Weather packet to creature's client.
/// </summary>
public static void Weather(Creature creature, int regionId, int groupId)
{
var packet = new Packet(Op.Weather, MabiId.Broadcast);
packet.PutByte(0);
packet.PutInt(regionId);
packet.PutByte(0);
packet.PutInt(groupId);
packet.PutByte(0);
creature.Client.Send(packet);
}
示例8: LoginR_Fail
/// <summary>
/// Sends (negative) LoginR to client.
/// </summary>
/// <param name="client"></param>
/// <param name="result"></param>
public static void LoginR_Fail(LoginClient client, LoginResult result)
{
var packet = new Packet(Op.LoginR, MabiId.Login);
packet.PutByte((byte)result);
if (result == LoginResult.SecondaryFail)
{
packet.PutInt(12);
packet.PutByte(1); // TODO: Number of fail attempts
}
client.Send(packet);
}
示例9: System_Broadcast
public static void System_Broadcast(string from, string format, params object[] args)
{
var packet = new Packet(Op.Chat, MabiId.Broadcast);
packet.PutByte(0);
packet.PutString("<{0}>", from);
packet.PutString(format, args);
packet.PutByte(true);
packet.PutUInt(0xFFFF8080);
packet.PutInt(0);
packet.PutByte(0);
ChannelServer.Instance.World.Broadcast(packet);
}
示例10: SystemMessage
/// <summary>
/// Sends system message (special Chat) to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="from"></param>
/// <param name="format"></param>
/// <param name="args"></param>
private static void SystemMessage(Creature creature, string from, string format, params object[] args)
{
var packet = new Packet(Op.Chat, creature.EntityId);
packet.PutByte(0);
packet.PutString(from);
packet.PutString(format, args);
packet.PutByte(true);
packet.PutUInt(0xFFFF8080);
packet.PutInt(0);
packet.PutByte(0);
creature.Client.Send(packet);
}
示例11: PersonalShopSetUpR
/// <summary>
/// Sends positive PersonalShopSetUpR to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="shopProp"></param>
public static void PersonalShopSetUpR(Creature creature, Prop shopProp)
{
var location = shopProp.GetLocation();
var packet = new Packet(Op.PersonalShopSetUpR, creature.EntityId);
packet.PutByte(true);
packet.PutLong(shopProp.EntityId);
packet.PutByte(1); // no location if 0?
packet.PutInt(location.RegionId);
packet.PutInt(location.X);
packet.PutInt(location.Y);
creature.Client.Send(packet);
}
示例12: EnterDynamicRegion
/// <summary>
/// Sends EnterDynamicRegion to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="warpFromRegionId"></param>
/// <param name="warpToRegion"></param>
public static void EnterDynamicRegion(Creature creature, int warpFromRegionId, Region warpToRegion, int x, int y)
{
var warpTo = warpToRegion as DynamicRegion;
if (warpTo == null)
throw new ArgumentException("EnterDynamicRegion requires a dynamic region.");
var pos = creature.GetPosition();
var packet = new Packet(Op.EnterDynamicRegion, MabiId.Broadcast);
packet.PutLong(creature.EntityId);
packet.PutInt(warpFromRegionId); // creature's current region or 0?
packet.PutInt(warpToRegion.Id);
packet.PutString(warpToRegion.Name); // dynamic region name
packet.PutUInt(0x80000000); // bitmask? (|1 = time difference?)
packet.PutInt(warpTo.BaseId);
packet.PutString(warpTo.BaseName);
packet.PutInt(200); // 100|200 (100 changes the lighting?)
packet.PutByte(0); // 1 = next is empty?
packet.PutString("data/world/{0}/{1}", warpTo.BaseName, warpTo.Variation);
packet.PutByte(0);
//if (^ true)
//{
// pp.PutByte(1);
// pp.PutInt(3100); // some region id?
//}
packet.PutInt(x); // target x pos
packet.PutInt(y); // target y pos
creature.Client.Send(packet);
}
示例13: AcceptGiftR
/// <summary>
/// Sends AcceptGiftR to client.
/// </summary>
/// <param name="client"></param>
/// <param name="gift">Negative response if null</param>
public static void AcceptGiftR(LoginClient client, Gift gift)
{
var packet = new Packet(Op.AcceptGiftR, MabiId.Login);
packet.PutByte(gift != null);
if (gift != null)
{
packet.PutByte(gift.IsCharacter);
packet.PutInt(0); // ?
packet.PutInt(0); // ?
packet.PutInt(gift.Type);
// ?
}
client.Send(packet);
}
示例14: TouchPropR
/// <summary>
/// Sends TouchPropR to creature's client.
/// </summary>
/// <param name="creature"></param>
public static void TouchPropR(Creature creature)
{
var packet = new Packet(Op.TouchPropR, creature.EntityId);
packet.PutByte(true);
creature.Client.Send(packet);
}
示例15: SosButtonRequestR
/// <summary>
/// Sends SosButtonRequestR to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="enabled"></param>
public static void SosButtonRequestR(Creature creature, bool enabled)
{
var packet = new Packet(Op.SosButtonRequestR, creature.EntityId);
packet.PutByte(enabled);
creature.Client.Send(packet);
}