Fixes bad expressions, bad bool checks in loops, a few null pointer exceptions, and optimizes constructors.
This commit is contained in:
parent
8da55d6043
commit
f93c3b992e
62 changed files with 318 additions and 634 deletions
|
|
@ -143,16 +143,13 @@ namespace Server.Items
|
|||
{
|
||||
BasePotion pot = (BasePotion)Activator.CreateInstance(GetType());
|
||||
|
||||
if (pot != null)
|
||||
{
|
||||
Amount--;
|
||||
Amount--;
|
||||
|
||||
if (from.Backpack != null && !from.Backpack.Deleted)
|
||||
from.Backpack.DropItem(pot);
|
||||
else
|
||||
pot.MoveToWorld(from.Location, from.Map);
|
||||
pot.Drink(from);
|
||||
}
|
||||
if (from.Backpack != null && !from.Backpack.Deleted)
|
||||
from.Backpack.DropItem(pot);
|
||||
else
|
||||
pot.MoveToWorld(from.Location, from.Map);
|
||||
pot.Drink(from);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue