Browse Source

- Reverted the mob ThinkTime update, that field is again aDelay as it apparently should be.
- Fixed one small compilation error.


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

skotlex 18 years ago
parent
commit
d882e5030b
9 changed files with 14 additions and 23 deletions
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      db/mob_db.txt
  3. 1 1
      db/mob_db2.txt
  4. 1 1
      sql-files/mob_db.sql
  5. 1 1
      sql-files/mob_db2.sql
  6. 1 1
      src/common/timer.c
  7. 6 16
      src/map/mob.c
  8. 0 1
      src/map/mob.h
  9. 1 1
      tools/mob_db.pl

+ 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.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2006/12/19
 2006/12/19
+	* Reverted the mob ThinkTime update, that field is again aDelay as it
+	  apparently should be. [Skotlex]
 	* Cleanups or minor changes.
 	* Cleanups or minor changes.
 	* Now addtick_timer invokes settick_timer, so keep an eye for whatever 
 	* Now addtick_timer invokes settick_timer, so keep an eye for whatever 
 	  timer issues it's supposed to have.
 	  timer issues it's supposed to have.

+ 1 - 1
db/mob_db.txt

@@ -1,7 +1,7 @@
 // Monster Database
 // Monster Database
 //
 //
 // Structure of Database :
 // Structure of Database :
-// ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,ThinkTime,aMotion,dMotion,MEXP,ExpPer,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper
+// ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,ExpPer,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper
 // Note: Keep the Sprite_Name field as it is (in the game client). You may change Name,JName field tough
 // Note: Keep the Sprite_Name field as it is (in the game client). You may change Name,JName field tough
 
 
 1001,SCORPION,Scorpion,Scorpion,24,1109,0,287,176,1,80,135,30,0,1,24,24,5,52,5,10,12,0,4,23,0x3195,200,1564,864,576,0,0,0,0,0,0,0,0,990,70,904,5500,757,57,943,210,7041,100,508,200,625,20,0,0,0,0,4068,1
 1001,SCORPION,Scorpion,Scorpion,24,1109,0,287,176,1,80,135,30,0,1,24,24,5,52,5,10,12,0,4,23,0x3195,200,1564,864,576,0,0,0,0,0,0,0,0,990,70,904,5500,757,57,943,210,7041,100,508,200,625,20,0,0,0,0,4068,1

+ 1 - 1
db/mob_db2.txt

@@ -1,7 +1,7 @@
 // Monsters Additional Database
 // Monsters Additional Database
 //
 //
 // Structure of Database :
 // Structure of Database :
-// ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,ThinkTime,aMotion,dMotion,MEXP,ExpPer,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper
+// ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,ExpPer,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper
 
 
 // Crusader quest monsters with poring stats (No drops)
 // Crusader quest monsters with poring stats (No drops)
 1910,C_GHOUL,Ghoul,Ghoul,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 1910,C_GHOUL,Ghoul,Ghoul,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

+ 1 - 1
sql-files/mob_db.sql

@@ -31,7 +31,7 @@ CREATE TABLE `mob_db` (
   `Element` tinyint(4) unsigned NOT NULL default '0',
   `Element` tinyint(4) unsigned NOT NULL default '0',
   `Mode` smallint(6) unsigned NOT NULL default '0',
   `Mode` smallint(6) unsigned NOT NULL default '0',
   `Speed` smallint(6) unsigned NOT NULL default '0',
   `Speed` smallint(6) unsigned NOT NULL default '0',
-  `ThinkTime` smallint(6) unsigned NOT NULL default '0',
+  `aDelay` smallint(6) unsigned NOT NULL default '0',
   `aMotion` smallint(6) unsigned NOT NULL default '0',
   `aMotion` smallint(6) unsigned NOT NULL default '0',
   `dMotion` smallint(6) unsigned NOT NULL default '0',
   `dMotion` smallint(6) unsigned NOT NULL default '0',
   `MEXP` mediumint(9) unsigned NOT NULL default '0',
   `MEXP` mediumint(9) unsigned NOT NULL default '0',

+ 1 - 1
sql-files/mob_db2.sql

@@ -31,7 +31,7 @@ CREATE TABLE `mob_db2` (
   `Element` tinyint(4) unsigned NOT NULL default '0',
   `Element` tinyint(4) unsigned NOT NULL default '0',
   `Mode` smallint(6) unsigned NOT NULL default '0',
   `Mode` smallint(6) unsigned NOT NULL default '0',
   `Speed` smallint(6) unsigned NOT NULL default '0',
   `Speed` smallint(6) unsigned NOT NULL default '0',
-  `ThinkTime` smallint(6) unsigned NOT NULL default '0',
+  `aDelay` smallint(6) unsigned NOT NULL default '0',
   `aMotion` smallint(6) unsigned NOT NULL default '0',
   `aMotion` smallint(6) unsigned NOT NULL default '0',
   `dMotion` smallint(6) unsigned NOT NULL default '0',
   `dMotion` smallint(6) unsigned NOT NULL default '0',
   `MEXP` mediumint(9) unsigned NOT NULL default '0',
   `MEXP` mediumint(9) unsigned NOT NULL default '0',

+ 1 - 1
src/common/timer.c

@@ -452,7 +452,7 @@ void timer_final(void)
 	struct timer_func_list *tfl;
 	struct timer_func_list *tfl;
 	struct timer_func_list *next;
 	struct timer_func_list *next;
 
 
-	for( tfl=tfl_root; tfl != NULL; tfl = next )
+	for( tfl=tfl_root; tfl != NULL; tfl = next ) {
 		next = tfl->next;	// copy next pointer
 		next = tfl->next;	// copy next pointer
 		aFree(tfl->name);	// free structures
 		aFree(tfl->name);	// free structures
 		aFree(tfl);
 		aFree(tfl);

+ 6 - 16
src/map/mob.c

@@ -1063,7 +1063,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
 	if(md->bl.prev == NULL || md->status.hp <= 0)
 	if(md->bl.prev == NULL || md->status.hp <= 0)
 		return 1;
 		return 1;
 		
 		
-	if (DIFF_TICK(tick, md->last_thinktime) < md->db->min_thinktime)
+	if (DIFF_TICK(tick, md->last_thinktime) < MIN_MOBTHINKTIME)
 		return 0;
 		return 0;
 	md->last_thinktime = tick;
 	md->last_thinktime = tick;
 
 
@@ -1335,7 +1335,7 @@ static int mob_ai_sub_lazy(DBKey key,void * data,va_list ap)
 
 
 	tick=va_arg(ap,unsigned int);
 	tick=va_arg(ap,unsigned int);
 
 
-	if(DIFF_TICK(tick,md->last_thinktime)< 10*md->db->min_thinktime)
+	if(DIFF_TICK(tick,md->last_thinktime)< 10*MIN_MOBTHINKTIME)
 		return 0;
 		return 0;
 
 
 	md->last_thinktime=tick;
 	md->last_thinktime=tick;
@@ -2925,7 +2925,6 @@ int mob_clone_spawn(struct map_session_data *sd, int m, int x, int y, const char
 	mob_db_data[class_]->job_exp=1;
 	mob_db_data[class_]->job_exp=1;
 	mob_db_data[class_]->range2=AREA_SIZE; //Let them have the same view-range as players.
 	mob_db_data[class_]->range2=AREA_SIZE; //Let them have the same view-range as players.
 	mob_db_data[class_]->range3=AREA_SIZE; //Min chase of a screen.
 	mob_db_data[class_]->range3=AREA_SIZE; //Min chase of a screen.
-	mob_db_data[class_]->min_thinktime = 500; //Average player's reflexes?
 	mob_db_data[class_]->option=sd->sc.option;
 	mob_db_data[class_]->option=sd->sc.option;
 
 
 	//Skill copy [Skotlex]
 	//Skill copy [Skotlex]
@@ -3143,7 +3142,6 @@ static int mob_makedummymobdb(int class_)
 	mob_dummy->status.adelay=1000;
 	mob_dummy->status.adelay=1000;
 	mob_dummy->status.amotion=500;
 	mob_dummy->status.amotion=500;
 	mob_dummy->status.dmotion=500;
 	mob_dummy->status.dmotion=500;
-	mob_dummy->min_thinktime=5000;
 	mob_dummy->base_exp=2;
 	mob_dummy->base_exp=2;
 	mob_dummy->job_exp=1;
 	mob_dummy->job_exp=1;
 	mob_dummy->range2=10;
 	mob_dummy->range2=10;
@@ -3308,12 +3306,8 @@ static int mob_readdb(void)
 				status->mode&=~MD_AGGRESSIVE;
 				status->mode&=~MD_AGGRESSIVE;
 			status->speed=atoi(str[26]);
 			status->speed=atoi(str[26]);
 			status->aspd_rate = 1000;
 			status->aspd_rate = 1000;
-			db->min_thinktime=atoi(str[27]);
-			status->adelay = status->amotion=atoi(str[28]);
-			if (db->min_thinktime > status->adelay)
-				status->adelay = db->min_thinktime;
-			if (db->min_thinktime < MIN_MOBTHINKTIME)
-				db->min_thinktime = MIN_MOBTHINKTIME;
+			status->adelay = atoi(str[27]);
+			status->amotion = atoi(str[28]);
 			status->dmotion=atoi(str[29]);
 			status->dmotion=atoi(str[29]);
 			if(battle_config.monster_damage_delay_rate != 100)
 			if(battle_config.monster_damage_delay_rate != 100)
 				status->dmotion = status->dmotion*battle_config.monster_damage_delay_rate/100;
 				status->dmotion = status->dmotion*battle_config.monster_damage_delay_rate/100;
@@ -4012,12 +4006,8 @@ static int mob_read_sqldb(void)
 					status->mode&=~MD_AGGRESSIVE;
 					status->mode&=~MD_AGGRESSIVE;
 				status->speed = TO_INT(26);
 				status->speed = TO_INT(26);
 				status->aspd_rate = 1000;
 				status->aspd_rate = 1000;
-				db->min_thinktime = TO_INT(27);
-				status->adelay = status->amotion = TO_INT(28);
-				if (db->min_thinktime > status->adelay)
-					status->adelay = db->min_thinktime;
-				if (db->min_thinktime < MIN_MOBTHINKTIME)
-					db->min_thinktime = MIN_MOBTHINKTIME;
+				status->adelay = TO_INT(27);
+				status->amotion = TO_INT(28);
 				status->dmotion = TO_INT(29);
 				status->dmotion = TO_INT(29);
 				if(battle_config.monster_damage_delay_rate != 100)
 				if(battle_config.monster_damage_delay_rate != 100)
 					status->dmotion = status->dmotion*battle_config.monster_damage_delay_rate/100;
 					status->dmotion = status->dmotion*battle_config.monster_damage_delay_rate/100;

+ 0 - 1
src/map/mob.h

@@ -58,7 +58,6 @@ struct mob_db {
 	char sprite[NAME_LENGTH],name[NAME_LENGTH],jname[NAME_LENGTH];
 	char sprite[NAME_LENGTH],name[NAME_LENGTH],jname[NAME_LENGTH];
 	unsigned int base_exp,job_exp;
 	unsigned int base_exp,job_exp;
 	unsigned int mexp,mexpper;
 	unsigned int mexp,mexpper;
-	unsigned int min_thinktime; //Min think time, Recharge Time as aegis calls it.
 	int range2,range3;
 	int range2,range3;
 	short race2;	// celest
 	short race2;	// celest
 	unsigned short lv;
 	unsigned short lv;

+ 1 - 1
tools/mob_db.pl

@@ -35,7 +35,7 @@ CREATE TABLE `mob_db` (
   `Element` tinyint(4) unsigned NOT NULL default '0',
   `Element` tinyint(4) unsigned NOT NULL default '0',
   `Mode` smallint(6) unsigned NOT NULL default '0',
   `Mode` smallint(6) unsigned NOT NULL default '0',
   `Speed` smallint(6) unsigned NOT NULL default '0',
   `Speed` smallint(6) unsigned NOT NULL default '0',
-  `ThinkTime` smallint(6) unsigned NOT NULL default '0',
+  `aDelay` smallint(6) unsigned NOT NULL default '0',
   `aMotion` smallint(6) unsigned NOT NULL default '0',
   `aMotion` smallint(6) unsigned NOT NULL default '0',
   `dMotion` smallint(6) unsigned NOT NULL default '0',
   `dMotion` smallint(6) unsigned NOT NULL default '0',
   `MEXP` mediumint(9) unsigned NOT NULL default '0',
   `MEXP` mediumint(9) unsigned NOT NULL default '0',