diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-04-09 18:50:37 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-04-09 18:50:37 -0300 |
commit | 3c4293fa9a3fa00756d1993ec8e1f0a04ec063de (patch) | |
tree | 75102078372fedda58001bdbe7a57a29013e4b8f /src | |
parent | 34134c6e72d5351082a72958833150fc8407f71f (diff) | |
parent | 8f76b5e745322b637a02e9a45c996acebe95bc3e (diff) | |
download | evol-hercules-3c4293fa9a3fa00756d1993ec8e1f0a04ec063de.tar.gz evol-hercules-3c4293fa9a3fa00756d1993ec8e1f0a04ec063de.tar.bz2 evol-hercules-3c4293fa9a3fa00756d1993ec8e1f0a04ec063de.tar.xz evol-hercules-3c4293fa9a3fa00756d1993ec8e1f0a04ec063de.zip |
Merge branch 'master' into tmw2
Diffstat (limited to 'src')
-rw-r--r-- | src/ecommon/init.c | 1 | ||||
-rw-r--r-- | src/emap/clif.c | 20 | ||||
-rw-r--r-- | src/emap/clif.h | 8 | ||||
-rw-r--r-- | src/emap/init.c | 3 | ||||
-rw-r--r-- | src/emap/map.c | 2 | ||||
-rw-r--r-- | src/emap/pc.c | 7 | ||||
-rw-r--r-- | src/emap/script_buildins.c | 26 | ||||
-rw-r--r-- | src/emap/script_buildins.h | 1 |
8 files changed, 52 insertions, 16 deletions
diff --git a/src/ecommon/init.c b/src/ecommon/init.c index 26887d3..5103ffa 100644 --- a/src/ecommon/init.c +++ b/src/ecommon/init.c @@ -52,4 +52,5 @@ void common_online(void) checkVar(OLD_MAX_SKILL_DB, 1510); checkVar(MAX_EVOL_SKILLS, 42); checkVar(EVOL_FIRST_SKILL, 20000); + checkVar(MAX_SKILL_TREE, 110); } diff --git a/src/emap/clif.c b/src/emap/clif.c index d0d3cde..53d9a29 100644 --- a/src/emap/clif.c +++ b/src/emap/clif.c @@ -149,7 +149,7 @@ void eclif_quest_add(TBL_PC *sd, hookStop(); } -// legacy eclif_charnameack_legacy start +// legacy eclif_blname_ack_legacy start // clientVersion <= 24 // @@ -189,7 +189,7 @@ struct packet_reqnameall_legacy_ack { /// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME) /// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL) /// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2) -static void eclif_charnameack_legacy(int fd, struct block_list *bl) +static void eclif_blname_ack_legacy(int fd, struct block_list *bl) { struct packet_reqnameall_legacy_ack packet; memset(&packet, 0, sizeof(struct packet_reqnameall_legacy_ack)); @@ -312,7 +312,7 @@ static void eclif_charnameack_legacy(int fd, struct block_list *bl) memcpy(packet.name, BL_UCCAST(BL_ELEM, bl)->db->name, NAME_LENGTH); break; default: - ShowError("clif_charnameack: bad type %u(%d)\n", bl->type, bl->id); + ShowError("clif_blname_ack: bad type %u(%d)\n", bl->type, bl->id); return; } @@ -388,12 +388,12 @@ static void eclif_charnameupdate_legacy(struct map_session_data *ssd) // // clientVersion <= 24 -// legacy eclif_charnameack_legacy end +// legacy eclif_blname_ack_legacy end -void eclif_charnameack_pre(int *fdPtr, - struct block_list **blPtr) +void eclif_blname_ack_pre(int *fdPtr, + struct block_list **blPtr) { - eclif_charnameack_pre_sub(fdPtr, blPtr); + eclif_blname_ack_pre_sub(fdPtr, blPtr); if (hookStopped()) return; @@ -402,13 +402,13 @@ void eclif_charnameack_pre(int *fdPtr, return; if (data->clientVersion <= 24) { - eclif_charnameack_legacy(*fdPtr, *blPtr); + eclif_blname_ack_legacy(*fdPtr, *blPtr); hookStop(); } } -void eclif_charnameack_pre_sub(int *fdPtr, - struct block_list **blPtr) +void eclif_blname_ack_pre_sub(int *fdPtr, + struct block_list **blPtr) { struct block_list *bl = *blPtr; if (!bl) diff --git a/src/emap/clif.h b/src/emap/clif.h index 3a563fd..1c602d8 100644 --- a/src/emap/clif.h +++ b/src/emap/clif.h @@ -9,10 +9,10 @@ void eclif_quest_add(TBL_PC *sd, struct quest *qd); void eclif_quest_add_pre(TBL_PC **sdPtr, struct quest **qdPtr); -void eclif_charnameack_pre(int *fdPtr, - struct block_list **blPtr); -void eclif_charnameack_pre_sub(int *fdPtr, - struct block_list **blPtr); +void eclif_blname_ack_pre(int *fdPtr, + struct block_list **blPtr); +void eclif_blname_ack_pre_sub(int *fdPtr, + struct block_list **blPtr); void eclif_charnameupdate_pre(struct map_session_data **ssdPtr); void eclif_getareachar_unit_post(TBL_PC *sd, struct block_list *bl); diff --git a/src/emap/init.c b/src/emap/init.c index 5e014d0..deabd84 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -154,6 +154,7 @@ HPExport void plugin_init (void) addScriptCommand("npcwalkto", "ii", npcWalkTo); addScriptCommand("rif", "is*", rif); addScriptCommand("setmapmask", "si", setMapMask); + addScriptCommand("sendmapmask", "i*", sendMapMask); addScriptCommand("addmapmask", "si", addMapMask); addScriptCommand("removemapmask", "si", removeMapMask); addScriptCommand("getmapmask", "s", getMapMask); @@ -297,7 +298,7 @@ HPExport void plugin_init (void) addHookPre(npc, unload, enpc_unload_pre); addHookPre(clif, quest_send_list, eclif_quest_send_list_pre); addHookPre(clif, quest_add, eclif_quest_add_pre); - addHookPre(clif, charnameack, eclif_charnameack_pre); + addHookPre(clif, blname_ack, eclif_blname_ack_pre); addHookPre(clif, charnameupdate, eclif_charnameupdate_pre); addHookPre(clif, getareachar_item, eclif_getareachar_item_pre); addHookPre(clif, dropflooritem, eclif_dropflooritem_pre); diff --git a/src/emap/map.c b/src/emap/map.c index cfbffef..9b38045 100644 --- a/src/emap/map.c +++ b/src/emap/map.c @@ -614,7 +614,7 @@ void map_alwaysVisible_send(TBL_PC *sd) continue; } clif->set_unit_idle(&npc->bl, sd, SELF); - clif->charnameack(sd->fd, &npc->bl); + clif->blname_ack(sd->fd, &npc->bl); } } diff --git a/src/emap/pc.c b/src/emap/pc.c index 9149e1e..ec45cdc 100644 --- a/src/emap/pc.c +++ b/src/emap/pc.c @@ -940,6 +940,13 @@ int epc_jobchange(struct map_session_data *sd, if (sd->disguise != -1) pc->disguise(sd, -1); + // Fix atcommand @jobchange when the player changing from 3rd job having alternate body style into non-3rd job, crashing the client +// if (pc->has_second_costume(sd) == false) { +// sd->status.body = 0; +// sd->vd.body_style = 0; +// clif->changelook(&sd->bl, LOOK_BODY2, sd->vd.body_style); +// } + status->set_viewdata(&sd->bl, class); send_changelook2(sd, &sd->bl, sd->bl.id, LOOK_BASE, sd->vd.class, 0, NULL, 0, AREA); // clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); // move sprite update to prevent client crashes with incompatible equipment [Valaris] diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index 4b41e0a..5e86a22 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -732,6 +732,32 @@ BUILDIN(setMapMask) return true; } +// sendMapMask(mask{, "player name"}) +BUILDIN(sendMapMask) +{ + const int val = script_getnum(st, 2); + + struct map_session_data *sd = NULL; + if (script_hasdata(st, 3) && script_isstringtype(st, 3)) + { + sd = script->nick2sd(st, script_getstr(st, 3)); + } + else + { + sd = script->rid2sd(st); + } + + if (sd == NULL) + { + ShowWarning("player not attached\n"); + script->reportsrc(st); + return false; + } + + send_mapmask(sd->fd, val); + return true; +} + BUILDIN(getMapMask) { const char *const mapName = script_getstr(st, 2); diff --git a/src/emap/script_buildins.h b/src/emap/script_buildins.h index 6d4b6e9..b93b302 100644 --- a/src/emap/script_buildins.h +++ b/src/emap/script_buildins.h @@ -29,6 +29,7 @@ BUILDIN(setq); BUILDIN(setNpcDir); BUILDIN(rif); BUILDIN(setMapMask); +BUILDIN(sendMapMask); BUILDIN(getMapMask); BUILDIN(addMapMask); BUILDIN(removeMapMask); |