summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-14 19:36:05 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-14 19:36:05 +0000
commit7a612f8db0c03ba748a174c97e9bc2cf902d8b10 (patch)
treecdcfc314cbcb079c65dc7951dda42e983f050a71 /src/map/clif.c
parentc07a09726d9e94d75786192fc671cde81dc73176 (diff)
downloadhercules-7a612f8db0c03ba748a174c97e9bc2cf902d8b10.tar.gz
hercules-7a612f8db0c03ba748a174c97e9bc2cf902d8b10.tar.bz2
hercules-7a612f8db0c03ba748a174c97e9bc2cf902d8b10.tar.xz
hercules-7a612f8db0c03ba748a174c97e9bc2cf902d8b10.zip
Added support for new carts (requires packetver 20120201 or newer). Super-Ultra-Plus thanks to Fatal Error and Judas.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16297 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 20a35b044..e472c343a 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1353,6 +1353,10 @@ int clif_spawn(struct block_list *bl)
//New Mounts are not complaint to the original method, so we gotta tell this guy that he is mounting.
clif_status_load_notick(&sd->bl,SI_ALL_RIDING,2,1,0,0);
}
+ #ifdef NEW_CARTS
+ if( sd->sc.data[SC_PUSH_CART] )
+ clif_status_load_notick(&sd->bl, SI_ON_PUSH_CART, 2, sd->sc.data[SC_PUSH_CART]->val1, 0, 0);
+ #endif
#if PACKETVER <= 20120207
if (sd->status.robe)
clif_refreshlook(bl,bl->id,LOOK_ROBE,sd->status.robe,AREA);
@@ -3998,6 +4002,10 @@ static void clif_getareachar_pc(struct map_session_data* sd,struct map_session_d
//New Mounts are not complaint to the original method, so we gotta tell this guy that I'm mounting.
clif_status_load_single(sd->fd,dstsd->bl.id,SI_ALL_RIDING,2,1,0,0);
}
+#ifdef NEW_CARTS
+ if( dstsd->sc.data[SC_PUSH_CART] )
+ clif_status_load_single(sd->fd, dstsd->bl.id, SI_ON_PUSH_CART, 2, dstsd->sc.data[SC_PUSH_CART]->val1, 0, 0);
+#endif
if( (sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting.
(sd->bg_id && sd->bg_id == dstsd->bg_id) || //BattleGround
pc_has_permission(sd, PC_PERM_VIEW_HPMETER)
@@ -10485,7 +10493,13 @@ void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
/**
* Attempts to remove these options when this function is called (will remove all available)
**/
+#ifdef NEW_CARTS
+ pc_setoption(sd,sd->sc.option&~(OPTION_RIDING|OPTION_FALCON|OPTION_DRAGON|OPTION_MADOGEAR));
+ if( sd->sc.data[SC_PUSH_CART] )
+ pc_setcart(sd,0);
+#else
pc_setoption(sd,sd->sc.option&~(OPTION_CART|OPTION_RIDING|OPTION_FALCON|OPTION_DRAGON|OPTION_MADOGEAR));
+#endif
}
@@ -10499,12 +10513,23 @@ void clif_parse_ChangeCart(int fd,struct map_session_data *sd)
return;
type = (int)RFIFOW(fd,2);
-
+#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 == 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);
}