Explorar o código

- Fixed passive mobs becoming increasingly unlikely to retaliate to attacks after they got inflicted by a disabling status change.
- Changed the "is_boss" define to check for mode MD_BOSS instead of giving mvp exp.


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

skotlex %!s(int64=18) %!d(string=hai) anos
pai
achega
8e68089e85
Modificáronse 5 ficheiros con 10 adicións e 10 borrados
  1. 4 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/battle.h
  3. 1 1
      src/map/mob.c
  4. 0 4
      src/map/npc.c
  5. 4 4
      src/map/script.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.
 
 2006/12/01
+	* Fixed passive mobs becoming increasingly unlikely to retaliate to attacks
+	  after they got inflicted by a disabling status change. [Skotlex]
+	* Changed the "is_boss" define to check for mode MD_BOSS instead of giving
+	  mvp exp. [Skotlex]
 	* Updated sql files [Playtester]
 	* Fixed txt-converter compilation. [Skotlex]
 	* STRECOVERYno longer makes a mob unlock it's target like Cure does.

+ 1 - 1
src/map/battle.h

@@ -75,7 +75,7 @@ int battle_getcurrentskill(struct block_list *bl);
 #define BCT_SELF 0x010000
 #define BCT_NEUTRAL 0x100000
 
-#define	is_boss(bl)	status_get_mexp(bl)	// Can refine later [Aru]
+#define	is_boss(bl)	(status_get_mode(bl)&MD_BOSS)	// Can refine later [Aru]
 
 int battle_check_undead(int race,int element);
 int battle_check_target(struct block_list *src, struct block_list *target,int flag);

+ 1 - 1
src/map/mob.c

@@ -1079,7 +1079,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
 	// Abnormalities
 	if((md->sc.opt1 > 0 && md->sc.opt1 != OPT1_STONEWAIT) || md->sc.data[SC_BLADESTOP].timer != -1)
   	{	//Should reset targets.
-		md->target_id = md->attacked_id = 0;
+		md->target_id = md->attacked_id = md->attacked_players = 0;
 		return 0;
 	}
 

+ 0 - 4
src/map/npc.c

@@ -2153,10 +2153,6 @@ static int npc_parse_function (char *w1, char *w2, char *w3, char *w4, char *fir
 	oldscript = (struct script_code *)strdb_get(user_db, p);
 	if(oldscript != NULL) {
 		printf("\r"); //Carriage return to clear the 'loading..' line. [Skotlex]
-		//ShowWarning("parse_function: Duplicate user function [%s] (%s:%d)\n", p, file, *lines);
-		//aFree(p);
-		//script_free_code(script);
-		// Experimental function overwriting - [Lance]
 		ShowInfo("parse_function: Overwriting user function [%s] (%s:%d)\n", p, file, *lines);
 		script_free_code(oldscript);
 		user_db->remove(user_db,str2key(p));

+ 4 - 4
src/map/script.c

@@ -10353,8 +10353,8 @@ int buildin_select(struct script_state *st)
 		clif_scriptmenu(sd,st->oid,buf);
 		aFree(buf);
 	} else if(sd->npc_menu==0xff){
-	  sd->state.menu_or_input=0;
-	  st->state=END;
+		sd->state.menu_or_input=0;
+		st->state=END;
 	} else {
 		//Skip empty menu entries which weren't displayed on the client (Skotlex)
 		for(i=st->start+2;i< (st->start+2+sd->npc_menu) && sd->npc_menu < (st->end-st->start-2);i++) {
@@ -10365,8 +10365,8 @@ int buildin_select(struct script_state *st)
 		pc_setreg(sd,add_str((unsigned char *) "@menu"),sd->npc_menu);
 		sd->state.menu_or_input=0;
 		push_val(st->stack,C_INT,sd->npc_menu);
-	  }
-	  return 0;
+	}
+	return 0;
 }
 
 int buildin_prompt(struct script_state *st)