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