Przeglądaj źródła

- The monsters can level up setting will not take effect when the mob's level is LESS than their db counter-part (should prevent under-leveling causing underflows and semi-immortal mobs)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7005 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 lat temu
rodzic
commit
38aacdd553
3 zmienionych plików z 6 dodań i 3 usunięć
  1. 3 0
      Changelog-Trunk.txt
  2. 2 2
      src/map/mob.c
  3. 1 1
      src/map/status.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ 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.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2006/06/06
 2006/06/06
+	* The monsters can level up setting will not take effect when the mob's
+	  level is LESS than their db counter-part (should prevent under-leveling
+	  causing underflows and semi-immortal mobs) [Skotlex]
 	* Fixed mvp-exp calculations being messed up with more than one attacker.
 	* Fixed mvp-exp calculations being messed up with more than one attacker.
 	  [Skotlex]
 	  [Skotlex]
 	* Changed the mob exp race bonus so that each player gets their own bonus,
 	* Changed the mob exp race bonus so that each player gets their own bonus,

+ 2 - 2
src/map/mob.c

@@ -2240,7 +2240,6 @@ int mob_class_change (struct mob_data *md, int class_)
 
 
 	hp_rate = md->status.hp*100/md->status.max_hp;
 	hp_rate = md->status.hp*100/md->status.max_hp;
 	md->db = mob_db(class_);
 	md->db = mob_db(class_);
-	md->level = md->db->lv; //Also reset their level.
 	
 	
 	if (battle_config.override_mob_names==1)
 	if (battle_config.override_mob_names==1)
 		memcpy(md->name,md->db->name,NAME_LENGTH-1);
 		memcpy(md->name,md->db->name,NAME_LENGTH-1);
@@ -2377,7 +2376,8 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id)
 		amount+=k; //Increase final value by same amount to preserve total number to summon.
 		amount+=k; //Increase final value by same amount to preserve total number to summon.
 	}
 	}
 	
 	
-	if (!battle_config.monster_class_change_full_recover && (skill_id == NPC_TRANSFORMATION || skill_id == NPC_METAMORPHOSIS))
+	if (!battle_config.monster_class_change_full_recover &&
+		(skill_id == NPC_TRANSFORMATION || skill_id == NPC_METAMORPHOSIS))
 		hp_rate = 100*md2->status.hp/md2->status.max_hp;
 		hp_rate = 100*md2->status.hp/md2->status.max_hp;
 
 
 	for(;k<amount;k++) {
 	for(;k<amount;k++) {

+ 1 - 1
src/map/status.c

@@ -1036,7 +1036,7 @@ int status_calc_mob(struct mob_data* md, int first)
 	}
 	}
 
 
 	//Check if we need custom base-status
 	//Check if we need custom base-status
-	if (battle_config.mobs_level_up && md->level != md->db->lv)
+	if (battle_config.mobs_level_up && md->level > md->db->lv)
 		flag|=1;
 		flag|=1;
 	
 	
 	if (md->special_state.size)
 	if (md->special_state.size)