Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit. --HG-- branch : trunk
This commit is contained in:
1 parent
b30800e9bc
commit
8649bee17f
65 files changed
+885
-889
No files matched your search
@@ -826,7 +826,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
||||
if (spell->getState() == SPELL_STATE_CASTING)
|
||||
{
|
||||
uint32 channelInterruptFlags = spell->m_spellInfo->ChannelInterruptFlags;
|
||||
if (channelInterruptFlags & CHANNEL_FLAG_DELAY != 0 && damagetype != DOT)
|
||||
if (((channelInterruptFlags & CHANNEL_FLAG_DELAY) != 0) && (damagetype != DOT))
|
||||
spell->DelayedChannel();
|
||||
}
|
||||
}
|
||||
@@ -15163,7 +15163,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
|
||||
pVictim->ToPlayer()->SetPvPDeath(player != NULL);
|
||||
|
||||
// only if not player and not controlled by player pet. And not at BG
|
||||
if ((durabilityLoss && !player && !pVictim->ToPlayer()->InBattleground()) || (player && sWorld.getConfig(CONFIG_DURABILITY_LOSS_IN_PVP)))
|
||||
if ((durabilityLoss && !player && !pVictim->ToPlayer()->InBattleground()) || (player && sWorld.getBoolConfig(CONFIG_DURABILITY_LOSS_IN_PVP)))
|
||||
{
|
||||
sLog.outStaticDebug("We are dead, losing %u percent durability", sWorld.getRate(RATE_DURABILITY_LOSS_ON_DEATH));
|
||||
pVictim->ToPlayer()->DurabilityLossAll(sWorld.getRate(RATE_DURABILITY_LOSS_ON_DEATH),false);
|
||||
@@ -15411,7 +15411,7 @@ void Unit::SetFeared(bool apply)
|
||||
caster = ObjectAccessor::GetUnit(*this, fearAuras.front()->GetCasterGUID());
|
||||
if (!caster)
|
||||
caster = getAttackerForHelper();
|
||||
GetMotionMaster()->MoveFleeing(caster, fearAuras.empty() ? sWorld.getConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY) : 0); // caster == NULL processed in MoveFleeing
|
||||
GetMotionMaster()->MoveFleeing(caster, fearAuras.empty() ? sWorld.getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY) : 0); // caster == NULL processed in MoveFleeing
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user