瀏覽代碼

- Fixed pets displaying "strangely" when they did not have their pet armor

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

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EVERYTHING ELSE
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 2006/02/15
+	* Fixed pets displaying "strangely" when they did not have their pet armor.
+	  [Skotlex]
 	* Added battle config option pk_level_range for specifying valid level
 	  ranges to engage in PK (battle/misc.conf) [Skotlex]
 	* Added battle config allow_es_magic_player to enable SL_S* skills to work

+ 3 - 3
src/map/clif.c

@@ -1578,7 +1578,7 @@ static int clif_pet0078(struct pet_data *pd, unsigned char *buf) {
 		WBUFW(buf,6)=pd->speed;
 		WBUFW(buf,14)=view_class;
 		WBUFW(buf,16)=battle_config.pet_hair_style;
-		if((view_class = itemdb_viewid(pd->equip)) > 0)
+		if(pd->equip && (view_class = itemdb_viewid(pd->equip)) > 0)
 			WBUFW(buf,20)=view_class;
 		else
 			WBUFW(buf,20)=pd->equip;
@@ -1680,7 +1680,7 @@ static int clif_pet007b(struct pet_data *pd, unsigned char *buf) {
 		WBUFW(buf,6)=pd->speed;
 		WBUFW(buf,14)=view_class;
 		WBUFW(buf,16)=battle_config.pet_hair_style;
-		if ((view_class = itemdb_viewid(pd->equip)) > 0)
+		if (pd->equip && (view_class = itemdb_viewid(pd->equip)) > 0)
 			WBUFW(buf,20)=view_class;
 		else
 			WBUFW(buf,20)=pd->equip;
@@ -6958,7 +6958,7 @@ int clif_pet_equip(struct pet_data *pd,int nameid)
 	WBUFW(buf,0)=0x1a4;
 	WBUFB(buf,2)=3;
 	WBUFL(buf,3)=pd->bl.id;
-	if((view = itemdb_viewid(nameid)) > 0)
+	if(nameid && (view = itemdb_viewid(nameid)) > 0)
 		WBUFL(buf,7)=view;
 	else
 		WBUFL(buf,7)=nameid;

+ 1 - 1
src/map/map.h

@@ -1139,7 +1139,6 @@ typedef enum {
 	CELL_CHKNOPASS,		// 通過不可(セルタイプ1,5)
 	CELL_GETTYPE,		// セルタイプを返す
 	CELL_GETCELLTYPE,
-	CELL_CHKSTACK,
 	CELL_CHKNPC=0x10,	// タッチタイプのNPC(セルタイプ0x80フラグ)
 	CELL_CHKREGEN,		// cells that improve regeneration
 	CELL_CHKPNEUMA,
@@ -1148,6 +1147,7 @@ typedef enum {
 	CELL_CHKLANDPROTECTOR,
 	CELL_CHKMOONLIT,
 	CELL_CHKICEWALL,
+	CELL_CHKSTACK,
 } cell_t;
 // map_setcell()で使用されるフラグ
 enum {