mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
[CORE] Imported PVP stats , special thanks to Mik & Shin
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user