当前位置: 首页>>代码示例>>C#>>正文


C# Character.HasProfession方法代码示例

本文整理汇总了C#中Character.HasProfession方法的典型用法代码示例。如果您正苦于以下问题:C# Character.HasProfession方法的具体用法?C# Character.HasProfession怎么用?C# Character.HasProfession使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Character的用法示例。


在下文中一共展示了Character.HasProfession方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IsBuffRelevant

 public override bool IsBuffRelevant(Buff buff, Character character)
 {
     if (buff == null) { return false; }
     if (!buff.AllowedClasses.Contains(CharacterClass.Warlock)
         || (buff.Group != null && buff.Group.Equals("Spell Sensitivity")))
     {
         return false;
     }
     if (character != null
         && Rawr.Properties.GeneralSettings.Default.HideProfEnchants
         && !character.HasProfession(buff.Professions))
     {
         return false;
     }
     Stats stats = buff.GetTotalStats();
     return HasRelevantStats(stats)
         || stats.Strength > 0
         || stats.Agility > 0
         || stats.AttackPower > 0
         || stats.BonusAttackPowerMultiplier > 0
         || stats.PhysicalCrit > 0
         || stats.PhysicalHaste > 0
         || stats.ArmorPenetration > 0
         || stats.TargetArmorReduction > 0
         || stats.BonusPhysicalDamageMultiplier > 0;
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:26,代码来源:CalculationsWarlock.cs

示例2: CalculationOptionsEnhance


//.........这里部分代码省略.........
                }
            }

            StatsEnhance statsTotal = new StatsEnhance()
            {
                BonusAgilityMultiplier = Character.ValidateArmorSpecialization(character, ItemType.Mail) ? 0.05f : 0f,
                BonusAttackPowerMultiplier = (hasAPBuff ? 0f : 0.05f * talents.UnleashedRage),
                BonusFireDamageMultiplier = 0.01f * talents.ElementalPrecision,
                //BonusFrostDamageMultiplier = 0.01f * talents.ElementalPrecision,
                BonusNatureDamageMultiplier = 0.01f * talents.ElementalPrecision,

                MovementSpeed = 0.15f / 2f * talents.AncestralSwiftness,
                ConcussionMultiplier = 0.02f * talents.Concussion,
                ShieldBonus = 0.05f * talents.ImprovedShields,
                CallofFlameBonus = 0.1f * talents.CallOfFlame,
                WindfuryDamageBonus = 0.2f * talents.ElementalWeapons,
                BonusStormstrikeDamageMultiplier = 0.15f * talents.FocusedStrikes,
                FTSpellPowerMultiplier = 0.2f * talents.ElementalWeapons,
                Expertise = 4f * talents.UnleashedRage,
            };

            #region Set Bonuses
            int T11Count;
            character.SetBonusCount.TryGetValue("Battlegear of the Raging Elements", out T11Count);
            if (T11Count >= 2)
            {
                statsTotal.BonusStormstrikeDamageMultiplier = (1f + statsTotal.BonusStormstrikeDamageMultiplier) * (1f + 0.1f) - 1f;
                statsTotal.BonusLavalashDamageMultipler = (1f + statsTotal.BonusLavalashDamageMultipler) * (1f + 0.1f) - 1f;
            }
            if (T11Count >= 4)
            {
                //
            }
            #endregion

            float FTspellpower = 0f;
            if (calcOpts.MainhandImbue == "Flametongue")
                FTspellpower += (float)Math.Floor((float)(748f * (1f + statsTotal.FTSpellPowerMultiplier)));
            if (calcOpts.OffhandImbue == "Flametongue")
                FTspellpower += (float)Math.Floor((float)(748f * (1f + statsTotal.FTSpellPowerMultiplier)));

            statsTotal.Accumulate(BaseStats.GetBaseStats(character.Level, character.Class, character.Race));
            statsTotal.Accumulate(GetItemStats(character, additionalItem));
            AccumulateBuffsStats(statsTotal, character.ActiveBuffs);

            statsTotal.Stamina = (float)Math.Floor(statsTotal.Stamina * (1f + statsTotal.BonusStaminaMultiplier));
            statsTotal.Strength = (float)Math.Floor(statsTotal.Strength * (1f + statsTotal.BonusStrengthMultiplier));
            statsTotal.Agility = (float)Math.Floor(statsTotal.Agility * (1f + statsTotal.BonusAgilityMultiplier));
            statsTotal.Intellect = (float)Math.Floor(statsTotal.Intellect * (1f + statsTotal.BonusIntellectMultiplier));
            statsTotal.Health += (float)Math.Floor(StatConversion.GetHealthFromStamina(statsTotal.Stamina));
            statsTotal.Health = (float)Math.Floor(statsTotal.Health * (1f + statsTotal.BonusHealthMultiplier));
            statsTotal.Mana += (float)Math.Floor(StatConversion.GetManaFromIntellect(statsTotal.Intellect));
            statsTotal.Mana = (float)Math.Floor(statsTotal.Mana * (1f + statsTotal.BonusManaMultiplier));

            statsTotal.AttackPower += statsTotal.Strength + 2f * (statsTotal.Agility - 20f) + 20f;
            statsTotal.AttackPower = (float)Math.Floor(statsTotal.AttackPower * (1f + statsTotal.BonusAttackPowerMultiplier));
            statsTotal.SpellPower += statsTotal.Intellect + 0.5f * statsTotal.AttackPower + FTspellpower;
            statsTotal.SpellPower = (float)Math.Floor(statsTotal.SpellPower * (1f * statsTotal.BonusSpellPowerMultiplier));

            StatsSpecialEffects se = new StatsSpecialEffects(character, statsTotal, calcOpts, bossOpts);
            statsTotal.Accumulate(se.getSpecialEffects());

            return statsTotal;
        }*/
        #endregion

        #region Buff Functions
        public override void SetDefaults(Character character)
        {
            // add shaman buffs
            character.ActiveBuffsAdd("Strength of Earth Totem");
            character.ActiveBuffsAdd("Windfury Totem");

            // add other raid buffs
            character.ActiveBuffsAdd("Blessing of Might (AP%)");
            character.ActiveBuffsAdd("Arcane Tactics");
            character.ActiveBuffsAdd("Commanding Shout");
            character.ActiveBuffsAdd("Arcane Brilliance (Mana)");
            character.ActiveBuffsAdd("Blessing of Might (Mp5)");
            character.ActiveBuffsAdd("Arcane Tactics");
            character.ActiveBuffsAdd("Arcane Brilliance (SP%)");
            character.ActiveBuffsAdd("Leader of the Pack");
            character.ActiveBuffsAdd("Communion");
            character.ActiveBuffsAdd("Moonkin Form");
            character.ActiveBuffsAdd("Mark of the Wild");

            character.ActiveBuffsAdd("Flask of the Winds");
            character.ActiveBuffsAdd("Agility Food");

            // Debuffs
            character.ActiveBuffsAdd("Faerie Fire");
            character.ActiveBuffsAdd("Brittle Bones");
            character.ActiveBuffsAdd("Critical Mass");
            character.ActiveBuffsAdd("Earth and Moon");

            if (character.HasProfession(Profession.Alchemy))
            {
                character.ActiveBuffsAdd(("Flask of the Winds (Mixology)"));
            }
        }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:101,代码来源:CalculationsEnhance.cs

示例3: IsBuffRelevant

 public override bool IsBuffRelevant(Buff buff, Character character)
 {
     string name = buff.Name;
     // Force some buffs to active
     if (name.Contains("Flask of the Winds")
         || name.Contains("Potion of the Tol'vir")
         || name.Contains("Agility Food")
     ) {
         return true;
     }
     // Force some buffs to go away
     else if (!buff.AllowedClasses.Contains(CharacterClass.Warrior))
     { return false; }
     else if (character != null && Rawr.Properties.GeneralSettings.Default.HideProfEnchants && !character.HasProfession(buff.Professions))
     { return false; }
     //
     bool haswantedStats = HasWantedStats(buff.Stats);
     bool hassurvStats = HasSurvivabilityStats(buff.Stats);
     bool hasbadstats = HasIgnoreStats(buff.Stats);
     bool retVal = haswantedStats || (hassurvStats && !hasbadstats);
     return retVal;
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:22,代码来源:CalculationsHunter.cs

示例4: IsBuffRelevant

        public override bool IsBuffRelevant(Buff buff, Character character)
        {
            if (buff.SetName == "Stormrider's Vestments" || buff.SetName == "Obsidian Arborweave Vestments" || buff.SetName == "Deep Earth Vestments")
                return true;

            // for buffs that are non-exclusive, allow anything that could be useful even slightly
            if (buff.Group == "Elixirs and Flasks" || buff.Group == "Potion" || buff.Group == "Food" || buff.Group == "Scrolls")
                return base.IsBuffRelevant(buff, character);
            else
            {
                if (character != null && Rawr.Properties.GeneralSettings.Default.HideProfEnchants && !character.HasProfession(buff.Professions))
                    return false;
                // Class Restrictions Enforcement
                else if (character != null && !buff.AllowedClasses.Contains(character.Class))
                    return false;

                return HasPrimaryStats(buff.Stats) || HasSecondaryStats(buff.Stats) || HasExtraStats(buff.Stats);
            }
        }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:19,代码来源:CalculationsTree.cs

示例5: IsBuffRelevant

        public override bool IsBuffRelevant(Buff buff, Character character)
        {
            // Any "Regalia" set bonus that applies to Druids is the Balance set
            if (!String.IsNullOrEmpty(buff.SetName) && buff.AllowedClasses.Contains(CharacterClass.Druid) && buff.SetName.EndsWith("Regalia"))
                return true;

            // for buffs that are non-exclusive, allow anything that could be useful even slightly
            if (buff.Group == "Elixirs and Flasks" || buff.Group == "Potion" || buff.Group == "Food" || buff.Group == "Scrolls")
                return base.IsBuffRelevant(buff, character);
            else
            {
                if (character != null && Rawr.Properties.GeneralSettings.Default.HideProfEnchants && !character.HasProfession(buff.Professions))
                    return false;
                // Class Restrictions Enforcement
                else if (character != null && !buff.AllowedClasses.Contains(character.Class))
                    return false;

                return HasPrimaryStats(buff.Stats) || HasSecondaryStats(buff.Stats) || HasExtraStats(buff.Stats);
            }
        }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:20,代码来源:CalculationsMoonkin.cs

示例6: IsBuffRelevant

 public override bool IsBuffRelevant(Buff buff, Character character) {
     if (buff == null) { return false; }
     // Force some buffs to active
     if (buff.SpellId == 53909 // Wild Magic Potion
         || buff.SpellId == 28494 // Insane Strength Potion
         || buff.SpellId == 22738 // Disarm Duration Reduction (Old PvP Set Bonuses)
         || buff.SpellId == 90293  // T11 2P
         || buff.SpellId == 90295  // T11 4P
         || buff.SpellId == 99233  // T12 2P
         || buff.SpellId == 99237) // T12 4P
     { return true; }
     // Force some buffs to go away
     else if (!buff.AllowedClasses.Contains(CharacterClass.Warrior))
     { return false; }
     else if (character != null
         && Rawr.Properties.GeneralSettings.Default.HideProfEnchants
         && !character.HasProfession(buff.Professions))
     { return false; }
     //
     bool haswantedStats = HasWantedStats(buff.Stats);
     bool hassurvStats = HasSurvivabilityStats(buff.Stats);
     bool hasbadstats = HasIgnoreStats(buff.Stats);
     bool retVal = haswantedStats || (hassurvStats && !hasbadstats);
     return retVal;
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:25,代码来源:CalculationsDPSWarr.cs


注:本文中的Character.HasProfession方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。