[CORE] Imported PVP stats , special thanks to Mik & Shin

This commit is contained in:
Yehonal
2016-08-08 11:23:30 +02:00
parent 895558c85c
commit e358c0bb74
16 changed files with 138 additions and 1 deletions

View File

@@ -505,7 +505,7 @@ inline void KillRewarder::_InitXP(Player* player)
// * otherwise, not in PvP;
// * not if killer is on vehicle.
if (_isBattleGround || (!_isPvP && !_killer->GetVehicle()))
_xp = Trinity::XP::Gain(player, _victim);
_xp = Trinity::XP::Gain(player, _victim, _isBattleGround);
if (_xp && !_isBattleGround && _victim) // pussywizard: npcs with relatively low hp give lower exp
if (_victim->GetTypeId() == TYPEID_UNIT)
@@ -22172,6 +22172,16 @@ void Player::LeaveBattleground(Battleground* bg)
if (!bg)
return;
// Deserter tracker - leave BG
if (bg->isBattleground() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_TRACK_DESERTERS)
&& (bg->GetStatus() == STATUS_IN_PROGRESS || bg->GetStatus() == STATUS_WAIT_JOIN))
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_DESERTER_TRACK);
stmt->setUInt32(0, GetGUIDLow());
stmt->setUInt8(1, BG_DESERTION_TYPE_LEAVE_BG);
CharacterDatabase.Execute(stmt);
}
// xinef: reset corpse reclaim time
m_deathExpireTime = time(NULL);