本文整理汇总了C++中GetCreatePowers函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCreatePowers函数的具体用法?C++ GetCreatePowers怎么用?C++ GetCreatePowers使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetCreatePowers函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: UnitMods
void Player::UpdateMaxPower(Powers power)
{
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
float bonusPower = (power == POWER_MANA && GetCreatePowers(power) > 0) ? GetManaBonusFromIntellect() : 0;
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power);
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + bonusPower;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxPower(power, uint32(value));
}
开发者ID:AnthoDevMoP,项目名称:SkyFire_5xx,代码行数:13,代码来源:StatSystem.cpp
示例2: UnitMods
void Guardian::UpdateMaxPower(Powers power)
{
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
float addValue = (power == POWER_MANA) ? GetStat(STAT_INTELLECT) - GetCreateStat(STAT_INTELLECT) : 0.0f;
float multiplicator = 15.0f;
switch (GetEntry())
{
case ENTRY_IMP: multiplicator = 4.95f; break;
case ENTRY_VOIDWALKER:
case ENTRY_SUCCUBUS:
case ENTRY_FELHUNTER:
case ENTRY_FELGUARD: multiplicator = 11.5f; break;
default: multiplicator = 15.0f; break;
}
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power);
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + addValue * multiplicator;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxPower(power, uint32(value));
}
开发者ID:Blumfield,项目名称:TBCPvP,代码行数:25,代码来源:StatSystem.cpp
示例3: UnitMods
void Pet::UpdateMaxPower(Powers power)
{
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
float addValue = (power == POWER_MANA) ? GetStat(STAT_INTELLECT) - GetCreateStat(STAT_INTELLECT) : 0.0f;
float multiplicator;
// nesocips warlock pet stats calculation
switch(GetEntry())
{
case 416: multiplicator = 4.95f; break; // imp
case 1860: // voidwalker
case 1863: // succubus
case 417: // felhunter
case 17252: multiplicator = 11.5f; break; // felguard
default: multiplicator = 15.0f; break;
}
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power);
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + addValue * multiplicator;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxPower(power, uint32(value));
}
开发者ID:kero99,项目名称:mangos_old,代码行数:25,代码来源:StatSystem.cpp
示例4: UpdateStats
bool Pet::UpdateAllStats()
{
for (int i = STAT_STRENGTH; i < MAX_STATS; ++i)
UpdateStats(Stats(i));
for (uint32 i = 0; i <= sChrPowerTypesStore.GetNumRows(); i++)
{
ChrPowerTypesEntry const* cEntry = sChrPowerTypesStore.LookupEntry(i);
if (!cEntry)
continue;
if (getClass() != cEntry->classId)
continue;
if (cEntry->power == 10)
continue;
SetMaxPower(Powers(cEntry->power), uint32(GetCreatePowers(Powers(cEntry->power))));
}
for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
UpdateResistances(i);
return true;
}
开发者ID:Shutok,项目名称:StrawberryCore-501Beta,代码行数:26,代码来源:StatSystem.cpp
示例5: UnitMods
void Guardian::UpdateMaxPower(Powers power)
{
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
float addValue = (power == POWER_MANA) ? std::max<float>(GetStat(STAT_INTELLECT) - GetCreateStat(STAT_INTELLECT), 0.0f) : 0.0f;
float multiplicator = 15.0f;
switch (GetEntry())
{
case NPC_IMP:
case NPC_WATER_ELEMENTAL_TEMP:
case NPC_WATER_ELEMENTAL_PERM:
multiplicator = 4.95f;
break;
case NPC_VOIDWALKER:
case NPC_SUCCUBUS:
case NPC_FELHUNTER:
case NPC_FELGUARD:
multiplicator = 11.5f;
break;
default:
multiplicator = 15.0f;
break;
}
// xinef: Do NOT add base mana TWICE
float value = GetModifierValue(unitMod, BASE_VALUE) + (power != POWER_MANA ? GetCreatePowers(power) : 0);
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + addValue * multiplicator;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxPower(power, uint32(value));
}
开发者ID:Cryostorm,项目名称:SunwellCore,代码行数:33,代码来源:StatSystem.cpp
示例6: UpdateMaxHealth
bool Creature::UpdateAllStats()
{
UpdateMaxHealth();
UpdateAttackPowerAndDamage();
for (uint32 i = 0; i <= sChrPowerTypesStore.GetNumRows(); i++)
{
ChrPowerTypesEntry const* cEntry = sChrPowerTypesStore.LookupEntry(i);
if (!cEntry)
continue;
if (getClass() != cEntry->classId)
continue;
if (cEntry->power == 10)
continue;
SetMaxPower(Powers(cEntry->power), uint32(GetCreatePowers(Powers(cEntry->power))));
}
for(int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
UpdateResistances(i);
return true;
}
开发者ID:Shutok,项目名称:StrawberryCore-501Beta,代码行数:26,代码来源:StatSystem.cpp
示例7: UnitMods
void Player::UpdateMaxPower(Powers power)
{
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power);
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE);
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxPower(power, uint32(value));
}
开发者ID:AlucardVoss,项目名称:Patchs,代码行数:11,代码来源:StatSystem.cpp
示例8: UnitMods
void Pet::UpdateMaxPower(Powers power)
{
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
float addValue = (power == POWER_MANA) ? GetStat(STAT_INTELLECT) - GetCreateStat(STAT_INTELLECT) : 0.0f;
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power);
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + addValue * 15.0f;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxPower(power, uint32(value));
}
开发者ID:Artea,项目名称:mangos-svn,代码行数:12,代码来源:StatSystem.cpp
示例9: UnitMods
void Pet::UpdateMaxPower(Powers power)
{
if (!CanModifyStats())
return;
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
float intellectBonus = (power == POWER_MANA) ? (GetStat(STAT_INTELLECT) - GetCreateStat(STAT_INTELLECT))*(CalculateScalingData()->powerScale / 100.0f) : 0.0f;
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power) + intellectBonus;
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE);
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxPower(power, uint32(value));
}
开发者ID:MichaelFurth,项目名称:RCore,代码行数:16,代码来源:StatSystem.cpp
示例10: UnitMods
void Player::UpdateMaxPower(Powers power)
{
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
float bonusPower = (power == POWER_MANA) ? GetManaBonusFromIntellect() : 0;
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power);
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + bonusPower;
value *= GetModifierValue(unitMod, TOTAL_PCT);
if (HasAura(30422, 0)) // Netherspite's Green Beam - Serenity
if (power == POWER_MANA)
SetPower(power, uint32(value));
SetMaxPower(power, uint32(value));
}
开发者ID:Looking4Group,项目名称:L4G_Core,代码行数:17,代码来源:StatSystem.cpp
示例11: MANGOS_ASSERT
void Player::UpdateMaxPower(Powers power)
{
MANGOS_ASSERT(power < MAX_POWERS);
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
uint32 create_power = GetCreatePowers(power);
// ignore classes without mana
float bonusPower = (power == POWER_MANA && create_power > 0) ? GetManaBonusFromIntellect() : 0;
float value = GetModifierValue(unitMod, BASE_VALUE) + create_power;
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + bonusPower;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxPower(power, uint32(value));
}
开发者ID:SkyFire,项目名称:server-1,代码行数:18,代码来源:StatSystem.cpp
示例12: GetTotalStatValue
bool Player::UpdateAllStats()
{
for (int i = STAT_STRENGTH; i < MAX_STATS; ++i)
{
float value = GetTotalStatValue(Stats(i));
SetStat(Stats(i), (int32)value);
}
UpdateArmor();
// calls UpdateAttackPowerAndDamage() in UpdateArmor for SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR
UpdateAttackPowerAndDamage(true);
UpdateMaxHealth();
for (uint32 i = 0; i <= sChrPowerTypesStore.GetNumRows(); i++)
{
ChrPowerTypesEntry const* cEntry = sChrPowerTypesStore.LookupEntry(i);
if (!cEntry)
continue;
if (getClass() != cEntry->classId)
continue;
if (cEntry->power == 10)
continue;
SetMaxPower(Powers(cEntry->power), uint32(GetCreatePowers(Powers(cEntry->power))));
}
UpdateAllRatings();
UpdateAllCritPercentages();
UpdateAllSpellCritChances();
UpdateDefenseBonusesMod();
UpdateShieldBlockValue();
UpdateArmorPenetration();
UpdateSpellDamageAndHealingBonus();
UpdateManaRegen();
UpdateExpertise(BASE_ATTACK);
UpdateExpertise(OFF_ATTACK);
for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
UpdateResistances(i);
return true;
}
开发者ID:Shutok,项目名称:StrawberryCore-501Beta,代码行数:44,代码来源:StatSystem.cpp
注:本文中的GetCreatePowers函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论