• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetTargetApplication函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetTargetApplication函数的典型用法代码示例。如果您正苦于以下问题:C++ GetTargetApplication函数的具体用法?C++ GetTargetApplication怎么用?C++ GetTargetApplication使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: OnRemove

 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
 {
     if (Unit* caster = GetCaster())
         if (Unit* target = GetTarget())
             if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE && GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEATH)
                 caster->CastSpell(target, SPELL_WATCH_CHARGE);
 }
开发者ID:AzerothShard-Dev,项目名称:azerothcore,代码行数:7,代码来源:boss_mandokir.cpp


示例2: AfterRemove

            void AfterRemove(AuraEffect const* eff, AuraEffectHandleModes /*mode*/)
            {
                if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
                    return;

                GetTarget()->CastSpell(nullptr, SPELL_DEATHBLOOM_FINAL_DAMAGE, CastSpellExtraArgs(eff).SetOriginalCaster(GetCasterGUID()));
            }
开发者ID:ElunaLuaEngine,项目名称:ElunaTrinityWotlk,代码行数:7,代码来源:boss_loatheb.cpp


示例3: AfterRemove

            void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
            {
                // Final heal only on duration end
                if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
                    return;

                // final heal
                int32 stack = GetStackAmount();
                int32 healAmount = aurEff->GetAmount();
                if (Unit* caster = GetCaster())
                {
                    healAmount = caster->SpellHealingBonusDone(GetTarget(), GetSpellInfo(), healAmount, HEAL, aurEff->GetSpellEffectInfo(), stack);
                    healAmount = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), healAmount, HEAL, aurEff->GetSpellEffectInfo(), stack);

                    GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());

                    // restore mana
                    std::vector<SpellInfo::CostData> costs = GetSpellInfo()->CalcPowerCost(caster, GetSpellInfo()->GetSchoolMask());
                    auto m = std::find_if(costs.begin(), costs.end(), [](SpellInfo::CostData const& cost) { return cost.Power == POWER_MANA; });
                    if (m != costs.end())
                    {
                        int32 returnMana = m->Amount * stack / 2;
                        caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnMana, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
                    }
                    return;
                }

                GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
            }
开发者ID:beyourself,项目名称:DeathCore_6.x,代码行数:29,代码来源:spell_druid.cpp


示例4: AfterRemove

            void AfterRemove(AuraEffect const* eff, AuraEffectHandleModes /*mode*/)
            {
                if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
                    return;

                GetTarget()->CastSpell(NULL, SPELL_DEATHBLOOM_FINAL_DAMAGE, true, NULL, eff, GetCasterGUID());
            }
开发者ID:boom8866,项目名称:new,代码行数:7,代码来源:boss_loatheb.cpp


示例5: OnRemove

			void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
            {
				AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode();
				if (removeMode != AURA_REMOVE_BY_EXPIRE)
                    return;

				int32 spell = 0;

				if (InstanceScript* instance = GetTarget()->GetInstanceScript())
				{
					if (instance->instance->Is25ManRaid())
					{
						if (instance->instance->IsHeroic())
							spell = SPELL_SEARING_SEEDS_DMG_25H;
						else
							spell = SPELL_SEARING_SEEDS_DMG_25N;
					}
					else
					{
						if (instance->instance->IsHeroic())
							spell = SPELL_SEARING_SEEDS_DMG_10H;
						else
							spell = SPELL_SEARING_SEEDS_DMG_10N;
					}
				}

				if (spell != 0)
					GetUnitOwner()->CastSpell(GetUnitOwner(),spell,true);
            }
开发者ID:Jildor,项目名称:4.3.4-Core,代码行数:29,代码来源:boss_majordomostaghelm.cpp


示例6: OnRemove

 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
 {
     Unit* target = GetTarget();
     Unit* caster = GetCaster();
     if (target && target->ToPlayer() && caster && GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEATH)
         target->CastSpell(caster, GetSpellInfo()->Effects[EFFECT_0].CalcValue(), true);
 }
开发者ID:AwkwardDev,项目名称:TrinityCore,代码行数:7,代码来源:boss_assembly_of_iron.cpp


示例7: HandleEffectRemove

			void HandleEffectRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
			{
				if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEFAULT)
					if (InstanceScript* instance = GetUnitOwner()->GetInstanceScript())
						if (Creature* leotheras = ObjectAccessor::GetCreature(*GetUnitOwner(), instance->GetData64(NPC_LEOTHERAS_THE_BLIND)))
							leotheras->CastSpell(GetUnitOwner(), SPELL_CONSUMING_MADNESS, true);
			}
开发者ID:DSlayerMan,项目名称:Sunwell,代码行数:7,代码来源:boss_leotheras_the_blind.cpp


示例8: HandleEffectRemove

            void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
            {               
                if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
                    return;

                GetUnitOwner()->CastSpell(GetUnitOwner(), RAND(SPELL_SUMMON_HAISHULUD, SPELL_SUMMON_MATURE_BONE_SIFTER1, SPELL_SUMMON_MATURE_BONE_SIFTER3), true);
            }
开发者ID:AzerothShard-Dev,项目名称:azerothcore,代码行数:7,代码来源:zone_terokkar_forest.cpp


示例9: OnRemove

            //! This will be called when Right Arm (vehicle) has sustained a specific amount of damage depending on instance mode
            //! What we do here is remove all harmful aura's related and teleport to safe spot.
            void OnRemove(constAuraEffectPtr /*aurEff*/, AuraEffectHandleModes /*mode*/)
            {
                if (GetTargetApplication()->GetRemoveMode() !=  AURA_REMOVE_BY_ENEMY_SPELL)
                    return;

                if (!GetOwner()->ToCreature())
                    return;

                if (Vehicle * vehicle = GetOwner()->ToCreature()->GetVehicle())
                {
                    if (Unit* rightArm = vehicle->GetPassenger(1))
                    {
                        if (Unit* pass = rightArm->GetVehicleKit()->GetPassenger(0))
                        {
                            Position exitPosition;
                            exitPosition.m_positionX = 1750.0f;
                            exitPosition.m_positionY = -7.5f + frand(-3.0f, 3.0f);
                            exitPosition.m_positionZ = 457.9322f;

                            pass->_ExitVehicle(&exitPosition);
                            pass->RemoveAurasDueToSpell(62056);

                            Position oldPos;
                            pass->GetPosition(&oldPos);
                            pass->Relocate(exitPosition);
                            pass->GetMotionMaster()->MoveFall();
                            pass->Relocate(oldPos);
                            rightArm->GetVehicleKit()->Reset();
                        }
                    }
                }
            }
开发者ID:Expery,项目名称:Core,代码行数:34,代码来源:boss_kologarn.cpp


示例10: HandleEffectRemove

            void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
            {
                if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
                    return;

                if (Unit* target = GetTarget())
                    target->CastSpell(target, SPELL_WEB_WRAP_WRAPPED, true);
            }
开发者ID:Declipe,项目名称:ElunaTrinityWotlk,代码行数:8,代码来源:boss_krikthir_the_gatewatcher.cpp


示例11: HandleRemove

            void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
            {
                if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEATH)
                    return;

                if (Unit* caster = GetCaster())
                    caster->CastSpell(caster, SPELL_DK_SOUL_REAPER_HASTE, true);
            }
开发者ID:DSlayerMan,项目名称:DraenorCore,代码行数:8,代码来源:spell_dk.cpp


示例12: OnRemove

 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
 {
     if (Creature* target = GetTarget()->ToCreature())
     {
         AuraRemoveMode mode = GetTargetApplication()->GetRemoveMode();
         if (mode == AURA_REMOVE_BY_ENEMY_SPELL || mode == AURA_REMOVE_BY_EXPIRE)
             target->AI()->DoAction(ACTION_REFRESH_DAMPEN);
     }
 }
开发者ID:martial69320,项目名称:cerberus,代码行数:9,代码来源:boss_illidari_council.cpp


示例13: HandleRemove

            void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
            {
                GetTarget()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_UNK_31);
                GetTarget()->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);

                if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
                    if (GetTarget()->IsAIEnabled)
                        GetTarget()->GetAI()->DoAction(ACTION_DRAINED);
            }
开发者ID:kemlg,项目名称:trinitycore-conciens,代码行数:9,代码来源:boss_ichoron.cpp


示例14: AfterRemove

            void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
            {
                // Final heal only on duration end
                if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
                    return;

                Unit* target = GetUnitOwner();
                target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), false);
            }
开发者ID:GlassFace,项目名称:XC_CORE,代码行数:9,代码来源:boss_astromancer.cpp


示例15: AfterRemove

            void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
            {
                AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode();
                if (removeMode != AURA_REMOVE_BY_ENEMY_SPELL && removeMode != AURA_REMOVE_BY_EXPIRE)
                    return;

                if (Unit* caster = GetCaster())
                    caster->CastSpell(GetTarget(), uint32(aurEff->GetAmount()), true, NULL, aurEff);
            }
开发者ID:CrazyMeal,项目名称:Serval_Core,代码行数:9,代码来源:spell_mage.cpp


示例16: HandleShareBuff

            void HandleShareBuff (AuraEffect const* aurEff, AuraEffectHandleModes mode)
            {
                if (!GetTargetApplication())
                    return;

                if (!GetTargetApplication()->GetBase())
                    return;

                if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_ENEMY_SPELL)
                {
                    if (Unit* target = GetTarget())
                    {
                        CustomSpellValues values;
                        values.AddSpellMod(SPELLVALUE_MAX_TARGETS, 2);
                        values.AddSpellMod(SPELLVALUE_BASE_POINT1, GetTargetApplication()->GetBase()->GetDuration());
                        GetTarget()->CastCustomSpell(SPELL_WRACK_JUMP, values, NULL, TRIGGERED_FULL_MASK, NULL, NULL, GetCasterGUID());
                    }
                }
            }
开发者ID:Faydz,项目名称:TrinityCore,代码行数:19,代码来源:boss_sinestra.cpp


示例17: OnRemove

 void OnRemove(AuraEffect const * /*aurEff*/, AuraEffectHandleModes /*mode*/)
 {
     if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
         if (auto target = GetTarget()->ToCreature())
             if (target->GetEntry() == 60925)
             {
                 target->RemoveAurasDueToSpell(106246);
                 target->ForcedDespawn();
             }
 }
开发者ID:Exodius,项目名称:chuspi,代码行数:10,代码来源:townlong_steppes.cpp


示例18: OnRemove

 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
 {
     Unit* target = GetTarget();
     if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
         if (target->HasAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF))
             if (Creature* finklestein = GetClosestCreatureWithEntry(target, NPC_FINKLESTEIN, 100.0f))
             {
                 target->RemoveAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF);
                 finklestein->AI()->Talk(SAY_RUINED, target);
             }
 }
开发者ID:Rastrian,项目名称:DeathCore_6.x-1,代码行数:11,代码来源:zone_zuldrak.cpp


示例19: HandleRemove

            void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
            {
                if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL && GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
                    return;

                if (Unit* caster = GetCaster())
                {
                    int32 amount = aurEff->GetAmount();
                    GetTarget()->CastCustomSpell(caster, WARLOCK_HAUNT_HEAL, &amount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
                }
            }
开发者ID:S-proyect,项目名称:Emu-S,代码行数:11,代码来源:spell_warlock.cpp


示例20: HandleRemove

            void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
            {
                if (GetCaster())
                {
                    AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode();

                    if (removeMode == AURA_REMOVE_BY_DEATH)
                        GetCaster()->CastSpell(GetCaster(), SPELL_DK_SOUL_REAPER_HASTE, true);
                    else if (removeMode == AURA_REMOVE_BY_EXPIRE && GetTarget()->GetHealthPct() < 35.0f)
                        GetCaster()->CastSpell(GetTarget(), SPELL_DK_SOUL_REAPER_DAMAGE, true);
                }
            }
开发者ID:AlucardVoss,项目名称:Patchs,代码行数:12,代码来源:spell_dk.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetTargetUnit函数代码示例发布时间:2022-05-30
下一篇:
C++ GetTarget函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap