示例#1
0
 static public BotEngine.EveOnline.Interface.MemoryStruct.ShipHitpointsAndEnergy AsOld(
     this IShipHitpointsAndEnergy shipHitpointsAndEnergy) =>
 shipHitpointsAndEnergy == null ? null :
 new BotEngine.EveOnline.Interface.MemoryStruct.ShipHitpointsAndEnergy
 {
     Shield    = shipHitpointsAndEnergy.Shield,
     Armor     = shipHitpointsAndEnergy.Armor,
     Struct    = shipHitpointsAndEnergy.Struct,
     Capacitor = shipHitpointsAndEnergy.Capacitor,
 };
示例#2
0
        static public bool EachComponentLessThenOrEqual(
            this IShipHitpointsAndEnergy o0,
            IShipHitpointsAndEnergy o1)
        {
            if (o0 == o1)
            {
                return(true);
            }

            if (null == o0 || null == o1)
            {
                return(false);
            }

            return
                (o0.Struct <= o1.Struct &&
                 o0.Armor <= o1.Armor &&
                 o0.Shield <= o1.Shield &&
                 o0.Capacitor <= o1.Capacitor);
        }
示例#3
0
 static public bool EveryComponentHasValue(this IShipHitpointsAndEnergy o) =>
 null == o ? false :
 (o.Struct.HasValue &&
  o.Armor.HasValue &&
  o.Shield.HasValue &&
  o.Capacitor.HasValue);