瀏覽代碼

- Modifed a bit the clif_change_look function, it should fix crashes with the Xmas sprite when changing maps.

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

+ 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.
 
 2006/12/12
+	* Modifed a bit the clif_change_look function, it should fix crashes with
+	  the Xmas sprite when changing maps.
 	* Fixed skills displaying a 32k damage when used while disguised. [Skotlex]
 	* Minor changes to ers.
 	* Removed unused/hardly used cbasetypes typedefs.

+ 10 - 2
src/map/clif.c

@@ -2857,11 +2857,19 @@ int clif_changelook(struct block_list *bl,int type,int val)
 
 	switch(type) {
 		case LOOK_WEAPON:
-			if (sd) clif_get_weapon_view(sd, &vd->weapon, &vd->shield);
+			if (sd)
+			{
+				clif_get_weapon_view(sd, &vd->weapon, &vd->shield);
+				val = vd->weapon;
+			}
 			else vd->weapon = val;
 		break;
 		case LOOK_SHIELD:
-			if (sd) clif_get_weapon_view(sd, &vd->weapon, &vd->shield);
+			if (sd)
+			{
+				clif_get_weapon_view(sd, &vd->weapon, &vd->shield);
+				val = vd->shield;
+			}
 			else vd->shield = val;
 		break;
 		case LOOK_BASE: