diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-03-29 22:53:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-04-07 22:38:35 +0300 |
commit | 0a349742abd855ae4b6edbe8735937768cdfeb07 (patch) | |
tree | 5cd95c4160b719f5fdfe7cfc78dcceb554eb6fd8 /src | |
parent | 0a5ee140c74989d5fb2cbc9a22150ff66bbcfb07 (diff) | |
download | hercules-0a349742abd855ae4b6edbe8735937768cdfeb07.tar.gz hercules-0a349742abd855ae4b6edbe8735937768cdfeb07.tar.bz2 hercules-0a349742abd855ae4b6edbe8735937768cdfeb07.tar.xz hercules-0a349742abd855ae4b6edbe8735937768cdfeb07.zip |
Add allow call option
Diffstat (limited to 'src')
-rw-r--r-- | src/char/char.c | 15 | ||||
-rw-r--r-- | src/common/mmo.h | 5 | ||||
-rw-r--r-- | src/map/clif.c | 3 | ||||
-rw-r--r-- | src/map/clif.h | 2 |
4 files changed, 18 insertions, 7 deletions
diff --git a/src/char/char.c b/src/char/char.c index 34a3ea7a8..5528fb8aa 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -479,7 +479,8 @@ static int char_mmo_char_tosql(int char_id, struct mmo_charstatus *p) (p->show_equip != cp->show_equip) || (p->allow_party != cp->allow_party) || (p->font != cp->font) || (p->uniqueitem_counter != cp->uniqueitem_counter) || (p->hotkey_rowshift != cp->hotkey_rowshift) || (p->clan_id != cp->clan_id) || (p->last_login != cp->last_login) || (p->attendance_count != cp->attendance_count) || - (p->attendance_timer != cp->attendance_timer) || (p->title_id != cp->title_id) || (p->inventorySize != cp->inventorySize) + (p->attendance_timer != cp->attendance_timer) || (p->title_id != cp->title_id) || (p->inventorySize != cp->inventorySize) || + (p->allow_call != cp->allow_call) ) { //Save status unsigned int opt = 0; @@ -491,10 +492,12 @@ static int char_mmo_char_tosql(int char_id, struct mmo_charstatus *p) p->inventorySize = FIXED_INVENTORY_SIZE; } - if( p->allow_party ) + if (p->allow_party) opt |= OPT_ALLOW_PARTY; - if( p->show_equip ) + if (p->show_equip) opt |= OPT_SHOW_EQUIP; + if (p->allow_call) + opt |= OPT_ALLOW_CALL; if( SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `base_level`='%d', `job_level`='%d'," "`base_exp`='%"PRIu64"', `job_exp`='%"PRIu64"', `zeny`='%d'," @@ -1447,10 +1450,12 @@ static int char_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool loa SQL->StmtFree(stmt); /* load options into proper vars */ - if( opt & OPT_ALLOW_PARTY ) + if (opt & OPT_ALLOW_PARTY) p->allow_party = true; - if( opt & OPT_SHOW_EQUIP ) + if (opt & OPT_SHOW_EQUIP) p->show_equip = true; + if (opt & OPT_ALLOW_CALL) + p->allow_call = true; cp = idb_ensure(chr->char_db_, char_id, chr->create_charstatus); memcpy(cp, p, sizeof(struct mmo_charstatus)); diff --git a/src/common/mmo.h b/src/common/mmo.h index 3a0f73520..2fc464243 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -487,6 +487,7 @@ enum e_mmo_charstatus_opt { OPT_NONE = 0x0, OPT_SHOW_EQUIP = 0x1, OPT_ALLOW_PARTY = 0x2, + OPT_ALLOW_CALL = 0x4, }; enum e_item_bound_type { @@ -733,7 +734,9 @@ struct mmo_charstatus { #ifdef HOTKEY_SAVING struct hotkey hotkeys[MAX_HOTKEYS]; #endif - bool show_equip, allow_party; + bool show_equip; + bool allow_party; + bool allow_call; unsigned short rename; unsigned short slotchange; diff --git a/src/map/clif.c b/src/map/clif.c index 605362fc5..349e56437 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17021,6 +17021,9 @@ static void clif_parse_cz_config(int fd, struct map_session_data *sd) hd->homunculus.autofeed = flag; break; } + case CZ_CONFIG_CALL: + sd->status.allow_call = flag; + break; default: ShowWarning("clif_parse_cz_config: Unsupported type has been received (%u).\n", type); return; diff --git a/src/map/clif.h b/src/map/clif.h index 241214e8b..9e60256c6 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -556,7 +556,7 @@ enum clif_unittype { **/ enum CZ_CONFIG { CZ_CONFIG_OPEN_EQUIPMENT_WINDOW = 0, - // Unknown = 1, + CZ_CONFIG_CALL = 1, CZ_CONFIG_PET_AUTOFEEDING = 2, CZ_CONFIG_HOMUNCULUS_AUTOFEEDING = 3, }; |