public override void Serialize(LittleEndianWriter writer) { writer.WriteByte(slotId); writer.WriteByte(0xF8); // 4.18 writer.WriteFloat(currentCd); writer.WriteFloat(totalCd); }
public override void Serialize(LittleEndianWriter writer) { position.Serialize(writer); casterPosition.Serialize(writer); direction.Serialize(writer); velocity.Serialize(writer); startPoint.Serialize(writer); endPoint.Serialize(writer); unitPosition.Serialize(writer); writer.WriteFloat(timeFromCreation); writer.WriteFloat(speed); writer.WriteFloat(lifePercentage); writer.WriteFloat(timedSpeedDelta); writer.WriteFloat(timedSpeedDeltaTime); byte bitfield = 0; if (bounced) { bitfield |= 1; } writer.WriteByte(bitfield); castInfo.Serialize(writer); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteUInt(targetNetId); writer.WriteByte((byte)extraTime); // extraTime writer.WriteUInt(futureProjectileNetId); // Basic attack projectile ID, to be spawned later writer.WriteByte((byte)slot); // attackSlot writer.WriteByte((byte)0x80); // not sure what this is, but it should be correct (or maybe attacked x z y?) - 4.18 writer.WriteByte((byte)0x01); writer.WriteShort((short)MovementVector.TargetXToNormalFormat(targetPosition.X, middleOfMap)); writer.WriteByte((byte)0x80); writer.WriteByte((byte)0x01); writer.WriteShort((short)MovementVector.TargetYToNormalFormat(targetPosition.Y, middleOfMap)); // writer.WriteFloat(targetPosition.X); // writer.WriteFloat(targetPosition.Y); writer.WriteByte((byte)0xCC); writer.WriteByte((byte)0x35); writer.WriteByte((byte)0xC4); writer.WriteByte((byte)0xD1); writer.WriteFloat(sourcePosition.X); writer.WriteFloat(sourcePosition.Y); }
public void Serialize(LittleEndianWriter writer) { writer.WriteUInt(TargetNetId); writer.WriteUInt(NetAssignedNetId); writer.WriteUInt(CasterNetId); writer.WriteUInt(BindNetId); writer.WriteUInt(KeywordNetId); writer.WriteShort(PositionX); writer.WriteFloat(PositionY); writer.WriteShort(PositionZ); writer.WriteShort(TargetPositionX); writer.WriteFloat(TargetPositionY); writer.WriteShort(TargetPositionZ); writer.WriteShort(OwnerPositionX); writer.WriteFloat(OwnerPositionY); writer.WriteShort(OwnerPositionZ); OrientationVector.Serialize(writer); writer.WriteFloat(TimeSpent); writer.WriteFloat(ScriptScale); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteUInt(100); // animation flags, unknown writer.WriteFloat(scaleTime); writer.WriteFloat(startProgress); writer.WriteFloat(speedRatio); writer.WriteFixedStringLast(animationName, 64); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteInt(unk1); writer.WriteLong(userId); writer.WriteFloat(loaded); writer.WriteFloat(ping); writer.WriteShort(unk2); writer.WriteShort(unk3); writer.WriteByte(unk4); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteFloat(position.X); writer.WriteFloat(position.Y); writer.WriteUInt(targetNetId); writer.WriteUInt(sourceNetId); writer.WriteByte((byte)pingType); writer.WriteByte(0xFB); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteByte(buffSlot); writer.WriteByte((byte)buffType); writer.WriteByte(count); writer.WriteBool(isHidden); writer.WriteUInt(buffNameHash); writer.WriteUInt(packageHash); writer.WriteFloat(runningTime); writer.WriteFloat(duration); writer.WriteUInt(casterNetId); }
public static void WriteWaypointSpeedParams(this LittleEndianWriter writer, SpeedParams data) { if (data == null) { data = new SpeedParams(); } writer.WriteFloat(data.PathSpeedOverride); writer.WriteFloat(data.ParabolicGravity); data.ParabolicStartPoint.Serialize(writer); writer.WriteBool(data.Facing); writer.WriteUInt(data.FollowNetID); writer.WriteFloat(data.FollowDistance); writer.WriteFloat(data.FollowBackDistance); writer.WriteFloat(data.FollowTravelTime); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteByte((byte)damageResult); writer.WriteShort((short)((short)damageType << 8)); writer.WriteFloat((float)value); writer.WriteUInt(targetNetId); writer.WriteUInt(sourceNetId); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteShort((short)1); // Number of dashes writer.WriteByte((byte)4); // Waypoints size * 2 writer.WriteUInt((uint)sourceNetId); writer.WriteFloat((float)dashSpeed); writer.WriteFloat((float)leapHeight); writer.WriteFloat((float)unitPosition.X); writer.WriteFloat((float)unitPosition.Y); writer.WriteByte((byte)(keepFacingLastDirection ? 0x01 : 0x00)); writer.WriteUInt(targetNetId); writer.WriteFloat((float)followTargetMaxDistance); writer.WriteFloat((float)backDistance); writer.WriteFloat((float)travelTime); var waypoints = new List <Vector2> { new Vector2(unitPosition.X, unitPosition.Y), new Vector2(targetPosition.X, targetPosition.Y) }; writer.WriteBytes(MovementVector.EncodeWaypoints(waypoints.ToArray(), mapSize)); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteUInt(netId); writer.WriteInt(playerId); writer.WriteByte(40); // net node id? writer.WriteByte(0); // botskilllevel if (team == TeamId.BLUE) { writer.WriteByte(1); } else { writer.WriteByte(0); } writer.WriteByte(0); // is bot writer.WriteByte(0); // spawn pos index writer.WriteInt(skinId); foreach (var b in Encoding.Default.GetBytes(name)) { writer.WriteByte((byte)b); } writer.Fill(0, 128 - name.Length); foreach (var b in Encoding.Default.GetBytes(championType)) { writer.WriteByte((byte)b); } writer.Fill(0, 40 - championType.Length); writer.WriteFloat(0.0f); writer.WriteFloat(0.0f); writer.WriteInt(0); writer.WriteByte(0); }
public override void Serialize(LittleEndianWriter writer) { Position.Serialize(writer); writer.WriteString(MinimapIcon, 64); writer.WriteByte(CampIndex); writer.WriteByte((byte)AudioVOComponentRevealEvent); writer.WriteByte((byte)TeamSide); writer.WriteInt(TimerType); writer.WriteFloat(Expire); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteInt(goldFromKill); // Gold from kill? writer.WriteByte((byte)0); writer.WriteUInt(killerNetId); writer.WriteByte((byte)0); writer.WriteByte((byte)7); writer.WriteFloat(respawnTimerMs); // Respawn timer, float }
public override void Serialize(LittleEndianWriter writer) { // Unk, if somebody figures out let @horato know writer.WriteByte(0x97); writer.WriteByte(0xD4); writer.WriteByte(0x00); writer.WriteByte(0x58); writer.WriteByte(0xD7); writer.WriteByte(0x17); writer.WriteByte(0x00); writer.WriteByte(0xCD); writer.WriteByte(0xED); writer.WriteByte(0x13); writer.WriteByte(0x01); writer.WriteByte(0xA0); writer.WriteByte(0x96); writer.WriteFloat(position.X); writer.WriteFloat(position.Y); // I think this coordinate is ignored writer.WriteFloat(position.Z); writer.WriteFloat(seconds); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteUInt(netId); writer.WriteByte((byte)netNodeId); position.Serialize(writer); groupPosition.Serialize(writer); faceDirectionPosition.Serialize(writer); writer.WriteString(name, 64); writer.WriteString(skinName, 64); writer.WriteString(uniqueName, 64); writer.WriteString(spawnAnimationName, 64); writer.WriteUInt((uint)teamId); writer.WriteInt(damageBonus); writer.WriteInt(healthBonus); writer.WriteUInt((uint)roamState); writer.WriteInt(groupNumber); writer.WriteInt(buffSide); writer.WriteInt(revealEvent); writer.WriteInt(initialLevel); writer.WriteFloat(spawnDuration); writer.WriteFloat(spawnTime); writer.WriteByte(BehaviorTree); writer.WriteFixedStringLast(AIScript, 32); }
public override void Serialize(LittleEndianWriter writer) { byte bitfield = 0; if (physical) { bitfield |= 1; } if (magical) { bitfield |= 2; } if (stopShieldFade) { bitfield |= 4; } writer.WriteByte(bitfield); writer.WriteFloat(amount); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteInt((int)teamId); writer.WriteByte((byte)0xFE); writer.WriteByte((byte)0xFF); writer.WriteByte((byte)0xFF); writer.WriteByte((byte)0xFF); writer.WriteInt((int)0); writer.WriteUInt((uint)unitNetId); // Fog Attached, when unit dies it disappears writer.WriteUInt((uint)fogNetId); //Fog NetID writer.WriteInt((int)0); writer.WriteFloat(position.X); writer.WriteFloat(position.Y); writer.WriteFloat((float)2500); writer.WriteFloat((float)88.4f); writer.WriteFloat((float)130); writer.WriteFloat((float)1.0f); writer.WriteInt((int)0); writer.WriteByte((byte)199); writer.WriteFloat(visionRadius); // vision radius }
private void Serialize2(LittleEndianWriter writer) { writer.WriteByte((byte)1); // number of particles writer.WriteUInt("Ezreal".HashString()); writer.WriteUInt("ezreal_bow.troy".HashString()); writer.WriteInt(0x00000020); // flags ? writer.WriteShort((short)0); // Unk writer.WriteUInt("L_HAND".HashString()); writer.WriteByte((byte)1); // number of targets ? writer.WriteUInt(netId); writer.WriteUInt(39439); // Particle net id ? writer.WriteUInt(netId); writer.WriteUInt(netId); writer.WriteInt(0); // unk for (var i = 0; i < 3; ++i) { var ownerHeight = 0; var particleHeight = 0; var higherValue = Math.Max(ownerHeight, particleHeight); writer.WriteShort((short)1); writer.WriteInt(higherValue); writer.WriteShort((short)1); } writer.WriteUInt((uint)0); // unk writer.WriteUInt((uint)0); // unk writer.WriteUInt((uint)0); // unk writer.WriteUInt((uint)0); // unk writer.WriteFloat(1.0f); // Particle size }
public override void Serialize(LittleEndianWriter writer) { writer.WriteByte(buffSlot); writer.WriteUInt(buffNameHash); writer.WriteFloat(runTimeRemove); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteFloat(time); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteShort(0); writer.WriteFloat(totalHealth); writer.WriteFloat(currentHealth); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteFloat(position.X); writer.WriteFloat(position.Y); writer.WriteFloat(0); // Z ? wtf? }
} //42-46 public void Serialize(LittleEndianWriter writer2) { byte[] buffer; using (var stream = new MemoryStream()) { using (var writer = new LittleEndianWriter(stream)) { writer.WriteUInt(SpellHash); writer.WriteUInt(SpellNetID); writer.WriteByte(SpellLevel); writer.WriteFloat(AttackSpeedModifier); writer.WriteUInt(CasterNetID); writer.WriteUInt(SpellChainOwnerNetID); writer.WriteUInt(PackageHash); writer.WriteUInt(MissileNetID); TargetPosition.Serialize(writer); TargetPositionEnd.Serialize(writer); int targetCount = Targets.Count; if (targetCount > 32) { throw new IOException("CastInfo targets > 32!!!"); } writer.WriteByte((byte)targetCount); foreach (var target in Targets) { writer.WriteUInt(target.Item1); writer.WriteByte((byte)target.Item2); } writer.WriteFloat(DesignerCastTime); writer.WriteFloat(ExtraCastTime); writer.WriteFloat(DesignerTotalTime); writer.WriteFloat(Cooldown); writer.WriteFloat(StartCastTime); byte bitfield = 0; if (IsAutoAttack) { bitfield |= 1; } if (IsSecondAutoAttack) { bitfield |= 2; } if (IsForceCastingOrChannel) { bitfield |= 4; } if (IsOverrideCastPosition) { bitfield |= 8; } if (IsClickCasted) { bitfield |= 16; } writer.WriteByte(bitfield); writer.WriteByte(SpellSlot); writer.WriteFloat(ManaCost); SpellCastLaunchPosition.Serialize(writer); writer.WriteInt(AmmoUsed); writer.WriteFloat(AmmoRechargeTime); } buffer = new byte[stream.Length]; var data = stream.GetBuffer(); Buffer.BlockCopy(data, 0, buffer, 0, buffer.Length); } writer2.WriteUShort((ushort)(buffer.Length + 2)); writer2.WriteBytes(buffer); }
public static void Serialize(this Vector3 vector3, LittleEndianWriter writer) { writer.WriteFloat(vector3.X); writer.WriteFloat(vector3.Z); writer.WriteFloat(vector3.Y); }
public void Serialize(LittleEndianWriter writer) { writer.WriteFloat(Magical); writer.WriteFloat(Physical); writer.WriteFloat(MagicalAndPhysical); }