Переглянути джерело

- When battle_damage's flag is &2, the flag 3 is passed to mob_damage so that it won't give exp nor items. NPC_SUICIDE was updated to reflect this.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6282 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 роки тому
батько
коміт
3f18944b8d
3 змінених файлів з 3 додано та 2 видалено
  1. 1 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/battle.c
  3. 1 1
      src/map/skill.c

+ 1 - 0
Changelog-Trunk.txt

@@ -3,6 +3,7 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 2006/04/25
+	* Fixed NPC_SUICIDE dropping items. [Skotlex]
 	* Moved the mapflag skill restrictions from skill_checkcondition to
 	  skillnotok, this makes auto-spells not work in maps where they aren't
 	  allowed. [Skotlex]

+ 1 - 1
src/map/battle.c

@@ -245,7 +245,7 @@ int battle_damage(struct block_list *src,struct block_list *target,int damage, i
 	switch (target->type)
 	{
 		case BL_MOB:
-			r_damage =  mob_damage(src,(TBL_MOB*)target, damage,0);
+			r_damage =  mob_damage(src,(TBL_MOB*)target, damage,flag&2?3:0);
 			break;
 		case BL_PC:
 			r_damage = pc_damage(src,(TBL_PC*)target,damage);

+ 1 - 1
src/map/skill.c

@@ -4910,7 +4910,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 
 	case NPC_SUICIDE:			/* Ž©Œˆ */
 		clif_skill_nodamage(src,bl,skillid,skilllv,1);
-		battle_damage(NULL, src,status_get_hp(src),0,3); //Suicidal Mobs should give neither exp (flag&1) not items (flag&2) [Skotlex]
+		battle_damage(NULL, src,status_get_hp(src),0,3); //Suicidal Mobs should give neither exp nor items. (flag&2 passed to battle_damage) [Skotlex]
 		break;
 
 	case NPC_SUMMONSLAVE:		/* Žè‰º?¢Š« */