Core/GM System: rename columns of gm_surveys, gm_subsurveys, gm_tickets and lag_reports tables to lowerCamel, move queries to prepared statements and refactor the code of TicketMgr.

This commit is contained in:
Azazel
2011-04-19 14:04:18 +06:00
parent 890b1f6cc7
commit c36846d78a
15 changed files with 762 additions and 722 deletions
+6 -15
View File
@@ -564,30 +564,21 @@ public:
if (!*args)
return false;
char *cstrticket_id = strtok((char*)args, " ");
if (!cstrticket_id)
char *sTicketId = strtok((char*)args, " ");
if (!sTicketId)
return false;
uint64 ticket_id = atoi(cstrticket_id);
if (!ticket_id)
uint32 ticketId = atoi(sTicketId);
if (!ticketId)
return false;
GM_Ticket *ticket = sTicketMgr->GetGMTicket(ticket_id);
GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
if (!ticket)
{
handler->SendSysMessage(LANG_COMMAND_TICKETNOTEXIST);
return true;
}
float x, y, z;
int mapid;
x = ticket->pos_x;
y = ticket->pos_y;
z = ticket->pos_z;
mapid = ticket->map;
Player* _player = handler->GetSession()->GetPlayer();
if (_player->isInFlight())
{
@@ -597,7 +588,7 @@ public:
else
_player->SaveRecallPosition();
_player->TeleportTo(mapid, x, y, z, 1, 0);
ticket->TeleportTo(_player);
return true;
}
};
+1 -1
View File
@@ -166,7 +166,7 @@ public:
//reload commands
static bool HandleReloadGMTicketsCommand(ChatHandler* /*handler*/, const char* /*args*/)
{
sTicketMgr->LoadGMTickets();
sTicketMgr->LoadTickets();
return true;
}