mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
Core/Tickets: Ticket System updated
This commit is contained in:
@@ -84,6 +84,7 @@
|
||||
#include "GameObjectAI.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "SavingSystem.h"
|
||||
#include "TicketMgr.h"
|
||||
|
||||
#define ZONE_UPDATE_INTERVAL (2*IN_MILLISECONDS)
|
||||
|
||||
@@ -4729,6 +4730,11 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
||||
// remove from arena teams
|
||||
LeaveAllArenaTeams(playerguid);
|
||||
|
||||
// close player ticket if any
|
||||
GmTicket* ticket = sTicketMgr->GetTicketByPlayer(playerguid);
|
||||
if (ticket)
|
||||
ticket->SetClosedBy(playerguid);
|
||||
|
||||
// remove from group
|
||||
if (uint32 groupId = GetGroupIdFromStorage(guid))
|
||||
if (Group* group = sGroupMgr->GetGroupByGUID(groupId))
|
||||
@@ -4923,9 +4929,18 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
||||
stmt->setUInt32(0, guid);
|
||||
trans->Append(stmt);
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_PLAYER_GM_TICKETS);
|
||||
stmt->setUInt32(0, guid);
|
||||
trans->Append(stmt);
|
||||
if (sWorld->getBoolConfig(CONFIG_DELETE_CHARACTER_TICKET_TRACE))
|
||||
{
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_PLAYER_GM_TICKETS_ON_CHAR_DELETION);
|
||||
stmt->setUInt32(0, guid);
|
||||
trans->Append(stmt);
|
||||
}
|
||||
else
|
||||
{
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_PLAYER_GM_TICKETS);
|
||||
stmt->setUInt32(0, guid);
|
||||
trans->Append(stmt);
|
||||
}
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_INSTANCE_BY_OWNER);
|
||||
stmt->setUInt32(0, guid);
|
||||
|
||||
Reference in New Issue
Block a user