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

C++ GetSpellInfo函数代码示例

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

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



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

示例1: Load

 bool Load()
 {
     healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
     return true;
 }
开发者ID:Altair69,项目名称:SkyFireEMU,代码行数:5,代码来源:spell_priest.cpp


示例2: Load

 bool Load()
 {
     // Max absorb stored in 1 dummy effect
     limit = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
     return true;
 }
开发者ID:Sania001,项目名称:ALiveCoreRC2,代码行数:6,代码来源:spell_generic.cpp


示例3: HandleDummyLaunch

 void HandleDummyLaunch(SpellEffIndex /*effIndex*/)
 {
     sLog->outString("Spell %u with SPELL_EFFECT_DUMMY is just launched!", GetSpellInfo()->Id);
 }
开发者ID:FirstCore,项目名称:FunCore,代码行数:4,代码来源:example_spell.cpp


示例4: HandleDummyHit

 void HandleDummyHit(SpellEffIndex /*effIndex*/)
 {
     sLog->outString("Spell %u with SPELL_EFFECT_DUMMY has hit!", GetSpellInfo()->Id);
 }
开发者ID:FirstCore,项目名称:FunCore,代码行数:4,代码来源:example_spell.cpp


示例5: HandleDummy

 void HandleDummy(SpellEffIndex /*effIndex*/)
 {
     if (Unit* unitTarget = GetHitUnit())
     {
         int32 bp0 = 0;
         int32 bp1 = 0;
         // Living ghoul as a target
         if (unitTarget->isAlive())
         {
             bp0 = int32(unitTarget->CountPctFromMaxHealth(25));
             bp1 = int32(unitTarget->CountPctFromMaxHealth(200));
             unitTarget->CastCustomSpell(unitTarget, DK_SPELL_PET_EXPLODE, &bp0, &bp1, NULL, false);
         }
         // Some corpse
         else
         {
             bp0 = GetEffectValue();
             GetCaster()->CastCustomSpell(unitTarget, SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), 1), &bp0, NULL, NULL, true);
             // Set corpse look
             unitTarget->SetDisplayId(DISPLAY_GHOUL_CORPSE + urand(0, 3));
         }
     }
 }
开发者ID:Sharki,项目名称:TC,代码行数:23,代码来源:spell_dk.cpp


示例6: HandleEffectRemove

 void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
 {
     if (Player* player = GetTarget()->ToPlayer())
         if (AuraEffect const* glyph = player->GetAuraEffect(SPELL_DK_GLYPH_OF_REGENERATIVE_MAGIC, EFFECT_0)) // reduce cooldown of AMS if player has glyph
         {
             // Cannot reduce cooldown by more than 50%
             int32 val = std::min(glyph->GetAmount(), int32(absorbedAmount) * 100 / maxHealth);
             player->GetSpellHistory()->ModifyCooldown(GetId(), -int32(player->GetSpellHistory()->GetRemainingCooldown(GetSpellInfo()) * val / 100));
         }
 }
开发者ID:DSlayerMan,项目名称:DraenorCore,代码行数:10,代码来源:spell_dk.cpp


示例7: CheckCast

 SpellCastResult CheckCast()
 {
     if (int32(GetCaster()->GetHealth()) > int32(GetCaster()->CountPctFromMaxHealth(GetSpellInfo()->Effects[EFFECT_2].CalcValue())))
         return SPELL_CAST_OK;
     return SPELL_FAILED_FIZZLE;
 }
开发者ID:BlackWolfsDen,项目名称:Cataclysm,代码行数:6,代码来源:spell_warlock.cpp


示例8: CalculateAmount

 void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
 {
     if (AuraEffect* aurEff = GetUnitOwner()->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_PET, GetSpellInfo()->SpellIconID, EFFECT_0))
         AddPct(amount, aurEff->GetAmount());
 }
开发者ID:AzerothShard-Dev,项目名称:azerothcore,代码行数:5,代码来源:spell_hunter.cpp


示例9: HandleHit

 void HandleHit(SpellEffIndex /*effIndex*/)
 {
     if (AuraEffect const* aurEff = GetHitUnit()->GetAuraEffect(SPELL_WARLOCK_IMMOLATE, EFFECT_2, GetCaster()->GetGUID()))
         SetHitDamage(CalculatePct(aurEff->GetAmount(), GetSpellInfo()->Effects[EFFECT_1].CalcValue(GetCaster())));
 }
开发者ID:BlackWolfsDen,项目名称:Cataclysm,代码行数:5,代码来源:spell_warlock.cpp


示例10: CheckCast

 SpellCastResult CheckCast()
 {
     if ((int32(GetCaster()->GetHealth()) > int32(GetSpellInfo()->Effects[EFFECT_0].CalcValue() + (6.3875 * GetSpellInfo()->BaseLevel))))
         return SPELL_CAST_OK;
     return SPELL_FAILED_FIZZLE;
 }
开发者ID:Shutok,项目名称:WingsEMU,代码行数:6,代码来源:spell_warlock.cpp


示例11: HandleEffectBearProc

            void HandleEffectBearProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                if (GetTarget()->GetShapeshiftForm() != FORM_BEAR || eventInfo.GetDamageInfo()->GetSpellInfo()->Id != SPELL_DRUID_FERAL_CHARGE_BEAR)
                    return;

                GetTarget()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_DRUID_STAMPEDE_BAER_RANK_1, GetSpellInfo()->GetRank()), true, NULL, aurEff);
            }
开发者ID:Nightprince,项目名称:SkyFire.548,代码行数:8,代码来源:spell_druid.cpp


示例12: HandleEnergize

        void HandleEnergize(SpellEffIndex effIndex)
        {
            Player* caster = GetCaster()->ToPlayer();

            // No boomy, no deal.
            if (caster->GetPrimaryTalentTree(caster->GetActiveSpec()) != TALENT_TREE_DRUID_BALANCE)
                return;

            switch(GetSpellInfo()->Id)
            {
                case SPELL_DRUID_WRATH:
                {
                    energizeAmount = -GetSpellInfo()->Effects[effIndex].BasePoints; // -13
                    // If we are set to fill the lunar side or we've just logged in with 0 power..
                    if ((!caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER))
                        || caster->GetPower(POWER_ECLIPSE) == 0)
                    {
                        caster->CastCustomSpell(caster,SPELL_DRUID_ECLIPSE_GENERAL_ENERGIZE,&energizeAmount,0,0,true);
                        // If the energize was due to 0 power, cast the eclipse marker aura
                        if (!caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER))
                            caster->CastSpell(caster,SPELL_DRUID_LUNAR_ECLIPSE_MARKER,true);
                    }
                    // The energizing effect brought us out of the solar eclipse, remove the aura
                    if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) <= 0)
                        caster->RemoveAurasDueToSpell(SPELL_DRUID_SOLAR_ECLIPSE);
                    break;
                }
                case SPELL_DRUID_STARFIRE:
                {
                    energizeAmount = GetSpellInfo()->Effects[effIndex].BasePoints; // 20
                    // If we are set to fill the solar side or we've just logged in with 0 power..
                    if ((!caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER))
                        || caster->GetPower(POWER_ECLIPSE) == 0)
                    {
                        caster->CastCustomSpell(caster,SPELL_DRUID_ECLIPSE_GENERAL_ENERGIZE,&energizeAmount,0,0,true);
                        // If the energize was due to 0 power, cast the eclipse marker aura
                        if (!caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER))
                            caster->CastSpell(caster,SPELL_DRUID_SOLAR_ECLIPSE_MARKER,true);
                    }
                    // The energizing effect brought us out of the lunar eclipse, remove the aura
                    if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) >= 0)
                        caster->RemoveAura(SPELL_DRUID_LUNAR_ECLIPSE);
                    break;
                }
                case SPELL_DRUID_STARSURGE:
                {
                    // If we are set to fill the solar side or we've just logged in with 0 power (confirmed with sniffs)
                    if ((!caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER))
                        || caster->GetPower(POWER_ECLIPSE) == 0)
                    {
                        energizeAmount = GetSpellInfo()->Effects[effIndex].BasePoints; // 15
                        caster->CastCustomSpell(caster,SPELL_DRUID_STARSURGE_ENERGIZE,&energizeAmount,0,0,true);

                        // If the energize was due to 0 power, cast the eclipse marker aura
                        if (!caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER))
                            caster->CastSpell(caster,SPELL_DRUID_SOLAR_ECLIPSE_MARKER,true);
                    }
                    else if (!caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER))
                    {
                        energizeAmount = -GetSpellInfo()->Effects[effIndex].BasePoints; // -15
                        caster->CastCustomSpell(caster,SPELL_DRUID_STARSURGE_ENERGIZE,&energizeAmount,0,0,true);
                    }
                    // The energizing effect brought us out of the lunar eclipse, remove the aura
                    if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) >= 0)
                        caster->RemoveAura(SPELL_DRUID_LUNAR_ECLIPSE);
                    // The energizing effect brought us out of the solar eclipse, remove the aura
                    else if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) <= 0)
                        caster->RemoveAura(SPELL_DRUID_SOLAR_ECLIPSE);
                    break;
                }
            }
        }
开发者ID:SgT-Fatality,项目名称:PandarenCore,代码行数:72,代码来源:spell_druid.cpp


示例13: HandlePeriodic

 void HandlePeriodic(AuraEffect const* aurEff)
 {
     PreventDefaultAction();
     if (aurEff->GetAmount() <= 0)
     {
         Unit* target = GetTarget();
         uint32 spellId = SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1 + GetId() - SPELL_HUNTER_SNIPER_TRAINING_R1;
         target->CastSpell(target, spellId, true, 0, aurEff);
         if (Player* playerTarget = GetUnitOwner()->ToPlayer())
         {
             int32 baseAmount = aurEff->GetBaseAmount();
             int32 amount = playerTarget->CalculateSpellDamage(playerTarget, GetSpellInfo(), aurEff->GetEffIndex(), &baseAmount);
             GetEffect(EFFECT_0)->SetAmount(amount);
         }
     }
 }
开发者ID:AwkwardDev,项目名称:TinyCore,代码行数:16,代码来源:spell_hunter.cpp


示例14: Load

 bool Load() override
 {
     absorbChance = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
     return GetUnitOwner()->GetTypeId() == TYPEID_PLAYER;
 }
开发者ID:DanielBallaSZTE,项目名称:TrinityCorePreWOTLK,代码行数:5,代码来源:spell_rogue.cpp


示例15: Load

 bool Load()
 {
     chance = GetSpellInfo()->Effects[EFFECT_1].CalcValue(GetCaster());
     return true;
 }
开发者ID:Eralan,项目名称:Darkcore,代码行数:5,代码来源:spell_shaman.cpp


示例16: HandleDummyLaunchTarget

 void HandleDummyLaunchTarget(SpellEffIndex /*effIndex*/)
 {
     uint64 targetGUID = 0;
     if (Unit* unitTarget = GetHitUnit())
         targetGUID = unitTarget->GetGUID();
     // we're handling SPELL_EFFECT_DUMMY in effIndex 0 here
     sLog->outString("Spell %u with SPELL_EFFECT_DUMMY is just launched at it's target: " UI64FMTD "!", GetSpellInfo()->Id, targetGUID);
 }
开发者ID:FirstCore,项目名称:FunCore,代码行数:8,代码来源:example_spell.cpp


示例17: CountTargets

 void CountTargets(std::list<WorldObject*>& targets)
 {
     _targetCount = std::min<uint32>(targets.size(), GetSpellInfo()->MaxAffectedTargets);
 }
开发者ID:GetPlay,项目名称:TC,代码行数:4,代码来源:boss_lord_marrowgar.cpp


示例18: HandleForceCast

 void HandleForceCast(SpellEffIndex effIndex)
 {
     PreventHitDefaultEffect(effIndex);
     GetCaster()->CastSpell(GetCaster(), GetSpellInfo()->GetEffect(effIndex)->TriggerSpell, true);
 }
开发者ID:blitztech,项目名称:TrinityCore,代码行数:5,代码来源:boss_kologarn.cpp


示例19: FilterTargets

 void FilterTargets(std::list<WorldObject*>& targets)
 {
     for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end();)
     {
         if ((*itr)->GetTypeId() == TYPEID_PLAYER && (*itr)->ToPlayer()->GetQuestStatus(GetSpellInfo()->GetEffect(EFFECT_1)->CalcValue()) == QUEST_STATUS_INCOMPLETE)
             ++itr;
         else
             targets.erase(itr++);
     }
     targets.push_back(GetCaster());
 }
开发者ID:Carbenium,项目名称:TrinityCore,代码行数:11,代码来源:zone_dustwallow_marsh.cpp


示例20: HandleEffectApply

		void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
		{
			if (GetStackAmount() == GetSpellInfo()->StackAmount)
				GetTarget()->CastSpell(GetTarget(), 93683, true);
		}
开发者ID:Tithand,项目名称:TER-Server,代码行数:5,代码来源:spell_priest.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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