so I want to know if ragsrvinfo table is constantly getting updated or it remains static for a long time.
it constantly getting updated
when @reloadbattleconf, it sends (srcmapatcommand.c)
chrif->ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common);then map-server.exe send the value to char-server.exe via (srccharchar.c)
Code:
if( SQL_ERROR == SQL->Query(sql_handle, "INSERT INTO `%s` SET `index`='%d',`name`='%s',`exp`='%d',`jexp`='%d',`drop`='%d'", ragsrvinfo_db, fd, esc_server_name, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)) )
..
ok ... I don't understand why they need a sql table to send a server rate ...
but for sure, whenever map-server change rate, it does send to the `ragsrvinfo` table
1 reason ... that I am just guessing ... is to support multi map-server
so with just 1 login server, the player can select which server they like to play, and each map-server has different rates
and that index indicate different map-server
I'm just guessing though, maybe try ask Ind
ok now I know why
in case that map-server.exe crash, and char-server.exe still up
it can retrieve the last value from SQL, because char-server.exe handles to rates
(srcmapcharif.c)
/*========================================== * timerFunction * Check the connection to char server, (if it down) *------------------------------------------*/..
.
>>>... any changes will just insert a new row on it. Try to get the last row only...
I'm quite sure that inserting a new row in a non-indexed table, will be the 1st rowjust do a
select * from ragsrvinfo limit 1;
would suffice