mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-21 07:11:59 -04:00
[7527] Remove redundent arg from Player::EnvironmentalDamage Author: VladimirMangos
--HG-- branch : trunk
This commit is contained in:
@@ -247,7 +247,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
||||
Unit *mover = _player->m_mover;
|
||||
recv_data.put<uint32>(6, getMSTime()); // fix time, offset flags(4) + unk(2)
|
||||
WorldPacket data(recv_data.GetOpcode(), (mover->GetPackGUID().size()+recv_data.size()));
|
||||
data.append(_player->m_mover->GetPackGUID()); // use mover guid
|
||||
data.append(mover->GetPackGUID()); // use mover guid
|
||||
data.append(recv_data.contents(), recv_data.size());
|
||||
GetPlayer()->SendMessageToSet(&data, false);
|
||||
|
||||
|
||||
+16
-12
@@ -885,7 +885,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;
|
||||
@@ -901,11 +901,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);
|
||||
@@ -984,7 +984,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);
|
||||
@@ -1020,7 +1020,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();
|
||||
@@ -1054,9 +1054,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14530,7 +14530,11 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
||||
//Need to call it to initialize m_team (m_team can be calculated from m_race)
|
||||
//Other way is to saves m_team into characters table.
|
||||
setFactionForRace(m_race);
|
||||
<<<<<<< HEAD:src/game/Player.cpp
|
||||
SetMover(this);
|
||||
=======
|
||||
SetCharm(NULL);
|
||||
>>>>>>> ef97c26c0d232525c291f647f3384f9bcfc3ea4b:src/game/Player.cpp
|
||||
|
||||
m_class = fields[5].GetUInt8();
|
||||
|
||||
@@ -20060,7 +20064,7 @@ void Player::HandleFallUnderMap()
|
||||
// TODO: discard movement packets after the player is rooted
|
||||
if(isAlive())
|
||||
{
|
||||
EnvironmentalDamage(GetGUID(),DAMAGE_FALL_TO_VOID, GetMaxHealth());
|
||||
EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetMaxHealth());
|
||||
// change the death state to CORPSE to prevent the death timer from
|
||||
// starting in the next player update
|
||||
KillPlayer();
|
||||
@@ -20667,7 +20671,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())
|
||||
|
||||
+1
-1
@@ -1944,7 +1944,7 @@ class TRINITY_DLL_SPEC Player : public Unit
|
||||
/*** ENVIROMENTAL SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
||||
void EnvironmentalDamage(uint64 guid, EnviromentalDamage type, uint32 damage);
|
||||
void EnvironmentalDamage(EnviromentalDamage type, uint32 damage);
|
||||
|
||||
/*********************************************************/
|
||||
/*** FLOOD FILTER SYSTEM ***/
|
||||
|
||||
@@ -3101,7 +3101,7 @@ void Aura::HandleAuraModScale(bool apply, bool Real)
|
||||
m_target->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,cinfo->faction_A);
|
||||
}
|
||||
|
||||
caster->SetCharm(0);
|
||||
caster->SetCharm(NULL);
|
||||
|
||||
if(caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
@@ -3257,7 +3257,7 @@ void Aura::HandleAuraModPetTalentsPoints(bool Apply, bool Real)
|
||||
}
|
||||
}
|
||||
|
||||
caster->SetCharm(0);
|
||||
caster->SetCharm(NULL);
|
||||
|
||||
if(caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
|
||||
@@ -304,7 +304,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)
|
||||
|
||||
Reference in New Issue
Block a user