Selaa lähdekoodia

Fixed an issue where normal NPC had no sprite when walking (#7652)

* Fixed an issue where normal NPC had no sprite when walking
* Added a note

Thannks to @vstumpf
Atemo 2 vuotta sitten
vanhempi
commit
6673e1a786
1 muutettua tiedostoa jossa 7 lisäystä ja 2 poistoa
  1. 7 2
      src/map/clif.cpp

+ 7 - 2
src/map/clif.cpp

@@ -375,9 +375,14 @@ static inline unsigned char clif_bl_type(struct block_list *bl, bool walking) {
 // There is one exception and this is if they are walking.
 // Since walking NPCs are not supported on official servers, the client does not know how to handle it.
 #if PACKETVER >= 20170726
-					return ( pcdb_checkid(status_get_viewdata(bl)->class_) && walking ) ? 0x0 : 0xC; // New walking NPC type
+		if (pcdb_checkid( status_get_viewdata( bl )->class_ ) && walking)
+			return 0x0;
+		else if (mobdb_checkid( status_get_viewdata( bl )->class_ ))	// FIXME: categorize NPCs able to walk
+			return 0xC;
+		else
+			return 0x6;
 #else
-				   return pcdb_checkid(status_get_viewdata(bl)->class_) ? 0x0 : 0x6; //NPC_EVT_TYPE
+		return pcdb_checkid(status_get_viewdata(bl)->class_) ? 0x0 : 0x6; //NPC_EVT_TYPE
 #endif
 	case BL_PET:   return pcdb_checkid(status_get_viewdata(bl)->class_)?0x0:0x7; //NPC_PET_TYPE
 	case BL_HOM:   return 0x8; //NPC_HOM_TYPE