Hey guys,
i would suggest, that we fix something in the database (flat file & sql).
An Update which added a new field to the database ruined the database template :
Line 943/** * [RRInd] * For backwards compatibility, in Renewal mode, MATK from weapons comes from the atk slot * We use a ':' delimiter which, if not found, assumes the weapon does not provide any matk. **/void itemdb_re_split_atoi(char *str, int *atk, int *matk) { int i, val[2]; for (i=0; i<2; i++) { if (!str) break; val[i] = atoi(str); str = strchr(str,':'); if (str) *str++=0; } if( i == 0 ) { *atk = *matk = 0; return;//no data found } if( i == 1 ) {//Single Value, we assume it's the ATK *atk = val[0]; *matk = 0; return; } //We assume we have 2 values. *atk = val[0]; *matk = val[1]; return;}
This is wasting a lot of cycle times for nothing and there could easily be a new database column that takes matk instead of appending it as string to attack..
just change the structure "item_data" in /src/map/itemdb.h
struct item_data { uint16 nameid; char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH]; //Do not add stuff between value_buy and view_id (see how getiteminfo works) int value_buy; int value_sell; int type; int maxchance; //For logs, for external game info, for scripts: Max drop chance of this item (e.g. 0.01% , etc.. if it = 0, then monsters don't drop it, -1 denotes items sold in shops only) [Lupus] int sex; int equip; int weight; int atk; int def; int range;...
to
struct item_data { uint16 nameid; char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH]; //Do not add stuff between value_buy and view_id (see how getiteminfo works) int value_buy; int value_sell; int type; int maxchance; //For logs, for external game info, for scripts: Max drop chance of this item (e.g. 0.01% , etc.. if it = 0, then monsters don't drop it, -1 denotes items sold in shops only) [Lupus] int sex; int equip; int weight; int atk; int matk; int def; int range;...
and then the database reader (just have not much time to explain, cause its 1:16am)
If i should do that, just let me know
~Shikazu