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


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

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


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

示例1: HandleProc

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

                uint32 spellId;
                Unit* caster = eventInfo.GetActor();
                Unit* target = eventInfo.GetProcTarget();

                switch (target->getClass())
                {
                    case CLASS_PALADIN:
                    case CLASS_PRIEST:
                    case CLASS_SHAMAN:
                    case CLASS_DRUID:
                        spellId = SPELL_SHAMAN_TOTEMIC_POWER_MP5;
                        break;
                    case CLASS_MAGE:
                    case CLASS_WARLOCK:
                        spellId = SPELL_SHAMAN_TOTEMIC_POWER_SPELL_POWER;
                        break;
                    case CLASS_HUNTER:
                    case CLASS_ROGUE:
                        spellId = SPELL_SHAMAN_TOTEMIC_POWER_ATTACK_POWER;
                        break;
                    case CLASS_WARRIOR:
                        spellId = SPELL_SHAMAN_TOTEMIC_POWER_ARMOR;
                        break;
                    default:
                        return;
                }

                caster->CastSpell(target, spellId, true);
            }
开发者ID:Lyill,项目名称:TrinityCore,代码行数:33,代码来源:spell_shaman.cpp

示例2: HandleProc

        void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
        {
            PreventDefaultAction();
            Unit* caster = eventInfo.GetActor();

            caster->CastSpell(caster->ToPlayer()->GetPet(), SPELL_HUNTER_T9_4P_GREATNESS, true, nullptr, aurEff);
        }
开发者ID:blitztech,项目名称:TrinityCore,代码行数:7,代码来源:spell_hunter.cpp

示例3: HandleEffectProc

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

            Unit* attacker = eventInfo.GetActor();
            int32 damage = int32(attacker->GetTotalAttackPowerValue(BASE_ATTACK) * 0.125f / 2600 * attacker->GetBaseAttackTime(BASE_ATTACK));
            attacker->CastCustomSpell(SPELL_SHAMAN_FLAMETONGUE_ATTACK, SPELLVALUE_BASE_POINT0, damage, eventInfo.GetActionTarget(), TRIGGERED_FULL_MASK, nullptr, aurEff);
        }
开发者ID:Lyill,项目名称:TrinityCore,代码行数:8,代码来源:spell_shaman.cpp

示例4: HandleProc

            void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
            {
                InstanceScript* instance = eventInfo.GetActor()->GetInstanceScript();
                if (!instance)
                    return;

                instance->DoCastSpellOnPlayers(SPELL_ACHIEVEMENT_CREDIT_NERF_SCRAPBOTS);
            }
开发者ID:Delicate90,项目名称:TrinityCore,代码行数:8,代码来源:boss_xt002.cpp

示例5: HandleProc

            void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                static uint32 const triggerSpell[2] = { SPELL_PET_SILVERBACK_RANK_1, SPELL_PET_SILVERBACK_RANK_2 };

                PreventDefaultAction();

                uint32 spellId = triggerSpell[GetSpellInfo()->GetRank() - 1];
                eventInfo.GetActor()->CastSpell(nullptr, spellId, aurEff);
            }
开发者ID:Refuge89,项目名称:TrinityCore,代码行数:9,代码来源:pet_hunter.cpp

示例6: HandleProc

            void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                static uint32 const triggerSpell[2] = { SPELL_MAGE_ARCANE_POTENCY_RANK_1, SPELL_MAGE_ARCANE_POTENCY_RANK_2 };

                PreventDefaultAction();
                Unit* caster = eventInfo.GetActor();
                uint32 spellId = triggerSpell[GetSpellInfo()->GetRank() - 1];
                caster->CastSpell(caster, spellId, true, nullptr, aurEff);
            }
开发者ID:kemlg,项目名称:trinitycore-conciens,代码行数:9,代码来源:spell_mage.cpp

示例7: 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

示例8: HandleProc

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

                SpellInfo const* igniteDot = sSpellMgr->GetSpellInfo(SPELL_MAGE_IGNITE);
                int32 pct = 8 * GetSpellInfo()->GetRank();

                int32 amount = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), pct) / igniteDot->GetMaxTicks());
                amount += eventInfo.GetProcTarget()->GetRemainingPeriodicAmount(eventInfo.GetActor()->GetGUID(), SPELL_MAGE_IGNITE, SPELL_AURA_PERIODIC_DAMAGE);
                GetTarget()->CastCustomSpell(SPELL_MAGE_IGNITE, SPELLVALUE_BASE_POINT0, amount, eventInfo.GetProcTarget(), true, NULL, aurEff);
            }
开发者ID:CrazyMeal,项目名称:Serval_Core,代码行数:11,代码来源:spell_mage.cpp

示例9: CheckProc

            bool CheckProc(ProcEventInfo& eventInfo)
            {
                // Do not take charges, add a stack of crit buff
                if (!(eventInfo.GetHitMask() & PROC_HIT_CRITICAL))
                {
                    eventInfo.GetActor()->CastSpell(nullptr, SPELL_MAGE_COMBUSTION_PROC, true);
                    return false;
                }

                return true;
            }
开发者ID:kemlg,项目名称:trinitycore-conciens,代码行数:11,代码来源:spell_mage.cpp

示例10: HandleDummy

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

                // Remove +% AP aura
                Unit* pet = eventInfo.GetActor();
                Aura* aura = pet->GetAura(SPELL_PET_SWOOP, pet->GetGUID());
                if (!aura)
                    aura = pet->GetAura(SPELL_PET_CHARGE, pet->GetGUID());

                if (!aura)
                    return;

                aura->DropCharge(AURA_REMOVE_BY_EXPIRE);
            }
开发者ID:Refuge89,项目名称:TrinityCore,代码行数:15,代码来源:pet_hunter.cpp

示例11: HandleCheckProc

        bool HandleCheckProc(ProcEventInfo &eventInfo)
        {
            if (!canProc)
                return false;

            auto const caster = eventInfo.GetActionTarget();
            if (caster && caster->HasAura(SPELL_ULTIMATE_POWER))
                return false;

            auto const target = eventInfo.GetActor();
            if (!target || target->GetTypeId() != TYPEID_PLAYER)
                return false;

            return true;
        }
开发者ID:Exodius,项目名称:chuspi,代码行数:15,代码来源:boss_lorewalker_stonestep.cpp

示例12: HandleProc

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

                uint32 heal = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount());

                Unit::AuraList const& auras = GetCaster()->GetSingleCastAuras();
                for (Unit::AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
                {
                    if ((*itr)->GetId() == SPELL_PALADIN_BEACON_OF_LIGHT)
                    {
                        std::list<AuraApplication*> applications;
                        (*itr)->GetApplicationList(applications);
                        if (!applications.empty())
                            eventInfo.GetActor()->CastCustomSpell(SPELL_PALADIN_BEACON_OF_LIGHT_HEAL, SPELLVALUE_BASE_POINT0, heal, applications.front()->GetTarget(), true);
                        return;
                    }
                }
            }
开发者ID:Diyvol,项目名称:TrinityCore,代码行数:19,代码来源:spell_paladin.cpp

示例13: HandleProc

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

                HealInfo* healInfo = eventInfo.GetHealInfo();
                if (!healInfo || !healInfo->GetHeal())
                    return;

                Unit* caster = eventInfo.GetActor();
                Unit* target = eventInfo.GetProcTarget();

                SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_PALADIN_HOLY_MENDING);
                int32 amount = CalculatePct(static_cast<int32>(healInfo->GetHeal()), aurEff->GetAmount());
                amount /= spellInfo->GetMaxTicks(DIFFICULTY_NONE);
                // Add remaining ticks to damage done
                amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_PALADIN_HOLY_MENDING, SPELL_AURA_PERIODIC_HEAL);

                caster->CastCustomSpell(SPELL_PALADIN_HOLY_MENDING, SPELLVALUE_BASE_POINT0, amount, target, true);
            }
开发者ID:Regigicas,项目名称:TrinityCore,代码行数:19,代码来源:spell_paladin.cpp

示例14: CheckProc

 bool CheckProc(ProcEventInfo& eventInfo)
 {
     if (!eventInfo.GetActionTarget())
         return false;
     if (eventInfo.GetActionTarget()->HasAura(SPELL_PALADIN_BEACON_OF_LIGHT, eventInfo.GetActor()->GetGUID()))
         return false;
     return true;
 }
开发者ID:Diyvol,项目名称:TrinityCore,代码行数:8,代码来源:spell_paladin.cpp

示例15: HandleProc

 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
 {
     PreventDefaultAction();
     GetTarget()->CastSpell(eventInfo.GetActor(), SPELL_WOE_STRIKE_EFFECT, true, NULL, aurEff);
 }
开发者ID:Declipe,项目名称:ElunaTrinityWotlk,代码行数:5,代码来源:boss_ingvar_the_plunderer.cpp


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