Просмотр исходного кода

- Added back cropping the attack delay to attack motion for those weird mobs that have a aDelay less than their aMotion time.
- Made the Note 4 comment clearer in the battle config files.


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

skotlex 18 лет назад
Родитель
Сommit
6e34fdb6ed

+ 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/12/21
+	* Added back cropping the attack delay to attack motion for those weird mobs
+	  that have a aDelay less than their aMotion time. [Skotlex]
 	* Added a 1-node cache to db. Removed party_cache and guild_cache since 
 	  now the database has a cache.
 	* Fixed "warning: comparison is always false due to limited range of data type"

+ 2 - 2
conf-tmpl/battle/battle.conf

@@ -19,8 +19,8 @@
 //Note 2: All rates are in percents, 100 would mean 100%, 200
 //   would mean 200%, etc
 //Note 3: Value is not limited to 60K (see below)
-//Note 4: Use bitmask values to specify who is affected 
-//        (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
+//Note 4: Use bitmask values (add to build setting). When no bit values are given,
+//   assume character types bits (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
 // Other Information:
 // All options are limited to a max of 60K (aprox) which is 600%
 // or 60secs as appropiate.

+ 2 - 2
conf-tmpl/battle/misc.conf

@@ -19,8 +19,8 @@
 //Note 2: All rates are in percents, 100 would mean 100%, 200
 //   would mean 200%, etc
 //Note 3: Value is not limited to 60K (see below)
-//Note 4: Use bitmask values to specify who is affected 
-//        (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
+//Note 4: Use bitmask values (add to build setting). When no bit values are given,
+//   assume character types bits (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
 // Other Information:
 // All options are limited to a max of 60K (aprox) which is 600%
 // or 60secs as appropiate.

+ 2 - 2
conf-tmpl/battle/monster.conf

@@ -19,8 +19,8 @@
 //Note 2: All rates are in percents, 100 would mean 100%, 200
 //   would mean 200%, etc
 //Note 3: Value is not limited to 60K (see below)
-//Note 4: Use bitmask values to specify who is affected 
-//        (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
+//Note 4: Use bitmask values (add to build setting). When no bit values are given,
+//   assume character types bits (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
 // Other Information:
 // All options are limited to a max of 60K (aprox) which is 600%
 // or 60secs as appropiate.

+ 2 - 2
conf-tmpl/battle/pet.conf

@@ -19,8 +19,8 @@
 //Note 2: All rates are in percents, 100 would mean 100%, 200
 //   would mean 200%, etc
 //Note 3: Value is not limited to 60K (see below)
-//Note 4: Use bitmask values to specify who is affected 
-//        (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
+//Note 4: Use bitmask values (add to build setting). When no bit values are given,
+//   assume character types bits (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
 // Other Information:
 // All options are limited to a max of 60K (aprox) which is 600%
 // or 60secs as appropiate.

+ 2 - 2
conf-tmpl/battle/skill.conf

@@ -19,8 +19,8 @@
 //Note 2: All rates are in percents, 100 would mean 100%, 200
 //   would mean 200%, etc
 //Note 3: Value is not limited to 60K (see below)
-//Note 4: Use bitmask values to specify who is affected 
-//        (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
+//Note 4: Use bitmask values (add to build setting). When no bit values are given,
+//   assume character types bits (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
 // Other Information:
 // All options are limited to a max of 60K (aprox) which is 600%
 // or 60secs as appropiate.

+ 2 - 2
conf-tmpl/battle/status.conf

@@ -19,8 +19,8 @@
 //Note 2: All rates are in percents, 100 would mean 100%, 200
 //   would mean 200%, etc
 //Note 3: Value is not limited to 60K (see below)
-//Note 4: Use bitmask values to specify who is affected 
-//        (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
+//Note 4: Use bitmask values (add to build setting). When no bit values are given,
+//   assume character types bits (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
 // Other Information:
 // All options are limited to a max of 60K (aprox) which is 600%
 // or 60secs as appropiate.

+ 6 - 0
src/map/mob.c

@@ -3308,6 +3308,9 @@ static int mob_readdb(void)
 			status->aspd_rate = 1000;
 			status->adelay = atoi(str[27]);
 			status->amotion = atoi(str[28]);
+			//If the attack animation is longer than the delay, the client crops the attack animation!
+			if (status->adelay < status->amotion)
+				status->adelay = status->amotion;
 			status->dmotion=atoi(str[29]);
 			if(battle_config.monster_damage_delay_rate != 100)
 				status->dmotion = status->dmotion*battle_config.monster_damage_delay_rate/100;
@@ -4008,6 +4011,9 @@ static int mob_read_sqldb(void)
 				status->aspd_rate = 1000;
 				status->adelay = TO_INT(27);
 				status->amotion = TO_INT(28);
+				//If the attack animation is longer than the delay, the client crops the attack animation!
+				if (status->adelay < status->amotion)
+					status->adelay = status->amotion;
 				status->dmotion = TO_INT(29);
 				if(battle_config.monster_damage_delay_rate != 100)
 					status->dmotion = status->dmotion*battle_config.monster_damage_delay_rate/100;

+ 1 - 1
src/map/skill.c

@@ -2167,7 +2167,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
  *------------------------------------------
  */
 static int skill_area_temp[8];
-static int skill_unit_temp[24];	/* For storing skill_unit ids as players move in/out of them. [Skotlex] */
+static int skill_unit_temp[64];	/* For storing skill_unit ids as players move in/out of them. [Skotlex] */
 static int skill_unit_index=0;	//Well, yeah... am too lazy to pass pointers around :X
 typedef int (*SkillFunc)(struct block_list *, struct block_list *, int, int, unsigned int, int);
 int skill_area_sub (struct block_list *bl, va_list ap)