summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-20 19:57:18 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-20 19:57:18 +0000
commitb1cb80992092152a1fe459f4a3ac24c5c41940bc (patch)
tree71bf77e70c4f60baf004414ee40e521afa0282b5
parent3e7eb3999221a0bc3ac28739848199de5aed6953 (diff)
downloadhercules-b1cb80992092152a1fe459f4a3ac24c5c41940bc.tar.gz
hercules-b1cb80992092152a1fe459f4a3ac24c5c41940bc.tar.bz2
hercules-b1cb80992092152a1fe459f4a3ac24c5c41940bc.tar.xz
hercules-b1cb80992092152a1fe459f4a3ac24c5c41940bc.zip
- Applied the fix to homunculus name saving...
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7777 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/char_sql/int_homun.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index ffd31258f..89fb5928e 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/07/20
+ * Applied the fix to homunculus name saving... [Skotlex]
* Added battle config settings agi_penalty_target and vit_penalty_target,
they define which object types will get vit/flee reductions when
multi-targetted and defaults to only players (battle/battle.conf) [Skotlex]
diff --git a/src/char_sql/int_homun.c b/src/char_sql/int_homun.c
index 7662784a3..5bb8934b1 100644
--- a/src/char_sql/int_homun.c
+++ b/src/char_sql/int_homun.c
@@ -117,6 +117,8 @@ int mapif_save_homunculus_skills(struct s_homunculus *hd)
int mapif_save_homunculus(int fd, int account_id, struct s_homunculus *hd)
{
int flag =1;
+ char t_name[NAME_LENGTH*2];
+ jstrescapecpy(t_name, hd->name);
if(hd->hom_id==0) // new homunculus
{
@@ -125,14 +127,14 @@ int mapif_save_homunculus(int fd, int account_id, struct s_homunculus *hd)
sprintf(tmp_sql, "INSERT INTO `homunculus` "
"(`char_id`, `class`,`name`,`level`,`exp`,`intimacy`,`hunger`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hp`,`max_hp`,`sp`,`max_sp`,`skill_point`, `rename_flag`, `vaporize`) "
"VALUES ('%d', '%d', '%s', '%d', '%lu', '%lu', '%d', '%d', %d, '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
- hd->char_id, hd->class_,hd->name,hd->level,hd->exp,hd->intimacy,hd->hunger, hd->str, hd->agi, hd->vit, hd->int_, hd->dex, hd->luk,
+ hd->char_id, hd->class_,t_name,hd->level,hd->exp,hd->intimacy,hd->hunger, hd->str, hd->agi, hd->vit, hd->int_, hd->dex, hd->luk,
hd->hp,hd->max_hp,hd->sp,hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize);
}
else
{
sprintf(tmp_sql, "UPDATE `homunculus` SET `char_id`='%d', `class`='%d',`name`='%s',`level`='%d',`exp`='%lu',`intimacy`='%lu',`hunger`='%d', `str`='%d', `agi`='%d', `vit`='%d', `int`='%d', `dex`='%d', `luk`='%d', `hp`='%d',`max_hp`='%d',`sp`='%d',`max_sp`='%d',`skill_point`='%d', `rename_flag`='%d', `vaporize`='%d' WHERE `homun_id`='%d'",
- hd->char_id, hd->class_,hd->name,hd->level,hd->exp,hd->intimacy,hd->hunger, hd->str, hd->agi, hd->vit, hd->int_, hd->dex, hd->luk,
+ hd->char_id, hd->class_,t_name,hd->level,hd->exp,hd->intimacy,hd->hunger, hd->str, hd->agi, hd->vit, hd->int_, hd->dex, hd->luk,
hd->hp,hd->max_hp,hd->sp,hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize, hd->hom_id);
}