Exemple #1
0
 public IPower GetPower()
 {
     if (this._power == null)
     {
         this._power = DatabaseAPI.GetPowerByName("Boosts." + this.UID + "." + this.UID);
     }
     return(this._power);
 }
        static clsUniversalImport.SetPair FindPower(string iName, int nAT)
        {
            IPowerset[] powersetIndexes2 = new IPowerset[2];
            clsUniversalImport.SetPair setPair3;
            if (MidsContext.Character != null)
            {
                powersetIndexes2[0] = MidsContext.Character.Powersets[0];
                powersetIndexes2[1] = MidsContext.Character.Powersets[1];
                clsUniversalImport.SetPair setPair2 = clsUniversalImport.ScanSetArray(iName, powersetIndexes2);
                if (setPair2.Powerset > -1)
                {
                    setPair3 = setPair2;
                    return(setPair3);
                }
            }
            int powerByName = DatabaseAPI.GetPowerByName(iName, nAT);

            if (powerByName < 0)
            {
                powerByName = DatabaseAPI.GetPowerByName(iName.Replace("'", ""), nAT);
            }
            if (powerByName > -1)
            {
                setPair3 = new clsUniversalImport.SetPair(DatabaseAPI.Database.Power[powerByName].PowerSetID, DatabaseAPI.Database.Power[powerByName].PowerSetIndex);
            }
            else
            {
                powersetIndexes2 = DatabaseAPI.GetPowersetIndexes(nAT, Enums.ePowerSetType.Ancillary);
                clsUniversalImport.SetPair setPair2 = clsUniversalImport.ScanSetArray(iName, powersetIndexes2);
                if (setPair2.Powerset > -1)
                {
                    setPair3 = setPair2;
                }
                else
                {
                    powersetIndexes2 = DatabaseAPI.GetPowersetIndexes(nAT, Enums.ePowerSetType.Pool);
                    setPair2         = clsUniversalImport.ScanSetArray(iName, powersetIndexes2);
                    if (setPair2.Powerset > -1)
                    {
                        setPair3 = setPair2;
                    }
                    else
                    {
                        setPair3 = new clsUniversalImport.SetPair(-1, -1);
                    }
                }
            }
            return(setPair3);
        }
Exemple #3
0
        static SetPair FindPower(string iName, int nAT)
        {
            IPowerset[] sets = new IPowerset[2];
            if (MidsContext.Character != null)
            {
                sets[0] = MidsContext.Character.Powersets[0];
                sets[1] = MidsContext.Character.Powersets[1];
                SetPair setPair = ScanSetArray(iName, sets);
                if (setPair.Powerset > -1)
                {
                    return(setPair);
                }
            }

            int powerByName = DatabaseAPI.GetPowerByName(iName, nAT);

            if (powerByName < 0)
            {
                powerByName = DatabaseAPI.GetPowerByName(iName.Replace("'", ""), nAT);
            }
            if (powerByName > -1)
            {
                return(new SetPair(DatabaseAPI.Database.Power[powerByName].PowerSetID, DatabaseAPI.Database.Power[powerByName].PowerSetIndex));
            }

            IPowerset[] powersetIndexes1 = DatabaseAPI.GetPowersetIndexes(nAT, Enums.ePowerSetType.Ancillary);
            SetPair     setPair2         = ScanSetArray(iName, powersetIndexes1);

            if (setPair2.Powerset > -1)
            {
                return(setPair2);
            }

            IPowerset[] powersetIndexes2 = DatabaseAPI.GetPowersetIndexes(nAT, Enums.ePowerSetType.Pool);
            setPair2 = ScanSetArray(iName, powersetIndexes2);
            return(setPair2.Powerset <= -1 ? new SetPair(-1, -1) : setPair2);
        }
Exemple #4
0
 public IPower GetPower()
 {
     return(_power ?? (_power = DatabaseAPI.GetPowerByName("Boosts." + UID + "." + UID)));
 }