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

C++ GetOriginalCaster函数代码示例

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

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



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

示例1: HandleSummon

            void HandleSummon(SpellEffIndex effIndex)
            {
                PreventHitEffect(effIndex);

                uint32 entry = GetSpellInfo()->Effects[effIndex].MiscValue;
                SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(GetSpellInfo()->Effects[effIndex].MiscValueB);
                int32 duration = GetSpellInfo()->GetDuration();
                if (!GetOriginalCaster() || !properties)
                    return;

                if (TempSummon* summon = GetCaster()->GetMap()->SummonCreature(entry, *GetHitDest(), properties, duration, GetOriginalCaster(), GetSpellInfo()->Id))
                {
                    summon->SetCreatorGUID(GetOriginalCaster()->GetGUID());
                    summon->HandleSpellClick(GetCaster());
                }
            }
开发者ID:Matt-One,项目名称:azerothcore-wotlk,代码行数:16,代码来源:zone_wintergrasp.cpp


示例2: HandleDummy

            void HandleDummy(SpellEffIndex effIndex)
            {
                Unit* caster = GetCaster();
                if (Unit* target = GetHitUnit())
                {
                    SpellInfo const* spellInfo = GetSpellInfo();
                    int32 rageUsed = std::min<int32>(300 - 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_1].CalcValue() * 10;
                        newRage = std::max(newRage, ragesave);
                    }

                    caster->SetPower(POWER_RAGE, uint32(newRage));
                    // Glyph of Execution bonus
                    if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_GLYPH_OF_EXECUTION, EFFECT_0))
                        rageUsed += aurEff->GetAmount() * 10;


                    int32 bp = GetEffectValue() + int32(rageUsed * spellInfo->Effects[effIndex].DamageMultiplier + caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.2f);
                    caster->CastCustomSpell(target,SPELL_EXECUTE,&bp,0,0,true,0,0,GetOriginalCaster()->GetGUID());
                }
            }
开发者ID:Blackn7g,项目名称:Voodoo,代码行数:26,代码来源:spell_warrior.cpp


示例3: HandleDummy

 void HandleDummy(SpellEffIndex /*effIndex*/)
 {
     if(GetHitCreature())
     {
         GetOriginalCaster()->GetVehicleKit()->GetPassenger(0)->ToPlayer()->KilledMonsterCredit(NPC_WYRMREST_TEMPLE_CREDIT, 0);
     }
 }
开发者ID:GlassFace,项目名称:MythCore,代码行数:7,代码来源:spell_quest.cpp


示例4: CheckDistance

 void CheckDistance()
 {
     if (Unit* caster = GetOriginalCaster())
     {
         if (Unit* target = GetHitUnit())
             target->CastSpell(caster, SPELL_SIPHONED_MIGHT, true);
     }
 }
开发者ID:3kids,项目名称:TrinityCore,代码行数:8,代码来源:boss_baltharus_the_warborn.cpp


示例5: HandleHeal

		void HandleHeal(SpellEffIndex /*effIndex*/)
		{
			if (Unit* caster = GetOriginalCaster())
				if (GetHitUnit()->GetGUID() == caster->GetGUID())
				{
				int32 heal = GetHitHeal() / 2.0f;
				SetHitHeal(heal);
				}
		}
开发者ID:Tithand,项目名称:TER-Server,代码行数:9,代码来源:spell_priest.cpp


示例6: CheckDistance

 void CheckDistance()
 {
     if (Unit* caster = GetOriginalCaster())
         if (Unit* target = GetHitUnit())
             if (target == GetCaster() 
                 // the spell has an unlimited range, so we need this check
                 && target->GetDistance2d(caster) <= 12.0f)
                 target->CastSpell(caster, SPELL_SIPHONED_MIGHT, true);
 }
开发者ID:Helias,项目名称:azerothcore-wotlk,代码行数:9,代码来源:boss_baltharus_the_warborn.cpp


示例7: FilterTargets

        void FilterTargets(std::list<WorldObject*>& targets)
        {
            targets.clear();

            Unit* target = GetOriginalCaster();
            if (!target)
                return;

            targets.push_back(target);
        }
开发者ID:DanielBallaSZTE,项目名称:TrinityCorePreWOTLK,代码行数:10,代码来源:spell_rogue.cpp


示例8: Hit

            void Hit()
            {
                if (!GetHitUnit())
                    return;

                if (!GetCaster())
                    return;               

                if (!GetOriginalCaster())
                    return;

                if (Aura* debuff = GetOriginalCaster()->AddAura(89421, GetHitUnit()))
                {
                    if (!GetSpellValue())
                        return;

                    int32 duration = GetSpellValue()->EffectBasePoints[1];
                    debuff->SetDuration(duration, false);
                }
            }
开发者ID:Faydz,项目名称:TrinityCore,代码行数:20,代码来源:boss_sinestra.cpp


示例9: HandleHeal

 void HandleHeal(SpellEffIndex /*effIndex*/)
 {
     if (Unit* caster = GetOriginalCaster())
     {
         if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_PRIEST_T9_HEALING_2P, EFFECT_0))
         {
             int32 heal = GetHitHeal();
             AddPct(heal, aurEff->GetAmount());
             SetHitHeal(heal);
         }
     }
 }
开发者ID:Stylerdk,项目名称:TrinityCore,代码行数:12,代码来源:spell_priest.cpp


示例10: SelectTargets

            void SelectTargets(std::list<WorldObject*>& targets)
            {
                targets.remove_if([](WorldObject* target)
                {
                    return !target->ToUnit() || target->ToUnit()->IsFullHealth();
                });

                Trinity::Containers::RandomResize(targets, 1);

                if (targets.empty())
                    targets.push_back(GetOriginalCaster());
            }
开发者ID:Lyill,项目名称:TrinityCore,代码行数:12,代码来源:spell_shaman.cpp


示例11: HandleHeal

 void HandleHeal(SpellEffIndex /*effIndex*/)
 {
     if (Unit* caster = GetOriginalCaster())
     {
         if (Aura* aur = caster->GetAura(SPELL_T9_HEALING_2_PIECE))
         {
             int32 heal = GetHitHeal();
             AddPctN(heal, aur->GetSpellInfo()->Effects[0].CalcValue());
             SetHitHeal(heal);
         }
     }
 }
开发者ID:Altair69,项目名称:SkyFireEMU,代码行数:12,代码来源:spell_priest.cpp


示例12: HandleAchievementCredit

            void HandleAchievementCredit(SpellEffIndex /*effIndex*/)
            {
                uint32 _creditSpell = 0;
                Unit* caster = GetOriginalCaster();
                if (!caster)
                    return;

                if (GetSpellInfo()->Id == SPELL_SEAFORIUM_BLAST)
                    _creditSpell = SPELL_A_BOMB_INABLE_CREDIT;
                else if (GetSpellInfo()->Id == SPELL_HUGE_SEAFORIUM_BLAST)
                    _creditSpell = SPELL_A_BOMB_INATION_CREDIT;

                if (GetHitGObj() && GetHitGObj()->IsDestructibleBuilding())
                    caster->CastSpell(caster, _creditSpell, true);
            }
开发者ID:090809,项目名称:TrinityCore,代码行数:15,代码来源:isle_of_conquest.cpp


示例13: HandleScript

            void HandleScript(SpellEffIndex effIndex)
            {
                PreventHitDefaultEffect(effIndex);
                Unit* target = GetHitUnit();
                Unit* caster = GetOriginalCaster();
                if (target && caster && caster->GetMap())
                {
                    for (uint32 i = 0; i < 3; ++i)
                    {
                        caster->CastSpell(target, 58689, true);
                        caster->CastSpell(target, 58692, true);
                    }

                    caster->CastSpell(target, caster->GetMap()->Is25ManRaid() ? 60883 : 58695, true); 
                }
            }
开发者ID:AzerothShard-Dev,项目名称:azerothcore,代码行数:16,代码来源:boss_archavon.cpp


示例14: HandleDamage

            void HandleDamage(SpellEffIndex /*effIndex*/)
            {
                if (!GetTriggeringSpell())
                    return;

                Unit* target = GetHitUnit();
                Unit* caster = GetOriginalCaster();

                if (target->HasAura(GetTriggeringSpell()->Id))
                    SetHitDamage(0);
                else
                {
                    if (target->GetTypeId() == TYPEID_PLAYER && caster->IsAIEnabled)
                        caster->ToCreature()->AI()->SetData(DATA_POLARITY_SWITCH, 1);
                }
            }
开发者ID:OniBoov,项目名称:TCOLD,代码行数:16,代码来源:boss_thaddius.cpp


示例15: HandleDummy

            void HandleDummy(SpellEffIndex /* effIndex */)
            {
                if (Unit* caster = GetOriginalCaster())
                    if (Unit* target = GetHitUnit())
                    {
                        if (!target->isAlive() || !_targetCount)
                            return;

                        int32 damage = 10000 / _targetCount;

                        SpellNonMeleeDamage damageInfo(caster, target, GetSpellInfo()->Id, GetSpellInfo()->SchoolMask);
                        damageInfo.damage = damage;

                        caster->CalcAbsorbResist(target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &damageInfo.absorb, &damageInfo.resist, GetSpellInfo());
                        caster->DealDamageMods(target, damageInfo.damage, &damageInfo.absorb);
                        caster->SendSpellNonMeleeDamageLog(&damageInfo);
                        caster->DealSpellDamage(&damageInfo, false);
                    }
            }
开发者ID:ArbacalTrinty,项目名称:TrinityCore,代码行数:19,代码来源:boss_astromancer.cpp


示例16: HandleScriptEffect

        void HandleScriptEffect(SpellEffIndex /*effIndex*/)
        {
            Unit* caster = GetOriginalCaster();
            Unit* target = GetHitUnit();
            if (!target)
                return;

            if (GetSpellInfo()->Id == SPELL_AIR_RIFLE_HIT_TRIGGER)
            {
                if (!caster->IsFriendlyTo(target))
                    caster->CastSpell(target, SPELL_AIR_RIFLE_PELTED_DAMAGE, true, NULL, NULL, caster->GetGUID());
            }
            else
            {
                uint8 rand = urand(0, 99);
                if (rand < 15)
                    caster->CastSpell(caster, SPELL_AIR_RIFLE_RIGHT_IN_THE_EYE, true, NULL, NULL, caster->GetGUID());
                else if (rand < 35)
                    caster->CastSpell(target, SPELL_AIR_RIFLE_STARLED, true, NULL, NULL, caster->GetGUID());
                else
                    caster->CastSpell(target, SPELL_AIR_RIFLE_HIT, true, NULL, NULL, caster->GetGUID());
            }
        }
开发者ID:Keader,项目名称:Sunwell,代码行数:23,代码来源:winter_veil.cpp


示例17: HandleDummy

            void HandleDummy(SpellEffIndex /* effIndex */)
            {
                int32 damage = GetEffectValue();
                SpellInfo const* triggeringSpell = GetTriggeringSpell();
                if (Unit* target = GetHitUnit())
                    if (Unit* caster = GetCaster())
                    {
                        if (Unit* owner = caster->GetOwner())
                        {
                            if (triggeringSpell)
                                damage = int32(owner->SpellHealingBonus(target, triggeringSpell, damage, HEAL));

                            // Restorative Totems
                            if (AuraEffect* dummy = owner->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, ICON_ID_RESTORATIVE_TOTEMS, 1))
                                AddPctN(damage, dummy->GetAmount());

                            // Glyph of Healing Stream Totem
                            if (AuraEffect const* aurEff = owner->GetAuraEffect(SPELL_GLYPH_OF_HEALING_STREAM_TOTEM, EFFECT_0))
                                AddPctN(damage, aurEff->GetAmount());
                        }
                        caster->CastCustomSpell(target, SPELL_HEALING_STREAM_TOTEM_HEAL, &damage, 0, 0, true, 0, 0, GetOriginalCaster()->GetGUID());
                    }
            }
开发者ID:BlackWolfsDen,项目名称:Justicar-WoW,代码行数:23,代码来源:spell_shaman.cpp


示例18: Load

 bool Load() override
 {
     return GetOriginalCaster()->GetTypeId() == TYPEID_UNIT;
 }
开发者ID:OniBoov,项目名称:TCOLD,代码行数:4,代码来源:boss_thaddius.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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