Cleanup/Housekeeping (#242)

This commit is contained in:
Kamron Batman 2020-09-12 15:31:21 -07:00 committed by GitHub
parent 90ede0659f
commit 741e8d8300
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
228 changed files with 6292 additions and 2690 deletions

View file

@ -1,23 +1,3 @@
/***************************************************************************
* TileData.cs
* -------------------
* begin : May 1, 2002
* copyright : (C) The RunUO Software Team
* email : info@runuo.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
using System;
using System.IO;
using System.Text;
@ -66,9 +46,13 @@ namespace Server
set
{
if (value)
{
Flags |= TileFlag.Bridge;
}
else
{
Flags &= ~TileFlag.Bridge;
}
}
}
@ -78,9 +62,13 @@ namespace Server
set
{
if (value)
{
Flags |= TileFlag.Impassable;
}
else
{
Flags &= ~TileFlag.Impassable;
}
}
}
@ -90,9 +78,13 @@ namespace Server
set
{
if (value)
{
Flags |= TileFlag.Surface;
}
else
{
Flags &= ~TileFlag.Surface;
}
}
}
@ -131,7 +123,10 @@ namespace Server
get
{
if ((Flags & TileFlag.Bridge) != 0)
{
return m_Height / 2;
}
return m_Height;
}
}
@ -184,7 +179,10 @@ namespace Server
ItemTable = new ItemData[0x10000];
LandTable = new LandData[0x4000];
if (Core.IsRunningFromXUnit) return;
if (Core.IsRunningFromXUnit)
{
return;
}
var filePath = Core.FindDataFile("tiledata.mul");
@ -200,7 +198,9 @@ namespace Server
if (is7090)
{
if (i == 1 || i > 0 && (i & 0x1F) == 0)
{
bin.ReadInt32();
}
}
else if ((i & 0x1F) == 0)
{
@ -218,7 +218,10 @@ namespace Server
for (var i = 0; i < length; i++)
{
if ((i & 0x1F) == 0) bin.ReadInt32(); // header
if ((i & 0x1F) == 0)
{
bin.ReadInt32(); // header
}
var flags = (TileFlag)(is7090 ? bin.ReadInt64() : bin.ReadInt32());
int weight = bin.ReadByte();
@ -263,7 +266,9 @@ namespace Server
while (count < 20)
{
if (m_StringBuffer[count] == 0)
{
break;
}
count++;
}