summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorprotimus <protimus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-04 01:20:06 +0000
committerprotimus <protimus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-04 01:20:06 +0000
commit390570b8d701f3e2c01241dea059f87dc716b9a4 (patch)
treeb92913f8d5b80c6f79a3c1216574b784d2cd335e /src/map
parent8538670a61c726fbd52087fe392f0a3d961db630 (diff)
downloadhercules-390570b8d701f3e2c01241dea059f87dc716b9a4.tar.gz
hercules-390570b8d701f3e2c01241dea059f87dc716b9a4.tar.bz2
hercules-390570b8d701f3e2c01241dea059f87dc716b9a4.tar.xz
hercules-390570b8d701f3e2c01241dea059f87dc716b9a4.zip
More cleanups for old clients.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15830 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c51
-rw-r--r--src/map/party.c4
-rw-r--r--src/map/script.c2
3 files changed, 4 insertions, 53 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index bca62eb96..0444bb2ee 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -851,10 +851,6 @@ void clif_get_weapon_view(struct map_session_data* sd, unsigned short *rhand, un
return;
}
-#if PACKETVER < 4
- *rhand = sd->status.weapon;
- *lhand = sd->status.shield;
-#else
if (sd->equip_index[EQI_HAND_R] >= 0 &&
sd->inventory_data[sd->equip_index[EQI_HAND_R]])
{
@@ -877,7 +873,6 @@ void clif_get_weapon_view(struct map_session_data* sd, unsigned short *rhand, un
*lhand = id->nameid;
} else
*lhand = 0;
-#endif
}
//To make the assignation of the level based on limits clearer/easier. [Skotlex]
@@ -923,9 +918,8 @@ static int clif_set_unit_idle(struct block_list* bl, unsigned char* buffer, bool
struct status_change* sc = status_get_sc(bl);
struct view_data* vd = status_get_viewdata(bl);
unsigned char *buf = WBUFP(buffer,0);
-#if PACKETVER >= 7
unsigned short offset = 0;
-#endif
+
const char *name;
sd = BL_CAST(BL_PC, bl);
@@ -956,16 +950,6 @@ static int clif_set_unit_idle(struct block_list* bl, unsigned char* buffer, bool
WBUFW(buf, 6) = status_get_speed(bl);
WBUFW(buf, 8) = (sc)? sc->opt1 : 0;
WBUFW(buf,10) = (sc)? sc->opt2 : 0;
-#if PACKETVER < 20091103
- if (type&&spawn) { //uses an older and different packet structure
- WBUFW(buf,12) = (sc)? sc->option : 0;
- WBUFW(buf,14) = vd->hair_style;
- WBUFW(buf,16) = vd->weapon;
- WBUFW(buf,18) = vd->head_bottom;
- WBUFW(buf,20) = vd->class_; //Pet armor (ignored by client)
- WBUFW(buf,22) = vd->shield;
- } else {
-#endif
#if PACKETVER >= 20091103
WBUFL(buf,12) = (sc)? sc->option : 0;
offset+=2;
@@ -983,18 +967,10 @@ static int clif_set_unit_idle(struct block_list* bl, unsigned char* buffer, bool
WBUFW(buf,14) = vd->class_;
WBUFW(buf,16) = vd->hair_style;
WBUFW(buf,18) = vd->weapon;
-#if PACKETVER < 4
- WBUFW(buf,20) = vd->head_bottom;
- WBUFW(buf,22) = vd->shield;
-#else
WBUFW(buf,20) = vd->shield;
WBUFW(buf,22) = vd->head_bottom;
-#endif
-#if PACKETVER < 20091103
- }
-#endif
- WBUFW(buf,24) = vd->head_top;
- WBUFW(buf,26) = vd->head_mid;
+ WBUFW(buf,24) = vd->head_top;
+ WBUFW(buf,26) = vd->head_mid;
if( bl->type == BL_NPC && vd->class_ == FLAG_CLASS )
{ //The hell, why flags work like this?
@@ -1006,16 +982,7 @@ static int clif_set_unit_idle(struct block_list* bl, unsigned char* buffer, bool
WBUFW(buf,28) = vd->hair_color;
WBUFW(buf,30) = vd->cloth_color;
WBUFW(buf,32) = (sd)? sd->head_dir : 0;
-#if PACKETVER < 20091103
- if (type&&spawn) { //End of packet 0x7c
- WBUFB(buf,34) = (sd)?sd->status.karma:0; // karma
- WBUFB(buf,35) = vd->sex;
- WBUFPOS(buf,36,bl->x,bl->y,unit_getdir(bl));
- WBUFB(buf,39) = 0;
- WBUFB(buf,40) = 0;
- return packet_len(0x7c);
- }
-#endif
+
#if PACKETVER >= 20110111
WBUFW(buf,34) = vd->robe;
offset+= 2;
@@ -1049,19 +1016,9 @@ static int clif_set_unit_idle(struct block_list* bl, unsigned char* buffer, bool
buf = WBUFP(buffer,offset);
}
WBUFW(buf,51) = clif_setlevel(bl);
-#if PACKETVER < 20091103
- if (type) //End for non-player packet
- return packet_len(WBUFW(buffer,0));
-#endif
-#if PACKETVER >= 20080102
WBUFW(buf,53) = sd?sd->user_font:0;
-#endif
-#if PACKETVER >= 20091103
memcpy((char*)WBUFP(buf,55), name, NAME_LENGTH);
return WBUFW(buffer,2);
-#else
- return packet_len(WBUFW(buffer,0));
-#endif
}
/*==========================================
diff --git a/src/map/party.c b/src/map/party.c
index 04757f737..8158e1afb 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -629,10 +629,6 @@ int party_optionchanged(int party_id,int account_id,int exp,int item,int flag)
p->party.exp=exp;
if(!(flag&0x10) && p->party.item != item) {
p->party.item=item;
-#if PACKETVER<20090603
- //item changes aren't updated by clif_party_option for older clients.
- clif_party_member_info(p,sd);
-#endif
}
clif_party_option(p,sd,flag);
diff --git a/src/map/script.c b/src/map/script.c
index 950297d8a..b9e619132 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -15588,7 +15588,6 @@ BUILDIN_FUNC(areamobuseskill)
BUILDIN_FUNC(progressbar)
{
-#if PACKETVER >= 20080318
struct map_session_data * sd = script_rid2sd(st);
const char * color;
unsigned int second;
@@ -15605,7 +15604,6 @@ BUILDIN_FUNC(progressbar)
sd->progressbar.timeout = gettick() + second*1000;
clif_progressbar(sd, strtol(color, (char **)NULL, 0), second);
-#endif
return 0;
}