Преглед изворни кода

Fixed bugs.
- problem fast movement animation when disguised.
- devotion behaviour Can't cast on other characters when limit is reached.

icxbb-xx пре 10 година
родитељ
комит
14f6654943
2 измењених фајлова са 22 додато и 2 уклоњено
  1. 9 2
      src/map/clif.c
  2. 13 0
      src/map/unit.c

+ 9 - 2
src/map/clif.c

@@ -5075,7 +5075,8 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int
 	type = clif_calc_delay(type,div,damage,ddelay);
 
 #if PACKETVER >= 20131223
-	if( type == 6 ) type = 8;
+	if ( type == DMG_SKILL ) 
+		type = DMG_MULTI_HIT;		/* Temporary Fix */
 #endif
 
 	if( ( sc = status_get_sc(dst) ) && sc->count ) {
@@ -17022,7 +17023,13 @@ void clif_snap( struct block_list *bl, short x, short y ) {
 	WBUFW(buf,6) = x;
 	WBUFW(buf,8) = y;
 
-	clif_send(buf,packet_len(0x8d2),bl,AREA);
+	if( disguised(bl) )
+	{
+		clif_send(buf, packet_len(0x8d2), bl, AREA_WOS);
+		WBUFL(buf,2) = -bl->id;
+		clif_send(buf, packet_len(0x8d2), bl, SELF);
+	} else
+		clif_send(buf,packet_len(0x8d2),bl, AREA);
 }
 
 void clif_monster_hp_bar( struct mob_data* md, int fd ) {

+ 13 - 0
src/map/unit.c

@@ -1748,6 +1748,19 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
 				casttime = -1;
 			combo = 1;
 		break;
+		case CR_DEVOTION:
+			if (sd)	{
+				int i = 0, count = min(skill_lv, MAX_DEVOTION);
+				ARR_FIND(0, count, i, sd->devotion[i] == target_id);
+				if (i == count) {
+					ARR_FIND(0, count, i, sd->devotion[i] == 0);
+						if(i == count) {
+							clif_skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
+							return 0; // Can't cast on other characters when limit is reached
+						}
+				}
+			}
+		break;
 		case SR_GATEOFHELL:
 		case SR_TIGERCANNON:
 			if (sc && sc->data[SC_COMBO] &&