本文整理汇总了C++中GetHitDamage函数的典型用法代码示例。如果您正苦于以下问题:C++ GetHitDamage函数的具体用法?C++ GetHitDamage怎么用?C++ GetHitDamage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetHitDamage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: HandleScript
void HandleScript(SpellEffIndex /*eff*/)
{
Unit* caster = GetCaster();
if (!caster)
return;
if (GetHitDamage() >= int32(GetHitUnit()->GetHealth()))
if (caster->GetAI())
caster->GetAI()->SetData(DATA_GRAVITY_BOMB_CASUALTY, 1);
}
开发者ID:martial69320,项目名称:cerberus,代码行数:10,代码来源:boss_xt002.cpp
示例2: RecalculateDamage
void RecalculateDamage(SpellEffIndex /*effIndex*/)
{
int32 dmg = GetHitDamage();
float distance = GetHitUnit()->GetExactDist2d(GetCaster());
if (distance < 5.0f)
return;
float distVar = distance >= 20.0f ? 4 : (10.0f/3.0f);
SetHitDamage(int32(dmg * distVar / distance));
}
开发者ID:Deathwatch,项目名称:SkyFireEMU,代码行数:10,代码来源:boss_lord_marrowgar.cpp
示例3: HandleDamage
void HandleDamage()
{
int32 damage = GetHitDamage();
// Pain and Suffering reduces damage
if (AuraEffect* aurEff = GetCaster()->GetDummyAuraEffect(SPELLFAMILY_PRIEST, PRIEST_ICON_ID_PAIN_AND_SUFFERING, EFFECT_1))
AddPct(damage, aurEff->GetAmount());
GetCaster()->CastCustomSpell(GetCaster(), SPELL_PRIEST_SHADOW_WORD_DEATH, &damage, nullptr, nullptr, true);
}
开发者ID:mynew,项目名称:Core,代码行数:10,代码来源:spell_priest.cpp
示例4: SplitDamage
void SplitDamage()
{
// Mark the unit as hit, even if the spell missed or was dodged/parried
GetCaster()->GetAI()->SetGUID(GetHitUnit()->GetGUID(), DATA_SPIKE_IMMUNE);
if (!_targetCount)
return; // This spell can miss all targets
SetHitDamage(GetHitDamage() / _targetCount);
}
开发者ID:Rastrian,项目名称:DeathCore_6.x-1,代码行数:10,代码来源:boss_lord_marrowgar.cpp
示例5: HandleScript
void HandleScript(SpellEffIndex /*eff*/)
{
Unit* caster = GetCaster();
if (!caster || !GetHitUnit())
return;
if (GetHitDamage() >= int32(GetHitUnit()->GetHealth()))
if (InstanceScript* instance = caster->GetInstanceScript())
if (Creature* Heigan = ObjectAccessor::GetCreature(*caster, instance->GetGuidData(DATA_HEIGAN)))
Heigan->AI()->KilledUnit(GetHitUnit());
}
开发者ID:kemlg,项目名称:trinitycore-conciens,代码行数:11,代码来源:boss_heigan.cpp
示例6: CalcDamage
void CalcDamage()
{
if (!GetHitUnit() || !GetCaster())
return;
float distance = GetHitUnit()->GetExactDist2d(GetCaster());
if (distance < 10.0f)
return;
SetHitDamage(int32(GetHitDamage() * 10 / distance));
}
开发者ID:Firearm,项目名称:TrinityCore,代码行数:11,代码来源:boss_emalon.cpp
示例7: CalcDamage
void CalcDamage(SpellEffIndex /*effIndex*/)
{
if (!GetHitUnit() || !GetTargetDest())
return;
float distance = GetHitUnit()->GetExactDist2d(GetTargetDest());
if (distance < 3.4f)
return;
SetHitDamage(int32(GetHitDamage() * 10.0f / pow(distance, 1.9f)));
}
开发者ID:Anonymus111,项目名称:chaoscore,代码行数:11,代码来源:boss_algalon.cpp
示例8: HandleOnHit
void HandleOnHit()
{
int32 damage = 0;
if (Unit* target = GetHitUnit())
{
float dist = target->GetDistance(GetCaster());
damage = int32(GetHitDamage() * (70.0f - std::min(70.0f, dist)) / 70.0f);
}
SetHitDamage(damage);
}
开发者ID:AlexHjelm,项目名称:sunwell,代码行数:11,代码来源:boss_emalon.cpp
示例9: RecalculateDamage
void RecalculateDamage(SpellEffIndex /*effIndex*/)
{
if (GetHitUnit() && GetHitUnit()->HasAuraState(AURA_STATE_FROZEN, GetSpellInfo(), GetCaster()))
{
if (AuraEffect* aurEff = GetCaster()->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_MAGE, ICON_MAGE_SHATTER, EFFECT_1))
{
int32 damage = GetHitDamage();
AddPct(damage, aurEff->GetAmount());
SetHitDamage(damage);
}
}
}
开发者ID:CrazyMeal,项目名称:Serval_Core,代码行数:12,代码来源:spell_mage.cpp
示例10: CalcDamage
void CalcDamage()
{
int32 damage = GetHitDamage();
if (Unit* target = GetHitUnit())
if (Aura* aura = target->GetAura(SPELL_AMBER_SHOCK_CHARGE, GetCaster()->GetGUID())) // shock charges from same caster
{
damage += aura->GetStackAmount()*6525;
aura->Remove();
}
SetHitDamage(damage);
}
开发者ID:boom8866,项目名称:azerothcore-wotlk,代码行数:12,代码来源:oculus.cpp
示例11: RecalculateDamage
void RecalculateDamage()
{
if (GetHitUnit()->getPowerType() != POWER_MANA)
return;
const int32 maxDamage = GetCaster()->GetMap()->GetSpawnMode() == 1 ? 15000 : 10000;
int32 newDamage = GetHitDamage();
newDamage += GetHitUnit()->GetMaxPower(POWER_MANA)/2;
newDamage = std::min<int32>(maxDamage, newDamage);
SetHitDamage(newDamage);
}
开发者ID:ATOM12192,项目名称:SkyFireEMU,代码行数:12,代码来源:boss_bronjahm.cpp
示例12: CalcDamage
void CalcDamage()
{
int32 damage = GetHitDamage();
if (Unit* target = GetHitUnit())
if (AuraEffect const* shockCharges = target->GetAuraEffect(SPELL_AMBER_SHOCK_CHARGE, EFFECT_0, GetCaster()->GetGUID()))
{
damage += shockCharges->GetAmount();
shockCharges->GetBase()->Remove();
}
SetHitDamage(damage);
}
开发者ID:redlaine,项目名称:InfinityCore-Ark,代码行数:12,代码来源:oculus.cpp
示例13: HandleOnHit
void HandleOnHit()
{
if (Unit* caster = GetCaster())
{
int32 damage = GetHitDamage();
// Mastery: Emberstorm
if (AuraEffect* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, 2129, EFFECT_0))
AddPct(damage, aurEff->GetAmount());
SetHitDamage(damage);
}
}
开发者ID:blitztech,项目名称:TrinityCore,代码行数:13,代码来源:warlock_spell.cpp
示例14: DealDamage
void DealDamage()
{
Unit* caster = GetCaster();
Unit* target = GetHitUnit();
if (!caster || !target)
return;
float distance = caster->GetExactDist2d(target);
if (distance >= 0 && distance <= 60)
SetHitDamage(GetHitDamage() * (distance / MAX_DIST));
}
开发者ID:Grimtonz1337,项目名称:JadeCore,代码行数:13,代码来源:boss_feng.cpp
示例15: HandleOnHit
void HandleOnHit()
{
if (Player* _player = GetCaster()->ToPlayer())
{
if (Unit* unitTarget = GetHitUnit())
{
if (unitTarget->IsImmunedToSpellEffect(sSpellMgr->GetSpellInfo(WARRIOR_SPELL_STORM_BOLT_STUN), 0))
SetHitDamage(GetHitDamage() * 4);
_player->CastSpell(unitTarget, WARRIOR_SPELL_STORM_BOLT_STUN, true);
}
}
}
开发者ID:CATACLYSMDEV,项目名称:JadeCore-5.4.8-18291--dev-,代码行数:13,代码来源:spell_warrior.cpp
示例16: RecalculateDamage
void RecalculateDamage(SpellEffIndex /*effIndex*/)
{
if (!GetCaster())
return;
int32 baseDamages = GetHitDamage();
int32 additionalDamages = GetCaster()->GetPower(POWER_ENERGY) * 100;
SetHitDamage(baseDamages + additionalDamages);
GetCaster()->SetPower(POWER_ENERGY, 0);
}
开发者ID:DebugProject,项目名称:MistCore,代码行数:13,代码来源:boss_gunship_battle.cpp
示例17: HandleOnHit
void HandleOnHit(SpellEffIndex effIndex)
{
if (Unit* caster = GetCaster())
{
if (caster->HasAura(44544))
SetHitDamage(int32(GetHitDamage() * 1.25f));
if (GetHitUnit())
caster->SetIciclesTarget(GetHitUnit()->GetGUID());
caster->CastSpell(caster, SPELL_MAGE_ICICLE_PERIODIC_TRIGGER, true);
}
}
开发者ID:Cailiaock,项目名称:5.4.7-Wow-source,代码行数:13,代码来源:spell_mastery.cpp
示例18: HandleAfterHit
void HandleAfterHit()
{
Unit* caster = GetCaster();
if (Unit* unitTarget = GetHitUnit())
{
int32 bp = GetHitDamage() * multiplier;
if (AuraEffect* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_DK_BLACK_ICE_R1, EFFECT_0))
AddPct(bp, aurEff->GetAmount());
caster->CastCustomSpell(unitTarget, SPELL_DK_SCOURGE_STRIKE_TRIGGERED, &bp, NULL, NULL, true);
}
}
开发者ID:AlucardVoss,项目名称:Patchs,代码行数:13,代码来源:spell_dk.cpp
示例19: CalculateDamage
void CalculateDamage()
{
if (!GetHitUnit())
return;
float radius = GetSpellInfo()->Effects[EFFECT_0].CalcRadius(GetCaster());
if (!radius)
return;
float distance = GetCaster()->GetDistance2d(GetHitUnit());
if (distance > 1.0f)
SetHitDamage(int32(GetHitDamage() * ((radius - distance) / radius)));
}
开发者ID:mryanlam,项目名称:Old-TrinityCore-Project-Script.me-,代码行数:13,代码来源:boss_gruul.cpp
示例20: HandleEffect
void HandleEffect(SpellEffIndex effIndex)
{
if (Unit* caster = GetCaster())
{
if (Unit* target = GetHitUnit())
{
if (Aura* cancellingAura = target->GetAura(SPELL_NOISE_CANCELLING_BUFF))
{
float reducePct = cancellingAura->GetEffect(1)->GetBaseAmount();
SetHitDamage(GetHitDamage() * (reducePct / 100));
}
}
}
}
开发者ID:ChipLeo,项目名称:SkyFire_5xx,代码行数:14,代码来源:boss_vizier_zorlock.cpp
注:本文中的GetHitDamage函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论