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


C++ GetDefenseSkillValue函数代码示例

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


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

示例1: GetDodgeFromAgility

void Player::UpdateDodgePercentage()
{
    // Dodge from agility
    float value = GetDodgeFromAgility();
    // Modify value from defense skill
    value += (int32(GetDefenseSkillValue()) - int32(GetMaxSkillValueForLevel())) * 0.04f;
    // Dodge from SPELL_AURA_MOD_DODGE_PERCENT aura
    value += GetTotalAuraModifier(SPELL_AURA_MOD_DODGE_PERCENT);

    value = value < 0.0f ? 0.0f : value;
    SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);
}
开发者ID:mynew,项目名称:TrinityCore-1,代码行数:12,代码来源:StatSystem.cpp

示例2: int32

void Player::UpdateParryPercentage()
{
    // Base parry
    float value  = 5.0f;
    // Modify value from defense skill
    value += (int32(GetDefenseSkillValue()) - int32(GetMaxSkillValueForLevel())) * 0.04f;
    // Parry from SPELL_AURA_MOD_PARRY_PERCENT aura
    value += GetTotalAuraModifier(SPELL_AURA_MOD_PARRY_PERCENT);
    // Parry from rating
    value += GetRatingBonusValue(CR_PARRY);
    value = value < 0.0f ? 0.0f : value;
    SetStatFloatValue(PLAYER_PARRY_PERCENTAGE, value);
}
开发者ID:Artea,项目名称:mangos-svn,代码行数:13,代码来源:StatSystem.cpp

示例3: GetDodgeFromAgility

void Player::UpdateDodgePercentage()
{
    // Base dodge
    float value = (getClass() < MAX_CLASSES) ? PLAYER_BASE_DODGE[getClass()] : 0.0f;
    // Dodge from agility
    value += GetDodgeFromAgility(GetStat(STAT_AGILITY));
    // Dodge from SPELL_AURA_MOD_DODGE_PERCENT aura
    value += GetTotalAuraModifier(SPELL_AURA_MOD_DODGE_PERCENT);
    // Dodge from rating
    value += GetRatingBonusValue(CR_DODGE);
    // Set current dodge chance
    m_modDodgeChance = value;
    // Set UI display value: modify value from defense skill against same level target
    value += (int32(GetDefenseSkillValue()) - int32(GetSkillMaxForLevel())) * 0.04f;
    SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, std::max(0.0f, std::min(value, 100.0f)));
}
开发者ID:MantisLord,项目名称:mangos-tbc,代码行数:16,代码来源:StatSystem.cpp

示例4: int32

void Player::UpdateBlockPercentage()
{
    // No block
    float value = 0.0f;
    if (CanBlock())
    {
        // Base value
        value = 5.0f;
        // Modify value from defense skill
        value += (int32(GetDefenseSkillValue()) - int32(GetMaxSkillValueForLevel())) * 0.04f;
        // Increase from SPELL_AURA_MOD_BLOCK_PERCENT aura
        value += GetTotalAuraModifier(SPELL_AURA_MOD_BLOCK_PERCENT);
        value = value < 0.0f ? 0.0f : value;
    }
    SetStatFloatValue(PLAYER_BLOCK_PERCENTAGE, value);
}
开发者ID:Chuck5ta,项目名称:server,代码行数:16,代码来源:StatSystem.cpp

示例5: GetTotalAuraModifier

void Player::UpdateBlockPercentage()
{
    float value = 0.0f;
    float real = 0.0f;
    if (CanBlock())
    {
        // Base value
        value = 5.0f;
        // Increase from SPELL_AURA_MOD_BLOCK_PERCENT aura
        value += GetTotalAuraModifier(SPELL_AURA_MOD_BLOCK_PERCENT);
        // Increase from rating
        value += GetRatingBonusValue(CR_BLOCK);
        real = value;
        // Set UI display value: modify value from defense skill against same level target
        value += (int32(GetDefenseSkillValue()) - int32(GetSkillMaxForLevel())) * 0.04f;
    }
    m_modBlockChance = real;
    SetStatFloatValue(PLAYER_BLOCK_PERCENTAGE, std::max(0.0f, std::min(value, 100.0f)));
}
开发者ID:MantisLord,项目名称:mangos-tbc,代码行数:19,代码来源:StatSystem.cpp


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