summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorShido <the.keikun@gmail.com>2014-05-16 21:42:25 +0800
committerShido <the.keikun@gmail.com>2014-05-17 01:13:23 +0800
commit5f5380e8d5fa2e6042813e35101cb33b656e3972 (patch)
tree76612807cd798428d6b199a5de02f42e518fdfab /src/char
parentbc1d286cc71a7ae82d9639f4a832970a287c0d71 (diff)
downloadhercules-5f5380e8d5fa2e6042813e35101cb33b656e3972.tar.gz
hercules-5f5380e8d5fa2e6042813e35101cb33b656e3972.tar.bz2
hercules-5f5380e8d5fa2e6042813e35101cb33b656e3972.tar.xz
hercules-5f5380e8d5fa2e6042813e35101cb33b656e3972.zip
Renamed incuvate of Pet System.
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c2
-rw-r--r--src/char/int_pet.c24
2 files changed, 13 insertions, 13 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 289df62a4..57031e3ee 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1780,7 +1780,7 @@ int delete_char_sql(int char_id)
/* delete char's pet */
//Delete the hatched pet if you have one...
- if( SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s` WHERE `char_id`='%d' AND `incuvate` = '0'", pet_db, char_id) )
+ if( SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s` WHERE `char_id`='%d' AND `incubate` = '0'", pet_db, char_id) )
Sql_ShowDebug(sql_handle);
//Delete all pets that are stored in eggs (inventory + cart)
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index 29c40eff9..0f7c683f8 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -25,7 +25,7 @@ struct s_pet *pet_pt;
//---------------------------------------------------------
int inter_pet_tosql(int pet_id, struct s_pet* p)
{
- //`pet` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate`)
+ //`pet` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incubate`)
char esc_name[NAME_LENGTH*2+1];// escaped pet name
SQL->EscapeStringLen(sql_handle, esc_name, p->name, strnlen(p->name, NAME_LENGTH));
@@ -35,10 +35,10 @@ int inter_pet_tosql(int pet_id, struct s_pet* p)
if( pet_id == -1 )
{// New pet.
if( SQL_ERROR == SQL->Query(sql_handle, "INSERT INTO `%s` "
- "(`class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate`) "
+ "(`class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incubate`) "
"VALUES ('%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
pet_db, p->class_, esc_name, p->account_id, p->char_id, p->level, p->egg_id,
- p->equip, p->intimate, p->hungry, p->rename_flag, p->incuvate) )
+ p->equip, p->intimate, p->hungry, p->rename_flag, p->incubate) )
{
Sql_ShowDebug(sql_handle);
return 0;
@@ -47,9 +47,9 @@ int inter_pet_tosql(int pet_id, struct s_pet* p)
}
else
{// Update pet.
- if( SQL_ERROR == SQL->Query(sql_handle, "UPDATE `%s` SET `class`='%d',`name`='%s',`account_id`='%d',`char_id`='%d',`level`='%d',`egg_id`='%d',`equip`='%d',`intimate`='%d',`hungry`='%d',`rename_flag`='%d',`incuvate`='%d' WHERE `pet_id`='%d'",
+ if( SQL_ERROR == SQL->Query(sql_handle, "UPDATE `%s` SET `class`='%d',`name`='%s',`account_id`='%d',`char_id`='%d',`level`='%d',`egg_id`='%d',`equip`='%d',`intimate`='%d',`hungry`='%d',`rename_flag`='%d',`incubate`='%d' WHERE `pet_id`='%d'",
pet_db, p->class_, esc_name, p->account_id, p->char_id, p->level, p->egg_id,
- p->equip, p->intimate, p->hungry, p->rename_flag, p->incuvate, p->pet_id) )
+ p->equip, p->intimate, p->hungry, p->rename_flag, p->incubate, p->pet_id) )
{
Sql_ShowDebug(sql_handle);
return 0;
@@ -71,9 +71,9 @@ int inter_pet_fromsql(int pet_id, struct s_pet* p)
#endif
memset(p, 0, sizeof(struct s_pet));
- //`pet` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate`)
+ //`pet` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incubate`)
- if( SQL_ERROR == SQL->Query(sql_handle, "SELECT `pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate` FROM `%s` WHERE `pet_id`='%d'", pet_db, pet_id) )
+ if( SQL_ERROR == SQL->Query(sql_handle, "SELECT `pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incubate` FROM `%s` WHERE `pet_id`='%d'", pet_db, pet_id) )
{
Sql_ShowDebug(sql_handle);
return 0;
@@ -92,7 +92,7 @@ int inter_pet_fromsql(int pet_id, struct s_pet* p)
SQL->GetData(sql_handle, 8, &data, NULL); p->intimate = atoi(data);
SQL->GetData(sql_handle, 9, &data, NULL); p->hungry = atoi(data);
SQL->GetData(sql_handle, 10, &data, NULL); p->rename_flag = atoi(data);
- SQL->GetData(sql_handle, 11, &data, NULL); p->incuvate = atoi(data);
+ SQL->GetData(sql_handle, 11, &data, NULL); p->incubate = atoi(data);
SQL->FreeResult(sql_handle);
@@ -186,11 +186,11 @@ int mapif_delete_pet_ack(int fd, int flag){
}
int mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id,
- short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name)
+ short pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name)
{
memset(pet_pt, 0, sizeof(struct s_pet));
safestrncpy(pet_pt->name, pet_name, NAME_LENGTH);
- if(incuvate == 1)
+ if(incubate == 1)
pet_pt->account_id = pet_pt->char_id = 0;
else {
pet_pt->account_id = account_id;
@@ -203,7 +203,7 @@ int mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short
pet_pt->intimate = intimate;
pet_pt->hungry = hungry;
pet_pt->rename_flag = rename_flag;
- pet_pt->incuvate = incuvate;
+ pet_pt->incubate = incubate;
if(pet_pt->hungry < 0)
pet_pt->hungry = 0;
@@ -229,7 +229,7 @@ int mapif_load_pet(int fd, int account_id, int char_id, int pet_id){
inter_pet_fromsql(pet_id, pet_pt);
if(pet_pt!=NULL) {
- if(pet_pt->incuvate == 1) {
+ if(pet_pt->incubate == 1) {
pet_pt->account_id = pet_pt->char_id = 0;
mapif_pet_info(fd, account_id, pet_pt);
}