summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJedzkie <eikzdej@gmail.com>2017-04-17 21:36:03 +0800
committerJedzkie <eikzdej@gmail.com>2017-04-17 21:36:03 +0800
commit890b29c2c58ded8544c690cacc8f98a4c4723b4b (patch)
tree70ecf7cc1af560546fb8e5c3ea4f2a6da01f8690 /src
parent5802b22439441be1914ae9024d6ce06d51c0210f (diff)
downloadhercules-890b29c2c58ded8544c690cacc8f98a4c4723b4b.tar.gz
hercules-890b29c2c58ded8544c690cacc8f98a4c4723b4b.tar.bz2
hercules-890b29c2c58ded8544c690cacc8f98a4c4723b4b.tar.xz
hercules-890b29c2c58ded8544c690cacc8f98a4c4723b4b.zip
Fix wrong level check for MC_CHANGECART skill
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c29
1 files changed, 13 insertions, 16 deletions
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).