Core/Misc: Cleanups, code style and typo fixes
This commit is contained in:
@@ -89,5 +89,5 @@ INSERT INTO `creature_loot_template`
|
||||
(32495,44697,99,1,0,1,1), -- Val'kyr Vestments
|
||||
(32495,44663,96,1,0,1,1), -- Abandoned Adventurer's Satchel
|
||||
-- Putridus the Ancient
|
||||
(32487,44696,98,1,0,1,1), -- Corroded Faceguard
|
||||
(32487,44696,98,1,0,1,1), -- Giant's Toewrap
|
||||
(32487,44663,93,1,0,1,1); -- Abandoned Adventurer's Satchel
|
||||
|
||||
@@ -1254,7 +1254,7 @@ uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
|
||||
else if (type == DAMAGE_SLIME)
|
||||
CalcAbsorbResist(this, SPELL_SCHOOL_MASK_NATURE, DIRECT_DAMAGE, damage, &absorb, &resist);
|
||||
|
||||
damage-=absorb+resist;
|
||||
damage -= absorb + resist;
|
||||
|
||||
DealDamageMods(this, damage, &absorb);
|
||||
|
||||
@@ -1412,7 +1412,7 @@ void Player::HandleDrowning(uint32 time_diff)
|
||||
// Calculate and deal damage
|
||||
// TODO: Check this formula
|
||||
uint32 damage = urand(600, 700);
|
||||
if (m_MirrorTimerFlags&UNDERWATER_INLAVA)
|
||||
if (m_MirrorTimerFlags & UNDERWATER_INLAVA)
|
||||
EnvironmentalDamage(DAMAGE_LAVA, damage);
|
||||
// need to skip Slime damage in Undercity,
|
||||
// maybe someone can find better way to handle environmental damage
|
||||
@@ -5143,8 +5143,9 @@ bool Player::FallGround(uint8 FallMode)
|
||||
// Below formula for falling damage is from Player::HandleFall
|
||||
if (FallMode == 2 && z_diff >= 14.57f)
|
||||
{
|
||||
uint32 damage = std::min(GetMaxHealth(), (uint32)((0.018f*z_diff-0.2426f)*GetMaxHealth()*sWorld->getRate(RATE_DAMAGE_FALL)));
|
||||
if (damage > 0) EnvironmentalDamage(DAMAGE_FALL, damage);
|
||||
uint32 damage = std::min(GetMaxHealth(), (uint32)((0.018f * z_diff - 0.2426f) * GetMaxHealth() * sWorld->getRate(RATE_DAMAGE_FALL)));
|
||||
if (damage)
|
||||
EnvironmentalDamage(DAMAGE_FALL, damage);
|
||||
}
|
||||
else if (FallMode == 0)
|
||||
Unit::setDeathState(DEAD_FALLING);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -313,7 +313,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
|
||||
&AuraEffect::HandleNULL, //258 SPELL_AURA_MOD_SPELL_VISUAL
|
||||
&AuraEffect::HandleNoImmediateEffect, //259 SPELL_AURA_MOD_HOT_PCT implemented in Unit::SpellHealingBonus
|
||||
&AuraEffect::HandleNoImmediateEffect, //260 SPELL_AURA_SCREEN_EFFECT (miscvalue = id in ScreenEffect.dbc) not required any code
|
||||
&AuraEffect::HandlePhase, //261 SPELL_AURA_PHASE undetactable invisibility? implemented in Unit::isVisibleForOrDetect
|
||||
&AuraEffect::HandlePhase, //261 SPELL_AURA_PHASE
|
||||
&AuraEffect::HandleNoImmediateEffect, //262 SPELL_AURA_ABILITY_IGNORE_AURASTATE implemented in spell::cancast
|
||||
&AuraEffect::HandleAuraAllowOnlyAbility, //263 SPELL_AURA_ALLOW_ONLY_ABILITY player can use only abilities set in SpellClassMask
|
||||
&AuraEffect::HandleUnused, //264 unused (3.2.0)
|
||||
|
||||
@@ -628,7 +628,7 @@ class AuraScript : public _SpellScript
|
||||
void SetStackAmount(uint8 num);
|
||||
bool ModStackAmount(int32 num, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
|
||||
|
||||
// passive - "working in background", not saved, not removed by immonities, not seen by player
|
||||
// passive - "working in background", not saved, not removed by immunities, not seen by player
|
||||
bool IsPassive() const;
|
||||
// death persistent - not removed on death
|
||||
bool IsDeathPersistent() const;
|
||||
|
||||
Reference in New Issue
Block a user