summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-08 00:21:13 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-08 00:21:13 +0000
commit95efe6677eb650ca8d158d6596c52c2028a02f51 (patch)
treed69657931eaec70fb40d68f66cdfe1fd2495dcf9 /src/map/clif.c
parenta3a95f6d2dd67cb09a08d2d633cfcf77f6349715 (diff)
downloadhercules-95efe6677eb650ca8d158d6596c52c2028a02f51.tar.gz
hercules-95efe6677eb650ca8d158d6596c52c2028a02f51.tar.bz2
hercules-95efe6677eb650ca8d158d6596c52c2028a02f51.tar.xz
hercules-95efe6677eb650ca8d158d6596c52c2028a02f51.zip
- Fixed Sense using mdef instead of mdef2
- Fixed item-skills not showing up on login. - Cleaned up clif_parseLoadEndAck, by testing which packets are required only on first-login and which ones are required on all map-changes. Skill-tree, Exp, Skill Points and most of the basic status are no longer sent on map-change (items, carts, zeny still need to be sent one very map-change). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7042 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c41
1 files changed, 25 insertions, 16 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 716e5e7c5..99a3a7a45 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4833,7 +4833,7 @@ int clif_skill_estimation(struct map_session_data *sd,struct block_list *dst)
+(battle_config.estimation_type&2?status->def2:0);
WBUFW(buf,14)=status->race;
WBUFW(buf,16)= (battle_config.estimation_type&1?status->mdef:0)
- +(battle_config.estimation_type&2?status->mdef - (status->vit>>1):0);
+ +(battle_config.estimation_type&2?status->mdef2 - (status->vit>>1):0);
WBUFW(buf,18)= status->def_ele;
for(i=0;i<9;i++)
WBUFB(buf,20+i)= (unsigned char)battle_attr_fix(NULL,dst,100,i+1,status->def_ele, status->ele_lv);
@@ -5617,7 +5617,7 @@ int clif_cart_equiplist(struct map_session_data *sd)
nullpo_retr(0, sd);
fd=sd->fd;
- WFIFOHEAD(fd, MAX_INVENTORY * 20 + 4);
+ WFIFOHEAD(fd, MAX_INVENTORY * 20 + 4);
buf = WFIFOP(fd,0);
for(i=0,n=0;i<MAX_INVENTORY;i++){
@@ -8176,26 +8176,39 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
return;
if(sd->npc_id) npc_event_dequeue(sd);
- clif_skillinfoblock(sd);
- pc_checkitem(sd);
- // loadendackˇ˛
- // next exp
- clif_updatestatus(sd,SP_NEXTBASEEXP);
- clif_updatestatus(sd,SP_NEXTJOBEXP);
- // skill point
- clif_updatestatus(sd,SP_SKILLPOINT);
+ if(sd->state.connect_new) {
+ clif_skillinfoblock(sd);
+ clif_updatestatus(sd,SP_NEXTBASEEXP);
+ clif_updatestatus(sd,SP_NEXTJOBEXP);
+ clif_updatestatus(sd,SP_SKILLPOINT);
+ clif_initialstatus(sd);
+ } else {
+ //For some reason the client "loses" these on map-change.
+ clif_updatestatus(sd,SP_STR);
+ clif_updatestatus(sd,SP_AGI);
+ clif_updatestatus(sd,SP_VIT);
+ clif_updatestatus(sd,SP_INT);
+ clif_updatestatus(sd,SP_DEX);
+ clif_updatestatus(sd,SP_LUK);
+ }
+
// item
+ pc_checkitem(sd);
clif_itemlist(sd);
clif_equiplist(sd);
+
// cart
if(pc_iscarton(sd)){
clif_cart_itemlist(sd);
clif_cart_equiplist(sd);
clif_updatestatus(sd,SP_CARTINFO);
}
- // param all
- clif_initialstatus(sd);
+
+ // weight max , now
+ clif_updatestatus(sd,SP_MAXWEIGHT);
+ clif_updatestatus(sd,SP_WEIGHT);
+
if(battle_config.pc_invincible_time > 0) {
if(map_flag_gvg(sd->bl.m))
pc_setinvincibletimer(sd,battle_config.pc_invincible_time<<1);
@@ -8211,10 +8224,6 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
// guild
guild_send_memberinfoshort(sd,1);
- // weight max , now
- clif_updatestatus(sd,SP_MAXWEIGHT);
- clif_updatestatus(sd,SP_WEIGHT);
-
// Show hp after displacement [LuzZza]
if(sd->status.party_id)
clif_party_hp(sd);