summaryrefslogtreecommitdiff
path: root/src/map/charsave.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-06 18:38:51 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-06 18:38:51 +0000
commite7096ca70629c5fd5f824cec8e2d4307e8578913 (patch)
treeae574e1de73431050206ac7d01f3f04caaec7c41 /src/map/charsave.c
parent86914c88410c49b2b84084f2165fc9b581f2986e (diff)
downloadhercules-e7096ca70629c5fd5f824cec8e2d4307e8578913.tar.gz
hercules-e7096ca70629c5fd5f824cec8e2d4307e8578913.tar.bz2
hercules-e7096ca70629c5fd5f824cec8e2d4307e8578913.tar.xz
hercules-e7096ca70629c5fd5f824cec8e2d4307e8578913.zip
- Added define clif_deadsit to send the dead state into player packets if the player is in trick dead state.
- Venom Splasher always hits (but splash damage targets can still avoid it) - Using autoloot with no arguments now toggles it between @autoloot 0 and @autoloot 100% - Falcon Assault now takes Blitz Beat lv5 as base damage. - Fixed pc_makesavestatus not updating status.option correctly. - Corrected Waterball so that higher levels can do insane amount of hits. - Altered slave behaviour. No more random walking, will stay within 2 cells of their master. - Reverted the Summon Slave behaviour to not adjust level based on number of current slaves. - Coma no longer sends SP to 1. - Updated Meteor so that when level 11 or more is casted, the area over which meteors fall is tripled. - Dark elemental characters are now inmune to Curse. - Fixed sc_data saving to sql buffer building method. Thanks to its_sparky. - Changed the map zone reading from using pow to a bit shift. - Experience has now been changed to unsigned int, and is read as such from the dbs. - Increased HT_DETECTING seek range to 7x7 - Added function map_foreachinrange which actually checks distance of nearing objects (unlike for each in area which uses a square area), may come handy for future code. - Corrected Venom Splasher: Being hit does not cancels it, works at 75% or less of target's HP, being hit normally while under the count has a chance of causing poison. Damage is +400% + 50*lv% git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5204 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/charsave.c')
-rw-r--r--src/map/charsave.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/charsave.c b/src/map/charsave.c
index e9fc888db..c335064c5 100644
--- a/src/map/charsave.c
+++ b/src/map/charsave.c
@@ -486,8 +486,9 @@ void charsave_save_scdata(int account_id, int char_id, struct status_change* sc_
int i,count =0;
struct TimerData *timer;
unsigned int tick = gettick();
+ char *p = tmp_sql;
- sprintf(tmp_sql, "INSERT INTO `sc_data` (`account_id`, `char_id`, `type`, `tick`, `val1`, `val2`, `val3`, `val4`) VALUES ");
+ p += sprintf(p, "INSERT INTO `sc_data` (`account_id`, `char_id`, `type`, `tick`, `val1`, `val2`, `val3`, `val4`) VALUES ");
for(i = 0; i < max_sc; i++)
{
@@ -497,14 +498,14 @@ void charsave_save_scdata(int account_id, int char_id, struct status_change* sc_
if (timer == NULL || timer->func != status_change_timer || DIFF_TICK(timer->tick,tick) < 0)
continue;
- sprintf (tmp_sql, "%s ('%d','%d','%hu','%d','%d','%d','%d','%d'),", tmp_sql, account_id, char_id,
+ p += (p, " ('%d','%d','%hu','%d','%d','%d','%d','%d'),", account_id, char_id,
i, DIFF_TICK(timer->tick,tick), sc_data->data[i].val1, sc_data->data[i].val2, sc_data->data[i].val3, sc_data->data[i].val4);
count++;
}
if (count > 0)
{
- tmp_sql[strlen(tmp_sql)-1] = '\0'; //Remove the trailing comma.
+ *--p = '\0'; //Remove the trailing comma.
if(mysql_query(&charsql_handle, tmp_sql)){
ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);