aboutsummaryrefslogtreecommitdiff
path: root/src/game/Level2.cpp
diff options
context:
space:
mode:
authorKingPin <none@none>2008-11-02 16:53:46 -0600
committerKingPin <none@none>2008-11-02 16:53:46 -0600
commitd5beb2bbe97afa0e50df8a2cef49bcac4a607f4a (patch)
tree4ce9fec826220b2476406e38915a15b6d00a4ce1 /src/game/Level2.cpp
parent6633d3c680d4f75d743f705e9b26278674f11ee0 (diff)
[svn] *Implement new player conditions CONDITION_NO_AURA, CONDITION_ACTIVE_EVENT
* Default behaviour of pets for creatures changed to REACT_DEFENSIVE * Disallowed sending wrapped items as COD * Prevent loading and saving single target auras for pet in same way as already implemented for player * Correctly limit use some flask types to zones. * Fixed extracting common.MPQ under *nix * Many small xleanups and fixes. ** mangos merge rev. TEST REV so be careful of creepy crawly bugs! --HG-- branch : trunk
Diffstat (limited to 'src/game/Level2.cpp')
-rw-r--r--src/game/Level2.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index f60b38b5522..6a78432a2fd 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -1954,7 +1954,7 @@ bool ChatHandler::HandleTicketCommand(const char* args)
int num = atoi(px);
if(num > 0)
{
- QueryResult *result = CharacterDatabase.PQuery("SELECT guid,ticket_text,ticket_lastchange FROM character_ticket ORDER BY ticket_id ASC LIMIT %d,1",num-1);
+ QueryResult *result = CharacterDatabase.PQuery("SELECT guid,ticket_text,ticket_lastchange FROM character_ticket ORDER BY ticket_id ASC "_OFFSET_, num-1);
if(!result)
{
@@ -2066,9 +2066,9 @@ bool ChatHandler::HandleDelTicketCommand(const char *args)
// delticket #num
if(num > 0)
{
- QueryResult *result = CharacterDatabase.PQuery("SELECT ticket_id,guid FROM character_ticket LIMIT %i",num);
+ QueryResult *result = CharacterDatabase.PQuery("SELECT ticket_id,guid FROM character_ticket ORDER BY ticket_id ASC "_OFFSET_,num-1);
- if(!result || uint64(num) > result->GetRowCount())
+ if(!result)
{
PSendSysMessage(LANG_COMMAND_TICKENOTEXIST, num);
delete result;
@@ -2076,9 +2076,6 @@ bool ChatHandler::HandleDelTicketCommand(const char *args)
return false;
}
- for(int i = 1; i < num; ++i)
- result->NextRow();
-
Field* fields = result->Fetch();
uint32 id = fields[0].GetUInt32();