本文整理匯總了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)));
}