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


C++ ProcEventInfo::GetDamageInfo方法代码示例

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


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

示例1: HandleEffectProc

            void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                int32 self = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()));
                int32 team = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount() / 2));

                GetTarget()->CastCustomSpell((Unit*)NULL, SPELL_PRIEST_VAMPIRIC_EMBRACE_HEAL, &team, &self, NULL, true, NULL, aurEff);
            }
开发者ID:Exodius,项目名称:ArkCORE-NG,代码行数:8,代码来源:spell_priest.cpp

示例2: HandleProc

            void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                int32 mana = eventInfo.GetDamageInfo()->GetSpellInfo()->CalcPowerCost(GetTarget(), eventInfo.GetSchoolMask());
                int32 damage = CalculatePct(mana, 35);

                GetTarget()->CastCustomSpell(SPELL_SHAMAN_ITEM_MANA_SURGE, SPELLVALUE_BASE_POINT0, damage, GetTarget(), true, NULL, aurEff);
            }
开发者ID:Diabloxx,项目名称:HS-WoW2,代码行数:8,代码来源:spell_shaman.cpp

示例3: HandleEffectCatProc

            void HandleEffectCatProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                if (GetTarget()->GetShapeshiftForm() != FORM_CAT || eventInfo.GetDamageInfo()->GetSpellInfo()->Id != SPELL_DRUID_FERAL_CHARGE_CAT)
                    return;

                GetTarget()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_DRUID_STAMPEDE_CAT_RANK_1, GetSpellInfo()->GetRank()), true, NULL, aurEff);
                GetTarget()->CastSpell(GetTarget(), SPELL_DRUID_STAMPEDE_CAT_STATE, true, NULL, aurEff);
            }
开发者ID:beyourself,项目名称:DeathCore_6.x,代码行数:9,代码来源:spell_druid.cpp

示例4: HandleProc

            void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();

                int32 mana = int32(eventInfo.GetDamageInfo()->GetSpellInfo()->CalcPowerCost(GetTarget(), eventInfo.GetDamageInfo()->GetSchoolMask()));
                mana = CalculatePct(mana, aurEff->GetAmount());

                GetTarget()->CastCustomSpell(SPELL_MAGE_BURNOUT, SPELLVALUE_BASE_POINT0, mana, GetTarget(), true, NULL, aurEff);
            }
开发者ID:CrazyMeal,项目名称:Serval_Core,代码行数:9,代码来源:spell_mage.cpp

示例5: HandleProc

        void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
        {
            if (eventInfo.GetSpellInfo() && eventInfo.GetSpellInfo()->Id == 82036)
                return;

            SpellSchoolMask mask = eventInfo.GetDamageInfo()->GetSchoolMask();
            if (mask & SPELL_SCHOOL_MASK_NORMAL)
            {
                int32 damage = QuadraticLinarBenefit(30.0f, 100.0f, eventInfo.GetDamageInfo()->GetDamage());
                if (damage < 1) damage = 1;
                GetCaster()->CastCustomSpell(eventInfo.GetProcTarget(), 82036, &damage, NULL, NULL, true);
            }
            else if (mask & SPELL_SCHOOL_MASK_NATURE)
            {
                int32 damage = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount());
                GetCaster()->CastCustomSpell(GetCaster(), 82037, &damage, NULL, NULL, true);
            }
        }
开发者ID:update88,项目名称:loa,代码行数:18,代码来源:spell_rogue.cpp

示例6: HandleProc

 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
 {
     PreventDefaultAction();
     if (eventInfo.GetDamageInfo())
     {
         SpellInfo const* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo();
         if (spellInfo && (spellInfo->Id == SPELL_WARRIOR_BLADESTORM_PERIODIC_WHIRLWIND || (spellInfo->Id == SPELL_WARRIOR_EXECUTE && !_procTarget->HasAuraState(AURA_STATE_HEALTHLESS_20_PERCENT))))
         {
             // If triggered by Execute (while target is not under 20% hp) or Bladestorm deals normalized weapon damage
             GetTarget()->CastSpell(_procTarget, SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK_2, true, NULL, aurEff);
         }
         else
         {
             int32 damage = eventInfo.GetDamageInfo()->GetDamage();
             GetTarget()->CastCustomSpell(SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK_1, SPELLVALUE_BASE_POINT0, damage, _procTarget, true, NULL, aurEff);
         }
     }
 }
开发者ID:GlassFace,项目名称:XC_CORE,代码行数:18,代码来源:spell_warrior.cpp

示例7: HandleEffectSpeedProc

            void HandleEffectSpeedProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                // Proc only with Power Word: Shield or Leap of Faith
                if (!(eventInfo.GetDamageInfo()->GetSpellInfo()->SpellFamilyFlags[0] & 0x1 || eventInfo.GetDamageInfo()->GetSpellInfo()->SpellFamilyFlags[2] & 0x80000))
                    return;

                GetTarget()->CastCustomSpell(SPELL_PRIEST_BODY_AND_SOUL_SPEED, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), eventInfo.GetProcTarget(), true, NULL, aurEff);
            }
开发者ID:DSlayerMan,项目名称:ArkCORE-NG,代码行数:9,代码来源:spell_priest.cpp

示例8: HandleProc

            void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                DamageInfo* damageInfo = eventInfo.GetDamageInfo();
                if (!damageInfo || !damageInfo->GetDamage())
                    return;

                int32 damage = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), 45);
                GetTarget()->CastCustomSpell(SPELL_MIRRORED_SOUL_DAMAGE, SPELLVALUE_BASE_POINT0, damage, GetCaster(), true);
            }
开发者ID:Carbenium,项目名称:TrinityCore,代码行数:10,代码来源:boss_devourer_of_souls.cpp

示例9: HandleEffectProc

            void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                DamageInfo* damageInfo = eventInfo.GetDamageInfo();
                if (!damageInfo || !damageInfo->GetDamage())
                    return;

                int32 damage = CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount());
                GetTarget()->CastCustomSpell(SPELL_PALADIN_EYE_FOR_AN_EYE_DAMAGE, SPELLVALUE_BASE_POINT0, damage, eventInfo.GetProcTarget(), true, NULL, aurEff);
            }
开发者ID:jackpoz,项目名称:TrinityCore,代码行数:10,代码来源:spell_paladin.cpp

示例10: HandleEffectDispelProc

            void HandleEffectDispelProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                // Proc only with Cure Disease
                if (eventInfo.GetDamageInfo()->GetSpellInfo()->Id != SPELL_PRIEST_CURE_DISEASE || eventInfo.GetProcTarget() != GetTarget())
                    return;

                if (roll_chance_i(aurEff->GetAmount()))
                    GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_BODY_AND_SOUL_DISPEL, true, NULL, aurEff);
            }
开发者ID:DSlayerMan,项目名称:ArkCORE-NG,代码行数:10,代码来源:spell_priest.cpp

示例11: OnProcSpell

    void OnProcSpell(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
    {
        PreventDefaultAction();
        DamageInfo* damageInfo = eventInfo.GetDamageInfo();
        if (!damageInfo || !damageInfo->GetDamage())
            return;

        Unit* caster = eventInfo.GetActor();
        caster->CastSpell(caster, SPELL_AURA_OF_DESIRE_DAMAGE, CastSpellExtraArgs(aurEff).AddSpellBP0(damageInfo->GetDamage() / 2));
    }
开发者ID:lasyan3,项目名称:TrinityCore,代码行数:10,代码来源:boss_reliquary_of_souls.cpp

示例12: HandleFocusRegen

            void HandleFocusRegen(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                // This effect only from Rapid Killing (focus regen)
                if (!(eventInfo.GetDamageInfo()->GetSpellInfo()->SpellFamilyFlags[1] & 0x01000000))
                    return;

                int32 focus = aurEff->GetAmount();
                GetTarget()->CastCustomSpell(SPELL_HUNTER_RAPID_RECUPERATION, SPELLVALUE_BASE_POINT0, focus, GetTarget(), true, NULL, aurEff);
            }
开发者ID:Abrek,项目名称:My-WoDCore-6.x.x,代码行数:10,代码来源:spell_hunter.cpp

示例13: HandleProc

            void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();

                if (DamageInfo* damageInfo = eventInfo.GetDamageInfo())
                {
                    int32 damage = damageInfo->GetDamage();
                    GetTarget()->CastCustomSpell(SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK, SPELLVALUE_BASE_POINT0, damage, _procTarget, true, nullptr, aurEff);
                }
            }
开发者ID:090809,项目名称:TrinityCore,代码行数:10,代码来源:spell_rogue.cpp

示例14: HandleProc

            void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();

                int32 mana = eventInfo.GetDamageInfo()->GetSpellInfo()->CalcPowerCost(GetTarget(), eventInfo.GetDamageInfo()->GetSchoolMask());
                mana = CalculatePct(mana, aurEff->GetAmount());

                if (mana > 0)
                    GetTarget()->CastCustomSpell(SPELL_MAGE_MASTER_OF_ELEMENTS_ENERGIZE, SPELLVALUE_BASE_POINT0, mana, GetTarget(), true, nullptr, aurEff);
            }
开发者ID:kemlg,项目名称:trinitycore-conciens,代码行数:10,代码来源:spell_mage.cpp

示例15: OnProc

            void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();

                int32 amount = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()));
                // Glyph of Siphon Life
                if (AuraEffect const* glyph = GetTarget()->GetAuraEffect(SPELL_WARLOCK_GLYPH_OF_SIPHON_LIFE, EFFECT_0))
                    AddPct(amount, glyph->GetAmount());

                GetTarget()->CastCustomSpell(SPELL_WARLOCK_SIPHON_LIFE_HEAL, SPELLVALUE_BASE_POINT0, amount, GetTarget(), true, NULL, aurEff);
            }
开发者ID:InkVisible,项目名称:EscapeWoW3.3.5a,代码行数:11,代码来源:spell_warlock.cpp


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