Aleos Posted June 12, 2014 Group: Development Manager Topic Count: 56 Topics Per Day: 0.01 Content Count: 732 Reputation: 525 Joined: 12/13/11 Last Seen: June 13, 2024 Share Posted June 12, 2014 Increased item ID array size! As of 7cd82d0, rAthena is now able to support item IDs up to 65,535! The added benefit is that there is no extra memory consumption for the increased size. By changing the variables to unsigned this removes all the negative values that could never be used. This patch also included a change to CARD0_PET and removed the negative value of it since it's not dependent on the client. @Cydh was able to help and tested clients 2010-07-30 and up and was able to create items successfully over 32k. If you still run a client before 2010-07-30 post your results so I can update this topic! Don't forget to run sql-files/upgrades/upgrade_20140612.sql and sql-files/upgrades/upgrade_20140612_log.sql! Follow ups: 42b29ee 82467e1 98c6aee please run sql-files/upgrades/upgrade_20140616.sql 6c5d4a7 5 2 Quote Link to comment Share on other sites More sharing options...
Cydh Posted June 12, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted June 12, 2014 the (fake) fact that u @Aleos an excuse that u can't diff 2013 client, then u forced me to did a test for him. 1 Quote Link to comment Share on other sites More sharing options...
Gidz Cross Posted June 12, 2014 Group: Members Topic Count: 133 Topics Per Day: 0.03 Content Count: 682 Reputation: 89 Joined: 04/07/14 Last Seen: 7 hours ago Share Posted June 12, 2014 Don't forget to run sql-files/upgrades/upgrade_20140612.sql and sql-files/upgrades/upgrade_20140612_log.sql! Uhm hi. How to do this? Quote Link to comment Share on other sites More sharing options...
Brynner Posted June 12, 2014 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1951 Reputation: 201 Joined: 01/08/12 Last Seen: 1 hour ago Share Posted June 12, 2014 Don't forget to run sql-files/upgrades/upgrade_20140612.sql and sql-files/upgrades/upgrade_20140612_log.sql! Uhm hi. How to do this? just execute it on your database. sameway on how you import the main.sql and log.sql Quote Link to comment Share on other sites More sharing options...
Olrox Posted June 12, 2014 Group: Members Topic Count: 87 Topics Per Day: 0.02 Content Count: 1335 Reputation: 933 Joined: 10/26/11 Last Seen: November 19, 2023 Share Posted June 12, 2014 Nice addition Quote Link to comment Share on other sites More sharing options...
Aleos Posted June 12, 2014 Group: Development Manager Topic Count: 56 Topics Per Day: 0.01 Content Count: 732 Reputation: 525 Joined: 12/13/11 Last Seen: June 13, 2024 Author Share Posted June 12, 2014 Made a small change in 42b29ee. Cydh pointed out that adjusting the tables before changing CARD0_PET caused the value to be set to 0 since we are applying an unsign change before the absolute change. Just make sure to use the updated SQL files. 1 Quote Link to comment Share on other sites More sharing options...
Gidz Cross Posted June 12, 2014 Group: Members Topic Count: 133 Topics Per Day: 0.03 Content Count: 682 Reputation: 89 Joined: 04/07/14 Last Seen: 7 hours ago Share Posted June 12, 2014 Thanks! Correct me if im wrong. So what i did was1. Truncate all of my SQL Files. From item_cash_db.sql to mob_skill_db2_re.sql (Located at \rAthena\sql-files) 2. After truncating all of my SQL files. I go to folder called upgrades and look for SQL files named upgrade_20140612.sql and upgrade_20140612_log.sql as stated above. ( Located at \rathena\sql-files\upgrades) 3. Im using MySQL Query so File > Open Script > select those updates then Execute. Am i making sense? I see no error after doing these steps above. Don't forget to run sql-files/upgrades/upgrade_20140612.sql and sql-files/upgrades/upgrade_20140612_log.sql! Uhm hi. How to do this? just execute it on your database. sameway on how you import the main.sql and log.sql Btw i tried this. As i am only using MAIN.SQL and LOG.SQL. The update upgrade_20140612.sql and upgrade_20140612_log.sql wont complete when i click the Execute. So what i did was the step above. Quote Link to comment Share on other sites More sharing options...
Aleos Posted June 12, 2014 Group: Development Manager Topic Count: 56 Topics Per Day: 0.01 Content Count: 732 Reputation: 525 Joined: 12/13/11 Last Seen: June 13, 2024 Author Share Posted June 12, 2014 You don't have to truncate anything when applying anything from the upgrade folder. As long as what steps you did above seem to work for you, then ok. Seems like all you did was remove stuff from non-character based files. Quote Link to comment Share on other sites More sharing options...
Gidz Cross Posted June 12, 2014 Group: Members Topic Count: 133 Topics Per Day: 0.03 Content Count: 682 Reputation: 89 Joined: 04/07/14 Last Seen: 7 hours ago Share Posted June 12, 2014 Well if there are new revision for git. I always start from zero. Out of topic.What are the files should i need to truncate? As i am using only 1 schema now named rathena. (The reason for this was the VPS i purchased only have 1 schema) so another schema is not necessary. Besides from MAIN and LOG what else? Quote Link to comment Share on other sites More sharing options...
Aleos Posted June 12, 2014 Group: Development Manager Topic Count: 56 Topics Per Day: 0.01 Content Count: 732 Reputation: 525 Joined: 12/13/11 Last Seen: June 13, 2024 Author Share Posted June 12, 2014 By default all you need is main.sql. Log would be if you want to use the logging system. The rest of the stuff is not needed unless you want everything to be ran via the SQL side rather than the db/ files. 1 Quote Link to comment Share on other sites More sharing options...
Gidz Cross Posted June 12, 2014 Group: Members Topic Count: 133 Topics Per Day: 0.03 Content Count: 682 Reputation: 89 Joined: 04/07/14 Last Seen: 7 hours ago Share Posted June 12, 2014 By default all you need is main.sql. Log would be if you want to use the logging system. The rest of the stuff is not needed unless you want everything to be ran via the SQL side rather than the db/ files. So to apply those updates from above. What i need to truncate is only the MAIN.SQL, LOG.SQL, MOB_DB.SQL, MOB_DB_RE.SQL, MOB_DB2.SQL and MOB_DB2_RE.SQL. Those 6. Because i tried it again only importing MAIN and LOGS. Im seeing error. And yeah you're right. I still want to run the db/files. So only those 6 sql's right? Quote Link to comment Share on other sites More sharing options...
Aleos Posted June 12, 2014 Group: Development Manager Topic Count: 56 Topics Per Day: 0.01 Content Count: 732 Reputation: 525 Joined: 12/13/11 Last Seen: June 13, 2024 Author Share Posted June 12, 2014 If you're using the db/ folder then all you need to import are the main and log SQL files. The rest of the files are not needed then. 1 Quote Link to comment Share on other sites More sharing options...
Gidz Cross Posted June 12, 2014 Group: Members Topic Count: 133 Topics Per Day: 0.03 Content Count: 682 Reputation: 89 Joined: 04/07/14 Last Seen: 7 hours ago Share Posted June 12, 2014 Thank you so much Aleos. yeah. Thats why im having a hard time understanding the upgrade sql files. So in my case. I dont need to update those upgrade_20140612.sql and upgrade_20140612_log.sql as i am using db files. Quote Link to comment Share on other sites More sharing options...
Cydh Posted June 12, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted June 12, 2014 If you still run a client before 2012-04-10 post your results so I can update this topic! Here, I give these gifts from 2010-07-30a 1 Quote Link to comment Share on other sites More sharing options...
Aleos Posted June 12, 2014 Group: Development Manager Topic Count: 56 Topics Per Day: 0.01 Content Count: 732 Reputation: 525 Joined: 12/13/11 Last Seen: June 13, 2024 Author Share Posted June 12, 2014 Made another small change in 82467e1. @gidzdlcrz The point of the upgrades folder is so for later on, all you need to do is go to the upgrades folder and import the SQL file that was added from the commits you haven't applied yet. It avoids you having to dump your schema every time (using live or offline data). You'd still have to apply those upgrades since some tables affected are core tables used by the server. The tables that you aren't using, such as mob_db, item_db, mob_skill_db, etc can be ignored if you get errors in your case since you are using the db/ files. @Cydh Thanks for testing an even older client! I'm surprised it went back that far. 1 Quote Link to comment Share on other sites More sharing options...
Gidz Cross Posted June 12, 2014 Group: Members Topic Count: 133 Topics Per Day: 0.03 Content Count: 682 Reputation: 89 Joined: 04/07/14 Last Seen: 7 hours ago Share Posted June 12, 2014 Made another small change in 82467e1. @gidzdlcrz The point of the upgrades folder is so for later on, all you need to do is go to the upgrades folder and import the SQL file that was added from the commits you haven't applied yet. It avoids you having to dump your schema every time (using live or offline data). You'd still have to apply those upgrades since some tables affected are core tables used by the server. The tables that you aren't using, such as mob_db, item_db, mob_skill_db, etc can be ignored if you get errors in your case since you are using the db/ files. @Cydh Thanks for testing an even older client! I'm surprised it went back that far. I dont really get it. So sorry but how can i apply the update when i only use main and log sql's? So sorry again. Im being to noob. Quote Link to comment Share on other sites More sharing options...
Gidz Cross Posted June 14, 2014 Group: Members Topic Count: 133 Topics Per Day: 0.03 Content Count: 682 Reputation: 89 Joined: 04/07/14 Last Seen: 7 hours ago Share Posted June 14, 2014 Okay i think that since i dont use any other SQL files beside MAIN and LOGS. And @aleos told me that i still need to apply the update even so. I think that it is okay to ignore the the error like mob_db since like i said i dont use it. So only these part is necessary right? UPDATE `auction` SET `card0` = 256 WHERE `card0` = -256; UPDATE `cart_inventory` SET `card0` = 256 WHERE `card0` = -256; UPDATE `guild_storage` SET `card0` = 256 WHERE `card0` = -256; UPDATE `inventory` SET `card0` = 256 WHERE `card0` = -256; UPDATE `mail` SET `card0` = 256 WHERE `card0` = -256; UPDATE `storage` SET `card0` = 256 WHERE `card0` = -256; ALTER TABLE `auction` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `auction` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `auction` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `auction` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `auction` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `cart_inventory` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `cart_inventory` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `cart_inventory` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `cart_inventory` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `cart_inventory` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `guild_storage` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `guild_storage` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `guild_storage` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `guild_storage` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `guild_storage` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `inventory` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `inventory` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `inventory` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `inventory` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `inventory` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mail` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mail` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mail` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mail` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mail` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `pet` MODIFY `egg_id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `storage` MODIFY `nameid` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `storage` MODIFY `card0` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `storage` MODIFY `card1` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `storage` MODIFY `card2` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `storage` MODIFY `card3` smallint(5) unsigned NOT NULL default '0'; While i ignore these (From line 40 to 94) ALTER TABLE `mob_db` MODIFY `MVP1id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db` MODIFY `MVP2id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db` MODIFY `MVP3id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db` MODIFY `Drop1id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db` MODIFY `Drop2id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db` MODIFY `Drop3id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db` MODIFY `Drop4id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db` MODIFY `Drop5id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db` MODIFY `Drop6id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db` MODIFY `Drop7id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db` MODIFY `Drop8id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db` MODIFY `Drop9id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db` MODIFY `DropCardid` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `MVP1id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `MVP2id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `MVP3id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `Drop1id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `Drop2id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `Drop3id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `Drop4id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `Drop5id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `Drop6id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `Drop7id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `Drop8id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `Drop9id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2` MODIFY `DropCardid` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `MVP1id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `MVP2id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `MVP3id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `Drop1id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `Drop2id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `Drop3id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `Drop4id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `Drop5id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `Drop6id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `Drop7id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `Drop8id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `Drop9id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db2_re` MODIFY `DropCardid` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `MVP1id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `MVP2id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `MVP3id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `Drop1id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `Drop2id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `Drop3id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `Drop4id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `Drop5id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `Drop6id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `Drop7id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `Drop8id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `Drop9id` smallint(5) unsigned NOT NULL default '0'; ALTER TABLE `mob_db_re` MODIFY `DropCardid` smallint(5) unsigned NOT NULL default '0'; Please correct me if im wrong. Quote Link to comment Share on other sites More sharing options...
Cydh Posted June 16, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted June 16, 2014 Changes in 98c6aee, issues bugreport:9041 7cd82d0#diff-447055087b8fd8d37b7e3eeb412b41f0R30 Quote Link to comment Share on other sites More sharing options...
Kido Posted June 17, 2014 Group: Members Topic Count: 127 Topics Per Day: 0.03 Content Count: 1445 Reputation: 164 Joined: 08/17/13 Last Seen: July 11, 2019 Share Posted June 17, 2014 If you still run a client before 2012-04-10 post your results so I can update this topic! Here, I give these gifts from 2010-07-30a maybe this for the guy? http://rathena.org/board/topic/95833-need-help-guild-button-on-basic-info/ o: you guys so cool! Quote Link to comment Share on other sites More sharing options...
Skorm Posted June 17, 2014 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Yesterday at 10:36 PM Share Posted June 17, 2014 Great work guys! Quote Link to comment Share on other sites More sharing options...
Cydh Posted June 20, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted June 20, 2014 another follow up, 6c5d4a7 Quote Link to comment Share on other sites More sharing options...
Napster Posted June 21, 2014 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 196 Reputation: 72 Joined: 12/12/11 Last Seen: November 6, 2016 Share Posted June 21, 2014 (edited) @Cydh please check , i'am not sure this function support for USHRT_MAX /// npc_selllist for script-controlled shops static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* item_list, struct npc_data* nd) { char npc_ev[EVENT_NAME_LENGTH]; char card_slot[NAME_LENGTH]; int i, j, idx; int key_nameid = 0; int key_amount = 0; int key_refine = 0; int key_attribute = 0; int key_identify = 0; int key_card[MAX_SLOTS]; int key_nameid = 0; <-- support 65k array (not sure) and /// Returns the id of the reference #define reference_getid(data) ( (int32)(reference_getuid(data) & 0x00ffffff) ) /// Returns the array index of the reference #define reference_getindex(data) ( (int32)(((uint32)(reference_getuid(data) & 0xff000000)) >> 24) ) /// Composes the uid of a reference from the id and the index #define reference_uid(id,idx) ( (int32)((((uint32)(id)) & 0x00ffffff) | (((uint32)(idx)) << 24)) ) not support USHRT_MAX thankyou Edited June 21, 2014 by Napster Quote Link to comment Share on other sites More sharing options...
Cydh Posted June 21, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted June 21, 2014 sure they are, int is 32-bits, short is 16-bits Quote Link to comment Share on other sites More sharing options...
K e o u g h Posted June 25, 2014 Group: Members Topic Count: 96 Topics Per Day: 0.02 Content Count: 260 Reputation: 181 Joined: 12/06/11 Last Seen: December 7, 2024 Share Posted June 25, 2014 i applied this on my server sql Don't forget to run sql-files/upgrades/upgrade_20140612.sql and sql-files/upgrades/upgrade_20140612_log.sql! and then pet cant incubate.. please help me with this. how to revert this? i want to return back the way my sql was. Quote Link to comment Share on other sites More sharing options...
Cydh Posted June 25, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted June 25, 2014 i applied this on my server sql Don't forget to run sql-files/upgrades/upgrade_20140612.sql and sql-files/upgrades/upgrade_20140612_log.sql! and then pet cant incubate.. please help me with this. how to revert this? i want to return back the way my sql was. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.