diff options
author | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-12-11 17:20:44 +0000 |
---|---|---|
committer | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-12-11 17:20:44 +0000 |
commit | 97166dfb92d7cbdef8731771c38923cc219a4fc3 (patch) | |
tree | b757962d8b2ef15de65fd62872f5dcc3a740e4a9 /src/char/int_elemental.c | |
parent | e6376945eb87a94974bfad2a5ca649c9b8d1288f (diff) | |
download | hercules-97166dfb92d7cbdef8731771c38923cc219a4fc3.tar.gz hercules-97166dfb92d7cbdef8731771c38923cc219a4fc3.tar.bz2 hercules-97166dfb92d7cbdef8731771c38923cc219a4fc3.tar.xz hercules-97166dfb92d7cbdef8731771c38923cc219a4fc3.zip |
Happy Holidays and Happy 12/12/12 :)
Update Elemental summon to its official behavior
- Fixed missing skill features of Ventus(bugreport:6792,bugreport:6723,bugreport:6511)
- Note: upgrade_svn17014.sql
- And other elemental skills are to follow :)
Fixed bugreport:6889 updated const.txt where it cause error to some items.
Fixed bugreport:6999 where matk damage deals miss atk to plant type targets.
Fixed status calculation where it doesn't give accurate result or how official calculation does.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17014 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/int_elemental.c')
-rw-r--r-- | src/char/int_elemental.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c index 7c76c4496..3c2f6672d 100644 --- a/src/char/int_elemental.c +++ b/src/char/int_elemental.c @@ -20,9 +20,9 @@ bool mapif_elemental_save(struct s_elemental* ele) { if( ele->elemental_id == 0 ) { // Create new DB entry if( SQL_ERROR == Sql_Query(sql_handle, - "INSERT INTO `elemental` (`char_id`,`class`,`mode`,`hp`,`sp`,`max_hp`,`max_sp`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`life_time`)" - "VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%u')", - ele->char_id, ele->class_, ele->mode, ele->hp, ele->sp, ele->max_hp, ele->max_sp, ele->str, ele->agi, ele->vit, ele->int_, ele->dex, ele->luk, ele->life_time) ) + "INSERT INTO `elemental` (`char_id`,`class`,`mode`,`hp`,`sp`,`max_hp`,`max_sp`,`atk1`,`atk2`,`matk`,`aspd`,`def`,`mdef`,`flee`,`hit`,`life_time`)" + "VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%u')", + ele->char_id, ele->class_, ele->mode, ele->hp, ele->sp, ele->max_hp, ele->max_sp, ele->atk, ele->atk2, ele->matk, ele->amotion, ele->def, ele->mdef, ele->flee, ele->hit, ele->life_time) ) { Sql_ShowDebug(sql_handle); flag = false; @@ -31,10 +31,10 @@ bool mapif_elemental_save(struct s_elemental* ele) { ele->elemental_id = (int)Sql_LastInsertId(sql_handle); } else if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `elemental` SET `char_id` = '%d', `class` = '%d', `mode` = '%d', `hp` = '%d', `sp` = '%d'," - "`max_hp` = '%d', `max_sp` = '%d', `str` = '%d', `agi` = '%d', `vit` = '%d', `int` = '%d', `dex` = '%d'," - "`luk` = '%d', `life_time` = '%u' WHERE `ele_id` = '%d'", - ele->char_id, ele->class_, ele->mode, ele->hp, ele->sp, ele->max_hp, ele->max_sp, ele->str, ele->agi, - ele->vit, ele->int_, ele->dex, ele->luk, ele->life_time, ele->elemental_id) ) + "`max_hp` = '%d', `max_sp` = '%d', `atk1` = '%d', `atk2` = '%d', `matk` = '%d', `aspd` = '%d', `def` = '%d'," + "`mdef` = '%d', `flee` = '%d', `hit` = '%d', `life_time` = '%u' WHERE `ele_id` = '%d'", + ele->char_id, ele->class_, ele->mode, ele->hp, ele->sp, ele->max_hp, ele->max_sp, ele->atk, ele->atk2, + ele->matk, ele->amotion, ele->def, ele->mdef, ele->flee, ele->hit, ele->life_time, ele->elemental_id) ) { // Update DB entry Sql_ShowDebug(sql_handle); flag = false; @@ -49,8 +49,8 @@ bool mapif_elemental_load(int ele_id, int char_id, struct s_elemental *ele) { ele->elemental_id = ele_id; ele->char_id = char_id; - if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `class`, `mode`, `hp`, `sp`, `max_hp`, `max_sp`, `str`, `agi`, `vit`, `int`, `dex`," - "`luk`, `life_time` FROM `elemental` WHERE `ele_id` = '%d' AND `char_id` = '%d'", + if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `class`, `mode`, `hp`, `sp`, `max_hp`, `max_sp`, `atk1`, `atk2`, `matk`, `aspd`," + "`def`, `mdef`, `flee`, `hit`, `life_time` FROM `elemental` WHERE `ele_id` = '%d' AND `char_id` = '%d'", ele_id, char_id) ) { Sql_ShowDebug(sql_handle); return false; @@ -67,13 +67,15 @@ bool mapif_elemental_load(int ele_id, int char_id, struct s_elemental *ele) { Sql_GetData(sql_handle, 3, &data, NULL); ele->sp = atoi(data); Sql_GetData(sql_handle, 4, &data, NULL); ele->max_hp = atoi(data); Sql_GetData(sql_handle, 5, &data, NULL); ele->max_sp = atoi(data); - Sql_GetData(sql_handle, 6, &data, NULL); ele->str = atoi(data); - Sql_GetData(sql_handle, 7, &data, NULL); ele->agi = atoi(data); - Sql_GetData(sql_handle, 8, &data, NULL); ele->vit = atoi(data); - Sql_GetData(sql_handle, 9, &data, NULL); ele->int_ = atoi(data); - Sql_GetData(sql_handle, 10, &data, NULL); ele->dex = atoi(data); - Sql_GetData(sql_handle, 11, &data, NULL); ele->luk = atoi(data); - Sql_GetData(sql_handle, 12, &data, NULL); ele->life_time = atoi(data); + Sql_GetData(sql_handle, 6, &data, NULL); ele->atk = atoi(data); + Sql_GetData(sql_handle, 7, &data, NULL); ele->atk2 = atoi(data); + Sql_GetData(sql_handle, 8, &data, NULL); ele->matk = atoi(data); + Sql_GetData(sql_handle, 9, &data, NULL); ele->amotion = atoi(data); + Sql_GetData(sql_handle, 10, &data, NULL); ele->def = atoi(data); + Sql_GetData(sql_handle, 11, &data, NULL); ele->mdef = atoi(data); + Sql_GetData(sql_handle, 12, &data, NULL); ele->flee = atoi(data); + Sql_GetData(sql_handle, 13, &data, NULL); ele->hit = atoi(data); + Sql_GetData(sql_handle, 14, &data, NULL); ele->life_time = atoi(data); Sql_FreeResult(sql_handle); if( save_log ) ShowInfo("Elemental loaded (%d - %d).\n", ele->elemental_id, ele->char_id); |