Browse Source

Fix for pet names, changing also status back if noname.

JIV 15 năm trước cách đây
mục cha
commit
a6da44ac69

+ 2 - 2
L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2PetInstance.java

@@ -1195,10 +1195,10 @@ public class L2PetInstance extends L2Summon
 	public void setName(String name)
 	{
 		L2ItemInstance controlItem = getControlItem();
-		if (getControlItem().getCustomType2() == 0) 
+		if (getControlItem().getCustomType2() == (name == null ? 1 : 0 )) 
 		{
 			// name not set yet
-			controlItem.setCustomType2(1);
+			controlItem.setCustomType2(name != null ? 1 : 0 );
 			controlItem.updateDatabase();
 			InventoryUpdate iu = new InventoryUpdate();
 			iu.addModifiedItem(controlItem);