Sfoglia il codice sorgente

- Reverted the Summon Flora change where all plants were being summoned in one go.
- Removed some redundant code.


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

skotlex 18 anni fa
parent
commit
7ad8d4effa
3 ha cambiato i file con 2 aggiunte e 38 eliminazioni
  1. 2 0
      Changelog-Trunk.txt
  2. 0 33
      src/map/skill.c
  3. 0 5
      src/map/status.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ 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/09/15
+	* Reverted the Summon Flora change where all plants were being summoned in
+	  one go. [Skotlex]
 	* Moved the weapon repair effect to where it belongs (after successfully
 	  repairing an item) [Skotlex]
 	* Added config setting "friend_auto_add" (battle/player.conf), if set, when

+ 0 - 33
src/map/skill.c

@@ -6081,7 +6081,6 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
 		{
 			int summons[5] = { 1020, 1068, 1118, 1500, 1368 };
 			int class_ = skillid==AM_SPHEREMINE?1142:summons[skilllv-1];
-			int count,range;
 			struct mob_data *md;
 
 			// Correct info, don't change any of this! [celest]
@@ -6092,38 +6091,6 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
 				md->deletetimer = add_timer (gettick() + skill_get_time(skillid,skilllv), mob_timer_delete, md->bl.id, 0);
 				mob_spawn (md); //Now it is ready for spawning.
 			}
-			count = 5-skilllv;
-			if (count < 1 || skillid == AM_SPHEREMINE)
-				break;
-			//Summon multiple floras based on SkillLV
-			if (sd &&
-				(i = skill_get_itemid(skillid, 0)) > 0 &&
-				(range = skill_get_itemqty(skillid, 0)) > 0
-			) {
-				//FIXME: Should this be expanded to check for all 10 possible items? [Skotlex]
-				i = pc_search_inventory(sd,i);
-				if (i == -1)
-					count = 0;
-				else if (sd->status.inventory[i].amount < count*range)
-					count = sd->status.inventory[i].amount/range;
-				if (count < 1) break;
-				pc_delitem(sd, i, count*range, 0);
-			}
-			range = 3+count/2; //Spread range is based on qty to be summoned.
-			for (; count > 0 ; count--)
-			{	//Summon additional creatures.
-				short xi, yi;
-				xi=x; yi=y;
-				map_search_freecell(src, src->m, &xi, &yi, range, range, 1);
-
-				md = mob_once_spawn_sub(src, src->m, xi, yi, status_get_name(src),class_,"");
-				if (md) {
-					md->master_id = src->id;
-					md->special_state.ai = skillid==AM_SPHEREMINE?2:3;
-					md->deletetimer = add_timer (gettick() + skill_get_time(skillid,skilllv), mob_timer_delete, md->bl.id, 0);
-					mob_spawn (md); //Now it is ready for spawning.
-				}
-			}
 		}
 		break;
 

+ 0 - 5
src/map/status.c

@@ -2067,7 +2067,6 @@ int status_calc_pc(struct map_session_data* sd,int first)
 	if(status->speed < battle_config.max_walk_speed)
 		status->speed = battle_config.max_walk_speed;
 
-
 // ----- HIT CALCULATION -----
 
 	// Absolute modifiers from passive skills
@@ -3030,16 +3029,12 @@ void status_calc_bl(struct block_list *bl, unsigned long flag)
 	
 	if(flag&SCB_MAXHP) {
 		status->max_hp = status_calc_maxhp(bl, sc, b_status->max_hp);
-		if (status->max_hp < 1)
-			status->max_hp = 1;
 		if (status->hp > status->max_hp) //FIXME: Should perhaps a status_zap should be issued?
 			status->hp = status->max_hp;
 	}
 
 	if(flag&SCB_MAXSP) {
 		status->max_sp = status_calc_maxsp(bl, sc, b_status->max_sp);
-		if (status->max_sp < 1)
-			status->max_sp = 1;
 		if (status->sp > status->max_sp)
 			status->sp = status->max_sp;
 	}