本文整理汇总了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);
}
示例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()));
}
示例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());
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
}
}
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}