diff options
author | Haru <haru@dotalux.com> | 2017-04-20 12:30:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-20 12:30:09 +0200 |
commit | 66b429f26bc751f190625d77e775e0573de77f94 (patch) | |
tree | db8346196ffe98b270bd8e6ea895c828ba7754d6 | |
parent | 5802b22439441be1914ae9024d6ce06d51c0210f (diff) | |
parent | b3da591891c1af06bfe4a82de58ce3a50f1f1c3d (diff) | |
download | hercules-66b429f26bc751f190625d77e775e0573de77f94.tar.gz hercules-66b429f26bc751f190625d77e775e0573de77f94.tar.bz2 hercules-66b429f26bc751f190625d77e775e0573de77f94.tar.xz hercules-66b429f26bc751f190625d77e775e0573de77f94.zip |
Merge pull request #1688 from Jedzkie/1-Carts
Cart Decorate & Change Cart Fixes
-rw-r--r-- | db/pre-re/skill_db.conf | 1 | ||||
-rw-r--r-- | db/re/skill_db.conf | 1 | ||||
-rw-r--r-- | src/map/clif.c | 29 |
3 files changed, 15 insertions, 16 deletions
diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf index 39ae0b313..80527b4f6 100644 --- a/db/pre-re/skill_db.conf +++ b/db/pre-re/skill_db.conf @@ -29842,6 +29842,7 @@ skill_db: ( } Requirements: { SPCost: 40 + State: "Cart" } }, { diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index ffc5e4e52..2a59785fa 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -30657,6 +30657,7 @@ skill_db: ( } Requirements: { SPCost: 40 + State: "Cart" } }, { diff --git a/src/map/clif.c b/src/map/clif.c index 5939222e9..8ab6e71a4 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -11025,39 +11025,36 @@ void clif_parse_RemoveOption(int fd,struct map_session_data *sd) void clif_parse_ChangeCart(int fd,struct map_session_data *sd) __attribute__((nonnull (2))); /// Request to change cart's visual look (CZ_REQ_CHANGECART). /// 01af <num>.W -void clif_parse_ChangeCart(int fd,struct map_session_data *sd) +void clif_parse_ChangeCart(int fd, struct map_session_data *sd) {// TODO: State tracking? int type; - if( pc->checkskill(sd, MC_CHANGECART) < 1 ) + if (pc->checkskill(sd, MC_CHANGECART) == 0) return; #ifdef RENEWAL - if( sd->npc_id || sd->state.workinprogress&1 ){ + if (sd->npc_id || sd->state.workinprogress&1) { clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); return; } #endif - type = RFIFOW(fd,2); + type = RFIFOW(fd, 2); + + if ( #ifdef NEW_CARTS - if( (type == 9 && sd->status.base_level > 131) || - (type == 8 && sd->status.base_level > 121) || - (type == 7 && sd->status.base_level > 111) || - (type == 6 && sd->status.base_level > 101) || + (type == 9 && sd->status.base_level > 130) || + (type == 8 && sd->status.base_level > 120) || + (type == 7 && sd->status.base_level > 110) || + (type == 6 && sd->status.base_level > 100) || +#endif (type == 5 && sd->status.base_level > 90) || (type == 4 && sd->status.base_level > 80) || (type == 3 && sd->status.base_level > 65) || (type == 2 && sd->status.base_level > 40) || (type == 1)) -#else - if( (type == 5 && sd->status.base_level > 90) || - (type == 4 && sd->status.base_level > 80) || - (type == 3 && sd->status.base_level > 65) || - (type == 2 && sd->status.base_level > 40) || - (type == 1)) -#endif - pc->setcart(sd,type); + + pc->setcart(sd, type); } /// Request to select cart's visual look for new cart design (CZ_SELECTCART). |