本文整理汇总了C++中ProcEventInfo::GetSpellInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ ProcEventInfo::GetSpellInfo方法的具体用法?C++ ProcEventInfo::GetSpellInfo怎么用?C++ ProcEventInfo::GetSpellInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProcEventInfo
的用法示例。
在下文中一共展示了ProcEventInfo::GetSpellInfo方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleProc
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo)
return;
uint32 spellId;
int32 chance;
// Holy Light & Flash of Light
if (spellInfo->SpellFamilyFlags[0] & 0xC0000000)
{
spellId = SPELL_PALADIN_ENDURING_LIGHT;
chance = 15;
}
// Judgements
else if (spellInfo->SpellFamilyFlags[0] & 0x00800000)
{
spellId = SPELL_PALADIN_ENDURING_JUDGEMENT;
chance = 50;
}
else
return;
if (roll_chance_i(chance))
eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), spellId, true);
}
示例2: HandleProc
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo)
return;
uint32 spellId;
int32 chance;
// Lesser Healing Wave
if (spellInfo->SpellFamilyFlags[0] & 0x00000080)
{
spellId = SPELL_SHAMAN_ENERGY_SURGE;
chance = 10;
}
// Lightning Bolt
else if (spellInfo->SpellFamilyFlags[0] & 0x00000001)
{
spellId = SPELL_SHAMAN_ENERGY_SURGE;
chance = 15;
}
// Stormstrike
else if (spellInfo->SpellFamilyFlags[1] & 0x00000010)
{
spellId = SPELL_SHAMAN_POWER_SURGE;
chance = 50;
}
else
return;
if (roll_chance_i(chance))
eventInfo.GetActor()->CastSpell((Unit*)nullptr, spellId, true);
}
示例3: CheckProc
bool CheckProc(ProcEventInfo& eventInfo)
{
if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
if (spellInfo->Id == SPELL_MAGE_IGNITE)
return true;
return false;
}
示例4: HandleProc
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
if (eventInfo.GetSpellInfo() && eventInfo.GetSpellInfo()->Id == 82036)
return;
SpellSchoolMask mask = eventInfo.GetDamageInfo()->GetSchoolMask();
if (mask & SPELL_SCHOOL_MASK_NORMAL)
{
int32 damage = QuadraticLinarBenefit(30.0f, 100.0f, eventInfo.GetDamageInfo()->GetDamage());
if (damage < 1) damage = 1;
GetCaster()->CastCustomSpell(eventInfo.GetProcTarget(), 82036, &damage, NULL, NULL, true);
}
else if (mask & SPELL_SCHOOL_MASK_NATURE)
{
int32 damage = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount());
GetCaster()->CastCustomSpell(GetCaster(), 82037, &damage, NULL, NULL, true);
}
}
示例5: CheckProc
bool CheckProc(ProcEventInfo& eventInfo)
{
// Growl shares family flags with other spells
// filter by spellIcon instead
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo || spellInfo->SpellIconID != PET_ICON_ID_GROWL)
return false;
return true;
}
示例6: HandleProc
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
SpellInfo const* procSpell = eventInfo.GetSpellInfo();
if (!procSpell)
return;
uint32 mana = procSpell->ManaCost + procSpell->ManaCostPercentage * GetTarget()->GetCreateMana() / 100;
int32 basepoint = CalculatePct(int32(mana), aurEff->GetAmount());
GetTarget()->CastCustomSpell(GetTarget(), SPELL_HUNTER_GLYPH_OF_ARCANE_SHOT, &basepoint, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
}
示例7: HandleProc
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
Unit* caster = eventInfo.GetActor();
caster->CastSpell(nullptr, SPELL_PET_GUARD_DOG_HAPPINESS, aurEff);
Unit* target = eventInfo.GetProcTarget();
if (!target->CanHaveThreatList())
return;
float addThreat = CalculatePct(ASSERT_NOTNULL(eventInfo.GetSpellInfo())->Effects[EFFECT_0].CalcValue(caster), aurEff->GetAmount());
target->GetThreatManager().AddThreat(caster, addThreat, GetSpellInfo(), false, true);
}
示例8: HandleCheckProc
bool HandleCheckProc(ProcEventInfo& eventInfo)
{
Unit const* const caster = GetCaster();
SpellInfo const* const triggerSpell = eventInfo.GetSpellInfo();
if (triggerSpell)
{
// Prevents proc by damage from the spell itself
if (triggerSpell->Id != GetId())
return true;
// Sanguinary Vein
if (AuraEffect const* const aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_SANGUINARY_VEIN, EFFECT_1))
if (triggerSpell->GetAuraState() == AURA_STATE_BLEEDING && roll_chance_i(aurEff->GetAmount()))
return false;
}
return true;
}
示例9: CheckProc
bool CheckProc(ProcEventInfo& eventInfo)
{
return eventInfo.GetSpellInfo() && (eventInfo.GetSpellInfo()->GetAllEffectsMechanicMask() & (1 << MECHANIC_SNARE | 1 << MECHANIC_ROOT | 1 << MECHANIC_FREEZE));
}