本文整理汇总了C#中ServerEngine.PacketEngine.Packet.WriteLong方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.WriteLong方法的具体用法?C# Packet.WriteLong怎么用?C# Packet.WriteLong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ServerEngine.PacketEngine.Packet
的用法示例。
在下文中一共展示了Packet.WriteLong方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendSpawnStats
// something about repulation, current hp/mana, stats
public static byte[] SendSpawnStats(Character ch)
{
Packet p = new Packet(200);
p.WriteShort(ch.Level);
p.WriteShort(ch.Strength);
p.WriteShort(ch.Stamina);
p.WriteShort(ch.Dexterity);
p.WriteShort(ch.Energy);
p.WriteHexString("01 01 01 01"); // unknown :(, maybe base stats?: D
p.WriteShort(ch.MaxMana);
p.WriteShort(ch.CurrentMana);
p.WriteInt(ch.MaxHp);
p.WriteInt(ch.CurrentHp);
p.WriteLong(ch.CurrentExp); // cur exp
p.WriteHexString("00 00 00 00 00 00 00 00"); // curxp to next training
p.WriteLong(1200000); // exp to level
p.WriteHexString("00 00 00 00 00 00 00 00"); // xp to next training
p.WriteHexString("00 00");
p.WriteHexString("04 00 00 00");
p.WriteHexString("00 00");
p.WriteHexString("08 00 00 00");
p.WriteShort(ch.StatPoint); // stat points
p.WriteHexString("6B 00 00 00"); // total trainings?
p.WriteShort(ch.TrainingPoint); // current trainings
p.WriteHexString("7C 00"); // damage from stats
p.WriteHexString("C5 00 00 00"); // total damage (from items, skills etc)
p.WriteHexString("11 00"); // defence from stats
p.WriteHexString("12 00 00 00"); // total defence (from items, skills etc)
p.WriteHexString("13 00"); // attack rating from stats
p.WriteHexString("14 00 00 00"); // total attack rating (from items, skills etc)
p.WriteHexString("07 00"); // attack range or speed
p.WriteHexString("0B 0B"); // animation speed (the speed hax thingy in xiah 2827)
p.WriteHexString("0B"); // movement speed, from shoes ^_ ^
p.WriteHexString("00 00 00 00 00");
p.WriteInt(ch.Money);
p.WriteHexString("02 00"); // Critical
p.WriteHexString("1A 00");
p.WriteInt(ch.Fame);
p.WriteShort(ch.FiveElementPoint); // five element points (unused)
p.WriteInt(ch.CurrentFEExp); // current fe experience
p.WriteHexString("02 00 00 00"); // fe experience to point, 40000 each level
p.WriteHexString("00 00 00 00"); // that other five element skill experience :S
p.WriteHexString("00 00"); // fire fe level
p.WriteHexString("00 00"); // water fe level
p.WriteHexString("00 00"); // wood fe level
p.WriteHexString("00 00"); // steel fe level
p.WriteHexString("00 00"); // soil fe level
p.WriteByte(ch.Rebirth); // rebirths
p.WriteInt(ch.RepulationPoint); // Repulation points, the points near stat ones :U
return p.GetWrittenBuffer(PacketIds.SendSpawnStats);
}
示例2: SendUnSealPet
public static byte[] SendUnSealPet(Pet pet)
{
Packet p = new Packet(200);
p.WriteHexString("00");
p.WriteInt(pet.PetID);
p.WriteInt(pet.OwnerID);
p.WriteInt(pet.MapID);
p.WriteByte(pet.PetType);
p.WriteString(pet.Name);
p.WriteShort(pet.Level);
p.WriteShort((short)pet.Position.X);
p.WriteShort((short)pet.Position.Y);
p.WriteHexString("4E 4E");
p.WriteHexString("01 78 02 4E C6 00");
p.WriteInt(pet.MaxHealth);
p.WriteInt(pet.CurHealth);
p.WriteShort(pet.Damage);
p.WriteShort(pet.Defense);
p.WriteShort(pet.AttackRating);
p.WriteHexString("01 00 09 00 00 00 00 00 25 32 00 00 01");
p.WriteLong(pet.CurrentExperience);
p.WriteLong(pet.NegativeExperience);
p.WriteLong(pet.ExperienceToLevel + pet.NegativeExperience);
p.WriteByte(pet.Evolution);
p.WriteByte(pet.Wildness);
p.WriteByte(Convert.ToByte(pet.IsLegendary));
p.WriteHexString("00 00 00 00");
p.WriteHexString("00 00 00 00 00 00 00 00");
return p.GetWrittenBuffer(PacketIds.SendUnSealPet);
}
示例3: SendPlayerPet
public static byte[] SendPlayerPet(Character ch)
{
Packet p = new Packet(200);
Pet pet = ch.Pet;
p.WriteInt(ch.CharacterId);
if (pet != null)
{
p.WriteHexString("01");
p.WriteInt(pet.PetID);
p.WriteInt(pet.OwnerID);
p.WriteInt(pet.MapID);
p.WriteByte(pet.PetType);
p.WriteString(pet.Name);
p.WriteShort(pet.Level);
p.WriteShort(pet.Position.X);
p.WriteShort(pet.Position.Y);
p.WriteHexString("38 D7 03 96 04 38 CE 00");
p.WriteInt(pet.TotalHealth);
p.WriteInt(pet.CurHealth);
p.WriteShort(pet.TotalDamage);
p.WriteShort(pet.TotalDefense);
p.WriteShort(pet.TotalAttackRating);
p.WriteHexString("01 00 09 00 00 00 00 00 56 2A 00 00 01 ");
p.WriteLong(pet.CurrentExperience);
p.WriteLong(pet.NegativeExperience);
p.WriteLong(pet.ExperienceToLevel + pet.NegativeExperience);
p.WriteByte(pet.Evolution);
p.WriteByte(pet.Wildness);
p.WriteByte(Convert.ToByte(pet.IsLegendary));
p.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00");
p.WriteHexString("00 00 00 00 00 00 00 00 00 00");
}
else
p.WriteHexString("00"); // no pet
return p.GetWrittenBuffer(PacketIds.SendPetOnLogin);
}
示例4: SendPetStats
public static byte[] SendPetStats(Pet pet)
{
Packet p = new Packet(200);
p.WriteHexString("00");
p.WriteInt(pet.PetID);
p.WriteInt(pet.OwnerID);
p.WriteInt(pet.MapID);
p.WriteByte(pet.PetType);
p.WriteString(pet.Name);
p.WriteShort(pet.Level);
p.WriteShort(pet.Position.X);
p.WriteShort(pet.Position.Y);
p.WriteHexString("00");
p.WriteShort(pet.Position.X);
p.WriteShort(pet.Position.Y);
p.WriteHexString("00 8B 00");
p.WriteInt(pet.TotalHealth);
p.WriteInt(pet.CurHealth);
p.WriteShort(pet.TotalDamage);
p.WriteShort(pet.TotalDefense);
p.WriteShort(pet.TotalAttackRating);
p.WriteHexString("00 00 04 04 00 00 00 00 83 4E 00 00 01");
p.WriteLong(pet.CurrentExperience);
p.WriteLong(pet.NegativeExperience);
p.WriteLong(pet.ExperienceToLevel + pet.NegativeExperience);
p.WriteByte(pet.Evolution);
p.WriteByte(pet.Wildness);
p.WriteByte(Convert.ToByte(pet.IsLegendary));
p.WriteHexString("00 00 00 00 00 00 00 00 00 00");
return p.GetWrittenBuffer(PacketIds.SendPetStats);
}
示例5: SendPetLeveled
public static byte[] SendPetLeveled(Pet pet)
{
Packet p = new Packet(200);
p.WriteInt(pet.OwnerID);
p.WriteInt(pet.PetID);
p.WriteByte(pet.Level);
p.WriteShort(pet.TotalDamage);
p.WriteShort(pet.TotalDefense);
p.WriteShort(pet.TotalAttackRating);
p.WriteHexString("00 00");
p.WriteInt(pet.MaxHealth);
p.WriteInt(pet.CurHealth);
p.WriteLong(pet.CurrentExperience);
p.WriteLong(pet.NegativeExperience);
p.WriteLong(pet.ExperienceToLevel + pet.NegativeExperience);
return p.GetWrittenBuffer(PacketIds.SendPetLeveled);
}
示例6: SendExperience
public static byte[] SendExperience(Character ch, int experienceGained, short feGained, bool leveled, bool gettraining)
{
Packet p = new Packet(200);
p.WriteInt(experienceGained);
p.WriteLong(ch.CurrentExp);
p.WriteByte(Convert.ToByte(leveled));
p.WriteByte(Convert.ToByte(gettraining));
p.WriteHexString("00"); // not sure
p.WriteLong(ch.ExpToLevel + ch.NegativeExp);
p.WriteLong(ch.ExpToTraining + ch.NegativeExp);
p.WriteShort(ch.FiveElementPoint);
p.WriteInt(ch.CurrentFEExp);
p.WriteHexString("40 9C 00 00"); // fe exp to level 4000 all levels or 40k not sure too lazy check kthxbye
p.WriteHexString("00 00 00 00"); // fe special skill current exp
p.WriteHexString("00 00 00 00"); // bonus exp
p.WriteShort(feGained);
return p.GetWrittenBuffer(PacketIds.SendExperience);
}