本文整理汇总了C#中FrameWork.PacketOut.Fill方法的典型用法代码示例。如果您正苦于以下问题:C# PacketOut.Fill方法的具体用法?C# PacketOut.Fill怎么用?C# PacketOut.Fill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameWork.PacketOut
的用法示例。
在下文中一共展示了PacketOut.Fill方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendAbilityDone
public void SendAbilityDone(ushort TargetOID)
{
Log.Success("Ability", "Send Done :" + Info.Entry);
Player player = this.Caster.GetPlayer();
PacketOut Out1 = new PacketOut((byte)Opcodes.F_USE_ABILITY);
Out1.WriteUInt16(0);
Out1.WriteUInt16(Info.Entry);
Out1.WriteUInt16(Caster.Oid);
Out1.WriteHexStringBytes("061022730601000001E601000000");
player.DispatchPacket(Out1, true);
PacketOut Out2 = new PacketOut((byte)Opcodes.F_USE_ABILITY);
Out2.WriteUInt16(0);
Out2.WriteUInt16(Info.Entry);
Out2.WriteUInt16(Caster.Oid);
Out2.WriteHexStringBytes("0610227302010000000001000000");
player.DispatchPacket(Out2, true);
PacketOut Out3 = new PacketOut((byte)Opcodes.F_SWITCH_ATTACK_MODE);
Out3.WriteByte(1);
Out3.Fill(0, 3);
player.SendPacket(Out3);
PacketOut Out4 = new PacketOut((byte)Opcodes.F_SET_ABILITY_TIMER);
Out4.WriteUInt16(Info.Entry);
Out4.Fill(0, 10);
player.SendPacket(Out4);
}
示例2: SendMount
public void SendMount(Player Plr)
{
PacketOut Out = new PacketOut((byte)Opcodes.F_MOUNT_UPDATE);
Out.WriteUInt16(Owner.Oid);
if (CurrentMountInfo == null)
Out.WriteUInt32(0);
else
Out.WriteUInt32(CurrentMountInfo.Entry);
Out.Fill(0, 14);
if (Plr == null)
Owner.DispatchPacket(Out, true);
else
Plr.SendPacket(Out);
}
示例3: SendTradeInfo
public void SendTradeInfo(ItemsInterface DistInterface)
{
PacketOut Out = new PacketOut((byte)Opcodes.F_TRADE_STATUS);
Out.WriteByte(DistInterface.TradingAccepted);
Out.WriteByte(0);
Out.WriteUInt16(DistInterface != this ? DistInterface._Owner.Oid : (ushort)0);
if (DistInterface.TradingAccepted == 2)
Out.Fill(0, 24);
else
{
Out.WriteUInt32(DistInterface.TradingMoney);
Out.WriteByte(TradingUpdate);
Out.Fill(0, 2 * MAX_TRADE_SLOT);
}
_Owner.GetPlayer().SendPacket(Out);
}
示例4: F_DELETE_CHARACTER
static public void F_DELETE_CHARACTER(BaseClient client, PacketIn packet)
{
GameClient cclient = client as GameClient;
byte Slot = packet.GetUint8();
if (cclient._Account == null)
{
cclient.Disconnect();
return;
}
CharMgr.RemoveCharacter(Slot, cclient._Account.AccountId);
PacketOut Out = new PacketOut((byte)Opcodes.F_SEND_CHARACTER_RESPONSE);
Out.FillString(cclient._Account.Username, 21);
Out.Fill(0, 3);
cclient.SendPacket(Out);
}
示例5: SendInited
public void SendInited()
{
PacketOut Out = new PacketOut((byte)Opcodes.S_PLAYER_INITTED);
Out.WriteUInt16(_ObjectId);
Out.WriteUInt16(0);
Out.WriteUInt32((uint)_Info.CharacterId);
Out.WriteUInt16((ushort)_Value.WorldZ);
Out.WriteUInt16(0);
Out.WriteUInt32((uint)_Value.WorldX);
Out.WriteUInt32((uint)_Value.WorldY);
Out.WriteUInt16((ushort)_Value.WorldO);
Out.WriteByte(0);
Out.WriteByte((byte)Realm);
Out.Fill(0, 5); // ??
Out.WriteByte((byte)Zone.Info.Region);
Out.WriteUInt16(1);
Out.WriteByte(0);
Out.WriteByte(_Info.Career);
Out.Fill(0, 6);
Out.WritePascalString(Program.Rm.Name);
Out.Fill(0, 3);
SendPacket(Out);
/* PacketOut Out = new PacketOut((byte)Opcodes.S_PLAYER_INITTED);
Out.WriteHexStringBytes("00CA00000028D5BF1D7F0000000CF824000CAFC7051700020000000000080001001A000000000000084261646C616E6473000000");
SendPacket(Out);
*/
}
示例6: BuildItem
static public void BuildItem(ref PacketOut Out,Item Itm,Item_Info Info,ushort SlotId,ushort Count)
{
SlotId = SlotId == 0 ? (Itm == null ? SlotId : Itm.SlotId ) : SlotId;
Count = Count == 0 ? (Itm == null ? Count : Itm.Count) : Count;
Info = Info == null ? (Itm == null ? null : Itm.Info) : Info;
if(SlotId != 0)
Out.WriteUInt16(SlotId);
Out.WriteByte(0);
Out.WriteUInt32((uint)(Info != null ? Info.Entry : 0));
if (Info == null)
return;
Out.WriteUInt16((ushort)Info.ModelId); // Valid 1.4.8
Out.Fill(0, 7); // Valid 1.4.8
Out.WriteUInt16(Info.SlotId); // Valid 1.4.8
Out.WriteByte(Info.Type); // Valid 1.4.8
Out.WriteByte(Info.MinRank); // Min Level
Out.WriteByte(Info.ObjectLevel); // 1.3.5, Object Level
Out.WriteByte(Info.MinRenown); // 1.3.5, Min Renown
Out.WriteByte(Info.MinRenown); // ?
Out.WriteByte(Info.UniqueEquiped); // Unique - Equiped
Out.WriteByte(Info.Rarity);
Out.WriteByte(Info.Bind);
Out.WriteByte(Info.Race);
// Trophys have some extra bytes
if (Info.Type == (byte)GameData.ItemTypes.ITEMTYPES_TROPHY)
{
Out.WriteUInt32(0);
Out.WriteUInt16(0x0080);
}
Out.WriteUInt32(Info.Career);
Out.WriteUInt32(0);
Out.WriteUInt32(Info.SellPrice);
Out.WriteUInt16((UInt16)(Count > 0 ? Count : 1));
Out.WriteUInt16((UInt16)(Count > 0 ? Count : 1));
Out.WriteUInt32(0);
Out.WriteUInt32(Info.Skills); // Valid 1.4.8
Out.WriteUInt16(Info.Dps > 0 ? Info.Dps : Info.Armor); // Valid 1.4.8
Out.WriteUInt16(Info.Speed); // Valid 1.4.8
Out.WritePascalString(Info.Name); // Valid 1.4.8
Out.WriteByte((byte)Info._Stats.Count); // Valid 1.4.8
foreach (KeyValuePair<byte, UInt16> Key in Info._Stats)
{
Out.WriteByte(Key.Key);
Out.WriteUInt16(Key.Value);
Out.Fill(0, 5);
}
Out.WriteByte(0); // Equip Effects
Out.WriteByte((byte)Info._Spells.Count); // OK
foreach (KeyValuePair<UInt32, UInt32> Kp in Info._Spells)
{
Out.WriteUInt32(Kp.Key);
Out.WriteUInt32(Kp.Value);
}
// (uint32)Entry, uint16 X, uint16 Y
Out.WriteByte((byte)Info._Crafts.Count); // OK
foreach (KeyValuePair<byte, ushort> Kp in Info._Crafts)
{
Out.WriteByte(Kp.Key);
Out.WriteUInt16(Kp.Value);
}
Out.WriteByte(0); // ??
Out.WriteByte(Info.TalismanSlots);
Item_Info TalismanInfo = null;
for (int i = 0; i < Info.TalismanSlots; ++i)
{
if (Itm != null)
TalismanInfo = Itm.GetTalisman((byte)i);
if (TalismanInfo == null)
Out.WriteUInt32(0); // Entry;
else
{
Out.WriteUInt32(TalismanInfo.Entry);
Out.WritePascalString(TalismanInfo.Name);
Out.Fill(0, 15);
}
}
Out.WritePascalString(Info.Description);
Out.Write(Info.Unk27);
//.........这里部分代码省略.........
示例7: SendMeTo
public override void SendMeTo(Player Plr)
{
//Log.Success("Creature", "SendMe " + Name);
PacketOut Out = new PacketOut((byte)Opcodes.F_CREATE_MONSTER);
Out.WriteUInt16(Oid);
Out.WriteUInt16(0);
Out.WriteUInt16((UInt16)Heading);
Out.WriteUInt16((UInt16)WorldPosition.Z);
Out.WriteUInt32((UInt32)WorldPosition.X);
Out.WriteUInt32((UInt32)WorldPosition.Y);
Out.WriteUInt16(0); // Speed Z
// 18
Out.WriteUInt16(Spawn.Proto.Model1);
Out.WriteByte((byte)Spawn.Proto.MinScale);
Out.WriteByte(Level);
Out.WriteByte(Faction);
Out.Fill(0, 4);
Out.WriteByte(Spawn.Emote);
Out.WriteByte(0); // ?
Out.WriteUInt16(Spawn.Proto._Unks[1]);
Out.WriteByte(0);
Out.WriteUInt16(Spawn.Proto._Unks[2]);
Out.WriteUInt16(Spawn.Proto._Unks[3]);
Out.WriteUInt16(Spawn.Proto._Unks[4]);
Out.WriteUInt16(Spawn.Proto._Unks[5]);
Out.WriteUInt16(Spawn.Proto._Unks[6]);
Out.WriteUInt16(Spawn.Title);
long TempPos = Out.Position;
byte TempLen = (byte)(Spawn.bBytes.Length + States.Count);
Out.WriteByte(TempLen);
Out.Write(Spawn.bBytes, 0, Spawn.bBytes.Length);
Out.Write(States.ToArray(), 0, States.Count);
if (QtsInterface.CreatureHasStartQuest(Plr))
{
Out.WriteByte(5);
Out.Position = TempPos;
Out.WriteByte((byte)(TempLen + 1));
}
else if (QtsInterface.CreatureHasQuestToAchieve(Plr))
{
Out.WriteByte(4);
Out.Position = TempPos;
Out.WriteByte((byte)(TempLen + 1));
}
else if (QtsInterface.CreatureHasQuestToComplete(Plr))
{
Out.WriteByte(7);
Out.Position = TempPos;
Out.WriteByte((byte)(TempLen + 1));
}
Out.Position = Out.Length;
Out.WriteByte(0);
Out.WriteStringBytes(Name);
Out.Fill(0, 48);
Plr.SendPacket(Out);
base.SendMeTo(Plr);
}
示例8: SendItems
private void SendItems(Player Plr, List<UInt16> Slots)
{
if (Slots.Count <= 0)
return;
PacketOut Out = new PacketOut((byte)Opcodes.F_GET_ITEM);
Out.WriteByte((byte)Slots.Count);
Out.Fill(0, 3);
for (int i = 0; i < Slots.Count; ++i)
Item.BuildItem(ref Out, GetItemInSlot(Slots[i]), null, Slots[i], 0);
Plr.SendPacket(Out);
}
示例9: SendItem
private void SendItem(Player Plr, UInt16 Slot, Item_Info Info)
{
PacketOut Out = new PacketOut((byte)Opcodes.F_GET_ITEM);
Out.WriteByte(1);
Out.Fill(0, 3);
Item.BuildItem(ref Out, null, Info, Slot, 1);
Plr.SendPacket(Out);
}
示例10: SendXp
public void SendXp()
{
PacketOut Out = new PacketOut((byte)Opcodes.F_PLAYER_EXPERIENCE);
Out.WriteUInt32(_Value.Xp);
Out.WriteUInt32(CurrentXp != null ? CurrentXp.Xp : 0);
Out.WriteUInt32(0);
Out.WriteByte(_Value.Level);
Out.Fill(0, 3);
SendPacket(Out);
}
示例11: SendStageInfo
public void SendStageInfo(Player Plr)
{
PacketOut Out = new PacketOut((byte)Opcodes.F_OBJECTIVE_UPDATE);
Out.WriteUInt32(Info.Entry);
Out.WriteByte(0);
Out.Fill(0, 3);
Plr.SendPacket(Out);
}
示例12: SendSkills
public void SendSkills()
{
PacketOut Out = new PacketOut((byte)Opcodes.F_CHARACTER_INFO);
Out.WriteByte(3); // Skills
Out.Fill(0, 3);
Out.WriteByte(_Info.CareerLine);
Out.WriteByte(_Info.Race);
Out.WriteUInt32R(_Value.Skills);
Out.WriteUInt16(_Value.RallyPoint);
SendPacket(Out);
}
示例13: SendSwitchRegion
public void SendSwitchRegion(UInt16 ZoneID)
{
PacketOut Out = new PacketOut((byte)Opcodes.F_SWITCH_REGION);
Out.WriteUInt16(ZoneID);
Out.Fill(0, 5);
Out.WriteByte(1);
Out.WriteByte(1);
Out.Fill(0, 11);
SendPacket(Out);
}
示例14: SendRenown
public void SendRenown()
{
PacketOut Out = new PacketOut((byte)Opcodes.F_PLAYER_RENOWN);
Out.WriteUInt32(_Value.Renown);
Out.WriteUInt32(CurrentRenown.Renown);
Out.WriteByte(_Value.RenownRank);
Out.Fill(0, 3);
SendPacket(Out);
}
示例15: SendMeTo
public override void SendMeTo(Player Plr)
{
Log.Success("SendMeTo", "[" + Plr.Name + "] voit : " + Name);
PacketOut Out = new PacketOut((byte)Opcodes.F_CREATE_PLAYER);
Out.WriteUInt16((UInt16)_Client.Id);
Out.WriteUInt16(Oid);
Out.WriteUInt16(_Info.ModelId);
Out.WriteUInt16(_Info.CareerLine);
Out.WriteUInt16((UInt16)Z);
Out.WriteUInt16(Zone.ZoneId);
Out.WriteUInt16((UInt16)X);
Out.WriteUInt16((UInt16)Y);
Out.WriteUInt16(Heading);
Out.WriteByte(_Value.Level); // Level
Out.WriteByte(0); // Level
Out.WriteByte(0);
Out.WriteByte(Faction);
Out.WriteByte(0);
Out.WriteByte(Faction);
Out.Write(_Info.bTraits, 0, _Info.bTraits.Length);
Out.Fill(0, 12);
Out.WriteByte(_Info.Race);
Out.Fill(0, 11);
Out.WritePascalString(_Info.Name);
Out.WritePascalString("");
Out.WriteByte(0);
Out.Fill(0, 4);
Plr.SendPacket(Out);
base.SendMeTo(Plr);
}