本文整理汇总了C++中GetEffectValue函数的典型用法代码示例。如果您正苦于以下问题:C++ GetEffectValue函数的具体用法?C++ GetEffectValue怎么用?C++ GetEffectValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetEffectValue函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleScript
void HandleScript(SpellEffIndex /*effIndex*/)
{
int32 basePoints0 = int32(GetHitUnit()->CountPctFromMaxHealth(GetEffectValue()));
GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_WARRIOR_RALLYING_CRY, &basePoints0, NULL, NULL, true);
}
示例2: HandleScript
void HandleScript(SpellEffIndex /*effIndex*/)
{
if (Unit* hitUnit = GetHitUnit())
GetCaster()->CastSpell(hitUnit, uint32(GetEffectValue()), true);
}
示例3: HandleDummy
void HandleDummy(SpellEffIndex /* effIndex */)
{
int32 damage = GetEffectValue();
if (GetCaster() && GetHitUnit())
GetCaster()->CastCustomSpell(GetHitUnit(), SHAMAN_SPELL_ANCESTRAL_AWAKENING_PROC, &damage, NULL, NULL, true);
}
示例4: HandleDummy
void HandleDummy(SpellEffIndex /*effIndex*/)
{
SetHitDamage(CalculatePct(GetCaster()->GetTotalAttackPowerValue(BASE_ATTACK), GetEffectValue()));
}
示例5: SetEffectValue
void cBlizzard::Update(const float & _delta)
{
SetEffectValue(m_pOwnerStatus->GetAttackDamage()*0.2f);
m_skillRange.vCenter = GetOwner()->GetVPos();
if (m_pOwnerStatus->GetCurrentHP() < 1)
{
SetCast(false);
SetCoolDown(false);
m_fCoolDownPassedTime = 0.0f;
m_fPassedTime = 0.0f;
}
if (IsCast())
{
m_fPassedTime += _delta;
if (m_fPassedTime < m_fRunTime)
{
m_vPos = m_skillRange.vCenter;
D3DXMatrixTranslation(&m_matWorld,m_vPos.x,m_vPos.y,m_vPos.z);
m_pParticleEffect->SetMatrix(m_matWorld);
m_pParticleEffect->Update(_delta);
if (m_fPassedTime > m_fNextHitTime)
{
for (size_t i = 0; i < m_vecTargetTag.size(); ++i)
{
const std::vector<cGameObject*> targets = g_pObjectManager->FindObjectByTag(m_vecTargetTag[i]);
for (size_t j = 0; j < targets.size(); ++j)
{
D3DXVECTOR3 vCheckPos = targets[j]->GetVPos();
D3DXVECTOR3 vRange;
D3DXVec3Normalize(&vRange, &(m_vPos - vCheckPos));
vRange *= targets[j]->GetBoundSphere().fRadius;
vCheckPos += vRange;
if (m_skillRange.IsPointIn(vCheckPos))
{
packet_hit = new Packet_Hit(GetEffectValue());
g_pMessageDispatcher->Dispatch(m_ownerID, targets[j]->GetID(), 0.0f, Msg_Hit, packet_hit);
}
}
}
m_fNextHitTime += m_fPerHitTime;
g_pSoundManager->Start("Blizzard");
}
}
else
{
if (m_pDelegate)
m_pDelegate->OnSkillDelegate(this);
SetCast(false);
SetCoolDown(true);
}
}
else if(IsCoolDown())
{
m_fCoolDownPassedTime += _delta;
if (m_fCoolDownPassedTime > m_fCoolDownTime)
{
SetCoolDown(false);
}
}
}
示例6: HandleScriptEffect
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
GetCaster()->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true);
}
示例7: HandleDummy
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
caster->CastSpell(caster, GetEffectValue(), true);
}
示例8: HandleScript
void HandleScript(SpellEffIndex /*effIndex*/)
{
GetHitUnit()->CastSpell(GetCaster(), GetEffectValue(), true);
}
示例9: HandleScript
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
GetHitUnit()->CastSpell(GetHitUnit(), GetEffectValue(), false);
}
示例10: HandleScript
void HandleScript(SpellEffIndex /*effIndex*/)
{
GetCaster()->RemoveAurasDueToSpell(uint32(GetEffectValue()));
GetCaster()->ToCreature()->AI()->Talk(EMOTE_PUNGENT_BLIGHT);
}
示例11: HandleScript
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
target->CastSpell(target, GetEffectValue(), false);
}
示例12: HandleDummy
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit* unitTarget = GetHitUnit())
if (SpellInfo const* spell_proto = sSpellMgr->GetSpellInfo(GetEffectValue()))
GetCaster()->CastSpell(unitTarget, spell_proto, true, NULL);
}
示例13: HandleEffect
void HandleEffect(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
if (GetHitUnit())
{
SpellInfo const* spellInfo = GetSpellInfo();
int32 rageUsed = std::min<int32>(200 - spellInfo->CalcPowerCost(caster, SpellSchoolMask(spellInfo->SchoolMask)), caster->GetPower(POWER_RAGE));
int32 newRage = std::max<int32>(0, caster->GetPower(POWER_RAGE) - rageUsed);
// Sudden Death rage save
if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_GENERIC, ICON_ID_SUDDEN_DEATH, EFFECT_0))
{
int32 ragesave = aurEff->GetSpellInfo()->Effects[EFFECT_0].CalcValue() * 10;
newRage = std::max(newRage, ragesave);
}
caster->SetPower(POWER_RAGE, uint32(newRage));
/// Formula taken from the DBC: "${10+$AP*0.437*$m1/100}"
int32 baseDamage = int32(10 + caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.437f * GetEffectValue() / 100.0f);
/// Formula taken from the DBC: "${$ap*0.874*$m1/100-1} = 20 rage"
int32 moreDamage = int32(rageUsed * (caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.874f * GetEffectValue() / 100.0f - 1) / 200);
SetHitDamage(baseDamage + moreDamage);
}
}
示例14: HandleScript
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
GetHitUnit()->CastSpell(GetCaster(), uint32(GetEffectValue()), true);
GetHitUnit()->GetMotionMaster()->MovePoint(POINT_LAND, SavianaRagefireFlyInPos);
}
示例15: HandleDummy
void HandleDummy(SpellEffIndex /*effIndex*/)
{
GetCaster()->CastSpell(GetCaster(), GetEffectValue(), true);
}