cleanup: Fixes bugs and cleans up code (#660)

This commit is contained in:
Kamron Batman 2021-07-19 20:49:59 -07:00 • committed by GitHub
parent 1de0b656a9
commit 679e8100f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
99 changed files with 160 additions and 346 deletions

View file

@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using Server.Engines.ConPVP;
using Server.Engines.PartySystem;
@ -258,7 +257,7 @@ namespace Server.Misc
return true; // Guild allies or enemies can be harmful
}
if (bcTarg?.Controlled == true || bcTarg?.Summoned == true && bcTarg?.SummonMaster != from)
if (bcTarg?.Controlled == true || bcTarg?.Summoned == true && bcTarg.SummonMaster != from)
{
return false; // Cannot harm other controlled mobiles
}

View file

@ -1,4 +1,3 @@
using System;
using Server.Accounting;
using Server.Network;

View file

@ -23,7 +23,7 @@ namespace Server
public static void Initialize()
{
var filePath = Path.Combine(Core.BaseDirectory, "Data/treasure.cfg");
int i = 0, x = 0, y = 0;
int i = 0;
if (File.Exists(filePath))
{
@ -38,8 +38,8 @@ namespace Server
{
var split = line.Split(' ');
x = Convert.ToInt32(split[0]);
y = Convert.ToInt32(split[1]);
var x = Convert.ToInt32(split[0]);
var y = Convert.ToInt32(split[1]);
try
{