소스 검색

* [Removed]:
- Redundant mob name copying. (it's already copied in mob_parse_dataset)

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

Lance 19 년 전
부모
커밋
67ff295ba4
3개의 변경된 파일12개의 추가작업 그리고 13개의 파일을 삭제
  1. 2 0
      Changelog-Trunk.txt
  2. 8 6
      src/map/mob.c
  3. 2 7
      src/map/script.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/06/21
+	* [Removed]:
+	  - Redundant mob name copying. (it's already copied in mob_parse_dataset) [Lance]
 	* [Fixed]:
 	  - Compilation warnings and errors.
 	  [Improved]:

+ 8 - 6
src/map/mob.c

@@ -623,12 +623,14 @@ int mob_spawn (struct mob_data *md)
 	else if (md->vd->class_ != md->class_) {
 		status_set_viewdata(&md->bl, md->class_);
 		md->db = mob_db(md->class_);
-		if (md->spawn)
-			memcpy(md->name,md->spawn->name,NAME_LENGTH);
-		else if (battle_config.override_mob_names == 1)
-			memcpy(md->name,md->db->name,NAME_LENGTH);
-		else
-			memcpy(md->name,md->db->jname,NAME_LENGTH);
+			if (md->spawn)
+				memcpy(md->name,md->spawn->name,NAME_LENGTH);
+			// Redundant? mob_parse_dataset already have the name copied. [Lance]
+			/*else if (battle_config.override_mob_names == 1)
+				memcpy(md->name,md->db->name,NAME_LENGTH);
+			else
+				memcpy(md->name,md->db->jname,NAME_LENGTH);*/
+		}
 	}
 
 	if (md->spawn) { //Respawn data

+ 2 - 7
src/map/script.c

@@ -10433,7 +10433,7 @@ int buildin_pcstopfollow(struct script_state *st) {
 // [zBuffer] List of mob control commands --->
 int buildin_mobspawn(struct script_state *st){
 	int class_,x,y,id;
-	char *str,*map,*event="";
+	char *str,*map;
 
 	// Who?
 	str		=conv_str(st,& (st->stack->stack_data[st->start+2]));
@@ -10443,13 +10443,8 @@ int buildin_mobspawn(struct script_state *st){
 	map		=conv_str(st,& (st->stack->stack_data[st->start+4]));
 	x		=conv_num(st,& (st->stack->stack_data[st->start+5]));
 	y		=conv_num(st,& (st->stack->stack_data[st->start+6]));
-	// When?
-	if( st->end > st->start+8 ){
-		event=conv_str(st,& (st->stack->stack_data[st->start+7]));
-		check_event(st, event);
-	}
 		
-	id = mob_once_spawn(map_id2sd(st->rid),map,x,y,str,class_,1,event);
+	id = mob_once_spawn(map_id2sd(st->rid),map,x,y,str,class_,1,NULL);
 	push_val(st->stack,C_INT,id);
 
 	return 0;