Fixed sql char deletion code using a broken pet deletion query (ran very slow, and had a typo in a binary shift operation) (bugreport:3304).
Fixed change r13774 to the code responsible for deciding whether to move 1 extra cell when stopping walking; it had its logic inverted by mistake (bugreport:3312). Cleaned up the itemlist, cartlist and storagelist gm command code: - fixed buffer overflows in all three functions (bugreport:456). - merged all three atcommand functions into a single one; the appropriate behavior is detected from the command's name. - using the StringBuf class instead of static-size buffers and string operations for more efficient and safe processing. - using 'jname' (the one without underscores) as the primary item name in the list, and not using the aegis name for cards at all (since it's almost identical). - fixed forged item details never being displayed due to a missing strcat(). - extended item info (crafted/named items, pet eggs) will now be displayed for storage and cart list as well. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13920 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
@@ -1373,11 +1373,9 @@ int delete_char_sql(int char_id)
|
||||
Sql_ShowDebug(sql_handle);
|
||||
|
||||
//Delete all pets that are stored in eggs (inventory + cart)
|
||||
if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE pet_id IN "
|
||||
"(SELECT card1|card2<<2 FROM `%s` WHERE char_id = '%d' AND card0 = -256"
|
||||
" UNION"
|
||||
" SELECT card1|card2<<2 FROM `%s` WHERE char_id = '%d' AND card0 = -256)",
|
||||
pet_db, inventory_db, char_id, cart_db, char_id) )
|
||||
if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` USING `%s` JOIN `%s` ON `pet_id` = `card1`|`card2`<<16 WHERE `%s`.char_id = '%d' AND card0 = -256", pet_db, pet_db, inventory_db, inventory_db, char_id) )
|
||||
Sql_ShowDebug(sql_handle);
|
||||
if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` USING `%s` JOIN `%s` ON `pet_id` = `card1`|`card2`<<16 WHERE `%s`.char_id = '%d' AND card0 = -256", pet_db, pet_db, cart_db, cart_db, char_id) )
|
||||
Sql_ShowDebug(sql_handle);
|
||||
|
||||
/* remove homunculus */
|
||||
|
||||
Reference in New Issue
Block a user