public override void Serialize(BigEndianWriter writer) { byte flag = new byte(); BooleanByteWrapper.SetFlag(0, flag, m_autoconnect); BooleanByteWrapper.SetFlag(1, flag, m_useCertificate); BooleanByteWrapper.SetFlag(2, flag, m_useLoginToken); writer.WriteByte(flag); m_version.Serialize(writer); writer.WriteUTF(m_lang); writer.WriteShort(((short)(m_credentials.Count))); int credentialsIndex; for (credentialsIndex = 0; (credentialsIndex < m_credentials.Count); credentialsIndex = (credentialsIndex + 1)) { writer.WriteByte(m_credentials[credentialsIndex]); } writer.WriteShort(m_serverId); writer.WriteVarLong(m_sessionOptionalSalt); writer.WriteShort(((short)(m_failedAttempts.Count))); int failedAttemptsIndex; for (failedAttemptsIndex = 0; (failedAttemptsIndex < m_failedAttempts.Count); failedAttemptsIndex = (failedAttemptsIndex + 1)) { writer.WriteVarUhShort(m_failedAttempts[failedAttemptsIndex]); } }
public virtual void Serialize(BigEndianWriter writer) { writer.WriteInt(allianceId); writer.WriteShort(nbGuilds); writer.WriteShort(nbMembers); writer.WriteShort(nbSubarea); }
public virtual void Serialize(BigEndianWriter writer) { writer.WriteShort(symbolShape); writer.WriteInt(symbolColor); writer.WriteShort(backgroundShape); writer.WriteInt(backgroundColor); }
public byte[] GetDatas() { var writer = new BigEndianWriter(); int count = 0; writer.WriteShort((short)_colors.Count); foreach (var item in _colors) { writer.WriteInt(item.Key); writer.WriteInt(item.Value); } writer.WriteShort((short)_scales.Count); foreach (var item in _scales) { writer.WriteInt(item); } writer.WriteShort((short)_skins.Count); foreach (var item in _skins) { writer.WriteUInt(item); } writer.WriteShort((short)_subLooks.Count); for (int i = 0; i < count; i++) { } writer.WriteUInt(_bonesID); writer.WriteByte((byte)_binding); return(writer.Data); }
public override void Serialize(BigEndianWriter writer) { writer.WriteInt(entityId); writer.WriteInt(elemId); writer.WriteShort(skillId); writer.WriteShort(duration); }
public override void Serialize(BigEndianWriter writer) { writer.WriteShort(subAreaId); writer.WriteDouble(fightId); writer.WriteShort(attacker.TypeId); attacker.Serialize(writer); }
public override void Serialize(BigEndianWriter writer) { base.Serialize(writer); writer.WriteShort(diceNum); writer.WriteShort(diceSide); writer.WriteShort(diceConst); }
public override void Serialize(BigEndianWriter writer) { base.Serialize(writer); writer.WriteInt(targetId); writer.WriteShort(loss); writer.WriteShort(permanentDamages); }
public virtual void Serialize(BigEndianWriter writer) { writer.WriteShort(actionId); writer.WriteInt(sourceId); writer.WriteShort(effect.TypeId); effect.Serialize(writer); }
public override void Serialize(BigEndianWriter writer) { base.Serialize(writer); writer.WriteShort(markId); writer.WriteInt(triggeringCharacterId); writer.WriteShort(triggeredSpellId); }
public override void Serialize(BigEndianWriter writer) { base.Serialize(writer); writer.WriteShort(days); writer.WriteShort(hours); writer.WriteShort(minutes); }
public virtual void Serialize(BigEndianWriter writer) { writer.WriteShort(@base); writer.WriteShort(objectsAndMountBonus); writer.WriteShort(alignGiftBonus); writer.WriteShort(contextModif); }
public override void Serialize(BigEndianWriter writer) { base.Serialize(writer); writer.WriteInt(targetId); writer.WriteShort(casterCellId); writer.WriteShort(targetCellId); }
public override void Serialize(BigEndianWriter writer) { writer.WriteInt(casterId); writer.WriteShort(targetCellId); writer.WriteShort(spellId); writer.WriteSByte(spellLevel); }
private void BuildPacket(BigEndianWriter writer) { byte[] data = writer.Data; writer.Clear(); int messageLenghtType = ComputeTypeLen(data.Length); short header = ComputeStaticHeader((int)MessageId, messageLenghtType); writer.WriteShort(header); switch (messageLenghtType) { case 1: writer.WriteByte((byte)data.Length); break; case 2: writer.WriteShort((short)data.Length); break; case 3: writer.WriteByte((byte)(data.Length >> 16 & 255)); writer.WriteShort((short)(data.Length & 65535)); break; } writer.WriteBytes(data); }
public virtual void Serialize(BigEndianWriter writer) { writer.WriteUTF(uid); writer.WriteShort(figure); writer.WriteShort(pedestal); writer.WriteBoolean(bound); }
public override void Serialize(BigEndianWriter writer) { base.Serialize(writer); writer.WriteShort(npcId); writer.WriteBoolean(sex); writer.WriteShort(specialArtworkId); }
public override void Serialize(BigEndianWriter writer) { writer.WriteUTF(name); writer.WriteShort(worldX); writer.WriteShort(worldY); writer.WriteUTF(liberator); }
public byte[] Serialize() { var bytes = new byte[(37 + this.Snake.Name.Length) + (2 * this.Snake.Parts.Count)]; var writer = new BigEndianWriter(new MemoryStream(bytes)); writer.WriteByte(0); writer.WriteByte(0); writer.WriteByte(Convert.ToByte(this.ProtocolId)); writer.WriteShort((short)this.Snake.ID); writer.WriteInt24(3.1415926535 / Math.PI * 16777215); writer.WriteByte(0); writer.WriteInt24(3.1415926535 / Math.PI * 16777215); writer.WriteShort((short)this.Snake.Speed); writer.WriteInt24(0.028860630325116536 * 16777215); writer.WriteByte((byte)this.Snake.Skin); writer.WriteInt24(this.Snake.Position.X); writer.WriteInt24(this.Snake.Position.Y); writer.WriteString(this.Snake.Name); writer.WriteInt24(this.Snake.HeadPosition.X); writer.WriteInt24(this.Snake.HeadPosition.Y); foreach (var part in this.Snake.Parts) { writer.WriteByte((byte)part.Position.X); writer.WriteByte((byte)part.Position.Y); } return(bytes); }
public override void Serialize(BigEndianWriter writer) { writer.WriteInt(accountId); writer.WriteBoolean(tutorialAvailable); writer.WriteShort(breedsVisible); writer.WriteShort(breedsAvailable); writer.WriteSByte(status); }
public override void Serialize(BigEndianWriter writer) { writer.WriteShort(rank); writer.WriteShort(bestDailyRank); writer.WriteShort(bestRank); writer.WriteShort(victoryCount); writer.WriteShort(arenaFightcount); }
public override void Serialize(BigEndianWriter writer) { base.Serialize(writer); writer.WriteShort(worldX); writer.WriteShort(worldY); writer.WriteInt(mapId); writer.WriteShort(subAreaId); }
public virtual void Serialize(BigEndianWriter writer) { writer.WriteInt(memberId); writer.WriteShort(worldX); writer.WriteShort(worldY); writer.WriteInt(mapId); writer.WriteVarShort(subAreaId); }
public override void Serialize(BigEndianWriter writer) { base.Serialize(writer); writer.WriteShort(worldX); writer.WriteShort(worldY); writer.WriteInt(mapId); writer.WriteShort(prism.TypeId); prism.Serialize(writer); }
public virtual void Serialize(BigEndianWriter writer) { writer.WriteInt(houseId); writer.WriteShort(modelId); writer.WriteShort(worldX); writer.WriteShort(worldY); writer.WriteInt(mapId); writer.WriteShort(subAreaId); }
public override void Serialize(BigEndianWriter writer) { base.Serialize(writer); writer.WriteShort(staticInfos.TypeId); staticInfos.Serialize(writer); writer.WriteShort(ageBonus); writer.WriteSByte(lootShare); writer.WriteSByte(alignmentSide); }
public virtual void Serialize(BigEndianWriter writer) { writer.WriteShort(firstNameId); writer.WriteShort(lastNameId); writer.WriteShort(worldX); writer.WriteShort(worldY); writer.WriteInt(mapId); writer.WriteShort(subAreaId); }
public virtual void Serialize(BigEndianWriter writer) { writer.WriteInt(uid); writer.WriteInt(targetId); writer.WriteShort(turnDuration); writer.WriteSByte(dispelable); writer.WriteShort(spellId); writer.WriteInt(parentBoostUid); }
public override void Serialize(BigEndianWriter writer) { base.Serialize(writer); writer.WriteShort(year); writer.WriteShort(month); writer.WriteShort(day); writer.WriteShort(hour); writer.WriteShort(minute); }
public override void Serialize(BigEndianWriter writer) { base.Serialize(writer); writer.WriteShort(firstNameId); writer.WriteShort(lastNameId); writer.WriteByte(level); writer.WriteInt(guildId); writer.WriteInt(uid); }