本文整理汇总了C++中GetTotalAuraModValue函数的典型用法代码示例。如果您正苦于以下问题:C++ GetTotalAuraModValue函数的具体用法?C++ GetTotalAuraModValue怎么用?C++ GetTotalAuraModValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetTotalAuraModValue函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetTotalAuraModValue
void Guardian::UpdateResistances(uint32 school)
{
if (school > SPELL_SCHOOL_NORMAL)
{
float value = GetTotalAuraModValue(UnitMods(UNIT_MOD_RESISTANCE_START + school));
if (isPet())
value += float(CalculatePct(m_owner->GetResistance(SpellSchools(school)), 40));
if (m_owner->HasAura(37386, 0)) // Void Star Talisman
value += 130;
SetResistance(SpellSchools(school), int32(value));
}
else
UpdateArmor();
}
示例2: GetTotalAuraModValue
void Pet::UpdateResistances(uint32 school)
{
if (school > SPELL_SCHOOL_NORMAL)
{
float value = GetTotalAuraModValue(UnitMods(UNIT_MOD_RESISTANCE_START + school));
Unit *owner = GetOwner();
// chained, use original owner instead
if (owner && owner->GetTypeId() == TYPEID_UNIT && ((Creature*)owner)->GetEntry() == GetEntry())
if (Unit *creator = GetCreator())
owner = creator;
// hunter and warlock pets gain 40% of owner's resistance
if (owner && (getPetType() == HUNTER_PET || (getPetType() == SUMMON_PET && owner->getClass() == CLASS_WARLOCK)))
value += float(owner->GetResistance(SpellSchools(school))) * 0.4f;
SetResistance(SpellSchools(school), int32(value));
}
else
UpdateArmor();
}
示例3: GetTotalAuraModValue
void Creature::UpdateMaxHealth()
{
float value = GetTotalAuraModValue(UNIT_MOD_HEALTH);
SetMaxHealth((uint32)value);
}