瀏覽代碼

* Fixed pets with player sprites causing the client to crash while looking for non-existing resources (topic:260895, follow up to r14488).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14496 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 年之前
父節點
當前提交
d503330ed8
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 2 0
      Changelog-Trunk.txt
  2. 2 2
      src/map/clif.c

+ 2 - 0
Changelog-Trunk.txt

@@ -1,5 +1,7 @@
 Date	Added
 
+2010/11/24
+	* Fixed pets with player sprites causing the client to crash while looking for non-existing resources (topic:260895, follow up to r14488). [Ai4rei]
 2010/11/23
 	* Added script command pushpc, which is required by newer scripts. [Ai4rei]
 	- Moved knockback-part of skill_blown into unit_blown, to allow unconditional knockback required by pushpc without copy-pasting code.

+ 2 - 2
src/map/clif.c

@@ -168,9 +168,9 @@ static inline unsigned char clif_bl_type(struct block_list *bl) {
 	case BL_ITEM:  return 0x2; //ITEM_TYPE
 	case BL_SKILL: return 0x3; //SKILL_TYPE
 	case BL_CHAT:  return 0x4; //UNKNOWN_TYPE
-	case BL_MOB:   return pcdb_checkid(((TBL_MOB*)bl)->vd->class_)?0x0:0x5; //NPC_MOB_TYPE
+	case BL_MOB:   return pcdb_checkid(status_get_viewdata(bl)->class_)?0x0:0x5; //NPC_MOB_TYPE
 	case BL_NPC:   return 0x6; //NPC_EVT_TYPE
-	case BL_PET:   return 0x7; //NPC_PET_TYPE
+	case BL_PET:   return pcdb_checkid(status_get_viewdata(bl)->class_)?0x0:0x7; //NPC_PET_TYPE
 	case BL_HOM:   return 0x8; //NPC_HOM_TYPE
 	case BL_MER:   return 0x9; //NPC_MERSOL_TYPE
 // case BL_ELEM:  return 0xA; //NPC_ELEMENTAL_TYPE