本文整理汇总了C++中GetCreateHealth函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCreateHealth函数的具体用法?C++ GetCreateHealth怎么用?C++ GetCreateHealth使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetCreateHealth函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GetStat
void Guardian::UpdateMaxHealth()
{
UnitMods unitMod = UNIT_MOD_HEALTH;
float stamina = GetStat(STAT_STAMINA) - GetCreateStat(STAT_STAMINA);
float multiplicator;
switch (GetEntry())
{
case ENTRY_IMP:
multiplicator = 8.4f;
break;
case ENTRY_VOIDWALKER:
case ENTRY_FELGUARD:
multiplicator = 11.0f;
break;
case ENTRY_SUCCUBUS:
multiplicator = 9.1f;
break;
case ENTRY_FELHUNTER:
multiplicator = 14.46f;
break;
case ENTRY_GHOUL:
case ENTRY_GARGOYLE:
multiplicator = 15.0f;
break;
case ENTRY_WATER_ELEMENTAL:
multiplicator = 1.0f;
stamina = 0.0f;
break;
case ENTRY_BLOODWORM:
case ENTRY_PSYFIEND:
SetMaxHealth(GetCreateHealth());
return;
default:
multiplicator = 10.0f;
break;
}
if (isHunterPet())
{
if (gtOCTHpPerStaminaEntry const* hpBase = sGtOCTHpPerStaminaStore.LookupEntry(getLevel()))
multiplicator = hpBase->ratio;
}
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + stamina * multiplicator;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxHealth((uint32)value);
}
开发者ID:Exodius,项目名称:chuspi,代码行数:51,代码来源:StatSystem.cpp
示例2: GetStat
void Guardian::UpdateMaxHealth()
{
UnitMods unitMod = UNIT_MOD_HEALTH;
float stamina = GetStat(STAT_STAMINA) - GetCreateStat(STAT_STAMINA);
float multiplicator;
switch (GetEntry())
{
case ENTRY_IMP: multiplicator = 8.4f; break;
case ENTRY_VOIDWALKER: multiplicator = 11.0f; break;
case ENTRY_SUCCUBUS: multiplicator = 9.1f; break;
case ENTRY_FELHUNTER: multiplicator = 9.5f; break;
case ENTRY_FELGUARD: multiplicator = 11.0f; break;
case ENTRY_BLOODWORM: multiplicator = 1.0f; break;
default: multiplicator = 10.0f; break;
}
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
value *= GetModifierValue(unitMod, BASE_PCT);
if (GetEntry()==ENTRY_GHOUL)
value += GetModifierValue(unitMod, TOTAL_VALUE) + (stamina+GetCreateStat(STAT_STAMINA)) * multiplicator;
else
value += GetModifierValue(unitMod, TOTAL_VALUE) + stamina * multiplicator;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxHealth((uint32)value);
}
开发者ID:LORDofDOOM,项目名称:MMOCore,代码行数:27,代码来源:StatSystem.cpp
示例3: GetStat
void Guardian::UpdateMaxHealth()
{
UnitMods unitMod = UNIT_MOD_HEALTH;
float stamina = GetStat(STAT_STAMINA) - GetCreateStat(STAT_STAMINA);
float multiplicator;
switch (GetEntry())
{
case ENTRY_IMP: multiplicator = 8.4f; break;
case ENTRY_VOIDWALKER: multiplicator = 11.0f; break;
case ENTRY_SUCCUBUS: multiplicator = 9.0f; break;
case ENTRY_FELHUNTER: multiplicator = 9.5f; break;
case ENTRY_FELGUARD: multiplicator = 11.0f; break;
case ENTRY_BLOODWORM: multiplicator = 1.0f; break;
default: multiplicator = 10.0f; break;
}
if (m_owner->GetTypeId() != TYPEID_PLAYER && !m_owner->isTotem())
multiplicator = 0.0f;
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + stamina * multiplicator;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxHealth((uint32)value);
}
开发者ID:xIchigox,项目名称:SoDCore.434,代码行数:26,代码来源:StatSystem.cpp
示例4: GetModifierValue
void Player::UpdateMaxHealth()
{
UnitMods unitMod = UNIT_MOD_HEALTH;
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + GetHealthBonusFromStamina();
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxHealth((uint32)value);
}
开发者ID:AnthoDevMoP,项目名称:SkyFire_5xx,代码行数:11,代码来源:StatSystem.cpp
示例5: GetCreateStat
void Pet::UpdateMaxHealth()
{
if (!CanModifyStats())
return;
UnitMods unitMod = UNIT_MOD_HEALTH;
float staminaBonus = (GetStat(STAT_STAMINA) - GetCreateStat(STAT_STAMINA)) * (CalculateScalingData()->healthScale / 100.0f);
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth() + staminaBonus;
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE);
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxHealth((uint32)value);
}
开发者ID:MichaelFurth,项目名称:RCore,代码行数:15,代码来源:StatSystem.cpp
示例6: GetModifierValue
void Player::UpdateMaxHealth()
{
UnitMods unitMod = UNIT_MOD_HEALTH;
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + GetHealthBonusFromStamina();
value *= GetModifierValue(unitMod, TOTAL_PCT);
if (HasAura(30421, 0)) // Netherspite's Red Beam - Perseverence
{
value += 30000;
SetMaxHealth((uint32)value);
SetHealth((uint32)value);
}
else
SetMaxHealth((uint32)value);
}
开发者ID:Looking4Group,项目名称:L4G_Core,代码行数:18,代码来源:StatSystem.cpp
示例7: GetStat
void Guardian::UpdateMaxHealth()
{
UnitMods unitMod = UNIT_MOD_HEALTH;
float stamina = GetStat(STAT_STAMINA) - GetCreateStat(STAT_STAMINA);
float multiplicator;
switch (GetEntry())
{
case ENTRY_BLOODWORM: multiplicator = 1.0f; break;
case ENTRY_WATER_ELEMENTAL: multiplicator = 7.5; break;
default: multiplicator = 14.0f; break;
}
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + stamina * multiplicator;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxHealth((uint32)value);
}
开发者ID:Jildor,项目名称:4.3.4-Core,代码行数:20,代码来源:StatSystem.cpp
示例8: GetStat
void Pet::UpdateMaxHealth()
{
UnitMods unitMod = UNIT_MOD_HEALTH;
float stamina = GetStat(STAT_STAMINA) - GetCreateStat(STAT_STAMINA);
float multiplicator;
// nesocips warlock pet stats calculation
switch(GetEntry())
{
case 416: multiplicator = 8.4f; break; // imp
case 1860: // voidwalker
case 17252: multiplicator = 11.0f; break; // felguard
case 1863: multiplicator = 9.1f; break; // succubus
case 417: multiplicator = 9.5f; break; // felhunter
default: multiplicator = 10.0f; break;
}
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + stamina * multiplicator;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxHealth((uint32)value);
}
开发者ID:kero99,项目名称:mangos_old,代码行数:24,代码来源:StatSystem.cpp
示例9: GetStat
void Guardian::UpdateMaxHealth()
{
UnitMods unitMod = UNIT_MOD_HEALTH;
//Ghouls have no base hp. only the one gained from stamina
float stamina = GetStat(STAT_STAMINA) - (GetEntry()==ENTRY_GHOUL ? 0.0f : GetCreateStat(STAT_STAMINA));
float multiplicator;
switch(GetEntry())
{
case ENTRY_IMP: multiplicator = 8.4f; break;
case ENTRY_VOIDWALKER: multiplicator = 11.0f; break;
case ENTRY_SUCCUBUS: multiplicator = 9.1f; break;
case ENTRY_FELHUNTER: multiplicator = 9.5f; break;
case ENTRY_FELGUARD: multiplicator = 11.0f; break;
case ENTRY_GHOUL: multiplicator = 10.0f; break;
case ENTRY_FIRE_ELEMENTAL: multiplicator = 1.0f; break;
case ENTRY_EARTH_ELEMENTAL: multiplicator = 20.0f; break;
default:
{
if (isGuardian() || isTotem())
multiplicator = 0.0f; // Guardians and Totems gain no hp from the owner
else
multiplicator = 10.0f; // Pets, and Minions do get health from stamina
break;
}
}
if (isHunterPet())
multiplicator = 10.0f;
//Ghouls have no base hp. only the one gained from stamina
float value = (GetEntry()==ENTRY_GHOUL ? 0 : GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth());
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + stamina * multiplicator;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxHealth((uint32)value);
}
开发者ID:Meandro,项目名称:wowcore,代码行数:37,代码来源:StatSystem.cpp
注:本文中的GetCreateHealth函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论