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
|
|
@ -7,11 +7,10 @@ namespace Server.Items
|
|||
{
|
||||
int itemID = 4280;
|
||||
int count = 5;
|
||||
bool leftToRight = false;
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
AddComponent(new AddonComponent(itemID++), leftToRight ? i : count - 1 - i,
|
||||
-(leftToRight ? i : count - 1 - i), 0);
|
||||
AddComponent(new AddonComponent(itemID++), count - 1 - i,
|
||||
-(count - 1 - i), 0);
|
||||
}
|
||||
|
||||
public GiantWeb1(Serial serial)
|
||||
|
|
@ -41,11 +40,10 @@ namespace Server.Items
|
|||
{
|
||||
int itemID = 4285;
|
||||
int count = 5;
|
||||
bool leftToRight = true;
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
AddComponent(new AddonComponent(itemID++), leftToRight ? i : count - 1 - i,
|
||||
-(leftToRight ? i : count - 1 - i), 0);
|
||||
AddComponent(new AddonComponent(itemID++), i,
|
||||
-i, 0);
|
||||
}
|
||||
|
||||
public GiantWeb2(Serial serial)
|
||||
|
|
@ -75,11 +73,10 @@ namespace Server.Items
|
|||
{
|
||||
int itemID = 4290;
|
||||
int count = 4;
|
||||
bool leftToRight = true;
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
AddComponent(new AddonComponent(itemID++), leftToRight ? i : count - 1 - i,
|
||||
-(leftToRight ? i : count - 1 - i), 0);
|
||||
AddComponent(new AddonComponent(itemID++), i,
|
||||
-i, 0);
|
||||
}
|
||||
|
||||
public GiantWeb3(Serial serial)
|
||||
|
|
@ -109,11 +106,10 @@ namespace Server.Items
|
|||
{
|
||||
int itemID = 4294;
|
||||
int count = 4;
|
||||
bool leftToRight = false;
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
AddComponent(new AddonComponent(itemID++), leftToRight ? i : count - 1 - i,
|
||||
-(leftToRight ? i : count - 1 - i), 0);
|
||||
AddComponent(new AddonComponent(itemID++), count - 1 - i,
|
||||
-(count - 1 - i), 0);
|
||||
}
|
||||
|
||||
public GiantWeb4(Serial serial)
|
||||
|
|
@ -143,11 +139,10 @@ namespace Server.Items
|
|||
{
|
||||
int itemID = 4298;
|
||||
int count = 4;
|
||||
bool leftToRight = true;
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
AddComponent(new AddonComponent(itemID++), leftToRight ? i : count - 1 - i,
|
||||
-(leftToRight ? i : count - 1 - i), 0);
|
||||
AddComponent(new AddonComponent(itemID++), i,
|
||||
-i, 0);
|
||||
}
|
||||
|
||||
public GiantWeb5(Serial serial)
|
||||
|
|
@ -177,11 +172,10 @@ namespace Server.Items
|
|||
{
|
||||
int itemID = 4302;
|
||||
int count = 4;
|
||||
bool leftToRight = false;
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
AddComponent(new AddonComponent(itemID++), leftToRight ? i : count - 1 - i,
|
||||
-(leftToRight ? i : count - 1 - i), 0);
|
||||
AddComponent(new AddonComponent(itemID++), count - 1 - i,
|
||||
-(count - 1 - i), 0);
|
||||
}
|
||||
|
||||
public GiantWeb6(Serial serial)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue