summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/pre-re/skill_db.conf1
-rw-r--r--db/re/skill_db.conf1
-rw-r--r--src/map/clif.c29
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).