Removed all assertion statements.

This commit is contained in:
MobiusDev
2018-09-03 17:19:02 +00:00
parent 5e7788c4f7
commit 69fd1ac954
24 changed files with 56 additions and 267 deletions

View File

@@ -212,7 +212,6 @@ public final class L2WorldRegion
/** /**
* Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR> * Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR>
* If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR> * If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this
* @param object * @param object
*/ */
public void addVisibleObject(L2Object object) public void addVisibleObject(L2Object object)
@@ -222,7 +221,6 @@ public final class L2WorldRegion
return; return;
} }
assert object.getWorldRegion() == this;
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
synchronized (object) synchronized (object)
@@ -247,7 +245,6 @@ public final class L2WorldRegion
/** /**
* Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR> * Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this || object.getCurrentWorldRegion() == null
* @param object * @param object
*/ */
public void removeVisibleObject(L2Object object) public void removeVisibleObject(L2Object object)
@@ -257,7 +254,6 @@ public final class L2WorldRegion
return; return;
} }
assert (object.getWorldRegion() == this) || (object.getWorldRegion() == null);
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
return; return;

View File

@@ -1015,9 +1015,11 @@ public abstract class Inventory extends ItemContainer
*/ */
public synchronized void addPaperdollListener(PaperdollListener listener) public synchronized void addPaperdollListener(PaperdollListener listener)
{ {
assert !_paperdollListeners.contains(listener); if (!_paperdollListeners.contains(listener))
{
_paperdollListeners.add(listener); _paperdollListeners.add(listener);
} }
}
/** /**
* Removes a paperdoll listener. * Removes a paperdoll listener.

View File

@@ -265,11 +265,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>this.isItem().</li>
* <li>_worldRegion != null <I>(L2Object is visible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Do Pickup Item : PCInstance and Pet</li><BR> * <li>Do Pickup Item : PCInstance and Pet</li><BR>
@@ -278,8 +273,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public final void pickupMe(L2Character character) public final void pickupMe(L2Character character)
{ {
assert getWorldRegion() != null;
final L2WorldRegion oldregion = getWorldRegion(); final L2WorldRegion oldregion = getWorldRegion();
// Create a server->client GetItem packet to pick up the L2ItemInstance // Create a server->client GetItem packet to pick up the L2ItemInstance
@@ -584,7 +577,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public int getLocationSlot() public int getLocationSlot()
{ {
assert (_loc == ItemLocation.PAPERDOLL) || (_loc == ItemLocation.PET_EQUIP) || (_loc == ItemLocation.INVENTORY) || (_loc == ItemLocation.MAIL) || (_loc == ItemLocation.FREIGHT);
return _locData; return _locData;
} }
@@ -1512,10 +1504,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>_worldRegion == null <I>(L2Object is invisible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Drop item</li> * <li>Drop item</li>
@@ -1539,8 +1527,6 @@ public final class L2ItemInstance extends L2Object
@Override @Override
public final void run() public final void run()
{ {
assert _itеm.getWorldRegion() == null;
if (_dropper != null) if (_dropper != null)
{ {
final Instance instance = _dropper.getInstanceWorld(); final Instance instance = _dropper.getInstanceWorld();
@@ -1590,14 +1576,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void updateInDb() private void updateInDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear || _storedInDb)
if (_wear)
{
return;
}
if (_storedInDb)
{ {
return; return;
} }
@@ -1630,9 +1609,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void insertIntoDb() private void insertIntoDb()
{ {
assert !_existsInDb && (getObjectId() != 0); if (_existsInDb || (getObjectId() == 0) || _wear)
if (_wear)
{ {
return; return;
} }
@@ -1676,9 +1653,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void removeFromDb() private void removeFromDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear)
if (_wear)
{ {
return; return;
} }

View File

@@ -212,7 +212,6 @@ public final class L2WorldRegion
/** /**
* Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR> * Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR>
* If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR> * If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this
* @param object * @param object
*/ */
public void addVisibleObject(L2Object object) public void addVisibleObject(L2Object object)
@@ -222,7 +221,6 @@ public final class L2WorldRegion
return; return;
} }
assert object.getWorldRegion() == this;
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
synchronized (object) synchronized (object)
@@ -247,7 +245,6 @@ public final class L2WorldRegion
/** /**
* Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR> * Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this || object.getCurrentWorldRegion() == null
* @param object * @param object
*/ */
public void removeVisibleObject(L2Object object) public void removeVisibleObject(L2Object object)
@@ -257,7 +254,6 @@ public final class L2WorldRegion
return; return;
} }
assert (object.getWorldRegion() == this) || (object.getWorldRegion() == null);
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
return; return;

View File

@@ -1045,9 +1045,11 @@ public abstract class Inventory extends ItemContainer
*/ */
public synchronized void addPaperdollListener(PaperdollListener listener) public synchronized void addPaperdollListener(PaperdollListener listener)
{ {
assert !_paperdollListeners.contains(listener); if (!_paperdollListeners.contains(listener))
{
_paperdollListeners.add(listener); _paperdollListeners.add(listener);
} }
}
/** /**
* Removes a paperdoll listener. * Removes a paperdoll listener.

View File

@@ -272,11 +272,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>this.isItem().</li>
* <li>_worldRegion != null <I>(L2Object is visible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Do Pickup Item : PCInstance and Pet</li><BR> * <li>Do Pickup Item : PCInstance and Pet</li><BR>
@@ -285,8 +280,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public final void pickupMe(L2Character character) public final void pickupMe(L2Character character)
{ {
assert getWorldRegion() != null;
final L2WorldRegion oldregion = getWorldRegion(); final L2WorldRegion oldregion = getWorldRegion();
// Create a server->client GetItem packet to pick up the L2ItemInstance // Create a server->client GetItem packet to pick up the L2ItemInstance
@@ -591,7 +584,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public int getLocationSlot() public int getLocationSlot()
{ {
assert (_loc == ItemLocation.PAPERDOLL) || (_loc == ItemLocation.PET_EQUIP) || (_loc == ItemLocation.INVENTORY) || (_loc == ItemLocation.MAIL) || (_loc == ItemLocation.FREIGHT);
return _locData; return _locData;
} }
@@ -1519,10 +1511,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>_worldRegion == null <I>(L2Object is invisible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Drop item</li> * <li>Drop item</li>
@@ -1546,8 +1534,6 @@ public final class L2ItemInstance extends L2Object
@Override @Override
public final void run() public final void run()
{ {
assert _itеm.getWorldRegion() == null;
if (_dropper != null) if (_dropper != null)
{ {
final Instance instance = _dropper.getInstanceWorld(); final Instance instance = _dropper.getInstanceWorld();
@@ -1597,14 +1583,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void updateInDb() private void updateInDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear || _storedInDb)
if (_wear)
{
return;
}
if (_storedInDb)
{ {
return; return;
} }
@@ -1637,9 +1616,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void insertIntoDb() private void insertIntoDb()
{ {
assert !_existsInDb && (getObjectId() != 0); if (_existsInDb || (getObjectId() == 0) || _wear)
if (_wear)
{ {
return; return;
} }
@@ -1687,9 +1664,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void removeFromDb() private void removeFromDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear)
if (_wear)
{ {
return; return;
} }

View File

@@ -212,7 +212,6 @@ public final class L2WorldRegion
/** /**
* Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR> * Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR>
* If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR> * If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this
* @param object * @param object
*/ */
public void addVisibleObject(L2Object object) public void addVisibleObject(L2Object object)
@@ -222,7 +221,6 @@ public final class L2WorldRegion
return; return;
} }
assert object.getWorldRegion() == this;
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
synchronized (object) synchronized (object)
@@ -247,7 +245,6 @@ public final class L2WorldRegion
/** /**
* Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR> * Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this || object.getCurrentWorldRegion() == null
* @param object * @param object
*/ */
public void removeVisibleObject(L2Object object) public void removeVisibleObject(L2Object object)
@@ -257,7 +254,6 @@ public final class L2WorldRegion
return; return;
} }
assert (object.getWorldRegion() == this) || (object.getWorldRegion() == null);
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
return; return;

View File

@@ -1045,9 +1045,11 @@ public abstract class Inventory extends ItemContainer
*/ */
public synchronized void addPaperdollListener(PaperdollListener listener) public synchronized void addPaperdollListener(PaperdollListener listener)
{ {
assert !_paperdollListeners.contains(listener); if (!_paperdollListeners.contains(listener))
{
_paperdollListeners.add(listener); _paperdollListeners.add(listener);
} }
}
/** /**
* Removes a paperdoll listener. * Removes a paperdoll listener.

View File

@@ -272,11 +272,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>this.isItem().</li>
* <li>_worldRegion != null <I>(L2Object is visible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Do Pickup Item : PCInstance and Pet</li><BR> * <li>Do Pickup Item : PCInstance and Pet</li><BR>
@@ -285,8 +280,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public final void pickupMe(L2Character character) public final void pickupMe(L2Character character)
{ {
assert getWorldRegion() != null;
final L2WorldRegion oldregion = getWorldRegion(); final L2WorldRegion oldregion = getWorldRegion();
// Create a server->client GetItem packet to pick up the L2ItemInstance // Create a server->client GetItem packet to pick up the L2ItemInstance
@@ -591,7 +584,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public int getLocationSlot() public int getLocationSlot()
{ {
assert (_loc == ItemLocation.PAPERDOLL) || (_loc == ItemLocation.PET_EQUIP) || (_loc == ItemLocation.INVENTORY) || (_loc == ItemLocation.MAIL) || (_loc == ItemLocation.FREIGHT);
return _locData; return _locData;
} }
@@ -1519,10 +1511,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>_worldRegion == null <I>(L2Object is invisible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Drop item</li> * <li>Drop item</li>
@@ -1546,8 +1534,6 @@ public final class L2ItemInstance extends L2Object
@Override @Override
public final void run() public final void run()
{ {
assert _itеm.getWorldRegion() == null;
if (_dropper != null) if (_dropper != null)
{ {
final Instance instance = _dropper.getInstanceWorld(); final Instance instance = _dropper.getInstanceWorld();
@@ -1597,14 +1583,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void updateInDb() private void updateInDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear || _storedInDb)
if (_wear)
{
return;
}
if (_storedInDb)
{ {
return; return;
} }
@@ -1637,9 +1616,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void insertIntoDb() private void insertIntoDb()
{ {
assert !_existsInDb && (getObjectId() != 0); if (_existsInDb || (getObjectId() == 0) || _wear)
if (_wear)
{ {
return; return;
} }
@@ -1687,9 +1664,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void removeFromDb() private void removeFromDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear)
if (_wear)
{ {
return; return;
} }

View File

@@ -212,7 +212,6 @@ public final class L2WorldRegion
/** /**
* Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR> * Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR>
* If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR> * If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this
* @param object * @param object
*/ */
public void addVisibleObject(L2Object object) public void addVisibleObject(L2Object object)
@@ -222,7 +221,6 @@ public final class L2WorldRegion
return; return;
} }
assert object.getWorldRegion() == this;
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
synchronized (object) synchronized (object)
@@ -247,7 +245,6 @@ public final class L2WorldRegion
/** /**
* Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR> * Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this || object.getCurrentWorldRegion() == null
* @param object * @param object
*/ */
public void removeVisibleObject(L2Object object) public void removeVisibleObject(L2Object object)
@@ -257,7 +254,6 @@ public final class L2WorldRegion
return; return;
} }
assert (object.getWorldRegion() == this) || (object.getWorldRegion() == null);
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
return; return;

View File

@@ -1045,9 +1045,11 @@ public abstract class Inventory extends ItemContainer
*/ */
public synchronized void addPaperdollListener(PaperdollListener listener) public synchronized void addPaperdollListener(PaperdollListener listener)
{ {
assert !_paperdollListeners.contains(listener); if (!_paperdollListeners.contains(listener))
{
_paperdollListeners.add(listener); _paperdollListeners.add(listener);
} }
}
/** /**
* Removes a paperdoll listener. * Removes a paperdoll listener.

View File

@@ -272,11 +272,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>this.isItem().</li>
* <li>_worldRegion != null <I>(L2Object is visible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Do Pickup Item : PCInstance and Pet</li><BR> * <li>Do Pickup Item : PCInstance and Pet</li><BR>
@@ -285,8 +280,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public final void pickupMe(L2Character character) public final void pickupMe(L2Character character)
{ {
assert getWorldRegion() != null;
final L2WorldRegion oldregion = getWorldRegion(); final L2WorldRegion oldregion = getWorldRegion();
// Create a server->client GetItem packet to pick up the L2ItemInstance // Create a server->client GetItem packet to pick up the L2ItemInstance
@@ -591,7 +584,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public int getLocationSlot() public int getLocationSlot()
{ {
assert (_loc == ItemLocation.PAPERDOLL) || (_loc == ItemLocation.PET_EQUIP) || (_loc == ItemLocation.INVENTORY) || (_loc == ItemLocation.MAIL) || (_loc == ItemLocation.FREIGHT);
return _locData; return _locData;
} }
@@ -1519,10 +1511,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>_worldRegion == null <I>(L2Object is invisible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Drop item</li> * <li>Drop item</li>
@@ -1546,8 +1534,6 @@ public final class L2ItemInstance extends L2Object
@Override @Override
public final void run() public final void run()
{ {
assert _itеm.getWorldRegion() == null;
if (_dropper != null) if (_dropper != null)
{ {
final Instance instance = _dropper.getInstanceWorld(); final Instance instance = _dropper.getInstanceWorld();
@@ -1597,14 +1583,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void updateInDb() private void updateInDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear || _storedInDb)
if (_wear)
{
return;
}
if (_storedInDb)
{ {
return; return;
} }
@@ -1637,9 +1616,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void insertIntoDb() private void insertIntoDb()
{ {
assert !_existsInDb && (getObjectId() != 0); if (_existsInDb || (getObjectId() == 0) || _wear)
if (_wear)
{ {
return; return;
} }
@@ -1687,9 +1664,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void removeFromDb() private void removeFromDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear)
if (_wear)
{ {
return; return;
} }

View File

@@ -212,7 +212,6 @@ public final class L2WorldRegion
/** /**
* Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR> * Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR>
* If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR> * If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this
* @param object * @param object
*/ */
public void addVisibleObject(L2Object object) public void addVisibleObject(L2Object object)
@@ -222,7 +221,6 @@ public final class L2WorldRegion
return; return;
} }
assert object.getWorldRegion() == this;
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
synchronized (object) synchronized (object)
@@ -247,7 +245,6 @@ public final class L2WorldRegion
/** /**
* Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR> * Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this || object.getCurrentWorldRegion() == null
* @param object * @param object
*/ */
public void removeVisibleObject(L2Object object) public void removeVisibleObject(L2Object object)
@@ -257,7 +254,6 @@ public final class L2WorldRegion
return; return;
} }
assert (object.getWorldRegion() == this) || (object.getWorldRegion() == null);
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
return; return;

View File

@@ -1065,9 +1065,11 @@ public abstract class Inventory extends ItemContainer
*/ */
public synchronized void addPaperdollListener(PaperdollListener listener) public synchronized void addPaperdollListener(PaperdollListener listener)
{ {
assert !_paperdollListeners.contains(listener); if (!_paperdollListeners.contains(listener))
{
_paperdollListeners.add(listener); _paperdollListeners.add(listener);
} }
}
/** /**
* Removes a paperdoll listener. * Removes a paperdoll listener.

View File

@@ -234,11 +234,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>this.isItem().</li>
* <li>_worldRegion != null <I>(L2Object is visible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Do Pickup Item : PCInstance and Pet</li><BR> * <li>Do Pickup Item : PCInstance and Pet</li><BR>
@@ -247,8 +242,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public final void pickupMe(L2Character character) public final void pickupMe(L2Character character)
{ {
assert getWorldRegion() != null;
final L2WorldRegion oldregion = getWorldRegion(); final L2WorldRegion oldregion = getWorldRegion();
// Create a server->client GetItem packet to pick up the L2ItemInstance // Create a server->client GetItem packet to pick up the L2ItemInstance
@@ -563,7 +556,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public int getLocationSlot() public int getLocationSlot()
{ {
assert (_loc == ItemLocation.PAPERDOLL) || (_loc == ItemLocation.PET_EQUIP) || (_loc == ItemLocation.INVENTORY) || (_loc == ItemLocation.MAIL) || (_loc == ItemLocation.FREIGHT);
return _locData; return _locData;
} }
@@ -1526,10 +1518,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>_worldRegion == null <I>(L2Object is invisible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Drop item</li> * <li>Drop item</li>
@@ -1553,8 +1541,6 @@ public final class L2ItemInstance extends L2Object
@Override @Override
public final void run() public final void run()
{ {
assert _itm.getWorldRegion() == null;
if (_dropper != null) if (_dropper != null)
{ {
final Location dropDest = GeoEngine.getInstance().canMoveToTargetLoc(_dropper.getX(), _dropper.getY(), _dropper.getZ(), _x, _y, _z, _dropper.getInstanceId()); final Location dropDest = GeoEngine.getInstance().canMoveToTargetLoc(_dropper.getX(), _dropper.getY(), _dropper.getZ(), _x, _y, _z, _dropper.getInstanceId());
@@ -1607,9 +1593,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void updateInDb() private void updateInDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear || _storedInDb)
if (_wear || _storedInDb)
{ {
return; return;
} }
@@ -1642,9 +1626,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void insertIntoDb() private void insertIntoDb()
{ {
assert !_existsInDb && (getObjectId() != 0); if (_existsInDb || (getObjectId() == 0) || _wear)
if (_wear)
{ {
return; return;
} }
@@ -1688,9 +1670,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void removeFromDb() private void removeFromDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear)
if (_wear)
{ {
return; return;
} }

View File

@@ -212,7 +212,6 @@ public final class L2WorldRegion
/** /**
* Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR> * Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR>
* If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR> * If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this
* @param object * @param object
*/ */
public void addVisibleObject(L2Object object) public void addVisibleObject(L2Object object)
@@ -222,7 +221,6 @@ public final class L2WorldRegion
return; return;
} }
assert object.getWorldRegion() == this;
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
synchronized (object) synchronized (object)
@@ -247,7 +245,6 @@ public final class L2WorldRegion
/** /**
* Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR> * Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this || object.getCurrentWorldRegion() == null
* @param object * @param object
*/ */
public void removeVisibleObject(L2Object object) public void removeVisibleObject(L2Object object)
@@ -257,7 +254,6 @@ public final class L2WorldRegion
return; return;
} }
assert (object.getWorldRegion() == this) || (object.getWorldRegion() == null);
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
return; return;

View File

@@ -1045,9 +1045,11 @@ public abstract class Inventory extends ItemContainer
*/ */
public synchronized void addPaperdollListener(PaperdollListener listener) public synchronized void addPaperdollListener(PaperdollListener listener)
{ {
assert !_paperdollListeners.contains(listener); if (!_paperdollListeners.contains(listener))
{
_paperdollListeners.add(listener); _paperdollListeners.add(listener);
} }
}
/** /**
* Removes a paperdoll listener. * Removes a paperdoll listener.

View File

@@ -272,11 +272,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>this.isItem().</li>
* <li>_worldRegion != null <I>(L2Object is visible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Do Pickup Item : PCInstance and Pet</li><BR> * <li>Do Pickup Item : PCInstance and Pet</li><BR>
@@ -285,8 +280,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public final void pickupMe(L2Character character) public final void pickupMe(L2Character character)
{ {
assert getWorldRegion() != null;
final L2WorldRegion oldregion = getWorldRegion(); final L2WorldRegion oldregion = getWorldRegion();
// Create a server->client GetItem packet to pick up the L2ItemInstance // Create a server->client GetItem packet to pick up the L2ItemInstance
@@ -591,7 +584,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public int getLocationSlot() public int getLocationSlot()
{ {
assert (_loc == ItemLocation.PAPERDOLL) || (_loc == ItemLocation.PET_EQUIP) || (_loc == ItemLocation.INVENTORY) || (_loc == ItemLocation.MAIL) || (_loc == ItemLocation.FREIGHT);
return _locData; return _locData;
} }
@@ -1519,10 +1511,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>_worldRegion == null <I>(L2Object is invisible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Drop item</li> * <li>Drop item</li>
@@ -1546,8 +1534,6 @@ public final class L2ItemInstance extends L2Object
@Override @Override
public final void run() public final void run()
{ {
assert _itеm.getWorldRegion() == null;
if (_dropper != null) if (_dropper != null)
{ {
final Instance instance = _dropper.getInstanceWorld(); final Instance instance = _dropper.getInstanceWorld();
@@ -1597,14 +1583,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void updateInDb() private void updateInDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear || _storedInDb)
if (_wear)
{
return;
}
if (_storedInDb)
{ {
return; return;
} }
@@ -1637,9 +1616,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void insertIntoDb() private void insertIntoDb()
{ {
assert !_existsInDb && (getObjectId() != 0); if (_existsInDb || (getObjectId() == 0) || _wear)
if (_wear)
{ {
return; return;
} }
@@ -1687,9 +1664,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void removeFromDb() private void removeFromDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear)
if (_wear)
{ {
return; return;
} }

View File

@@ -212,7 +212,6 @@ public final class L2WorldRegion
/** /**
* Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR> * Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR>
* If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR> * If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this
* @param object * @param object
*/ */
public void addVisibleObject(L2Object object) public void addVisibleObject(L2Object object)
@@ -222,7 +221,6 @@ public final class L2WorldRegion
return; return;
} }
assert object.getWorldRegion() == this;
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
synchronized (object) synchronized (object)
@@ -247,7 +245,6 @@ public final class L2WorldRegion
/** /**
* Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR> * Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this || object.getCurrentWorldRegion() == null
* @param object * @param object
*/ */
public void removeVisibleObject(L2Object object) public void removeVisibleObject(L2Object object)
@@ -257,7 +254,6 @@ public final class L2WorldRegion
return; return;
} }
assert (object.getWorldRegion() == this) || (object.getWorldRegion() == null);
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
return; return;

View File

@@ -1045,9 +1045,11 @@ public abstract class Inventory extends ItemContainer
*/ */
public synchronized void addPaperdollListener(PaperdollListener listener) public synchronized void addPaperdollListener(PaperdollListener listener)
{ {
assert !_paperdollListeners.contains(listener); if (!_paperdollListeners.contains(listener))
{
_paperdollListeners.add(listener); _paperdollListeners.add(listener);
} }
}
/** /**
* Removes a paperdoll listener. * Removes a paperdoll listener.

View File

@@ -272,11 +272,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>this.isItem().</li>
* <li>_worldRegion != null <I>(L2Object is visible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Do Pickup Item : PCInstance and Pet</li><BR> * <li>Do Pickup Item : PCInstance and Pet</li><BR>
@@ -285,8 +280,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public final void pickupMe(L2Character character) public final void pickupMe(L2Character character)
{ {
assert getWorldRegion() != null;
final L2WorldRegion oldregion = getWorldRegion(); final L2WorldRegion oldregion = getWorldRegion();
// Create a server->client GetItem packet to pick up the L2ItemInstance // Create a server->client GetItem packet to pick up the L2ItemInstance
@@ -591,7 +584,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public int getLocationSlot() public int getLocationSlot()
{ {
assert (_loc == ItemLocation.PAPERDOLL) || (_loc == ItemLocation.PET_EQUIP) || (_loc == ItemLocation.INVENTORY) || (_loc == ItemLocation.MAIL) || (_loc == ItemLocation.FREIGHT);
return _locData; return _locData;
} }
@@ -1519,10 +1511,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>_worldRegion == null <I>(L2Object is invisible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Drop item</li> * <li>Drop item</li>
@@ -1546,8 +1534,6 @@ public final class L2ItemInstance extends L2Object
@Override @Override
public final void run() public final void run()
{ {
assert _itеm.getWorldRegion() == null;
if (_dropper != null) if (_dropper != null)
{ {
final Instance instance = _dropper.getInstanceWorld(); final Instance instance = _dropper.getInstanceWorld();
@@ -1597,14 +1583,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void updateInDb() private void updateInDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear || _storedInDb)
if (_wear)
{
return;
}
if (_storedInDb)
{ {
return; return;
} }
@@ -1637,9 +1616,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void insertIntoDb() private void insertIntoDb()
{ {
assert !_existsInDb && (getObjectId() != 0); if (_existsInDb || (getObjectId() == 0) || _wear)
if (_wear)
{ {
return; return;
} }
@@ -1687,9 +1664,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void removeFromDb() private void removeFromDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear)
if (_wear)
{ {
return; return;
} }

View File

@@ -212,7 +212,6 @@ public final class L2WorldRegion
/** /**
* Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR> * Add the L2Object in the L2ObjectHashSet(L2Object) _visibleObjects containing L2Object visible in this L2WorldRegion <BR>
* If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR> * If L2Object is a L2PcInstance, Add the L2PcInstance in the L2ObjectHashSet(L2PcInstance) _allPlayable containing L2PcInstance of all player in game in this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this
* @param object * @param object
*/ */
public void addVisibleObject(L2Object object) public void addVisibleObject(L2Object object)
@@ -222,7 +221,6 @@ public final class L2WorldRegion
return; return;
} }
assert object.getWorldRegion() == this;
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
synchronized (object) synchronized (object)
@@ -247,7 +245,6 @@ public final class L2WorldRegion
/** /**
* Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR> * Remove the L2Object from the L2ObjectHashSet(L2Object) _visibleObjects in this L2WorldRegion. If L2Object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayable of this L2WorldRegion <BR>
* Assert : object.getCurrentWorldRegion() == this || object.getCurrentWorldRegion() == null
* @param object * @param object
*/ */
public void removeVisibleObject(L2Object object) public void removeVisibleObject(L2Object object)
@@ -257,7 +254,6 @@ public final class L2WorldRegion
return; return;
} }
assert (object.getWorldRegion() == this) || (object.getWorldRegion() == null);
if (_visibleObjects == null) if (_visibleObjects == null)
{ {
return; return;

View File

@@ -1083,9 +1083,11 @@ public abstract class Inventory extends ItemContainer
*/ */
public synchronized void addPaperdollListener(PaperdollListener listener) public synchronized void addPaperdollListener(PaperdollListener listener)
{ {
assert !_paperdollListeners.contains(listener); if (!_paperdollListeners.contains(listener))
{
_paperdollListeners.add(listener); _paperdollListeners.add(listener);
} }
}
/** /**
* Removes a paperdoll listener. * Removes a paperdoll listener.

View File

@@ -272,11 +272,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>this.isItem().</li>
* <li>_worldRegion != null <I>(L2Object is visible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Do Pickup Item : PCInstance and Pet</li><BR> * <li>Do Pickup Item : PCInstance and Pet</li><BR>
@@ -285,8 +280,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public final void pickupMe(L2Character character) public final void pickupMe(L2Character character)
{ {
assert getWorldRegion() != null;
final L2WorldRegion oldregion = getWorldRegion(); final L2WorldRegion oldregion = getWorldRegion();
// Create a server->client GetItem packet to pick up the L2ItemInstance // Create a server->client GetItem packet to pick up the L2ItemInstance
@@ -591,7 +584,6 @@ public final class L2ItemInstance extends L2Object
*/ */
public int getLocationSlot() public int getLocationSlot()
{ {
assert (_loc == ItemLocation.PAPERDOLL) || (_loc == ItemLocation.PET_EQUIP) || (_loc == ItemLocation.INVENTORY) || (_loc == ItemLocation.MAIL) || (_loc == ItemLocation.FREIGHT);
return _locData; return _locData;
} }
@@ -1519,10 +1511,6 @@ public final class L2ItemInstance extends L2Object
* <BR> * <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR> * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR>
* <BR> * <BR>
* <B><U> Assert </U> :</B><BR>
* <BR>
* <li>_worldRegion == null <I>(L2Object is invisible at the beginning)</I></li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR> * <B><U> Example of use </U> :</B><BR>
* <BR> * <BR>
* <li>Drop item</li> * <li>Drop item</li>
@@ -1546,8 +1534,6 @@ public final class L2ItemInstance extends L2Object
@Override @Override
public final void run() public final void run()
{ {
assert _itеm.getWorldRegion() == null;
if (_dropper != null) if (_dropper != null)
{ {
final Instance instance = _dropper.getInstanceWorld(); final Instance instance = _dropper.getInstanceWorld();
@@ -1597,14 +1583,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void updateInDb() private void updateInDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear || _storedInDb)
if (_wear)
{
return;
}
if (_storedInDb)
{ {
return; return;
} }
@@ -1637,9 +1616,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void insertIntoDb() private void insertIntoDb()
{ {
assert !_existsInDb && (getObjectId() != 0); if (_existsInDb || (getObjectId() == 0) || _wear)
if (_wear)
{ {
return; return;
} }
@@ -1687,9 +1664,7 @@ public final class L2ItemInstance extends L2Object
*/ */
private void removeFromDb() private void removeFromDb()
{ {
assert _existsInDb; if (!_existsInDb || _wear)
if (_wear)
{ {
return; return;
} }