using System; using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; using GuildWarsInterface; using GuildWarsInterface.Debugging; using Mod.Hooks; using Mod.Logic.GameServer; using Mod.Logic.LoginServer; using Mod.Networking; using Mod.Patches; using Protocol.Messages.Update; using EnticeMiscLogic = Mod.Logic.LoginServer.EnticeMiscLogic; namespace Mod { public class EntryPoint { /// /// this is the entry point of the mod. /// public static int Main(String arg) { Game.Initialize(); KeyboardMoveDeactivation.Apply(); ClickToMoveDeactivation.Apply(); PwCache.InstallHook(); LoginServerLogic.LoginLogic = new EnticeLoginLogic(); LoginServerLogic.MiscLogic = new EnticeMiscLogic(); GameServerLogic.MovementLogic = new EnticeMovementLogic(); GameServerLogic.MiscLogic = new Logic.GameServer.EnticeMiscLogic(); GameServerLogic.ChatLogic = new EnticeChatLogic(); GameServerLogic.PartyLogic = new EnticePartyLogic(); GameServerLogic.CharacterCreationLogic = new EnticeCharacterCreationLogic(); GameServerLogic.InstanceLoadLogic = new EnticeInstanceLoadLogic(); if (!Client.Start()) { MessageBox.Show("can't connect to server", "entice", MessageBoxButtons.OK, MessageBoxIcon.Error); return 0; } Client.RegisterMessageHandler(GameUpdate.Handler); // notify main thread resume Marshal.WriteByte((IntPtr) 0x00DEA00C, 1); // run Application.Run(new DebugWindow()); // exit return 0; } } }