Sfoglia il codice sorgente

- 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://svn.code.sf.net/p/rathena/svn/trunk@7042 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 19 anni fa
parent
commit
f69a49a292
4 ha cambiato i file con 34 aggiunte e 17 eliminazioni
  1. 7 0
      Changelog-Trunk.txt
  2. 2 0
      src/login/login.h
  3. 25 16
      src/map/clif.c
  4. 0 1
      src/map/pc.c

+ 7 - 0
Changelog-Trunk.txt

@@ -4,6 +4,13 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/06/07
+	* Fixed Sense using mdef instead of mdef2 [Skotlex]
+	* Fixed item-skills not showing up on login. [Skotlex]
+	* 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, cart data and zeny still need to be sent one
+	  very  map-change). [Skotlex]
 	* Fixed the mob state not being set to Berserk/Angry correctly after the
 	  mob reaches the target's location. [Skotlex]
 	* Added config setting mob_npc_warp, when set to yes, enables mobs to be

+ 2 - 0
src/login/login.h

@@ -4,6 +4,8 @@
 #ifndef _LOGIN_H_
 #define _LOGIN_H_
 
+#include "../common/mmo.h"
+
 #define MAX_SERVERS 30
 
 #define LOGIN_CONF_NAME "conf/login_athena.conf"

+ 25 - 16
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);

+ 0 - 1
src/map/pc.c

@@ -787,7 +787,6 @@ int pc_reg_received(struct map_session_data *sd)
 	char feel_var[3][NAME_LENGTH] = {"PC_FEEL_SUN","PC_FEEL_MOON","PC_FEEL_STAR"};
 	char hate_var[3][NAME_LENGTH] = {"PC_HATE_MOB_SUN","PC_HATE_MOB_MOON","PC_HATE_MOB_STAR"};
 	
-	pc_clean_skilltree(sd); //Clean skill tree before loading reg-based skills
 	sd->change_level = pc_readglobalreg(sd,"jobchange_level");
 	sd->die_counter = pc_readglobalreg(sd,"PC_DIE_COUNTER");
 	if (!sd->die_counter && (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE)