protected override void ReadData(IPacketReader reader) { _position = reader.ReadPoint2D(); _vPosition = reader.ReadPoint2D(); base.ReadData(reader); }
protected override void ReadData(IPacketReader reader) { _position = reader.ReadPoint2D(); _vPosition = reader.ReadPoint2D(); _footholdID = reader.ReadShort(); if (Attribute == MoveFragmentAttribute.FallDown) { _fallStartFootholdID = reader.ReadShort(); } _offset = reader.ReadPoint2D(); base.ReadData(reader); }
protected override void ReadData(IPacketReader reader) { _position = reader.ReadPoint2D(); _footholdID = reader.ReadShort(); base.ReadData(reader); }
public void ReadFromPacket(IPacketReader reader) { _ = reader.ReadByte(); // FieldKey _ = reader.ReadInt(); // dr0 _ = reader.ReadInt(); // dr1 var attackInfo = reader.ReadByte(); DamagePerMob = attackInfo >> 0 & 0xF; MobCount = attackInfo >> 4 & 0xF; _ = reader.ReadInt(); // dr2 _ = reader.ReadInt(); // dr3 SkillID = reader.ReadInt(); _ = reader.ReadBool(); // unk _ = reader.ReadInt(); // dr rand _ = reader.ReadInt(); // crc _ = reader.ReadInt(); // skillLevel crc _ = reader.ReadInt(); // skillLevel crc Keydown = 0; // TODO keydownskill check - int keydown var skillFlags = reader.ReadByte(); IsFinalAfterSlashBlast = (skillFlags & 0x0) > 0; IsShadowPartner = (skillFlags & 8) > 0; IsSerialAttack = (skillFlags & 32) > 0; var actionInfo = reader.ReadShort(); Action = actionInfo & 0x7FFF; IsFacingLeft = (actionInfo >> 15 & 1) > 0; _ = reader.ReadInt(); // action crc? ActionType = reader.ReadByte(); ActionSpeed = reader.ReadByte(); ActionTime = reader.ReadInt(); Phase = reader.ReadInt(); // BattleMage? for (var i = 0; i < MobCount; i++) { Mobs.Add(reader.Read(new ClientAttackMobInfo(DamagePerMob))); } _ = reader.ReadPoint2D(); // unk // TODO grenade readpoint2d }
public void ReadFromPacket(IPacketReader reader) { _position = reader.ReadPoint2D(); _vPosition = reader.ReadPoint2D(); var size = reader.ReadByte(); for (var i = 0; i < size; i++) { var attribute = (MoveFragmentAttribute)reader.ReadByte(); switch (attribute) { case MoveFragmentAttribute.Normal: case MoveFragmentAttribute.HangOnBack: case MoveFragmentAttribute.FallDown: case MoveFragmentAttribute.Wings: case MoveFragmentAttribute.MobAttackRush: case MoveFragmentAttribute.MobAttackRushStop: _fragments.Add(new NormalMoveFragment(attribute, reader)); break; case MoveFragmentAttribute.Jump: case MoveFragmentAttribute.Impact: case MoveFragmentAttribute.StartWings: case MoveFragmentAttribute.MobToss: case MoveFragmentAttribute.DashSlide: case MoveFragmentAttribute.MobLadder: case MoveFragmentAttribute.MobRightAngle: case MoveFragmentAttribute.MobStopNodeStart: case MoveFragmentAttribute.MobBeforeNode: _fragments.Add(new JumpMoveFragment(attribute, reader)); break; case MoveFragmentAttribute.FlashJump: case MoveFragmentAttribute.RocketBooster: case MoveFragmentAttribute.BackStepShot: case MoveFragmentAttribute.MobPowerKnockBack: case MoveFragmentAttribute.VerticalJump: case MoveFragmentAttribute.CustomImpact: case MoveFragmentAttribute.CombatStep: case MoveFragmentAttribute.Hit: case MoveFragmentAttribute.TimeBombAttack: case MoveFragmentAttribute.SnowballTouch: case MoveFragmentAttribute.BuffZoneEffect: _fragments.Add(new ActionMoveFragment(attribute, reader)); break; case MoveFragmentAttribute.Immediate: case MoveFragmentAttribute.Teleport: case MoveFragmentAttribute.Assaulter: case MoveFragmentAttribute.Assassination: case MoveFragmentAttribute.Rush: case MoveFragmentAttribute.SitDown: _fragments.Add(new TeleportMoveFragment(attribute, reader)); break; case MoveFragmentAttribute.StartFallDown: _fragments.Add(new StartFallDownMoveFragment(attribute, reader)); break; case MoveFragmentAttribute.FlyingBlock: _fragments.Add(new FlyingBlockMoveFragment(attribute, reader)); break; case MoveFragmentAttribute.StatChange: _fragments.Add(new StatChangeMoveFragment(attribute, reader)); break; } } _fragments.ForEach(f => f.Apply(this)); }