示例#1
0
文件: Biome.cs 项目: Etabli/DA-GAME
    /// <summary>
    ///
    /// </summary>
    /// <param name="possItemType"></param>
    void FillSpawnableItems(List <ItemBaseType> possItemType)
    {
        //Debug.LogWarning("Biome::FillSpwanableItems - Currently uses items of all types wihtoug checking for tier");

        //List<ResourceType> ResourceForThisTier = new List<ResourceType>();
        //= ResourceInfo.GetResourcesForTier(Tier, possEnemyTpye);

        System.Random rng = new System.Random((int)System.DateTime.Now.Ticks);

        //TODO: USE enmeies for this tier not poss enemies
        if (WorldController.Instance.ItemVariatyPerBiome >= possItemType.Count)
        {
            SpawnableItems = possItemType;
            return;
        }

        while (SpawnableResource.Count < WorldController.Instance.ItemVariatyPerBiome)
        {
            //TODO: Use enmeiesFor this tier not poss enemis.
            ItemBaseType type = possItemType[rng.Next(possItemType.Count)];
            if (!SpawnableItems.Contains(type))
            {
                SpawnableItems.Add(type);
            }
        }
    }
示例#2
0
        public CacheBalance(CacheItem item)
        {
            try
            {
                BalanceID     = item.ref_DiaItem.CommonData.GameBalanceId;
                _itemLevel    = item.ref_DiaItem.CommonData.Level;
                _type         = item.ref_DiaItem.CommonData.ItemType;
                _base         = item.ref_DiaItem.CommonData.ItemBaseType;
                _followerType = item.ref_DiaItem.CommonData.FollowerSpecialType;

                _pluginType = ItemFunc.DetermineItemType(item.InternalName, _type, _followerType, item.SNOID);
                if (item.ItemDropType.HasValue)
                {
                    _pluginBase = ItemFunc.DetermineBaseItemType(item.ItemDropType.Value);
                }
                else
                {
                    _pluginBase = ItemFunc.DetermineBaseItemType(item.InternalName, item.SNOID);
                }

                _isStackable = ItemFunc.DetermineIsStackable(_pluginType, item.SNOID);

                if (!_isStackable)
                {
                    _isTwoSlot = ItemFunc.DetermineIsTwoSlot(_pluginType);
                }
            }
            catch (Exception ex)
            {
                Logger.Write(LogLevel.Items,
                             String.Format("Failed to create balance data for item {0}", item.DebugStringSimple));
            }
        }
示例#3
0
        /// <summary>
        /// validates currency type units.  assumes three valid signals: price and priceRelative with units of curencyType, and
        /// priceMultiplier with no units
        /// </summary>
        /// <param name="signalType"></param>
        /// <param name="units"></param>
        /// <param name="currencyDescriptonType"></param>
        public static void validateUnits(SignalTypeEnumeratedType signalType, ItemBaseType units, currencyItemDescriptionType currencyDescriptonType)
        {
            if (signalType == SignalTypeEnumeratedType.price || signalType == SignalTypeEnumeratedType.priceRelative)
            {
                // the class could be currencyType, or a sub class currencyPerKWh, currencyPerKW type
                if (units.GetType().BaseType != typeof(currencyType) && units.GetType() != typeof(currencyType))
                {
                    throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_UNITS);
                }

                currencyType c = (currencyType)units;

                if (c.itemDescription != currencyDescriptonType)
                {
                    throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_UNITS);
                }

                return;
            }

            if (signalType == SignalTypeEnumeratedType.priceMultiplier)
            {
                if (units != null)
                {
                    throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_UNITS);
                }

                return;
            }

            throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_TYPE);
        }
示例#4
0
 public ItemBase(ItemBaseType baseType, ItemClass itemClass, AffixType[] baseAffixs, AffixType[] guaranteedAffixes, AffixPool affixPool)
 {
     BaseType = baseType;
     Class = itemClass;
     BaseAffixes = baseAffixs.Clone() as AffixType[];
     GuaranteedAffixes = guaranteedAffixes.Clone() as AffixType[];
     PossibleAffixes = affixPool;
 }
示例#5
0
 public Item(string name, int tier, int quality, ItemBaseType baseType, ItemBase itemBase)
 {
     Name          = name;
     Tier          = tier;
     Quality       = quality;
     BaseType      = baseType;
     this.itemBase = itemBase;
 }
示例#6
0
 public CacheBalance(int itemlevel, ItemType itemtype, ItemBaseType itembasetype, bool onehand, bool twohand, FollowerType followertype)
 {
     iThisItemLevel=itemlevel;
              thisItemType=itemtype;
              bThisOneHand=onehand;
              bThisTwoHand=twohand;
              thisItemBaseType=itembasetype;
              thisFollowerType=followertype;
              bNeedsUpdated=false;
 }
示例#7
0
 public CacheBalance(int balanceID, int itemlevel, ItemType itemtype, ItemBaseType itembasetype, bool onehand, bool twohand, FollowerType followertype)
 {
     iThisBalanceID   = balanceID;
     iThisItemLevel   = itemlevel;
     thisItemType     = itemtype;
     bThisOneHand     = onehand;
     bThisTwoHand     = twohand;
     thisItemBaseType = itembasetype;
     thisFollowerType = followertype;
     bNeedsUpdated    = false;
 }
示例#8
0
        /******************************************************************************/

        public override void validateUnits(SignalTypeEnumeratedType signalType, ItemBaseType units)
        {
            if (signalType != SignalTypeEnumeratedType.level)
            {
                throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_TYPE);
            }

            if (units != null)
            {
                throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_UNITS);
            }
        }
        /// <summary>
        /// Initializes variable set for single object refresh
        /// </summary>
        private static void RefreshStepInit(out bool AddTocache)
        {
            CurrentCacheObject = new TrinityCacheObject();
            AddTocache         = true;
            // Start this object as off as unknown type
            CurrentCacheObject.Type = GObjectType.Unknown;

            CurrentCacheObject.Distance = 0f;
            CurrentCacheObject.Radius   = 0f;
            c_ZDiff           = 0f;
            c_ItemDisplayName = "";
            c_ItemLink        = "";
            CurrentCacheObject.InternalName = "";
            c_IgnoreReason                   = "";
            c_IgnoreSubStep                  = "";
            CurrentCacheObject.ACDGuid       = -1;
            CurrentCacheObject.RActorGuid    = -1;
            CurrentCacheObject.DynamicID     = -1;
            CurrentCacheObject.GameBalanceID = -1;
            CurrentCacheObject.ActorSNO      = -1;
            c_ItemLevel             = -1;
            c_GoldStackSize         = -1;
            c_HitPointsPct          = -1;
            c_HitPoints             = -1;
            c_IsOneHandedItem       = false;
            c_IsTwoHandedItem       = false;
            c_unit_IsElite          = false;
            c_unit_IsRare           = false;
            c_unit_IsUnique         = false;
            c_unit_IsMinion         = false;
            c_unit_IsTreasureGoblin = false;
            c_unit_IsAttackable     = false;
            c_unit_HasShieldAffix   = false;
            c_IsEliteRareUnique     = false;
            c_IsObstacle            = false;
            c_HasBeenNavigable      = false;
            c_HasBeenRaycastable    = false;
            c_HasBeenInLoS          = false;
            c_ItemMd5Hash           = string.Empty;
            c_ItemQuality           = ItemQuality.Invalid;
            c_DBItemBaseType        = ItemBaseType.None;
            c_DBItemType            = ItemType.Unknown;
            c_item_tFollowerType    = FollowerType.None;
            c_item_GItemType        = GItemType.Unknown;
            c_unit_MonsterSize      = MonsterSize.Unknown;
            c_diaObject             = null;
            c_CurrentAnimation      = SNOAnim.Invalid;
            c_HasDotDPS             = false;
            c_MonsterAffixes        = MonsterAffixes.None;
            c_IsFacingPlayer        = false;
            c_Rotation        = 0f;
            c_DirectionVector = Vector2.Zero;
        }
示例#10
0
        /**********************************************************/

        public override void validateUnits(SignalTypeEnumeratedType signalType, ItemBaseType units)
        {
            if (signalType == SignalTypeEnumeratedType.setpoint)
            {
                if (units.GetType().BaseType != typeof(EnergyItemType))
                {
                    throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_UNITS);
                }

                return;
            }

            throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_TYPE);
        }
示例#11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ContentItemType"/> class.
        /// </summary>
        /// <param name="typeGuid">The type GUID.</param>
        /// <param name="typeID">The type ID.</param>
        /// <param name="title">The title.</param>
        /// <param name="description">The description.</param>
        /// <param name="xmlSettings">The XML settings.</param>
        /// <param name="baseType">Type of the base.</param>
        public ItemType(Guid typeGuid, int typeID, string title, string description, string xmlSettings, int baseType)
        {
            LoadItemByGUID();

            _itemBaseType = (ItemBaseType)baseType;

            FetchTypeSettings(xmlSettings);
            // TODO: Convert settings to list, and clear xml document.

            _typeID      = typeID;
            _typeGUID    = typeGuid;
            _title       = title;
            _description = description;
        }
        /**********************************************************/

        public override void validateUnits(SignalTypeEnumeratedType signalType, ItemBaseType units)
        {
            if (signalType == SignalTypeEnumeratedType.xloadControlCapacity || signalType == SignalTypeEnumeratedType.xloadControlLevelOffset ||
                signalType == SignalTypeEnumeratedType.xloadControlPercentOffset || signalType == SignalTypeEnumeratedType.xloadControlSetpoint)
            {
                if (units != null)
                {
                    throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_UNITS);
                }

                return;
            }

            throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_TYPE);
        }
示例#13
0
 public PickupItem(string name, string internalName, int level, ItemQuality quality, int balanceId, ItemBaseType dbItemBaseType,
                   ItemType dbItemType, bool isOneHand, bool isTwoHand, FollowerType followerType, int acdGuid, int dynamicID = 0)
 {
     Name             = name;
     InternalName     = Trinity.NameNumberTrimRegex.Replace(internalName, "");
     Level            = level;
     Quality          = quality;
     BalanceID        = balanceId;
     DBBaseType       = dbItemBaseType;
     DBItemType       = dbItemType;
     IsOneHand        = isOneHand;
     IsTwoHand        = isTwoHand;
     ItemFollowerType = followerType;
     ACDGuid          = acdGuid;
     DynamicID        = dynamicID;
     WorldId          = Trinity.Player.WorldID;
 }
示例#14
0
 public PickupItem(string name, string internalName, int level, ItemQuality quality, int balanceId, ItemBaseType dbItemBaseType, 
     ItemType dbItemType, bool isOneHand, bool isTwoHand, FollowerType followerType, int acdGuid, int dynamicID = 0)
 {
     Name = name;
     InternalName = Trinity.NameNumberTrimRegex.Replace(internalName, "");
     Level = level;
     Quality = quality;
     BalanceID = balanceId;
     DBBaseType = dbItemBaseType;
     DBItemType = dbItemType;
     IsOneHand = isOneHand;
     IsTwoHand = isTwoHand;
     ItemFollowerType = followerType;
     ACDGuid = acdGuid;
     DynamicID = dynamicID;
     WorldId = Trinity.Player.WorldID;
 }
示例#15
0
        /******************************************************************************/

        public void testItemBase(ItemBaseType itemBase)
        {
            eiEventSignalType signal = new eiEventSignalType();

            signal.itemBase = itemBase;

            string xml = SerializeOadrObject.serializeOjbect(signal, signal.GetType());

            // by default, the itemBase substitution parameters are generated with a root element of 'itemBase'
            // hand made modifications to oadr20b.cs fix this problem
            Assert.IsFalse(xml.Contains("itemBase"));

            Console.Out.WriteLine(xml);

            signal = (eiEventSignalType)SerializeOadrObject.deserializeObject(xml, typeof(eiEventSignalType));

            Assert.IsNotNull(signal, xml);
            Assert.IsNotNull(signal.itemBase, xml);
        }
        private void SaveNewBaseType(string itemBaseType)
        {
            bool isBaseTypeInDb = _context.BaseTypes.Select(i => i.Name).Contains(itemBaseType);

            if (!isBaseTypeInDb)
            {
                ItemBaseType newBaseType = new ItemBaseType();
                newBaseType.Name = itemBaseType.ToString();
                try
                {
                    _context.BaseTypes.Add(newBaseType);
                    _context.SaveChanges();
                }
                catch (Exception e)
                {
                    LogError(e);
                }
            }
        }
示例#17
0
        /**********************************************************/

        public override void validateUnits(SignalTypeEnumeratedType signalType, ItemBaseType units)
        {
            if (signalType == SignalTypeEnumeratedType.price)
            {
                if (units.GetType() != typeof(currencyType))
                {
                    throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_UNITS);
                }

                currencyType c = (currencyType)units;

                if (c.itemDescription != currencyItemDescriptionType.currency)
                {
                    throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_UNITS);
                }

                return;
            }

            throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_TYPE);
        }
示例#18
0
        /**********************************************************/

        public override void validateUnits(SignalTypeEnumeratedType signalType, ItemBaseType units)
        {
            if (signalType == SignalTypeEnumeratedType.setpoint || signalType == SignalTypeEnumeratedType.delta || signalType == SignalTypeEnumeratedType.level)
            {
                if (units.GetType().BaseType != typeof(PowerItemType))
                {
                    throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_UNITS);
                }

                return;
            }

            if (signalType == SignalTypeEnumeratedType.multiplier)
            {
                if (units != null)
                {
                    throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_UNITS);
                }

                return;
            }

            throw new ExceptionInvalidSignal(ExceptionInvalidSignal.INVALID_TYPE);
        }
示例#19
0
 public AmmoBase(ItemBaseType baseType, AffixType[] baseAffixes, AffixType[] guaranteedAffixes, AmmoClass ammoClass, AffixPoolPreset affixPoolPreset)
     : base(baseType, ItemClass.Ammo, baseAffixes, guaranteedAffixes, AffixPool.GetPool(affixPoolPreset))
 { }
        /******************************************************************************/

        public override void validateUnits(SignalTypeEnumeratedType signalType, ItemBaseType units)
        {
            ValidateUnits.validateUnits(signalType, units, currencyItemDescriptionType.currencyPerKWh);
        }
示例#21
0
        /**********************************************************/

        public void addDescription(string rID, string resourceID, ReportEnumeratedType reportType, ReadingTypeEnumeratedType readingType,
                                   string marketContext, int minSamplingPeriod, int maxSamplingPeriod, bool onChange, DurationModifier durationModifier, ItemBaseType measuredValue = null)
        {
            oadrReportDescriptionType reportDescription = new oadrReportDescriptionType();

            reportDescription.rID = rID;
            reportDescription.reportDataSource               = new EiTargetType();
            reportDescription.reportDataSource.resourceID    = new string[1];
            reportDescription.reportDataSource.resourceID[0] = resourceID;

            reportDescription.reportType    = reportType;
            reportDescription.readingType   = readingType;
            reportDescription.marketContext = marketContext;

            reportDescription.oadrSamplingRate = new oadrSamplingRateType();
            reportDescription.oadrSamplingRate.oadrMaxPeriod = "PT" + maxSamplingPeriod.ToString() + durationModifier.Value;
            reportDescription.oadrSamplingRate.oadrMinPeriod = "PT" + minSamplingPeriod.ToString() + durationModifier.Value;

            reportDescription.oadrSamplingRate.oadrOnChange = onChange;

            reportDescription.itemBase = measuredValue;

            m_reportDescriptions.Add(rID, reportDescription);
        }
示例#22
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ContentItemType"/> class.
        /// </summary>
        /// <param name="typeGuid">The type GUID.</param>
        /// <param name="title">The title.</param>
        /// <param name="description">The description.</param>
        /// <param name="xmlSettings">The XML settings.</param>
        /// <param name="baseType">Type of the base.</param>
        public ItemType(Guid typeGuid, string title, string description, string xmlSettings, int baseType)
        {
            _typeGUID = typeGuid;
            LoadItemByGUID();

            _itemBaseType = (ItemBaseType)baseType;

            FetchTypeSettings(xmlSettings);
            // TODO: Convert settings to list, and clear xml document.

            //_typeID = typeID;

            _title = title;
            _description = description;
        }
示例#23
0
        /**********************************************************/

        public abstract void validateUnits(SignalTypeEnumeratedType signalType, ItemBaseType units);
示例#24
0
 public ItemBase(ItemBaseType baseType, ItemClass itemClass, AffixType[] baseAffixes, AffixType[] guaranteedAffixes, AffixPoolPreset affixPoolPreset)
     : this(baseType, itemClass, baseAffixes, guaranteedAffixes, AffixPool.GetPool(affixPoolPreset))
 { }
示例#25
0
 public PickupItem(string Name, string internalName, int level, ItemQuality quality, int balanceId, ItemBaseType dbItemBaseType, ItemType dbItemType, bool isOneHand, bool isTwoHand, FollowerType followerType, int dynamicID = 0)
 {
     this.Name             = Name;
     this.InternalName     = internalName;
     this.Level            = level;
     this.Quality          = quality;
     this.BalanceID        = balanceId;
     this.DBBaseType       = dbItemBaseType;
     this.DBItemType       = dbItemType;
     this.IsOneHand        = IsOneHand;
     this.IsTwoHand        = IsTwoHand;
     this.ItemFollowerType = followerType;
     this.DynamicID        = dynamicID;
 }
示例#26
0
 public ArmorBase(ItemBaseType baseType, AffixType[] baseAffixes, AffixType[] guaranteedAffixes, Slot[] slots, AffixPool affixPool)
     : base(baseType, ItemClass.Armor, baseAffixes, guaranteedAffixes, affixPool)
 {
     Slots = slots.Clone() as Slot[];
 }
示例#27
0
文件: Weapon.cs 项目: Etabli/DA-GAME
 public Weapon(string name, int tier, int quality, ItemBaseType baseType, ItemBase itemBase) : base(name, tier, quality, baseType, itemBase)
 {
     AmmoQueue = new List <Ammo>();
 }
示例#28
0
文件: Ammo.cs 项目: Etabli/DA-GAME
 public Ammo(string name, int tier, int quality, ItemBaseType baseType, ItemBase itemBase) : base(name, tier, quality, baseType, itemBase)
 {
 }
示例#29
0
 /// <summary>
 /// Initializes variable set for single object refresh
 /// </summary>
 private static void RefreshStepInit()
 {
     CurrentCacheObject = new TrinityCacheObject();
     // Start this object as off as unknown type
     CurrentCacheObject.Type = TrinityObjectType.Unknown;
     CurrentCacheObject.GizmoType = GizmoType.None;
     CurrentCacheObject.Distance = 0f;
     CurrentCacheObject.Radius = 0f;
     c_ZDiff = 0f;
     c_ItemDisplayName = "";
     c_ItemLink = "";
     CurrentCacheObject.InternalName = "";
     c_IgnoreReason = "";
     c_IgnoreSubStep = "";
     CurrentCacheObject.ACDGuid = -1;
     CurrentCacheObject.RActorGuid = -1;
     CurrentCacheObject.DynamicID = -1;
     CurrentCacheObject.GameBalanceID = -1;
     CurrentCacheObject.ActorSNO = -1;
     c_ItemLevel = -1;
     c_GoldStackSize = -1;
     c_HitPointsPct = -1;
     c_HitPoints = -1;
     c_IsOneHandedItem = false;
     c_IsTwoHandedItem = false;
     c_unit_IsElite = false;
     c_unit_IsRare = false;
     c_unit_IsUnique = false;
     c_unit_IsMinion = false;
     c_unit_IsTreasureGoblin = false;
     c_unit_IsAttackable = false;
     c_unit_HasShieldAffix = false;
     c_IsEliteRareUnique = false;
     c_IsObstacle = false;
     c_HasBeenNavigable = false;
     c_HasBeenRaycastable = false;
     c_HasBeenInLoS = false;
     c_ItemMd5Hash = string.Empty;
     c_ItemQuality = ItemQuality.Invalid;
     c_DBItemBaseType = ItemBaseType.None;
     c_DBItemType = ItemType.Unknown;
     c_item_tFollowerType = FollowerType.None;
     _cItemTinityItemType = TrinityItemType.Unknown;
     c_unit_MonsterSize = MonsterSize.Unknown;
     c_diaObject = null;
     c_diaGizmo = null;
     c_CurrentAnimation = SNOAnim.Invalid;
     c_HasDotDPS = false;
     c_MonsterAffixes = MonsterAffixes.None;
 }
示例#30
0
        public CacheBalance(CacheItem item)
        {
            try
            {
                BalanceID = item.ref_DiaItem.CommonData.GameBalanceId;
                _itemLevel = item.ref_DiaItem.CommonData.Level;
                _type = item.ref_DiaItem.CommonData.ItemType;
                _base = item.ref_DiaItem.CommonData.ItemBaseType;
                _followerType = item.ref_DiaItem.CommonData.FollowerSpecialType;

                _pluginType = ItemFunc.DetermineItemType(item.InternalName, _type, _followerType, item.SNOID);
                if (item.ItemDropType.HasValue)
                    _pluginBase = ItemFunc.DetermineBaseItemType(item.ItemDropType.Value);
                else
                    _pluginBase = ItemFunc.DetermineBaseItemType(item.InternalName, item.SNOID);

                _isStackable = ItemFunc.DetermineIsStackable(_pluginType, item.SNOID);

                if (!_isStackable)
                    _isTwoSlot = ItemFunc.DetermineIsTwoSlot(_pluginType);
            }
            catch (Exception ex)
            {
                Logger.Write(LogLevel.Items,
                    String.Format("Failed to create balance data for item {0}", item.DebugStringSimple));

            }
        }
示例#31
0
        public CachedACDItem(
            ACDItem acdItem,
            string internalName,
            string realName,
            int level,
            ItemQuality quality,
            int goldAmount,
            int balanceId,
            int dynamicId,
            float dps,
            bool oneHanded,
            bool twoHanded,
            DyeType dyeType,
            ItemType itemType,
            ItemBaseType itembasetype,
            FollowerType followerType,
            bool unidentified,
            int stackQuantity,
            ItemStats itemStats)
        {
            AcdItem           = acdItem;
            InternalName      = internalName;
            RealName          = realName;
            Level             = level;
            Quality           = quality;
            GoldAmount        = goldAmount;
            BalanceID         = balanceId;
            DynamicID         = dynamicId;
            WeaponDPS         = dps;
            OneHanded         = oneHanded;
            TwoHanded         = twoHanded;
            DyeType           = dyeType;
            DBItemType        = itemType;
            DBBaseType        = itembasetype;
            FollowerType      = followerType;
            IsUnidentified    = unidentified;
            ItemStackQuantity = stackQuantity;

            Dexterity                      = itemStats.Dexterity;
            Intelligence                   = itemStats.Intelligence;
            Strength                       = itemStats.Strength;
            Vitality                       = itemStats.Vitality;
            LifePercent                    = itemStats.LifePercent;
            LifeOnHit                      = itemStats.LifeOnHit;
            LifeSteal                      = itemStats.LifeSteal;
            HealthPerSecond                = itemStats.HealthPerSecond;
            MagicFind                      = itemStats.MagicFind;
            GoldFind                       = itemStats.GoldFind;
            MovementSpeed                  = itemStats.MovementSpeed;
            PickUpRadius                   = itemStats.PickUpRadius;
            Sockets                        = itemStats.Sockets;
            CritPercent                    = itemStats.CritPercent;
            CritDamagePercent              = itemStats.CritDamagePercent;
            AttackSpeedPercent             = itemStats.AttackSpeedPercent;
            MinDamage                      = itemStats.MinDamage;
            MaxDamage                      = itemStats.MaxDamage;
            BlockChance                    = itemStats.BlockChance;
            Thorns                         = itemStats.Thorns;
            ResistAll                      = itemStats.ResistAll;
            ResistArcane                   = itemStats.ResistArcane;
            ResistCold                     = itemStats.ResistCold;
            ResistFire                     = itemStats.ResistFire;
            ResistHoly                     = itemStats.ResistHoly;
            ResistLightning                = itemStats.ResistLightning;
            ResistPhysical                 = itemStats.ResistPhysical;
            ResistPoison                   = itemStats.ResistPoison;
            WeaponDamagePerSecond          = itemStats.WeaponDamagePerSecond;
            ArmorBonus                     = itemStats.ArmorBonus;
            MaxDiscipline                  = itemStats.MaxDiscipline;
            MaxMana                        = itemStats.MaxMana;
            ArcaneOnCrit                   = itemStats.ArcaneOnCrit;
            ManaRegen                      = itemStats.ManaRegen;
            GlobeBonus                     = itemStats.HealthGlobeBonus;
            HatredRegen                    = itemStats.HatredRegen;
            MaxFury                        = itemStats.MaxFury;
            SpiritRegen                    = itemStats.SpiritRegen;
            MaxSpirit                      = itemStats.MaxSpirit;
            HealthPerSpiritSpent           = itemStats.HealthPerSpiritSpent;
            MaxArcanePower                 = itemStats.MaxArcanePower;
            DamageReductionPhysicalPercent = itemStats.DamageReductionPhysicalPercent;
            ArmorTotal                     = itemStats.ArmorTotal;
            Armor = itemStats.Armor;
            //FireDamagePercent = itemStats.FireDamagePercent;
            //LightningDamagePercent = itemStats.LightningDamagePercent;
            //ColdDamagePercent = itemStats.ColdDamagePercent;
            //PoisonDamagePercent = itemStats.PoisonDamagePercent;
            //ArcaneDamagePercent = itemStats.ArcaneDamagePercent;
            //HolyDamagePercent = itemStats.HolyDamagePercent;
            HealthGlobeBonus       = itemStats.HealthGlobeBonus;
            WeaponAttacksPerSecond = itemStats.WeaponAttacksPerSecond;
            WeaponMaxDamage        = itemStats.WeaponMaxDamage;
            WeaponMinDamage        = itemStats.WeaponMinDamage;

            TrinityItemType     = Trinity.DetermineItemType(internalName, itemType, followerType);
            TrinityItemBaseType = Trinity.DetermineBaseType(TrinityItemType);

            ComputeUpgrade();
        }
示例#32
0
 public AmmoBase(ItemBaseType baseType, AffixType[] baseAffixes, AffixType[] guaranteedAffixes, AmmoClass ammoClass, AffixPool affixPool)
     : base(baseType, ItemClass.Ammo, baseAffixes, guaranteedAffixes, affixPool)
 {
     AmmoClass = ammoClass;
 }
示例#33
0
        /**********************************************************/

        public void addDescription(string reportSpecifierID, string rID, string resourceID, ReportEnumeratedType reportType, ReadingTypeEnumeratedType readingType,
                                   string marketContext, int minSamplingPeriod, int maxSamplingPeriod, bool onChange, DurationModifier durationModifier, ItemBaseType measuredValue = null)
        {
            oadrReportDescriptionType reportDescription = new oadrReportDescriptionType();

            reportDescription.rID = rID;
            reportDescription.reportDataSource               = new EiTargetType();
            reportDescription.reportDataSource.resourceID    = new string[1];
            reportDescription.reportDataSource.resourceID[0] = resourceID;

            reportDescription.reportType    = reportType;
            reportDescription.readingType   = readingType;
            reportDescription.marketContext = marketContext;

            reportDescription.oadrSamplingRate = new oadrSamplingRateType();
            reportDescription.oadrSamplingRate.oadrMaxPeriod = "PT" + maxSamplingPeriod.ToString() + durationModifier.Value;
            reportDescription.oadrSamplingRate.oadrMinPeriod = "PT" + minSamplingPeriod.ToString() + durationModifier.Value;

            reportDescription.oadrSamplingRate.oadrOnChange = onChange;

            Dictionary <string, oadrReportDescriptionType> reportDescriptions = (_reportDescriptions.ContainsKey(reportSpecifierID) ? _reportDescriptions[reportSpecifierID] : null);

            if (reportDescriptions == null)
            {
                reportDescriptions = new Dictionary <string, oadrReportDescriptionType>();
                _reportDescriptions[reportSpecifierID] = reportDescriptions;
            }

            reportDescription.itemBase = measuredValue;

            reportDescriptions[rID] = reportDescription;
        }
示例#34
0
 public ArmorBase(ItemBaseType baseType, AffixType[] baseAffixes, AffixType[] guaranteedAffixes, Slot[] slots, AffixPoolPreset affixPoolPreset)
     : base(baseType, ItemClass.Armor, baseAffixes, guaranteedAffixes, AffixPool.GetPool(affixPoolPreset))
 { }
示例#35
0
 /// <summary>Return the score needed to keep something by the item type</summary>
 internal static double ScoreNeeded(ItemBaseType itemBaseType)
 {
     switch (itemBaseType)
     {
         case ItemBaseType.Weapon:
             return Math.Round((double)Trinity.Settings.Loot.TownRun.WeaponScore);
         case ItemBaseType.Armor:
             return Math.Round((double)Trinity.Settings.Loot.TownRun.ArmorScore);
         case ItemBaseType.Jewelry:
             return Math.Round((double)Trinity.Settings.Loot.TownRun.JewelryScore);
         default:
             return 0;
     }
 }
示例#36
0
文件: Backpack.cs 项目: BUFORD/Funky
 private int ItemBaseTypePriorty(ItemBaseType type)
 {
     switch (type)
     {
         case ItemBaseType.Jewelry:
             return 0;
         case ItemBaseType.Weapon:
             return 1;
         case ItemBaseType.Armor:
             return 2;
     }
     return 3;
 }
示例#37
0
        /******************************************************************************/

        private void validateSignal(SignalNameEnumeratedType signalName, SignalTypeEnumeratedType signalType, ItemBaseType units, bool shouldBeValid, string exceptionMessage = null)
        {
            eiEventSignalType signal = new eiEventSignalType();

            signal.signalName = signalName.ToString();
            signal.signalType = signalType;

            signal.itemBase = units;

            validateSignal(signal, shouldBeValid, exceptionMessage);
        }