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


C++ SpellSchools函数代码示例

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


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

示例1: GetTotalAuraModValue

void Guardian::UpdateResistances(uint32 school)
{
    if (school > SPELL_SCHOOL_NORMAL)
    {
        float value  = GetTotalAuraModValue(UnitMods(UNIT_MOD_RESISTANCE_START + school));

        // hunter and warlock pets gain 40% of owner's resistance
        if (IsPet())
            value += float(CalculatePct(m_owner->GetResistance(SpellSchools(school)), 40));

        SetResistance(SpellSchools(school), int32(value));
    }
    else
        UpdateArmor();
}
开发者ID:AnthoDevMoP,项目名称:SkyFire_5xx,代码行数:15,代码来源:StatSystem.cpp

示例2: UnitMods

void Player::UpdateResistances(uint32 school)
{ 
    if (school > SPELL_SCHOOL_NORMAL)
    {
        // cant use GetTotalAuraModValue because of total pct multiplier :P
        float value = 0.0f;
        UnitMods unitMod = UnitMods(UNIT_MOD_RESISTANCE_START + school);

        value  = GetModifierValue(unitMod, BASE_VALUE);
        value *= GetModifierValue(unitMod, BASE_PCT);
        value += GetModifierValue(unitMod, TOTAL_VALUE);

        AuraEffectList const& mResbyIntellect = GetAuraEffectsByType(SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT);
        for(AuraEffectList::const_iterator i = mResbyIntellect.begin();i != mResbyIntellect.end(); ++i)
        {
            if((*i)->GetMiscValue() & (1 << (school-1)) )
				value += int32(GetStat(Stats((*i)->GetMiscValueB())) * (*i)->GetAmount() / 100.0f);
        }

        value *= GetModifierValue(unitMod, TOTAL_PCT);

        SetResistance(SpellSchools(school), int32(value));
    }
    else
        UpdateArmor();
}
开发者ID:Cryostorm,项目名称:SunwellCore,代码行数:26,代码来源:StatSystem.cpp

示例3: 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();
}
开发者ID:Blumfield,项目名称:TBCPvP,代码行数:17,代码来源:StatSystem.cpp

示例4: GetTotalAuraModValue

void Creature::UpdateResistances(uint32 school)
{
    if (school > SPELL_SCHOOL_NORMAL)
    {
        float value  = GetTotalAuraModValue(UnitMods(UNIT_MOD_RESISTANCE_START + school));
        SetResistance(SpellSchools(school), int32(value));
    }
    else
        { UpdateArmor(); }
}
开发者ID:Chuck5ta,项目名称:server,代码行数:10,代码来源:StatSystem.cpp

示例5: GetTotalAuraModValue

void Player::UpdateResistances(uint32 school)
{
    if(school > SPELL_SCHOOL_NORMAL)
    {
        float value  = GetTotalAuraModValue(UnitMods(UNIT_MOD_RESISTANCE_START + school));
        SetResistance(SpellSchools(school), int32(value));
    }
    else
        UpdateArmor();

    CallForAllControlledUnits(ApplyScalingBonusWithHelper(SCALING_TARGET_RESISTANCE, school, false),CONTROLLED_PET|CONTROLLED_GUARDIANS);
}
开发者ID:MichaelFurth,项目名称:RCore,代码行数:12,代码来源:StatSystem.cpp

示例6: GetTotalAuraModValue

void Player::UpdateResistances(uint32 school)
{
    if (school > SPELL_SCHOOL_NORMAL)
    {
        float value  = GetTotalAuraModValue(UnitMods(UNIT_MOD_RESISTANCE_START + school));
        SetResistance(SpellSchools(school), int32(value));

        RecalculatePetsScalingResistance(school);
    }
    else
        UpdateArmor();
}
开发者ID:xIchigox,项目名称:SoDCore.434,代码行数:12,代码来源:StatSystem.cpp

示例7: 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();
}
开发者ID:Archives,项目名称:try,代码行数:21,代码来源:StatSystem.cpp


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