Browse Source

Fixed RA_CAMOUFLAGE where the animation(semi transparent effect) is not seen when sight is refreshed.
Fixed RA_CLUSTERBOMB now it has 1s delay to disappear when activated and does full damage in plants.
Fixed Burning status fixed damage (1000+3% of MaxHP) and damage effect and walk delay

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

rud0lp20 13 years ago
parent
commit
6c5e5c1765
4 changed files with 17 additions and 9 deletions
  1. 1 1
      src/map/battle.c
  2. 8 0
      src/map/clif.c
  3. 4 4
      src/map/skill.c
  4. 4 4
      src/map/status.c

+ 1 - 1
src/map/battle.c

@@ -1234,7 +1234,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
 	//Initial flag
 	flag.rh=1;
 	flag.weapon=1;
-	flag.infdef=(tstatus->mode&MD_PLANT?1:0);
+	flag.infdef=(tstatus->mode&MD_PLANT&&skill_num!=RA_CLUSTERBOMB?1:0);
 
 	//Initial Values
 	wd.type=0; //Normal attack

+ 8 - 0
src/map/clif.c

@@ -4047,6 +4047,8 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl)
 				clif_specialeffect_single(bl,421,sd->fd);
 			if( tsd->bg_id && map[tsd->bl.m].flag.battleground )
 				clif_sendbgemblem_single(sd->fd,tsd);
+			if( tsd->sc.data[SC_CAMOUFLAGE] )
+				clif_status_load(bl,SI_CAMOUFLAGE,1);
 		}
 		break;
 	case BL_MER: // Devotion Effects
@@ -4130,6 +4132,7 @@ int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tic
 {
 	unsigned char buf[33];
 	struct status_change *sc;
+	int dir=0;
 #if PACKETVER < 20071113
 	const int cmd = 0x8a;
 #else
@@ -4148,6 +4151,8 @@ int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tic
 		}
 	}
 
+	dir = unit_getdir(src);
+
 	WBUFW(buf,0)=cmd;
 	WBUFL(buf,2)=src->id;
 	WBUFL(buf,6)=dst->id;
@@ -4195,6 +4200,9 @@ int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tic
 #endif
 		clif_send(buf,packet_len(cmd),src,SELF);
 	}
+
+	if(src == dst)
+		unit_setdir(src,dir);
 	//Return adjusted can't walk delay for further processing.
 	return clif_calc_walkdelay(dst,ddelay,type,damage+damage2,div);
 }

+ 4 - 4
src/map/skill.c

@@ -10874,7 +10874,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
 			if (sg->unit_id != UNT_FIREPILLAR_ACTIVE)
 				clif_changetraplook(&src->bl, sg->unit_id==UNT_LANDMINE?UNT_FIREPILLAR_ACTIVE:UNT_USED_TRAPS);
 			src->range = -1; //Disable range so it does not invoke a for each in area again.
-			sg->limit=DIFF_TICK(tick,sg->tick)+1500;
+			sg->limit=DIFF_TICK(tick,sg->tick)+1500 + (sg->unit_id== UNT_CLUSTERBOMB?1000:0);// Cluster Bomb has 1s to disappear once activated.
 			break;
 
 		case UNT_TALKIEBOX:
@@ -13729,7 +13729,7 @@ int skill_detonator(struct block_list *bl, va_list ap)
 			clif_changetraplook(bl,unit_id == UNT_FIRINGTRAP ? UNT_DUMMYSKILL : UNT_USED_TRAPS);
 			unit->group->unit_id = UNT_USED_TRAPS;
 			unit->range = -1;
-			unit->group->limit = DIFF_TICK(gettick(),unit->group->tick) + (unit_id == UNT_TALKIEBOX ? 5000 : 1500);
+			unit->group->limit = DIFF_TICK(gettick(),unit->group->tick) + (unit_id == UNT_TALKIEBOX ? 5000 : (unit_id == UNT_CLUSTERBOMB ? 2500 : 1500) );
 			break;
 	}
 	return 0;
@@ -13906,8 +13906,8 @@ static int skill_trap_splash (struct block_list *bl, va_list ap)
 		case UNT_FIRINGTRAP:
 		case UNT_ICEBOUNDTRAP:
 		case UNT_CLUSTERBOMB:
-			if(skill_attack(BF_MISC,ss,bl,bl,sg->skill_id,sg->skill_lv,tick,sg->val1))
-				clif_skill_damage(bl,bl,tick,0,0,-30000,1,sg->skill_id,sg->skill_lv,5);
+			if(skill_attack(BF_MISC,ss,src,bl,sg->skill_id,sg->skill_lv,tick,sg->val1))
+				clif_skill_damage(src,bl,tick,0,0,-30000,1,sg->skill_id,sg->skill_lv,5);
 			break;
 		case UNT_REVERBERATION:
 			skill_attack(BF_WEAPON,ss,src,bl,WM_REVERBERATION_MELEE,sg->skill_lv,tick,0);

+ 4 - 4
src/map/status.c

@@ -9513,12 +9513,12 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
 		if( --(sce->val4) >= 0 )
 		{
 			struct block_list *src = map_id2bl(sce->val3);
-			int damage = 3 * status_get_max_hp(bl) / 100; // Non Elemental Damage
-			if( status )
-				damage += battle_attr_fix(NULL, bl, sce->val2, ELE_FIRE, status->def_ele, status->ele_lv);
+			int damage = 1000 + 3 * status_get_max_hp(bl) / 100; // Deals fixed (1000 + 3%*MaxHP) 
 
 			map_freeblock_lock();
-			status_fix_damage(src,bl,damage,clif_damage(bl,bl,tick,0,0,damage,0,0,0));
+			clif_damage(bl,bl,tick,0,0,damage,1,9,0); //damage is like endure effect with no walk delay
+			status_damage(src, bl, damage, 0, 0, 1);
+
 			if( sc->data[type]){ // Target still lives. [LimitLine]
 				sc_timer_next(2000 + tick, status_change_timer, bl->id, data);
 			}