Pārlūkot izejas kodu

- Fixed @lvup, #lvup not doing a stat reset and lowering your status points if you had 0 status points at that time.
- Fixed MvP exp and item rewards being given even when the mob_dead flag specifies you should not receive exp or items.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9795 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 18 gadi atpakaļ
vecāks
revīzija
29e3b9e204
4 mainītis faili ar 24 papildinājumiem un 24 dzēšanām
  1. 4 0
      Changelog-Trunk.txt
  2. 9 11
      src/map/atcommand.c
  3. 9 11
      src/map/charcommand.c
  4. 2 2
      src/map/mob.c

+ 4 - 0
Changelog-Trunk.txt

@@ -4,6 +4,10 @@ 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.
 
 2007/02/05
+	* Fixed @lvup, #lvup not doing a stat reset and lowering your status points
+	  if you had 0 status points at that time.
+	* Fixed MvP exp and item rewards being given even when the mob_dead flag
+	  specifies you should not receive exp or items.
 	* Updated the code so that now a range of a skill is determined by the
 	  skill's range in the db. Now only skills with less than 5 cells of range
 	  are melee.

+ 9 - 11
src/map/atcommand.c

@@ -2743,17 +2743,15 @@ int atcommand_baselevelup(const int fd, struct map_session_data* sd, const char*
 		level*=-1;
 		if ((unsigned int)level >= sd->status.base_level)
 			level = sd->status.base_level-1;
-		if (sd->status.status_point > 0) {
-			for (i = 0; i > -level; i--)
-				status_point += (sd->status.base_level + i + 14) / 5;
-			if (sd->status.status_point < status_point)
-				pc_resetstate(sd);
-			if (sd->status.status_point < status_point)
-				sd->status.status_point = 0;
-			else
-				sd->status.status_point -= status_point;
-			clif_updatestatus(sd, SP_STATUSPOINT);
-		} /* to add: remove status points from stats */
+		for (i = 0; i > -level; i--)
+			status_point += (sd->status.base_level + i + 14) / 5;
+		if (sd->status.status_point < status_point)
+			pc_resetstate(sd);
+		if (sd->status.status_point < status_point)
+			sd->status.status_point = 0;
+		else
+			sd->status.status_point -= status_point;
+		clif_updatestatus(sd, SP_STATUSPOINT);
 		sd->status.base_level -= (unsigned int)level;
 		clif_updatestatus(sd, SP_BASELEVEL);
 		clif_updatestatus(sd, SP_NEXTBASEEXP);

+ 9 - 11
src/map/charcommand.c

@@ -1338,17 +1338,15 @@ int charcommand_baselevel(
 		level *= -1;
 		if ((unsigned int)level >= pl_sd->status.base_level)
 			level = pl_sd->status.base_level -1;
-		if (pl_sd->status.status_point > 0) {
-			for (i = 0; i > -level; i--)
-				status_point += (pl_sd->status.base_level +i + 14) / 5;
-			if (pl_sd->status.status_point < status_point)
-				pc_resetstate(pl_sd);
-			if (pl_sd->status.status_point < status_point)
-				pl_sd->status.status_point = 0;
-			else
-				pl_sd->status.status_point -= status_point;
-			clif_updatestatus(pl_sd, SP_STATUSPOINT);
-		} // to add: remove status points from stats
+		for (i = 0; i > -level; i--)
+			status_point += (pl_sd->status.base_level +i + 14) / 5;
+		if (pl_sd->status.status_point < status_point)
+			pc_resetstate(pl_sd);
+		if (pl_sd->status.status_point < status_point)
+			pl_sd->status.status_point = 0;
+		else
+			pl_sd->status.status_point -= status_point;
+		clif_updatestatus(pl_sd, SP_STATUSPOINT);
 		pl_sd->status.base_level -= (unsigned int)level;
 		clif_updatestatus(pl_sd, SP_BASELEVEL);
 		clif_updatestatus(pl_sd, SP_NEXTBASEEXP);

+ 2 - 2
src/map/mob.c

@@ -2058,7 +2058,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 		double exp;
 		
 		//mapflag: noexp check [Lorky]
-		if (map[m].flag.nobaseexp)
+		if (map[m].flag.nobaseexp || !(type&2))
 			exp =1; 
 		else {
 			exp = md->db->mexp;
@@ -2075,7 +2075,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 		clif_mvp_exp(mvp_sd,mexp);
 		pc_gainexp(mvp_sd, &md->bl, mexp,0);
 		log_mvp[1] = mexp;
-		if(!map[m].flag.nomvploot)
+		if(!map[m].flag.nomvploot && !(type&1))
 		for(j=0;j<3;j++){
 			i = rand() % 3;