本文整理汇总了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);
}
示例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);
}
示例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)));
}
示例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);
}
示例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)));
}