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


C++ GetTargetApplication函数代码示例

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


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


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