public void serialize(Utils.Objects.Packet sender) { // --------------- // // --- MINIMAL --- // // --------------- // sender.WriteInt(_character.Guid); sender.WriteByte( (byte)_character.Level ); sender.WriteUTF(_character.Name); // ------------ // // --- LOOK --- // // ------------ // sender.WriteShort(1); // bones ID sender.WriteShort(1); // nSkins sender.WriteShort( (short)( (int)_character.Classe * 10 + (int)_character.Sexe) ); sender.WriteShort((short)5); for (int i = 0; i < 5; ++i) sender.WriteInt(_character.Colors[i] | (i + 1) * 0x1000000); sender.WriteShort(1); // nScales sender.WriteShort( (short)140 ); sender.WriteShort(0); // nSubEntities // ------------ // // --- BASE --- // // ------------ // sender.WriteByte( (byte)_character.Classe ); sender.WriteByte( (byte)_character.Sexe ); }
public void serialize(Utils.Objects.Packet sender) { sender.WriteInt(_target.Guid); ////// ENTITY LOOK ////// sender.WriteShort(1); // bones ID sender.WriteShort(1); // nSkins sender.WriteShort( (short)( (int)_target.Classe * 10 + (int)_target.Sexe) ); sender.WriteShort((short)5); for (int i = 0; i < 5; ++i) sender.WriteInt(_target.Colors[i] | (i + 1) * 0x1000000); sender.WriteShort(1); // nScales sender.WriteShort( (short)140 ); sender.WriteShort(0); // nSubEntities ////// ENTITY DISPOSITION sender.WriteShort((short)Types.game.context.EntityDispositionInformations.ProtocolID); _target.Disposition.serialize(sender); }
public void serialize(Utils.Objects.Packet sender) { // MINIMAL INFO sender.WriteInt(Member.Guid); sender.WriteByte((byte)Member.Level); sender.WriteUTF(Member.Name); // LOOK sender.WriteShort(1); // bones ID sender.WriteShort(1); // nSkins sender.WriteShort((short)((int)Member.Classe * 10 + (int)Member.Sexe)); sender.WriteShort((short)5); for (int i = 0; i < 5; ++i) sender.WriteInt(Member.Colors[i] | (i + 1) * 0x1000000); sender.WriteShort(1); // nScales sender.WriteShort((short)140); sender.WriteShort(0); // nSubEntities // PARTY sender.WriteInt(Member.Characteristics.lifePoints); sender.WriteInt(Member.Characteristics.maxLifePoints); sender.WriteShort((short)Member.Characteristics.prospecting.Total); sender.WriteByte(0); // regenRate sender.WriteShort((short)Member.Characteristics.initiative.Total); sender.WriteBool(false); // pvp enabled sender.WriteByte(0); // alignment side }
public void serialize(Utils.Objects.Packet sender) { sender.WriteInt(_target.Guid); ////// ENTITY LOOK ////// sender.WriteShort(1); // bones ID sender.WriteShort(1); // nSkins sender.WriteShort( (short)( (int)_target.Classe * 10 + (int)_target.Sexe) ); sender.WriteShort((short)5); for (int i = 0; i < 5; ++i) sender.WriteInt(_target.Colors[i] | (i + 1) * 0x1000000); sender.WriteShort(1); // nScales sender.WriteShort( (short)140 ); sender.WriteShort(0); // nSubEntities ////// ENTITY DISPOSITION sender.WriteShort(60); // EntityDisposition id sender.WriteShort(_target.CurCell); sender.WriteByte( (byte)_target.Direction ); }
public static void serialize(Utils.Objects.Packet sender, Global.Character senderChar, Global.Character targetChar) { sender.WriteInt(senderChar.Guid); sender.WriteUTF(senderChar.Name); sender.WriteInt(targetChar.Guid); sender.WriteUTF(targetChar.Name); }
public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character target) { sender.WriteByte((byte)chan); sender.WriteUTF(message); sender.WriteInt( (int)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds ); sender.WriteUTF("abcdef"); // fingerprint ??? sender.WriteInt((int)target.Id); sender.WriteUTF(target.Name); }
public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character target) { sender.WriteByte((byte)chan); sender.WriteUTF(message); sender.WriteInt(Global.Environnement.getInstance().Timestamp); sender.WriteUTF("abcdef"); // fingerprint ??? sender.WriteInt(target.Guid); sender.WriteUTF(target.Name); }
public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character actor) { sender.WriteByte((byte)chan); sender.WriteUTF(message); sender.WriteInt(Global.Environnement.getInstance().Timestamp); sender.WriteUTF("abcdef"); sender.WriteInt(actor.Guid); sender.WriteUTF(actor.Name); sender.WriteInt(actor.AccountID); }
public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character actor) { sender.WriteByte((byte)chan); sender.WriteUTF(message); sender.WriteInt( (int)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds ); sender.WriteUTF(string.Empty); sender.WriteInt((int)actor.Id); sender.WriteUTF(actor.Name); sender.WriteInt((int)actor.Owner.Id); }
public static void serialize(Utils.Objects.Packet sender, int accountId) { sender.WriteInt(accountId); sender.WriteBool(false); // tutorial available sender.WriteShort(8191); // breeds visible sender.WriteShort(2047); // breeds available }
public static void serialize(Utils.Objects.Packet sender, List<int> path, Global.Character actor) { sender.WriteShort( (short)path.Count ); foreach (int cell in path) sender.WriteShort((short)cell); sender.WriteInt(actor.Guid); }
public static void serialize(Utils.Objects.Packet sender, List<int> path, int targetMap) { sender.WriteShort( (short)path.Count ); foreach (int cell in path) sender.WriteCell(cell); sender.WriteInt(targetMap); }
public static void serialize(Utils.Objects.Packet sender) { int nFlags = 0; sender.WriteShort((short)nFlags); for (int i = 0; i < nFlags; ++i) sender.WriteInt(0); }
public static void serialize(Utils.Objects.Packet packet, Global.Character character) { packet.WriteUTF(character.Name); packet.WriteByte((byte)character.Classe); packet.WriteByte((byte)character.Sexe); foreach (int color in character.Colors) packet.WriteInt(color); }
public void serialize(Utils.Objects.Packet sender) { // MINIMAL INFO sender.WriteInt((int)Member.Id); sender.WriteByte((byte)Member.Level); sender.WriteUTF(Member.Name); Member.Look.serialize(sender); // PARTY sender.WriteInt(Member.Characteristics.lifePoints); sender.WriteInt(Member.Characteristics.maxLifePoints); sender.WriteShort((short)Member.Characteristics.prospecting.Total); sender.WriteByte(0); // regenRate sender.WriteShort((short)Member.Characteristics.initiative.Total); sender.WriteBool(false); // pvp enabled sender.WriteByte(0); // alignment side }
public void serialize(Utils.Objects.Packet sender) { sender.WriteInt(_target.Id); _target.Look.serialize(sender); sender.WriteShort((short)EntityDispositionInformations.ProtocolID); _target.Disposition.serialize(sender); }
public static void serialize(Utils.Objects.Packet sender, Global.Party party) { sender.WriteInt(party.Leader.Guid); sender.WriteShort((short)party.Members.Count); foreach (Global.Character member in party.Members) new Types.game.context.PartyMemberInformations(member).serialize(sender); sender.WriteBool(false); // restricted ?? }
public void serialize(Utils.Objects.Packet sender) { sender.WriteUTF(Friend.Nickname); sender.WriteByte(Friend.CurrentCharacter != null ? (byte)Friend.CurrentCharacter.State : (byte)Enums.PlayerStateEnum.NOT_CONNECTED); sender.WriteInt(0); if (Friend.CurrentCharacter != null && Friend.CurrentCharacter.IsConnected) { sender.WriteUTF(Friend.CurrentCharacter.Name); sender.WriteShort((short)Friend.CurrentCharacter.Level); sender.WriteByte(0); // alignmentSide sender.WriteByte((byte)Friend.CurrentCharacter.Classe); sender.WriteByte((byte)Friend.CurrentCharacter.Sexe); sender.WriteInt(0); // guild guid sender.WriteUTF(""); // guild name sender.WriteByte(0xff); // mood smiley id } }
public void serialize(Utils.Objects.Packet sender) { sender.WriteInt( (int)Character.Id ); sender.WriteByte( (byte)Character.Level ); sender.WriteUTF(Character.Name); Character.Look.serialize(sender); sender.WriteByte( (byte)Character.Breed ); sender.WriteByte( (byte)Character.Gender ); }
public static void serialize(Utils.Objects.Packet sender, Global.Account acc) { int wrapper = 0; Utils.BooleanByteWrapper.setFlag(ref wrapper, 0, (int)acc.GmLvl > 0); Utils.BooleanByteWrapper.setFlag(ref wrapper, 1, acc.Connected); sender.WriteByte( (byte)wrapper ); sender.WriteUTF("[" + acc.GmLvl + "] " + acc.Nickname); sender.WriteInt((int)acc.Id); sender.WriteByte(0); // communityID sender.WriteUTF(""); // question sender.WriteDouble(31536000000); // aboTime (un an en millisecondes) }
public void serialize(Utils.Objects.Packet sender) { sender.WriteByte((byte)alignmentSide); sender.WriteByte((byte)alignmentValue); sender.WriteByte((byte)alignmentGrade); sender.WriteShort((short)dishonor); sender.WriteInt(characterPower); sender.WriteShort((short)honor); sender.WriteShort((short)honorGradeFloor); sender.WriteShort((short)honorNextGradeFloor); sender.WriteBool(pvpEnabled); }
public void serialize(Utils.Objects.Packet sender) { sender.WriteShort(1); // bones ID sender.WriteShort(1); // nSkins sender.WriteShort((short)((int)Target.Breed * 10 + (int)Target.Gender)); sender.WriteShort((short)5); for (int i = 0; i < 5; ++i) sender.WriteInt(Colors[i] | (i + 1) * 0x1000000); sender.WriteShort(1); // nScales sender.WriteShort((short)140); sender.WriteShort(0); // nSubEntities }
public static void serialize(Utils.Objects.Packet sender, Global.Map map) { sender.WriteShort( (short)map.SubAreaID ); sender.WriteInt( map.ID ); sender.WriteByte(0); // subareaAlignmentSide sender.WriteShort(0); // nHouses sender.WriteShort( (short)map.Actors.Count ); foreach (Global.Character actor in map.Actors) { sender.WriteShort((short)Types.game.context.GameRolePlayActorInformations.ProtocolID); new Types.game.context.GameRolePlayActorInformations(actor).serialize(sender); } sender.WriteShort(0); // nInteractiveElements sender.WriteShort(0); // nStatedElements sender.WriteShort(0); // nObstacles sender.WriteShort(0); // nFights }
public static void serialize(Utils.Objects.Packet sender, Global.IActor target) { sender.WriteInt((int)target.Id); }
public static void serialize(Utils.Objects.Packet sender, int characterId, string reponse) { sender.WriteInt(characterId); sender.WriteUTF(reponse); }
public void serialize(Utils.Objects.Packet sender) { sender.WriteDouble(experience); sender.WriteDouble(experienceLevelFloor); sender.WriteDouble(experienceNextLevelFloor); sender.WriteInt(kamas); sender.WriteInt(statsPoints); sender.WriteInt(spellsPoints); alignmentInfos.serialize(sender); sender.WriteInt(lifePoints); sender.WriteInt(maxLifePoints); sender.WriteShort((short)energyPoints); sender.WriteShort((short)maxEnergyPoints); sender.WriteShort((short)actionPointsCurrent); sender.WriteShort((short)movementPointsCurrent); initiative.serialize(sender); prospecting.serialize(sender); actionPoints.serialize(sender); movementPoints.serialize(sender); strength.serialize(sender); vitality.serialize(sender); wisdom.serialize(sender); chance.serialize(sender); agility.serialize(sender); intelligence.serialize(sender); range.serialize(sender); summonableCreaturesBoost.serialize(sender); reflect.serialize(sender); criticalHit.serialize(sender); sender.WriteShort((short)criticalHitWeapon); criticalMiss.serialize(sender); healBonus.serialize(sender); allDamagesBonus.serialize(sender); weaponDamagesBonusPercent.serialize(sender); damagesBonusPercent.serialize(sender); trapBonus.serialize(sender); trapBonusPercent.serialize(sender); permanentDamagePercent.serialize(sender); tackleBlock.serialize(sender); tackleEvade.serialize(sender); PAAttack.serialize(sender); PMAttack.serialize(sender); pushDamageBonus.serialize(sender); criticalDamageBonus.serialize(sender); neutralDamageBonus.serialize(sender); earthDamageBonus.serialize(sender); waterDamageBonus.serialize(sender); airDamageBonus.serialize(sender); fireDamageBonus.serialize(sender); dodgePALostProbability.serialize(sender); dodgePMLostProbability.serialize(sender); neutralElementResistPercent.serialize(sender); earthElementResistPercent.serialize(sender); waterElementResistPercent.serialize(sender); airElementResistPercent.serialize(sender); fireElementResistPercent.serialize(sender); neutralElementReduction.serialize(sender); earthElementReduction.serialize(sender); waterElementReduction.serialize(sender); airElementReduction.serialize(sender); fireElementReduction.serialize(sender); pushDamageReduction.serialize(sender); criticalDamageReduction.serialize(sender); pvpNeutralElementResistPercent.serialize(sender); pvpEarthElementResistPercent.serialize(sender); pvpWaterElementResistPercent.serialize(sender); pvpAirElementResistPercent.serialize(sender); pvpFireElementResistPercent.serialize(sender); pvpNeutralElementReduction.serialize(sender); pvpEarthElementReduction.serialize(sender); pvpWaterElementReduction.serialize(sender); pvpAirElementReduction.serialize(sender); pvpFireElementReduction.serialize(sender); sender.WriteShort(0); // nSpellModifications }
public static void serialize(Utils.Objects.Packet sender, Global.Character perso) { sender.WriteShort(0); // nItems sender.WriteInt(perso.Characteristics.kamas); }
public static void serialize(Utils.Objects.Packet sender, int leavingPlayerId) { sender.WriteInt(leavingPlayerId); }
public static void serialize(Utils.Objects.Packet sender, int target) { sender.WriteInt(target); }
public static void serialize(Utils.Objects.Packet sender) { sender.WriteInt( (int)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds ); // timestamp sender.WriteShort(3600); // timezoneOffset }