Ver Fonte

- Fixed Dragon Fear's status change selection and duration.
- Fixed Metamorphosis not displaying a speed-change update on the client.
- Status changes that were blocked by element are no longer blocked, instead, now no-damage skills are blocked if they have an element which is absorbed by the target (This is the behaviour that Tharis believes is correct).


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

skotlex há 17 anos atrás
pai
commit
f9f1076a9e
4 ficheiros alterados com 14 adições e 15 exclusões
  1. 7 0
      Changelog-Trunk.txt
  2. 1 0
      src/map/mob.c
  3. 6 1
      src/map/skill.c
  4. 0 14
      src/map/status.c

+ 7 - 0
Changelog-Trunk.txt

@@ -3,6 +3,13 @@ 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.
 
+2007/08/22
+	* Fixed Dragon Fear's status change selection and duration.
+	* Fixed Metamorphosis not displaying a speed-change update on the client.
+	* Status changes that were blocked by element are no longer blocked,
+	  instead, now no-damage skills are blocked if they have an element which is
+	  absorbed by the target (This is the behaviour that Tharis believes is
+	  correct). [Skotlex]
 2007/08/19
 	* Fixed small mistake in confs causing some confusion [Paradox924X]
 	* Set proper limits to drop rates, prevents int overflow during calc

+ 1 - 0
src/map/mob.c

@@ -2341,6 +2341,7 @@ int mob_class_change (struct mob_data *md, int class_)
 	status_set_viewdata(&md->bl, class_);
 	clif_mob_class_change(md,class_);
 	status_calc_mob(md, 3);
+	md->ud.state.speed_changed = 1; //Speed change update.
 
 	if (battle_config.monster_class_change_recover) {
 		memset(md->dmglog, 0, sizeof(md->dmglog));

+ 6 - 1
src/map/skill.c

@@ -3400,6 +3400,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 
 	tstatus = status_get_status_data(bl);
 	sstatus = status_get_status_data(src);
+	
+	if(src!=bl && (i = skill_get_pl(skillid, skilllv)) > ELE_NEUTRAL && 
+		battle_attr_fix(NULL, NULL, 100, i, tstatus->def_ele, tstatus->ele_lv) <= 0)
+		return 1; //Skills with an element should be blocked if the target element absorbs it.
 
 	//Check for undead skills that convert a no-damage skill into a damage one. [Skotlex]
 	switch (skillid) {
@@ -5657,7 +5661,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 	case NPC_DRAGONFEAR:
 		if (flag&1) {
 			const int sc[] = { SC_STUN, SC_CURSE, SC_SILENCE, SC_BLEEDING };
-			sc_start(bl,rand()%ARRAYLENGTH(sc),100,skilllv,skill_get_time2(skillid,skilllv));
+			i = rand()%ARRAYLENGTH(sc);
+			sc_start(bl,sc[i],100,skilllv,skill_get_time2(skillid,i+1));
 			break;
 		}
 	case NPC_WIDEBLEEDING:

+ 0 - 14
src/map/status.c

@@ -4608,20 +4608,6 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
 		if (sc->opt1)
 			return 0; //Cannot override other opt1 status changes. [Skotlex]
 	break;
-	case SC_CURSE:
-		//Dark Elementals are inmune to curse.
-		if (status->def_ele == ELE_DARK && !(flag&1))
-			return 0;
-	break;
-	case SC_CHANGEUNDEAD: //Undead/Dark are inmune to it.
-		if ((status->def_ele == ELE_DARK || undead_flag) && !(flag&1))
-			return 0;
-	break;
-	case SC_COMA:
-		//Dark elementals and Demons are inmune to coma.
-		if((status->def_ele == ELE_DARK || status->race == RC_DEMON) && !(flag&1))
-			return 0;
-	break;
 	case SC_SIGNUMCRUCIS:
 		//Only affects demons and undead.
 		if(status->race != RC_DEMON && !undead_flag)