[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

@@ -455,6 +455,15 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
{
bgQueue.RemovePlayer(_player->GetGUID(), false, queueSlot);
_player->RemoveBattlegroundQueueId(bgQueueTypeId);
// track if player refuses to join the BG after being invited
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, _player->GetGUIDLow());
stmt->setUInt8(1, BG_DESERTION_TYPE_LEAVE_QUEUE);
CharacterDatabase.Execute(stmt);
}
}
break;
default: