[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

@@ -463,6 +463,14 @@ void WorldSession::LogoutPlayer(bool save)
{
_player->RemoveBattlegroundQueueId(bgQueueTypeId);
sBattlegroundMgr->GetBattlegroundQueue(bgQueueTypeId).RemovePlayer(_player->GetGUID(), false, i);
// track if player logs out after invited to join BG
if(_player->IsInvitedForBattlegroundInstance() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_TRACK_DESERTERS))
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_DESERTER_TRACK);
stmt->setUInt32(0, _player->GetGUIDLow());
stmt->setUInt8(1, BG_DESERTION_TYPE_INVITE_LOGOUT);
CharacterDatabase.Execute(stmt);
}
}
///- If the player is in a guild, update the guild roster and broadcast a logout message to other guild members