ItemInstance detailed log NPE fixes.
This commit is contained in:
parent
bc399fc171
commit
46e0fa7419
@ -326,24 +326,30 @@ public final class L2ItemInstance extends L2Object
|
||||
if (Config.LOG_ITEMS)
|
||||
{
|
||||
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (getItem().isEquipable() || (getItem().getId() == ADENA_ID))))
|
||||
{
|
||||
if ((creator != null) && (reference != null))
|
||||
{
|
||||
if (getEnchantLevel() > 0)
|
||||
{
|
||||
_logItems.info("SETOWNER:" + process + ", item " + getObjectId() + ":+" + getEnchantLevel() + " " + getItem().getName() + "(" + _count + "), " + creator + ", " + reference);
|
||||
_logItems.info("SETOWNER:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":+" + getEnchantLevel() //
|
||||
+ " " + getItem().getName() //
|
||||
+ "(" + _count + "), " //
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
else
|
||||
{
|
||||
_logItems.info("SETOWNER:" + process + ", item " + getObjectId() + ":" + getItem().getName() + "(" + _count + "), " + creator + ", " + reference);
|
||||
}
|
||||
_logItems.info("SETOWNER:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":" + getItem().getName() //
|
||||
+ "(" + _count + "), " //
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (creator != null)
|
||||
{
|
||||
if (creator.isGM())
|
||||
if ((creator != null) && creator.isGM())
|
||||
{
|
||||
String referenceName = "no-reference";
|
||||
if (reference instanceof L2Object)
|
||||
@ -361,7 +367,6 @@ public final class L2ItemInstance extends L2Object
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the ownerID of the item
|
||||
@ -495,24 +500,32 @@ public final class L2ItemInstance extends L2Object
|
||||
if (Config.LOG_ITEMS && (process != null))
|
||||
{
|
||||
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (_item.isEquipable() || (_item.getId() == ADENA_ID))))
|
||||
{
|
||||
if ((creator != null) && (reference != null))
|
||||
{
|
||||
if (getEnchantLevel() > 0)
|
||||
{
|
||||
_logItems.info("CHANGE:" + process + ", item " + getObjectId() + ":+" + getEnchantLevel() + " " + getItem().getName() + "(" + _count + "), PrevCount(" + old + "), " + creator + ", " + reference);
|
||||
_logItems.info("CHANGE:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":+" + getEnchantLevel() //
|
||||
+ " " + getItem().getName() //
|
||||
+ "(" + _count + "), PrevCount(" //
|
||||
+ String.valueOf(old) + "), " // in case of null
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
else
|
||||
{
|
||||
_logItems.info("CHANGE:" + process + ", item " + getObjectId() + ":" + getItem().getName() + "(" + _count + "), PrevCount(" + old + "), " + creator + ", " + reference);
|
||||
}
|
||||
_logItems.info("CHANGE:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":" + getItem().getName() //
|
||||
+ "(" + _count + "), PrevCount(" //
|
||||
+ String.valueOf(old) + "), " // in case of null
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (creator != null)
|
||||
{
|
||||
if (creator.isGM())
|
||||
if ((creator != null) && creator.isGM())
|
||||
{
|
||||
String referenceName = "no-reference";
|
||||
if (reference instanceof L2Object)
|
||||
@ -530,7 +543,6 @@ public final class L2ItemInstance extends L2Object
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No logging (function designed for shots only)
|
||||
public void changeCountWithoutTrace(int count, L2PcInstance creator, Object reference)
|
||||
|
@ -330,24 +330,30 @@ public final class L2ItemInstance extends L2Object
|
||||
if (Config.LOG_ITEMS)
|
||||
{
|
||||
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (getItem().isEquipable() || (getItem().getId() == ADENA_ID))))
|
||||
{
|
||||
if ((creator != null) && (reference != null))
|
||||
{
|
||||
if (getEnchantLevel() > 0)
|
||||
{
|
||||
_logItems.info("SETOWNER:" + process + ", item " + getObjectId() + ":+" + getEnchantLevel() + " " + getItem().getName() + "(" + _count + "), " + creator + ", " + reference);
|
||||
_logItems.info("SETOWNER:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":+" + getEnchantLevel() //
|
||||
+ " " + getItem().getName() //
|
||||
+ "(" + _count + "), " //
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
else
|
||||
{
|
||||
_logItems.info("SETOWNER:" + process + ", item " + getObjectId() + ":" + getItem().getName() + "(" + _count + "), " + creator + ", " + reference);
|
||||
}
|
||||
_logItems.info("SETOWNER:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":" + getItem().getName() //
|
||||
+ "(" + _count + "), " //
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (creator != null)
|
||||
{
|
||||
if (creator.isGM())
|
||||
if ((creator != null) && creator.isGM())
|
||||
{
|
||||
String referenceName = "no-reference";
|
||||
if (reference instanceof L2Object)
|
||||
@ -365,7 +371,6 @@ public final class L2ItemInstance extends L2Object
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the ownerID of the item
|
||||
@ -499,24 +504,32 @@ public final class L2ItemInstance extends L2Object
|
||||
if (Config.LOG_ITEMS && (process != null))
|
||||
{
|
||||
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (_item.isEquipable() || (_item.getId() == ADENA_ID))))
|
||||
{
|
||||
if ((creator != null) && (reference != null))
|
||||
{
|
||||
if (getEnchantLevel() > 0)
|
||||
{
|
||||
_logItems.info("CHANGE:" + process + ", item " + getObjectId() + ":+" + getEnchantLevel() + " " + getItem().getName() + "(" + _count + "), PrevCount(" + old + "), " + creator + ", " + reference);
|
||||
_logItems.info("CHANGE:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":+" + getEnchantLevel() //
|
||||
+ " " + getItem().getName() //
|
||||
+ "(" + _count + "), PrevCount(" //
|
||||
+ String.valueOf(old) + "), " // in case of null
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
else
|
||||
{
|
||||
_logItems.info("CHANGE:" + process + ", item " + getObjectId() + ":" + getItem().getName() + "(" + _count + "), PrevCount(" + old + "), " + creator + ", " + reference);
|
||||
}
|
||||
_logItems.info("CHANGE:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":" + getItem().getName() //
|
||||
+ "(" + _count + "), PrevCount(" //
|
||||
+ String.valueOf(old) + "), " // in case of null
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (creator != null)
|
||||
{
|
||||
if (creator.isGM())
|
||||
if ((creator != null) && creator.isGM())
|
||||
{
|
||||
String referenceName = "no-reference";
|
||||
if (reference instanceof L2Object)
|
||||
@ -534,7 +547,6 @@ public final class L2ItemInstance extends L2Object
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No logging (function designed for shots only)
|
||||
public void changeCountWithoutTrace(int count, L2PcInstance creator, Object reference)
|
||||
|
@ -330,24 +330,30 @@ public final class L2ItemInstance extends L2Object
|
||||
if (Config.LOG_ITEMS)
|
||||
{
|
||||
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (getItem().isEquipable() || (getItem().getId() == ADENA_ID))))
|
||||
{
|
||||
if ((creator != null) && (reference != null))
|
||||
{
|
||||
if (getEnchantLevel() > 0)
|
||||
{
|
||||
_logItems.info("SETOWNER:" + process + ", item " + getObjectId() + ":+" + getEnchantLevel() + " " + getItem().getName() + "(" + _count + "), " + creator + ", " + reference);
|
||||
_logItems.info("SETOWNER:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":+" + getEnchantLevel() //
|
||||
+ " " + getItem().getName() //
|
||||
+ "(" + _count + "), " //
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
else
|
||||
{
|
||||
_logItems.info("SETOWNER:" + process + ", item " + getObjectId() + ":" + getItem().getName() + "(" + _count + "), " + creator + ", " + reference);
|
||||
}
|
||||
_logItems.info("SETOWNER:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":" + getItem().getName() //
|
||||
+ "(" + _count + "), " //
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (creator != null)
|
||||
{
|
||||
if (creator.isGM())
|
||||
if ((creator != null) && creator.isGM())
|
||||
{
|
||||
String referenceName = "no-reference";
|
||||
if (reference instanceof L2Object)
|
||||
@ -365,7 +371,6 @@ public final class L2ItemInstance extends L2Object
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the ownerID of the item
|
||||
@ -499,24 +504,32 @@ public final class L2ItemInstance extends L2Object
|
||||
if (Config.LOG_ITEMS && (process != null))
|
||||
{
|
||||
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (_item.isEquipable() || (_item.getId() == ADENA_ID))))
|
||||
{
|
||||
if ((creator != null) && (reference != null))
|
||||
{
|
||||
if (getEnchantLevel() > 0)
|
||||
{
|
||||
_logItems.info("CHANGE:" + process + ", item " + getObjectId() + ":+" + getEnchantLevel() + " " + getItem().getName() + "(" + _count + "), PrevCount(" + old + "), " + creator + ", " + reference);
|
||||
_logItems.info("CHANGE:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":+" + getEnchantLevel() //
|
||||
+ " " + getItem().getName() //
|
||||
+ "(" + _count + "), PrevCount(" //
|
||||
+ String.valueOf(old) + "), " // in case of null
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
else
|
||||
{
|
||||
_logItems.info("CHANGE:" + process + ", item " + getObjectId() + ":" + getItem().getName() + "(" + _count + "), PrevCount(" + old + "), " + creator + ", " + reference);
|
||||
}
|
||||
_logItems.info("CHANGE:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":" + getItem().getName() //
|
||||
+ "(" + _count + "), PrevCount(" //
|
||||
+ String.valueOf(old) + "), " // in case of null
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (creator != null)
|
||||
{
|
||||
if (creator.isGM())
|
||||
if ((creator != null) && creator.isGM())
|
||||
{
|
||||
String referenceName = "no-reference";
|
||||
if (reference instanceof L2Object)
|
||||
@ -534,7 +547,6 @@ public final class L2ItemInstance extends L2Object
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No logging (function designed for shots only)
|
||||
public void changeCountWithoutTrace(int count, L2PcInstance creator, Object reference)
|
||||
|
@ -330,24 +330,30 @@ public final class L2ItemInstance extends L2Object
|
||||
if (Config.LOG_ITEMS)
|
||||
{
|
||||
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (getItem().isEquipable() || (getItem().getId() == ADENA_ID))))
|
||||
{
|
||||
if ((creator != null) && (reference != null))
|
||||
{
|
||||
if (getEnchantLevel() > 0)
|
||||
{
|
||||
_logItems.info("SETOWNER:" + process + ", item " + getObjectId() + ":+" + getEnchantLevel() + " " + getItem().getName() + "(" + _count + "), " + creator + ", " + reference);
|
||||
_logItems.info("SETOWNER:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":+" + getEnchantLevel() //
|
||||
+ " " + getItem().getName() //
|
||||
+ "(" + _count + "), " //
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
else
|
||||
{
|
||||
_logItems.info("SETOWNER:" + process + ", item " + getObjectId() + ":" + getItem().getName() + "(" + _count + "), " + creator + ", " + reference);
|
||||
}
|
||||
_logItems.info("SETOWNER:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":" + getItem().getName() //
|
||||
+ "(" + _count + "), " //
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (creator != null)
|
||||
{
|
||||
if (creator.isGM())
|
||||
if ((creator != null) && creator.isGM())
|
||||
{
|
||||
String referenceName = "no-reference";
|
||||
if (reference instanceof L2Object)
|
||||
@ -365,7 +371,6 @@ public final class L2ItemInstance extends L2Object
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the ownerID of the item
|
||||
@ -499,24 +504,32 @@ public final class L2ItemInstance extends L2Object
|
||||
if (Config.LOG_ITEMS && (process != null))
|
||||
{
|
||||
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (_item.isEquipable() || (_item.getId() == ADENA_ID))))
|
||||
{
|
||||
if ((creator != null) && (reference != null))
|
||||
{
|
||||
if (getEnchantLevel() > 0)
|
||||
{
|
||||
_logItems.info("CHANGE:" + process + ", item " + getObjectId() + ":+" + getEnchantLevel() + " " + getItem().getName() + "(" + _count + "), PrevCount(" + old + "), " + creator + ", " + reference);
|
||||
_logItems.info("CHANGE:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":+" + getEnchantLevel() //
|
||||
+ " " + getItem().getName() //
|
||||
+ "(" + _count + "), PrevCount(" //
|
||||
+ String.valueOf(old) + "), " // in case of null
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
else
|
||||
{
|
||||
_logItems.info("CHANGE:" + process + ", item " + getObjectId() + ":" + getItem().getName() + "(" + _count + "), PrevCount(" + old + "), " + creator + ", " + reference);
|
||||
}
|
||||
_logItems.info("CHANGE:" + String.valueOf(process) // in case of null
|
||||
+ ", item " + getObjectId() //
|
||||
+ ":" + getItem().getName() //
|
||||
+ "(" + _count + "), PrevCount(" //
|
||||
+ String.valueOf(old) + "), " // in case of null
|
||||
+ String.valueOf(creator) + ", " // in case of null
|
||||
+ String.valueOf(reference)); // in case of null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (creator != null)
|
||||
{
|
||||
if (creator.isGM())
|
||||
if ((creator != null) && creator.isGM())
|
||||
{
|
||||
String referenceName = "no-reference";
|
||||
if (reference instanceof L2Object)
|
||||
@ -534,7 +547,6 @@ public final class L2ItemInstance extends L2Object
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No logging (function designed for shots only)
|
||||
public void changeCountWithoutTrace(int count, L2PcInstance creator, Object reference)
|
||||
|
Loading…
Reference in New Issue
Block a user