public TitleCard(uint cardGUID, CardView cardView, byte level, ObjectStats staticBuff, ObjectStats multiplyBuff) : base(cardGUID, cardView) { Level = level; StaticBuff = staticBuff; MultiplyBuff = multiplyBuff; }
public ShipConsumableCard(uint cardGUID, CardView cardView, ushort consumableType, ObjectStats itemBuffMultiply, ObjectStats itemBuffAdd, byte tier, AugmentActionType action, bool isAugment, bool autoConsume, bool trashable, uint buyCount, ConsumableAttribute[] sortingAttributes, ConsumableEffectType effectType) : base(cardGUID, cardView) { ConsumableType = consumableType; ItemBuffMultiply = itemBuffMultiply; ItemBuffAdd = itemBuffAdd; Tier = tier; Action = action; IsAugment = isAugment; AutoConsume = autoConsume; Trashable = trashable; this.buyCount = buyCount; this.sortingAttributes = sortingAttributes; this.effectType = effectType; }
public ShipCard(uint cardGUID, CardView cardView, uint shipObjectKey, byte level, byte maxLevel, byte levelRequeriment, byte hangarID, uint next, float durability, byte tier, ShipRole[] shipRoles, ShipRoleDeprecated shipRoleDeprecated, string paperdollUiLayoutfile, List <ShipSlotCard> slots, bool cubitOnlyRepair, List <uint> variantHangarIDs, int parentHangerID, ObjectStats stats, Faction faction, List <ShipImmutableSlot> immutableSlots) : base(cardGUID, cardView) { ShipObjectKey = shipObjectKey; Level = level; MaxLevel = maxLevel; LevelRequeriment = levelRequeriment; HangarID = hangarID; this.next = next; Durability = durability; Tier = tier; ShipRoles = shipRoles; ShipRoleDeprecated = shipRoleDeprecated; PaperdollUiLayoutfile = paperdollUiLayoutfile; Slots = slots; CubitOnlyRepair = cubitOnlyRepair; VariantHangarIDs = variantHangarIDs; ParentHangerID = parentHangerID; Stats = stats; Faction = faction; ImmutableSlots = immutableSlots; }
private void SyncMove(int index, SpaceEntityType spaceEntityType, uint objectId) { BgoProtocolWriter buffer = NewMessage(); buffer.Write((ushort)Reply.SyncMove); buffer.Write((uint)spaceEntityType + objectId); buffer.Write((int)1); // tick //position buffer.Write(new Vector3()); //euler3 buffer.Write(new Vector3()); //linearSpeed buffer.Write(new Vector3()); //strafeSpeed buffer.Write(new Vector3()); //euler3speed buffer.Write(new Vector3()); // mode buffer.Write((byte)2); buffer.Write((byte)8); buffer.Write(1); //qweasd buffer.Write(Server.GetClientByIndex(index).Character.qweasd); ObjectStats currentShipStats = ((ShipCard)Catalogue.FetchCard(Server.GetClientByIndex(index).Character.WorldCardGUID, CardView.Ship)).Stats; //gear buffer.Write((byte)0); //speed buffer.Write(Server.GetClientByIndex(index).Character.shipSpeed); //acceleration buffer.Write(currentShipStats.Acceleration); //inertiaCompensation buffer.Write(currentShipStats.InertiaCompensation); //pitchAcceleration buffer.Write(currentShipStats.PitchAcceleration); //pitchMaxSpeed buffer.Write(currentShipStats.PitchMaxSpeed); //yawAcceleration buffer.Write(currentShipStats.YawAcceleration); //yawMaxSpeed buffer.Write(currentShipStats.YawMaxSpeed); //rollAcceleration buffer.Write(currentShipStats.RollAcceleration); //rollMaxSpeed buffer.Write(currentShipStats.RollMaxSpeed); //strafeAcceleration buffer.Write(currentShipStats.StrafeAcceleration); //strafeMaxSpeed buffer.Write(currentShipStats.StrafeMaxSpeed); SendMessageToUser(index, buffer); }
public void SyncMove(int index, SpaceEntityType spaceEntityType, uint objectId) { Client c = Server.GetClientByIndex(index); c.lastSyncSendTime = DateTime.UtcNow; if (!c.Character.PlayerShip.isSpawned && c.Character.PlayerShip.MovementOptions.speed > 0) { c.Character.PlayerShip.isSpawned = true; c.Character.PlayerShip.ManeuverController.AddManeuver(new TurnManeuver(ManeuverType.Turn, Server.GetSectorById(c.Character.PlayerShip.sectorId).Tick.Current.value, c.Character.PlayerShip.qweasd, c.Character.PlayerShip.MovementOptions)); // Avoid problems with setting speed and not moving due to being at the rest maneuver } BgoProtocolWriter buffer = NewMessage(); buffer.Write((ushort)Reply.SyncMove); buffer.Write(objectId); Sector s = Server.GetSectorById(c.Character.PlayerShip.sectorId); buffer.Write(s.Tick.Current - 1); // tick c.Character.PlayerShip.MovementFrame.Write(buffer); //c.Character.ManeuverController.GetTickFrame(s.Tick.Current - 1).Write(buffer); Maneuver lastManeuverAtTick = c.Character.PlayerShip.ManeuverController.GetLastManeuverAtTick(s.Tick.Current); ManeuverType maneuverType = lastManeuverAtTick.ManeuverType; buffer.Write((byte)maneuverType); buffer.Write(lastManeuverAtTick.GetStartTick()); switch (maneuverType) { case ManeuverType.Rest: buffer.Write(c.Character.PlayerShip.MovementFrame.position); buffer.Write(c.Character.PlayerShip.MovementFrame.euler3); break; case ManeuverType.Turn: case ManeuverType.TurnQweasd: buffer.Write((byte)c.Character.PlayerShip.qweasd.Bitmask); break; case ManeuverType.Directional: case ManeuverType.DirectionalWithoutRoll: buffer.Write(c.Character.PlayerShip.direction); break; } ObjectStats currentShipStats = c.Character.PlayerShip.currentShipStats; //gear buffer.Write((byte)c.Character.PlayerShip.shipGear); //speed buffer.Write(c.Character.PlayerShip.shipGear == Gear.Regular ? c.Character.PlayerShip.shipSpeed : currentShipStats.BoostSpeed); //acceleration buffer.Write(currentShipStats.Acceleration); //inertiaCompensation buffer.Write(currentShipStats.InertiaCompensation); //pitchAcceleration buffer.Write(currentShipStats.PitchAcceleration); //pitchMaxSpeed buffer.Write(currentShipStats.PitchMaxSpeed); //yawAcceleration buffer.Write(currentShipStats.YawAcceleration); //yawMaxSpeed buffer.Write(currentShipStats.YawMaxSpeed); //rollAcceleration buffer.Write(currentShipStats.RollAcceleration); //rollMaxSpeed buffer.Write(currentShipStats.RollMaxSpeed); //strafeAcceleration buffer.Write(currentShipStats.StrafeAcceleration); //strafeMaxSpeed buffer.Write(currentShipStats.StrafeMaxSpeed); SendMessageToSector(index, buffer); }