mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7527] Remove redundent arg from Player::EnvironmentalDamage
This commit is contained in:
parent
fa098236af
commit
73ac0bcc7f
5 changed files with 15 additions and 15 deletions
|
|
@ -292,7 +292,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
|||
// TODO: discard movement packets after the player is rooted
|
||||
if(GetPlayer()->isAlive())
|
||||
{
|
||||
GetPlayer()->EnvironmentalDamage(GetPlayer()->GetGUID(),DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
|
||||
GetPlayer()->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
|
||||
// change the death state to CORPSE to prevent the death timer from
|
||||
// starting in the next player update
|
||||
GetPlayer()->KillPlayer();
|
||||
|
|
|
|||
|
|
@ -826,7 +826,7 @@ void Player::StopMirrorTimer(MirrorTimerType Type)
|
|||
GetSession()->SendPacket( &data );
|
||||
}
|
||||
|
||||
void Player::EnvironmentalDamage(uint64 guid, EnviromentalDamage type, uint32 damage)
|
||||
void Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
|
||||
{
|
||||
if(!isAlive() || isGameMaster())
|
||||
return;
|
||||
|
|
@ -842,11 +842,11 @@ void Player::EnvironmentalDamage(uint64 guid, EnviromentalDamage type, uint32 da
|
|||
damage-=absorb+resist;
|
||||
|
||||
WorldPacket data(SMSG_ENVIRONMENTALDAMAGELOG, (21));
|
||||
data << (uint64)guid;
|
||||
data << (uint8)(type!=DAMAGE_FALL_TO_VOID ? type : DAMAGE_FALL);
|
||||
data << (uint32)damage;
|
||||
data << (uint32)absorb; // absorb
|
||||
data << (uint32)resist; // resist
|
||||
data << uint64(GetGUID());
|
||||
data << uint8(type!=DAMAGE_FALL_TO_VOID ? type : DAMAGE_FALL);
|
||||
data << uint32(damage);
|
||||
data << uint32(absorb);
|
||||
data << uint32(resist);
|
||||
SendMessageToSet(&data, true);
|
||||
|
||||
DealDamage(this, damage, NULL, SELF_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
|
|
@ -925,7 +925,7 @@ void Player::HandleDrowning(uint32 time_diff)
|
|||
// Calculate and deal damage
|
||||
// TODO: Check this formula
|
||||
uint32 damage = GetMaxHealth() / 5 + urand(0, getLevel()-1);
|
||||
EnvironmentalDamage(GetGUID(), DAMAGE_DROWNING, damage);
|
||||
EnvironmentalDamage(DAMAGE_DROWNING, damage);
|
||||
}
|
||||
else if (!(m_MirrorTimerFlagsLast & UNDERWATER_INWATER)) // Update time in client if need
|
||||
SendMirrorTimer(BREATH_TIMER, getMaxTimer(BREATH_TIMER), m_MirrorTimer[BREATH_TIMER], -1);
|
||||
|
|
@ -961,7 +961,7 @@ void Player::HandleDrowning(uint32 time_diff)
|
|||
if (isAlive()) // Calculate and deal damage
|
||||
{
|
||||
uint32 damage = GetMaxHealth() / 5 + urand(0, getLevel()-1);
|
||||
EnvironmentalDamage(GetGUID(), DAMAGE_EXHAUSTED, damage);
|
||||
EnvironmentalDamage(DAMAGE_EXHAUSTED, damage);
|
||||
}
|
||||
else if (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)) // Teleport ghost to graveyard
|
||||
RepopAtGraveyard();
|
||||
|
|
@ -995,9 +995,9 @@ void Player::HandleDrowning(uint32 time_diff)
|
|||
// TODO: Check this formula
|
||||
uint32 damage = urand(600, 700);
|
||||
if (m_MirrorTimerFlags&UNDERWATER_INLAVA)
|
||||
EnvironmentalDamage(GetGUID(), DAMAGE_LAVA, damage);
|
||||
EnvironmentalDamage(DAMAGE_LAVA, damage);
|
||||
else
|
||||
EnvironmentalDamage(GetGUID(), DAMAGE_SLIME, damage);
|
||||
EnvironmentalDamage(DAMAGE_SLIME, damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -19933,7 +19933,7 @@ void Player::HandleFall(MovementInfo const& movementInfo)
|
|||
if (GetDummyAura(43621))
|
||||
damage = GetMaxHealth()/2;
|
||||
|
||||
EnvironmentalDamage(GetGUID(), DAMAGE_FALL, damage);
|
||||
EnvironmentalDamage(DAMAGE_FALL, damage);
|
||||
|
||||
// recheck alive, might have died of EnvironmentalDamage
|
||||
if (isAlive())
|
||||
|
|
|
|||
|
|
@ -1928,7 +1928,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
/*** ENVIROMENTAL SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
||||
void EnvironmentalDamage(uint64 guid, EnviromentalDamage type, uint32 damage);
|
||||
void EnvironmentalDamage(EnviromentalDamage type, uint32 damage);
|
||||
|
||||
/*********************************************************/
|
||||
/*** FLOOD FILTER SYSTEM ***/
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ void Spell::EffectEnvirinmentalDMG(uint32 i)
|
|||
|
||||
m_caster->SendSpellNonMeleeDamageLog(m_caster, m_spellInfo->Id, damage, GetSpellSchoolMask(m_spellInfo), absorb, resist, false, 0, false);
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)m_caster)->EnvironmentalDamage(m_caster->GetGUID(),DAMAGE_FIRE,damage);
|
||||
((Player*)m_caster)->EnvironmentalDamage(DAMAGE_FIRE,damage);
|
||||
}
|
||||
|
||||
void Spell::EffectSchoolDMG(uint32 effect_idx)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7526"
|
||||
#define REVISION_NR "7527"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue