本文整理汇总了C#中Zepheus.FiestaLib.Networking.Packet.WriteInt方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.WriteInt方法的具体用法?C# Packet.WriteInt怎么用?C# Packet.WriteInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zepheus.FiestaLib.Networking.Packet
的用法示例。
在下文中一共展示了Packet.WriteInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WritePremiumInfo
public void WritePremiumInfo(Packet packet)
{
packet.WriteInt(this.UniqueID);
packet.WriteInt(this.ShopID);
packet.WriteInt(0);//unk
packet.WriteInt(0);//unk
}
示例2: Write
public void Write(Packet packet)
{
packet.WriteUShort(ID);
packet.WriteUShort(Item.ItemID);
packet.WriteInt(Position.X);
packet.WriteInt(Position.Y);
packet.WriteUShort((DroppedBy != null) ? DroppedBy.MapObjectID : (ushort)0xffff);
packet.WriteByte(CanTake ? (byte)0x08 : (byte)0x00);
}
示例3: Write
public void Write(Packet pPacket)
{
pPacket.WriteUShort(ID);
pPacket.WriteInt(60000); // Cooldown
//pPacket.WriteShort(Upgrades);
pPacket.WriteUShort(GetUpgrades(4, 3, 2, 1));
pPacket.WriteInt(9000); // Skill exp???
}
示例4: SendChangeMap
public static void SendChangeMap(ZoneCharacter character, ushort mapid, int x, int y)
{
using (var packet = new Packet(SH6Type.ChangeMap))
{
packet.WriteUShort(mapid);
packet.WriteInt(x);
packet.WriteInt(y);
character.Client.SendPacket(packet);
}
}
示例5: SendClientTime
public static void SendClientTime(WorldClient client, DateTime time)
{
using (var packet = new Packet(SH2Type.UpdateClientTime))
{
//pPacket.WriteUInt((59 << 25) | (23 << 19) | (31 << 13) | (12 << 8) | (254));
// * Minutes | Hours | Days | Months | Years
packet.WriteInt(3);
packet.WriteInt(time.Minute);//minutes
packet.WriteInt(time.Hour);//hourses
packet.WriteInt(time.Day);
packet.WriteInt(time.Month-1);
packet.WriteInt((time.Year - 1900));
packet.WriteInt((int)time.DayOfWeek);//wekday?
packet.WriteInt(105);
packet.WriteInt(2);
packet.WriteByte(1); //GMT 0-130 positive 130 -254 negative
// packet.WriteLong(2012);
// packet.WriteInt(4);//unk
//packet.WriteInt(1);//unk
//packet.WriteInt(3);//unk
//packet.WriteInt(46);
// packet.Fill(3, 0);//unk
// packet.WriteByte(2);
client.SendPacket(packet);
}
}
示例6: SendChangeZone
public static void SendChangeZone(ZoneCharacter character, ushort mapid, int x, int y, string ip, ushort port, ushort randomid)
{
using (var packet = new Packet(SH6Type.ChangeZone))
{
packet.WriteUShort(mapid);
packet.WriteInt(x);
packet.WriteInt(y);
packet.WriteString(Settings.Instance.IP, 16);
packet.WriteUShort(port);
packet.WriteUShort(randomid);
character.Client.SendPacket(packet);
}
}
示例7: SendChangeZone
public static void SendChangeZone(ZoneCharacter character, ushort mapid, int x, int y, string IP, ushort port, ushort randomid)
{
using (var packet = new Packet(SH6Type.ChangeZone))
{
packet.WriteUShort(mapid);
packet.WriteInt(x);
packet.WriteInt(y);
packet.WriteString(character.Client.Host == "127.0.0.1" ? "127.0.0.1" : IP, 16);
packet.WriteUShort(port);
packet.WriteUShort(randomid);
character.Client.SendPacket(packet);
}
}
示例8: SendPartyInformation
public static void SendPartyInformation(ZoneClient client)
{
if (Program.Entity.Parties.Where(c => c.CharNo == client.Character.ID).Count() == 1)
{
Party PartyNo = Program.Entity.Parties.First(c => c.CharNo == client.Character.ID);
foreach (Party party in Program.Entity.Parties.Where(c => c.PartyNo == PartyNo.PartyNo))
{
Character Pcharacter = Program.Entity.Characters.First(c => c.ID == party.CharNo);
ZoneClient otherLiveInfo = ClientManager.Instance.GetClientByName(Pcharacter.Name);
if (otherLiveInfo != null)
{
if (otherLiveInfo.Character.MapID == client.Character.MapID)
{
using (var ppacket = new Packet(SH14Type.PartyInformationShort))
{
ppacket.WriteByte(1);
ppacket.WriteString(otherLiveInfo.Character.Name, 16);
ppacket.WriteUInt(otherLiveInfo.Character.HP);
ppacket.WriteUInt(otherLiveInfo.Character.SP);
ppacket.WriteUInt(otherLiveInfo.Character.LP);
client.SendPacket(ppacket);
}
using (var ppacket = new Packet(SH14Type.PartyInformation))
{
ppacket.WriteByte(1); //unk
ppacket.WriteString(otherLiveInfo.Character.Name, 16);
ppacket.WriteByte((byte)otherLiveInfo.Character.Job);
ppacket.WriteByte(otherLiveInfo.Character.Level);
ppacket.WriteUInt(otherLiveInfo.Character.HP);
ppacket.WriteUInt(otherLiveInfo.Character.SP);
ppacket.WriteUInt(otherLiveInfo.Character.LP);
ppacket.WriteByte(1); //unk
client.SendPacket(ppacket);
}
using (var ppacket = new Packet(SH14Type.PartyLoginCord))
{
ppacket.WriteByte(1); //unk
ppacket.WriteString(otherLiveInfo.Character.Name, 16);
ppacket.WriteInt(otherLiveInfo.Character.Position.X);
ppacket.WriteInt(otherLiveInfo.Character.Position.Y);
client.SendPacket(ppacket);
}
}
}
}
}
}
示例9: BroadcastGuildName
public void BroadcastGuildName()
{
var packet = new Packet(SH29Type.GuildNameResult);
packet.WriteInt(Academy.Guild.ID);
packet.WriteString(Academy.Guild.Name, 16);
Character.BroucastPacket(packet);
}
示例10: SendUnknown
public static void SendUnknown(WorldClient client)
{
using (var packet = new Packet(SH31Type.LoadUnkown))
{
packet.WriteInt(0xbd1); //lolwut?! charid or sumtin'
client.SendPacket(packet);
}
}
示例11: BroadcastGuildName
public void BroadcastGuildName()
{
var packet = new Packet(SH29Type.GuildNameResult);
packet.WriteInt(Guild.ID);
packet.WriteString(Guild.Name, 16);
BroadcastManager.Instance.BroadcastInRange(Character, packet, false);
}
示例12: SendChatBlock
public static void SendChatBlock(ZoneCharacter character, int seconds)
{
using (var packet = new Packet(SH2Type.Chatblock))
{
packet.WriteInt(seconds);
character.Client.SendPacket(packet);
}
}
示例13: WriteBasicCharInfo
public static void WriteBasicCharInfo(WorldCharacter wchar, Packet packet)
{
packet.WriteInt(wchar.Character.ID);
packet.WriteString(wchar.Character.Name, 20);
packet.WriteUShort(wchar.Character.CharLevel);
packet.WriteByte(wchar.Character.Slot);
MapInfo mapinfo;
if (!DataProvider.Instance.Maps.TryGetValue(wchar.Character.Map, out mapinfo))
{
Log.WriteLine(LogLevel.Warn, "{0} has an invalid MapID ({1})", wchar.Character.Name, wchar.Character.Map);
wchar.Character.Map = 0;//we reset
packet.WriteString("Rou", 12);
}
else
{
packet.WriteString(mapinfo.ShortName, 12);
}
packet.WriteByte(0); // UNK
packet.WriteInt(0x00000000); // Random seed
WriteLook(wchar, packet);
WriteEquipment(wchar, packet);
WriteRefinement(wchar, packet);
packet.Fill(2, 0xff); // UNK
packet.WriteString("Rou", 12); //TODO: load from mapinfo.shn
packet.WriteInt(0); // X, doesn't matter
packet.WriteInt(0); // Y, neither
packet.WriteInt(0x63dd45ca);
packet.WriteByte(0);
packet.WriteInt(100); // Test later!
packet.WriteByte(0);
packet.WriteInt(0);
packet.WriteByte(1);
wchar.Detach();
}
示例14: SendGuildNameResult
public static void SendGuildNameResult(WorldClient client, int pID, string pName)
{
using (var packet = new Packet(SH29Type.GuildNameResult))
{
packet.WriteInt(pID);
packet.WriteString(pName, 16);
client.SendPacket(packet);
}
}
示例15: SendQuestion
public static void SendQuestion(ZoneCharacter character, Question question, ushort range)
{
using (var packet = new Packet(SH15Type.Question))
{
packet.WriteString(question.Text, 129);
packet.WriteUShort(character.MapObjectID); // Obj id
packet.WriteInt(character.Position.X);
packet.WriteInt(character.Position.Y);
packet.WriteUShort(range); // Distance how far your allowed to run when the question window is closed by Client
packet.WriteByte((byte)question.Answers.Count);
for (byte i = 0; i < question.Answers.Count; ++i)
{
packet.WriteByte(i);
packet.WriteString(question.Answers[i], 32);
}
character.Client.SendPacket(packet);
}
}