当前位置: 首页>>代码示例>>C++>>正文


C++ GetSpellProto函数代码示例

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


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

示例1: Load

		bool Load() {
			absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(),
					EFFECT_0, GetCaster());
			hpPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(),
					EFFECT_1, GetCaster());
			return true;
		}
开发者ID:jsj2008,项目名称:StarGate-Plus-EMU,代码行数:7,代码来源:spell_dk.cpp

示例2: Load

		bool Load() {
			healPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(),
					EFFECT_1);
			absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(),
					EFFECT_0);
			return GetUnitOwner()->ToPlayer();
		}
开发者ID:jsj2008,项目名称:StarGate-Plus-EMU,代码行数:7,代码来源:spell_paladin.cpp

示例3: Load

 bool Load ()
 {
     absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0, GetCaster());
     if (GetCaster()->HasSpell(49224))
         absorbPct += 8;
     if (GetCaster()->HasSpell(49610))
         absorbPct += 16;
     if (GetCaster()->HasSpell(49611))
         absorbPct += 25;
     hpPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_1, GetCaster());
     return true;
 }
开发者ID:VeraDev,项目名称:ArkCORE-4.3.4,代码行数:12,代码来源:spell_dk.cpp

示例4: PeriodicTick

            void PeriodicTick(AuraEffect const* /*aurEff*/)
            {
                PreventDefaultAction();
                uint32 triggerSpellId = GetSpellProto()->EffectTriggerSpell[0];

                if (Unit* caster = GetCaster())
                    caster->CastCustomSpell(triggerSpellId, SPELLVALUE_MAX_TARGETS, irand(1, 2), caster, true);
            }
开发者ID:814077430,项目名称:ArkCORE,代码行数:8,代码来源:boss_drakkari_colossus.cpp

示例5: CalcAbsorbAmount

		int32 CalcAbsorbAmount()
		{
			Player* caster = GetPlayerCaster();
			if(caster != NULL)
				return caster->GetMaxHealth() * (GetSpellProto()->EffectBasePoints[1] + 1) / 100;
			else
				return mod->m_amount;
		}
开发者ID:Selenah,项目名称:ArcEmu,代码行数:8,代码来源:Spell_DeathKnight.cpp

示例6: HandleTriggerSpell

            void HandleTriggerSpell(AuraEffect const* aurEff)
            {
                PreventDefaultAction();
                Unit* target = GetTarget();
                uint32 triggerSpellId = GetSpellProto()->EffectTriggerSpell[aurEff->GetEffIndex()];
                target->CastSpell(target, triggerSpellId, true);

                if (Unit* caster = GetCaster())
                    if (target->GetDistance(caster) <= 12.0f)
                        target->CastSpell(caster, SPELL_SIPHONED_MIGHT, true);
            }
开发者ID:AwkwardDev,项目名称:ZoneLimit,代码行数:11,代码来源:boss_baltharus_the_warborn.cpp

示例7: AbsorbDamage

		uint32 AbsorbDamage(uint32 School, uint32* dmg)
		{
			// Checking for 1 min cooldown
			if(dSpell == NULL || ! p_target->Cooldown_CanCast(dSpell))
				return 0;

			// Check for proc chance
			if(RandomFloat(100.0f) > GetSpellProto()->EffectBasePoints[0] + 1)
				return 0;

			// Check if damage will kill player.
			uint32 cur_hlth = p_target->GetHealth();
			if((*dmg) < cur_hlth)
				return 0;

			uint32 max_hlth = p_target->GetMaxHealth();
			uint32 min_hlth = max_hlth / 10;

			/*
				looks like the following lines are not so good, we check and cast on spell id 31231_
				and adding the cooldown to it, but it looks like this spell is useless(all it's doing is_
				casting 45182, so we can do all this stuff on 45182 at first place), BUT_
				as long as proceeding cheat death is not so height (how many rogue at the same time_
				gonna get to this point?) so it's better to use it because we wont lose anything!!
			*/
			p_target->CastSpell(p_target->GetGUID(), dSpell, true);

			// set dummy effect,
			// this spell is used to procced the post effect of cheat death later.
			// Move next line to SPELL::SpellEffectDummy ?!! well it's better in case of dbc changing!!
			p_target->CastSpell(p_target->GetGUID(), 45182, true);

			// Better to add custom cooldown procedure then fucking with entry, or not!!
			dSpell->RecoveryTime = 60000;
			p_target->Cooldown_Add(dSpell, NULL);

			// Calc abs and applying it
			uint32 real_dmg = (cur_hlth > min_hlth ? cur_hlth - min_hlth : 0);
			uint32 absorbed_dmg = *dmg - real_dmg;

			*dmg = real_dmg;
			return absorbed_dmg;
		}
开发者ID:DebugProject,项目名称:Lua-Other,代码行数:43,代码来源:Spell_Rogue.cpp

示例8: AbsorbDamage

		uint32 AbsorbDamage(uint32 School, uint32* dmg)
		{
			Unit* caster = GetUnitCaster();
			if(caster == NULL)
				return 0;

			int health_pct = caster->GetHealthPct();
			uint32 cur_health = caster->GetHealth();
			uint32 max_health = caster->GetMaxHealth();
			uint32 new_health_pct = (cur_health - *dmg) * 100 / max_health;

			// "Damage that would take you below $s1% health or taken while you are at $s1% health is reduced by $52284s1%."
			if((health_pct > 35 && new_health_pct < 35) || health_pct == 35)
			{
				uint32 dmg_absorbed = *dmg * (GetSpellProto()->EffectBasePoints[0] + 1) / 100;
				*dmg -= dmg_absorbed;

				return dmg_absorbed;
			}
			else
				return 0;
		}
开发者ID:Selenah,项目名称:ArcEmu,代码行数:22,代码来源:Spell_DeathKnight.cpp

示例9: Load

 bool Load()
 {
     healPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_1);
     return true;
 }
开发者ID:1024wow,项目名称:TrinityCore,代码行数:5,代码来源:spell_priest.cpp

示例10: Load

 bool Load()
 {
     absorbChance = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0);
     return GetUnitOwner()->ToPlayer();
 }
开发者ID:antiker,项目名称:StarGateEmu-v5.x.x,代码行数:5,代码来源:spell_rogue.cpp

示例11: Load

		bool Load() {
			// Max absorb stored in 1 dummy effect
			limit = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(),
					EFFECT_1);
			return true;
		}
开发者ID:wowlove,项目名称:ArkCORE,代码行数:6,代码来源:spell_generic.cpp

示例12: CalcPctDamage

		int32 CalcPctDamage()
		{
			return GetSpellProto()->EffectBasePoints[0] + 1;
		}
开发者ID:Selenah,项目名称:ArcEmu,代码行数:4,代码来源:Spell_DeathKnight.cpp


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