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

C++ GetEffectValue函数代码示例

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

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



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

示例1: HandleScript

            void HandleScript(SpellEffIndex /*effIndex*/)
            {
                int32 basePoints0 = int32(GetHitUnit()->CountPctFromMaxHealth(GetEffectValue()));

                GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_WARRIOR_RALLYING_CRY, &basePoints0, NULL, NULL, true);
            }
开发者ID:blitztech,项目名称:TrinityCore,代码行数:6,代码来源:spell_warrior.cpp


示例2: HandleScript

 void HandleScript(SpellEffIndex /*effIndex*/)
 {
     if (Unit* hitUnit = GetHitUnit())
         GetCaster()->CastSpell(hitUnit, uint32(GetEffectValue()), true);
 }
开发者ID:blitztech,项目名称:TrinityCore,代码行数:5,代码来源:blackfathom_deeps.cpp


示例3: HandleDummy

 void HandleDummy(SpellEffIndex /* effIndex */)
 {
     int32 damage = GetEffectValue();
     if (GetCaster() && GetHitUnit())
         GetCaster()->CastCustomSpell(GetHitUnit(), SHAMAN_SPELL_ANCESTRAL_AWAKENING_PROC, &damage, NULL, NULL, true);
 }
开发者ID:Dramacydal,项目名称:Trinitycore-5.3.0,代码行数:6,代码来源:spell_shaman.cpp


示例4: HandleDummy

 void HandleDummy(SpellEffIndex /*effIndex*/)
 {
     SetHitDamage(CalculatePct(GetCaster()->GetTotalAttackPowerValue(BASE_ATTACK), GetEffectValue()));
 }
开发者ID:blitztech,项目名称:TrinityCore,代码行数:4,代码来源:spell_warrior.cpp


示例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);
		}
	}
	
}
开发者ID:serment7,项目名称:WuwaFantasy,代码行数:63,代码来源:cBlizzard.cpp


示例6: HandleScriptEffect

 void HandleScriptEffect(SpellEffIndex effIndex)
 {
     PreventHitDefaultEffect(effIndex);
     GetCaster()->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true);
 }
开发者ID:Cailiaock,项目名称:5.4.7-Wow-source,代码行数:5,代码来源:boss_lord_marrowgar.cpp


示例7: HandleDummy

 void HandleDummy(SpellEffIndex /*effIndex*/)
 {
     Unit* caster = GetCaster();
     caster->CastSpell(caster, GetEffectValue(), true);
 }
开发者ID:beyourself,项目名称:123,代码行数:5,代码来源:spell_warlock.cpp


示例8: HandleScript

 void HandleScript(SpellEffIndex /*effIndex*/)
 {
     GetHitUnit()->CastSpell(GetCaster(), GetEffectValue(), true);
 }
开发者ID:Arkania,项目名称:ArkCORE-NG,代码行数:4,代码来源:boss_occuthar.cpp


示例9: HandleScript

 void HandleScript(SpellEffIndex effIndex)
 {
     PreventHitDefaultEffect(effIndex);
     GetHitUnit()->CastSpell(GetHitUnit(), GetEffectValue(), false);
 }
开发者ID:Lbniese,项目名称:WoWCircle434,代码行数:5,代码来源:wintergrasp.cpp


示例10: HandleScript

 void HandleScript(SpellEffIndex /*effIndex*/)
 {
     GetCaster()->RemoveAurasDueToSpell(uint32(GetEffectValue()));
     GetCaster()->ToCreature()->AI()->Talk(EMOTE_PUNGENT_BLIGHT);
 }
开发者ID:DSlayerMan,项目名称:DraenorCore,代码行数:5,代码来源:boss_festergut.cpp


示例11: HandleScript

 void HandleScript(SpellEffIndex effIndex)
 {
     PreventHitDefaultEffect(effIndex);
     if (Unit* target = GetHitUnit())
         target->CastSpell(target, GetEffectValue(), false);
 }
开发者ID:Hlkz2,项目名称:ACoreOld,代码行数:6,代码来源:spell_dk.cpp


示例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);
 }
开发者ID:Stylerdk,项目名称:TrinityCore,代码行数:6,代码来源:spell_paladin.cpp


示例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);
                }
            }
开发者ID:8Infinity8,项目名称:InfinityCore,代码行数:25,代码来源:spell_warrior.cpp


示例14: HandleScript

 void HandleScript(SpellEffIndex effIndex)
 {
     PreventHitDefaultEffect(effIndex);
     GetHitUnit()->CastSpell(GetCaster(), uint32(GetEffectValue()), true);
     GetHitUnit()->GetMotionMaster()->MovePoint(POINT_LAND, SavianaRagefireFlyInPos);
 }
开发者ID:Expery,项目名称:Core,代码行数:6,代码来源:boss_saviana_ragefire.cpp


示例15: HandleDummy

 void HandleDummy(SpellEffIndex /*effIndex*/)
 {
     GetCaster()->CastSpell(GetCaster(), GetEffectValue(), true);
 }
开发者ID:Jason01ex,项目名称:ZoneLimit,代码行数:4,代码来源:spell_warlock.cpp


示例16: HandleScript

 void HandleScript(SpellEffIndex /*effIndex*/)
 {
     GetHitUnit()->RemoveAurasDueToSpell(GetEffectValue());
 }
开发者ID:Mihapro,项目名称:TrinityCore,代码行数:4,代码来源:boss_anraphet.cpp


示例17: HandleScript

 void HandleScript(SpellEffIndex effIndex)
 {
     PreventHitDefaultEffect(effIndex);
     GetHitUnit()->RemoveAurasDueToSpell(uint32(GetEffectValue()));
 }
开发者ID:AlexTheBest,项目名称:ACore,代码行数:5,代码来源:icecrown_citadel.cpp


示例18: HandleDummy

 void HandleDummy(SpellEffIndex /* effIndex */)
 {
     int32 bp0 = GetEffectValue();
     if (GetHitUnit())
         GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_SLAM, &bp0, NULL, NULL, true, 0);
 }
开发者ID:Folderp,项目名称:TrinityCore,代码行数:6,代码来源:spell_warrior.cpp


示例19: HandleQuestComplete

 void HandleQuestComplete(SpellEffIndex effIndex)
 {
     GetHitUnit()->RemoveAurasDueToSpell(uint32(GetEffectValue()));
 }
开发者ID:AlexTheBest,项目名称:ACore,代码行数:4,代码来源:icecrown_citadel.cpp


示例20: HandleTaunt

 void HandleTaunt(SpellEffIndex /*effIndex*/)
 {
     if (Unit* target = GetHitUnit())
         target->CastSpell(GetCaster(), uint32(GetEffectValue()), true);
 }
开发者ID:Diyvol,项目名称:TrinityCore,代码行数:5,代码来源:boss_trollgore.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetElapsedTime函数代码示例发布时间:2022-05-30
下一篇:
C++ GetEffect函数代码示例发布时间: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