本文整理汇总了C#中Solar.FiestaLib.Networking.Packet.WriteInt方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.WriteInt方法的具体用法?C# Packet.WriteInt怎么用?C# Packet.WriteInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solar.FiestaLib.Networking.Packet
的用法示例。
在下文中一共展示了Packet.WriteInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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???
}
示例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: 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);
}
}
示例4: 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);
}
}
示例5: SendChatBlock
public static void SendChatBlock(ZoneCharacter character, int seconds)
{
using (var packet = new Packet(SH2Type.Chatblock))
{
packet.WriteInt(seconds);
character.Client.SendPacket(packet);
}
}
示例6: SendUnknown
public static void SendUnknown(WorldClient client)
{
using (var packet = new Packet(SH31Type.LoadUnkown))
{
packet.WriteInt(0xbd1); //lolwut?! charid or sumtin'
client.SendPacket(packet);
}
}
示例7: 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);
}
}
示例8: 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);
}
}
示例9: WriteBasicCharInfo
public static void WriteBasicCharInfo(WorldCharacter wchar, Packet packet)
{
packet.WriteInt(wchar.Character.ID);
packet.WriteString(wchar.Character.Name, 20);
packet.WriteByte(wchar.Character.CharLevel);
packet.WriteByte(0);
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", 13);
}
else
{
packet.WriteString(mapinfo.ShortName, 13);
}
packet.WriteByte(36); // Idk right now
packet.WriteByte(193); // Idk right now
packet.WriteByte(18); // Idk right now
packet.WriteByte(11); // Idk right now
WriteLook(wchar, packet);
WriteEquipment(wchar, packet);
WriteRefinement(wchar, packet);
packet.WriteString(mapinfo == null ? "Rou" : mapinfo.ShortName, 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.WriteByte(2);
packet.WriteByte(0);
packet.WriteByte(0);
packet.WriteByte(0);
packet.WriteByte(0);
wchar.Detach();
}
示例10: Write
public void Write(Packet packet)
{
packet.WriteUShort(this.MapObjectID);
packet.WriteByte(2); //always 2 (type i bet shown / transparent?)
packet.WriteUShort(ID);
packet.WriteInt(this.Position.X);
packet.WriteInt(this.Position.Y);
packet.WriteByte(this.Rotation); //TODO: rotation for NPC (from txt official files?)
if (Gate != null)
{
packet.WriteByte(1);
packet.WriteString(Gate.MapClient, 12);
packet.Fill(41, 0);
}
else
{
packet.Fill(54, 0); //find out later
}
}
示例11: SendActiveSkillList
public static void SendActiveSkillList(ZoneCharacter character)
{
using (var packet = new Packet(SH4Type.CharacterActiveSkillList))
{
var list = character.SkillsActive.Values;
packet.WriteByte(0);
packet.WriteInt(character.ID);
packet.WriteUShort((ushort)list.Count); // Skill count (max 300)
foreach (var skill in list)
{
skill.Write(packet);
}
character.Client.SendPacket(packet);
}
}
示例12: WriteCharacterDisplay
public void WriteCharacterDisplay(Packet packet)
{
packet.WriteUShort(MapObjectID);
packet.WriteString(Name, 16);
packet.WriteInt(Position.X);
packet.WriteInt(Position.Y);
packet.WriteByte(Rotation); // Rotation
packet.WriteByte((byte)State); // Player State (1,2 - Player, 3 - Dead, 4 - Resting, 5 - Vendor, 6 - On Mount)
packet.WriteByte((byte)Job);
if (State != PlayerState.Resting && State != PlayerState.Vendor && this.House == null)
{
WriteLook(packet);
WriteEquipment(packet);
}
else
{
this.House.WritePacket(packet);
}
WriteRefinement(packet);
packet.WriteUShort(0xffff); // Mount Handle
packet.WriteUShort(0xffff);
packet.WriteByte(0xff); // Emote (0xff = nothing)
packet.WriteUShort(0xffff);
packet.WriteShort(0);
packet.WriteUShort(0); // Mob ID (title = 10)
packet.Fill(53, 0); // Buff Bits? Something like that
packet.WriteInt(character.GuildID.HasValue ? character.GuildID.Value : 0); // Guild ID
packet.WriteByte(0x02); // UNK (0x02)
packet.WriteBool(false); // In Guild Academy (0 - No, 1 - Yes)
packet.WriteBool(true); // Pet AutoPickup (0 - Off, 1 - On)
packet.WriteByte(this.Level);
}
示例13: WriteDetailedInfo
public void WriteDetailedInfo(Packet pPacket)
{
pPacket.WriteInt(ID);
pPacket.WriteString(this.Name, 16);
pPacket.WriteByte(this.Slot);
pPacket.WriteByte(this.Level);
pPacket.WriteLong(this.Exp);
pPacket.WriteInt(12345678); // UNK
pPacket.WriteShort(this.StonesHP);
pPacket.WriteShort(this.StonesSP);
pPacket.WriteUInt(this.HP);
pPacket.WriteUInt(this.SP);
pPacket.WriteInt(this.Fame); // Fame
pPacket.WriteLong(this.Money); //TODO: inventory class
pPacket.WriteString(this.Map.MapInfo.ShortName, 12);
pPacket.WriteInt(this.Position.X);
pPacket.WriteInt(this.Position.Y);
pPacket.WriteByte(this.Rotation);
pPacket.WriteByte(this.Str); // Str bonus
pPacket.WriteByte(this.End); // End bonus
pPacket.WriteByte(this.Dex); // Dex bonus
pPacket.WriteByte(this.Int); // Int bonus
pPacket.WriteByte(this.Spr); // Spr bonus
pPacket.WriteShort(0); // UNK
pPacket.WriteUInt(0); // Killpoints
pPacket.Fill(7, 0); // UNK
}
示例14: SendTitleList
public static void SendTitleList(ZoneCharacter character)
{
using (var packet = new Packet(SH4Type.CharacterTitles))
{
packet.WriteInt(0); //current title ID
packet.WriteShort(0); //title count
//here comes shit loop (see old Solar)
character.Client.SendPacket(packet);
}
}
示例15: SendRevive
public static void SendRevive(ZoneClient client, ushort mapid, int x, int y)
{
using (var packet = new Packet(SH4Type.Revive))
{
packet.WriteUShort(mapid);
packet.WriteInt(x);
packet.WriteInt(y);
client.SendPacket(packet);
}
}