mirror of
https://github.com/islehorse/HISP.git
synced 2025-06-04 04:47:09 +12:00
Make commands more accurate
This commit is contained in:
parent
997be8573d
commit
55c0f29914
14 changed files with 415 additions and 342 deletions
|
@ -21,6 +21,7 @@ namespace HISP.Server
|
|||
public static string GameData = "gamedata.json";
|
||||
public static string CrossDomainPolicyFile = "CrossDomainPolicy.xml";
|
||||
|
||||
public static string ModsFolder = "mods";
|
||||
public static int LogLevel = 4;
|
||||
|
||||
public static bool SqlLite = false;
|
||||
|
@ -117,6 +118,9 @@ namespace HISP.Server
|
|||
break;
|
||||
case "enable_word_filter":
|
||||
BadWords = data == "true";
|
||||
break;
|
||||
case "mods_folder":
|
||||
ModsFolder = data;
|
||||
break;
|
||||
case "intrest_rate":
|
||||
IntrestRate = int.Parse(data);
|
||||
|
|
|
@ -3,6 +3,7 @@ using HISP.Game.Horse;
|
|||
using HISP.Game.Items;
|
||||
using HISP.Game.Services;
|
||||
using HISP.Game.SwfModules;
|
||||
using HISP.Game.Chat;
|
||||
using HISP.Security;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
@ -13,7 +14,6 @@ namespace HISP.Server
|
|||
{
|
||||
// "Entry Point"
|
||||
|
||||
|
||||
private static void defaultOnShutdownCallback()
|
||||
{
|
||||
Process.GetCurrentProcess().Close();
|
||||
|
@ -52,6 +52,7 @@ namespace HISP.Server
|
|||
Auction.LoadAllAuctionRooms();
|
||||
|
||||
Item.DoSpecialCases();
|
||||
Command.RegisterCommands();
|
||||
|
||||
GameServer.StartServer();
|
||||
}
|
||||
|
|
|
@ -18,7 +18,8 @@ using HISP.Game.SwfModules;
|
|||
using HISP.Game.Horse;
|
||||
using HISP.Game.Events;
|
||||
using HISP.Game.Items;
|
||||
|
||||
using HISP.Modding;
|
||||
|
||||
namespace HISP.Server
|
||||
{
|
||||
public class GameServer
|
||||
|
@ -8249,12 +8250,16 @@ namespace HISP.Server
|
|||
}
|
||||
public static void OnShutdown()
|
||||
{
|
||||
ServerSocket.Dispose();
|
||||
gameTimer.Dispose();
|
||||
minuteTimer.Dispose();
|
||||
if(ServerSocket != null)
|
||||
ServerSocket.Dispose();
|
||||
if (gameTimer != null)
|
||||
gameTimer.Dispose();
|
||||
if (minuteTimer != null)
|
||||
minuteTimer.Dispose();
|
||||
}
|
||||
public static void ShutdownServer()
|
||||
{
|
||||
{
|
||||
ModLoader.OnShutdown();
|
||||
GameClient.OnShutdown();
|
||||
GameServer.OnShutdown();
|
||||
Database.OnShutdown();
|
||||
|
@ -8271,6 +8276,9 @@ namespace HISP.Server
|
|||
gameTimer = new Timer(new TimerCallback(onGameTick), null, gameTickSpeed, gameTickSpeed);
|
||||
minuteTimer = new Timer(new TimerCallback(onMinuteTick), null, oneMinute, oneMinute);
|
||||
Logger.InfoPrint("Binding to ip: " + ConfigReader.BindIP + " On port: " + ConfigReader.Port.ToString());
|
||||
|
||||
// Load all/any mods
|
||||
ModLoader.ReloadModsFromFilesystem();
|
||||
|
||||
SocketAsyncEventArgs e = new SocketAsyncEventArgs();
|
||||
e.Completed += GameClient.CreateClient;
|
||||
|
|
|
@ -27,8 +27,6 @@ namespace HISP.Server
|
|||
return arr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static double PointsToDistance(int x1, int y1, int x2, int y2)
|
||||
{
|
||||
return Math.Sqrt(Math.Pow((x2 - x1), 2) + Math.Pow((y2 - y1), 2));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue