diff --git a/FFXIVClassic Lobby Server/common/Bitfield.cs b/FFXIVClassic Common Class Lib/Bitfield.cs similarity index 90% rename from FFXIVClassic Lobby Server/common/Bitfield.cs rename to FFXIVClassic Common Class Lib/Bitfield.cs index d4e885a0..8a54eec3 100644 --- a/FFXIVClassic Lobby Server/common/Bitfield.cs +++ b/FFXIVClassic Common Class Lib/Bitfield.cs @@ -1,13 +1,9 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace FFXIVClassic_Lobby_Server.common +namespace FFXIVClassic.Common { [global::System.AttributeUsage(AttributeTargets.Field, AllowMultiple = false)] - sealed class BitfieldLengthAttribute : Attribute + public sealed class BitfieldLengthAttribute : Attribute { uint length; @@ -19,7 +15,7 @@ namespace FFXIVClassic_Lobby_Server.common public uint Length { get { return length; } } } - static class PrimitiveConversion + public static class PrimitiveConversion { public static UInt32 ToUInt32(T t) where T : struct { diff --git a/FFXIVClassic Map Server/common/Blowfish.cs b/FFXIVClassic Common Class Lib/Blowfish.cs similarity index 98% rename from FFXIVClassic Map Server/common/Blowfish.cs rename to FFXIVClassic Common Class Lib/Blowfish.cs index 92305b58..e42fd062 100644 --- a/FFXIVClassic Map Server/common/Blowfish.cs +++ b/FFXIVClassic Common Class Lib/Blowfish.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace FFXIVClassic_Lobby_Server.common +namespace FFXIVClassic.Common { public class Blowfish { @@ -287,7 +283,7 @@ namespace FFXIVClassic_Lobby_Server.common public Blowfish(byte[] key) { - initializeBlowfish(key); + InitializeBlowfish(key); } public void Encipher(byte[] data, int offset, int length) @@ -299,7 +295,7 @@ namespace FFXIVClassic_Lobby_Server.common { uint xl = (uint)((data[i + 0]) | (data[i + 1] << 8) | (data[i + 2] << 16) | (data[i + 3] << 24)); uint xr = (uint)((data[i + 4]) | (data[i + 5] << 8) | (data[i + 6] << 16) | (data[i + 7] << 24)); - blowfish_encipher(ref xl, ref xr); + BlowfishEncipher(ref xl, ref xr); data[i + 0] = (byte)(xl >> 0); data[i + 1] = (byte)(xl >> 8); data[i + 2] = (byte)(xl >> 16); @@ -320,7 +316,7 @@ namespace FFXIVClassic_Lobby_Server.common { uint xl = (uint)((data[i + 0]) | (data[i + 1] << 8) | (data[i + 2] << 16) | (data[i + 3] << 24)); uint xr = (uint)((data[i + 4]) | (data[i + 5] << 8) | (data[i + 6] << 16) | (data[i + 7] << 24)); - blowfish_decipher(ref xl, ref xr); + BlowfishDecipher(ref xl, ref xr); data[i + 0] = (byte)(xl >> 0); data[i + 1] = (byte)(xl >> 8); data[i + 2] = (byte)(xl >> 16); @@ -355,7 +351,7 @@ namespace FFXIVClassic_Lobby_Server.common return y; } - private void blowfish_encipher(ref UInt32 xl, ref UInt32 xr) + private void BlowfishEncipher(ref UInt32 xl, ref UInt32 xr) { UInt32 temp; Int32 i; @@ -378,7 +374,7 @@ namespace FFXIVClassic_Lobby_Server.common } - private void blowfish_decipher(ref UInt32 xl, ref UInt32 xr) + private void BlowfishDecipher(ref UInt32 xl, ref UInt32 xr) { UInt32 temp; Int32 i; @@ -387,13 +383,13 @@ namespace FFXIVClassic_Lobby_Server.common xl = xl ^ P[i]; xr = F(xl) ^ xr; - /* Exchange xl and xr */ + /* ExChange xl and xr */ temp = xl; xl = xr; xr = temp; } - /* Exchange xl and xr */ + /* ExChange xl and xr */ temp = xl; xl = xr; xr = temp; @@ -403,7 +399,7 @@ namespace FFXIVClassic_Lobby_Server.common } - private int initializeBlowfish(byte [] key) + private int InitializeBlowfish(byte [] key) { Int16 i; Int16 j; @@ -437,7 +433,7 @@ namespace FFXIVClassic_Lobby_Server.common for (i = 0; i < N + 2; i += 2) { - blowfish_encipher(ref datal, ref datar); + BlowfishEncipher(ref datal, ref datar); P[i] = datal; P[i + 1] = datar; @@ -447,7 +443,7 @@ namespace FFXIVClassic_Lobby_Server.common { for (j = 0; j < 256; j += 2) { - blowfish_encipher(ref datal, ref datar); + BlowfishEncipher(ref datal, ref datar); S[i,j] = datal; S[i,j + 1] = datar; } diff --git a/FFXIVClassic Map Server/common/EfficientHashTables.cs b/FFXIVClassic Common Class Lib/EfficientHashTables.cs similarity index 91% rename from FFXIVClassic Map Server/common/EfficientHashTables.cs rename to FFXIVClassic Common Class Lib/EfficientHashTables.cs index 9ac2c4aa..d96f2303 100644 --- a/FFXIVClassic Map Server/common/EfficientHashTables.cs +++ b/FFXIVClassic Common Class Lib/EfficientHashTables.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace FFXIVClassic_Map_Server.common +namespace FFXIVClassic.Common { namespace EfficientHashTables { @@ -29,14 +25,14 @@ namespace FFXIVClassic_Map_Server.common _buckets = new element[_capacity][]; } - public uint hash(ulong key) + public uint Hash(ulong key) { return (uint)(key % _capacity); } public void Add(ulong key, T value) { - uint hsh = hash(key); + uint hsh = Hash(key); element[] e; if (_buckets[hsh] == null) _buckets[hsh] = e = new element[1]; @@ -57,7 +53,7 @@ namespace FFXIVClassic_Map_Server.common public T Get(ulong key) { - uint hsh = hash(key); + uint hsh = Hash(key); element[] e = _buckets[hsh]; if (e == null) return default(T); foreach (var f in e) @@ -68,7 +64,7 @@ namespace FFXIVClassic_Map_Server.common public bool Has(ulong key) { - uint hsh = hash(key); + uint hsh = Hash(key); element[] e = _buckets[hsh]; if (e == null) return false; foreach (var f in e) @@ -108,14 +104,14 @@ namespace FFXIVClassic_Map_Server.common _buckets = new element[_capacity][]; } - public uint hash(uint key) + public uint Hash(uint key) { return (uint)(key % _capacity); } public void Add(uint key, T value) { - uint hsh = hash(key); + uint hsh = Hash(key); element[] e; if (_buckets[hsh] == null) _buckets[hsh] = e = new element[1]; @@ -136,7 +132,7 @@ namespace FFXIVClassic_Map_Server.common public T Get(uint key) { - uint hsh = hash(key); + uint hsh = Hash(key); element[] e = _buckets[hsh]; if (e == null) return default(T); foreach (var f in e) diff --git a/FFXIVClassic Common Class Lib/FFXIVClassic Common Class Lib.csproj b/FFXIVClassic Common Class Lib/FFXIVClassic Common Class Lib.csproj new file mode 100644 index 00000000..1adbda3e --- /dev/null +++ b/FFXIVClassic Common Class Lib/FFXIVClassic Common Class Lib.csproj @@ -0,0 +1,66 @@ + + + + + Debug + AnyCPU + {3A3D6626-C820-4C18-8C81-64811424F20E} + Library + Properties + FFXIVClassic.Common + FFXIVClassic.Common + v4.5 + 512 + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FFXIVClassic Common Class Lib/Properties/AssemblyInfo.cs b/FFXIVClassic Common Class Lib/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..79f8aa4e --- /dev/null +++ b/FFXIVClassic Common Class Lib/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("FFXIVClassic.Common")] +[assembly: AssemblyDescription("Common class library for FFXIVClassic project")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ffxivclassic.fragmenterworks.com")] +[assembly: AssemblyProduct("FFXIVClassic.Common")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3a3d6626-c820-4c18-8c81-64811424f20e")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/FFXIVClassic Map Server/common/STA_INIFile.cs b/FFXIVClassic Common Class Lib/STA_INIFile.cs similarity index 97% rename from FFXIVClassic Map Server/common/STA_INIFile.cs rename to FFXIVClassic Common Class Lib/STA_INIFile.cs index fa7107ad..1f0d64c3 100644 --- a/FFXIVClassic Map Server/common/STA_INIFile.cs +++ b/FFXIVClassic Common Class Lib/STA_INIFile.cs @@ -9,10 +9,9 @@ using System.Globalization; using System.IO; using System.Text; -namespace STA.Settings +namespace FFXIVClassic.Common { - - internal class INIFile + public class INIFile { #region "Declarations" @@ -179,7 +178,7 @@ namespace STA.Settings // *** Check if original file exists *** bool OriginalFileExists = File.Exists(m_FileName); - // *** Get temporary file name *** + // *** get temporary file name *** string TmpFileName = Path.ChangeExtension(m_FileName, "$n$"); // *** Copy content of original file to temporary file, replace modified values *** @@ -199,7 +198,7 @@ namespace STA.Settings // *** Open the original file *** sr = new StreamReader(m_FileName); - // *** Read the file original content, replace changes with local cache values *** + // *** Read the file original content, replace Changes with local cache values *** string s; string SectionName; string Key = null; @@ -337,7 +336,7 @@ namespace STA.Settings } // *** Read a value from local cache *** - internal string GetValue(string SectionName, string Key, string DefaultValue) + public string GetValue(string SectionName, string Key, string DefaultValue) { // *** Lazy loading *** if (m_Lazy) @@ -380,7 +379,7 @@ namespace STA.Settings Dictionary Section; if (!m_Sections.TryGetValue(SectionName, out Section)) { - // *** If it doesn't, add it *** + // *** If it Doesn't, Add it *** Section = new Dictionary(); m_Sections.Add(SectionName,Section); } @@ -474,7 +473,7 @@ namespace STA.Settings return DefaultValue; } - internal double GetValue(string SectionName, string Key, double DefaultValue) + internal Double GetValue(string SectionName, string Key, Double DefaultValue) { string StringValue = GetValue(SectionName, Key, DefaultValue.ToString(CultureInfo.InvariantCulture)); double Value; @@ -519,7 +518,7 @@ namespace STA.Settings SetValue(SectionName, Key, Value.ToString(CultureInfo.InvariantCulture)); } - internal void SetValue(string SectionName, string Key, double Value) + internal void SetValue(string SectionName, string Key, Double Value) { SetValue(SectionName, Key, Value.ToString(CultureInfo.InvariantCulture)); } diff --git a/FFXIVClassic Lobby Server/common/Utils.cs b/FFXIVClassic Common Class Lib/Utils.cs similarity index 61% rename from FFXIVClassic Lobby Server/common/Utils.cs rename to FFXIVClassic Common Class Lib/Utils.cs index 40830386..a97f2ee2 100644 --- a/FFXIVClassic Lobby Server/common/Utils.cs +++ b/FFXIVClassic Common Class Lib/Utils.cs @@ -1,12 +1,9 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Threading.Tasks; -namespace FFXIVClassic_Lobby_Server.common +namespace FFXIVClassic.Common { - static class Utils + public static class Utils { private static readonly uint[] _lookup32 = CreateLookup32(); @@ -21,28 +18,71 @@ namespace FFXIVClassic_Lobby_Server.common return result; } - public static string ByteArrayToHex(byte[] bytes) + public static string ByteArrayToHex(byte[] bytes, int offset = 0, int bytesPerLine = 16) { - var lookup32 = _lookup32; - var result = new char[(bytes.Length * 3) + ((bytes.Length / 16) < 1 ? 1 : (bytes.Length / 16) * 3) + bytes.Length + 60]; - int numNewLines = 0; - for (int i = 0; i < bytes.Length; i++) + if (bytes == null) { - var val = lookup32[bytes[i]]; - result[(3 * i) + (17 * numNewLines) + 0] = (char)val; - result[(3 * i) + (17 * numNewLines) + 1] = (char)(val >> 16); - result[(3 * i) + (17 * numNewLines) + 2] = ' '; + return String.Empty; + } - result[(numNewLines * (3 * 16 + 17)) + (3 * 16) + (i % 16)] = (char)bytes[i] >= 32 && (char)bytes[i] <= 126 ? (char)bytes[i] : '.'; + char[] hexChars = "0123456789ABCDEF".ToCharArray(); - if (i != bytes.Length - 1 && bytes.Length > 16 && i != 0 && (i + 1) % 16 == 0) + // 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + // 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + int offsetBlock = 8 + 3; + int byteBlock = offsetBlock + (bytesPerLine * 3) + ((bytesPerLine - 1) / 8) + 2; + int lineLength = byteBlock + bytesPerLine + Environment.NewLine.Length; + + char[] line = (new String(' ', lineLength - Environment.NewLine.Length) + Environment.NewLine).ToCharArray(); + int numLines = (bytes.Length + bytesPerLine - 1) / bytesPerLine; + + StringBuilder sb = new StringBuilder(numLines * lineLength); + + for (int i = 0; i < bytes.Length; i += bytesPerLine) + { + int h = i + offset; + + line[0] = hexChars[(h >> 28) & 0xF]; + line[1] = hexChars[(h >> 24) & 0xF]; + line[2] = hexChars[(h >> 20) & 0xF]; + line[3] = hexChars[(h >> 16) & 0xF]; + line[4] = hexChars[(h >> 12) & 0xF]; + line[5] = hexChars[(h >> 8) & 0xF]; + line[6] = hexChars[(h >> 4) & 0xF]; + line[7] = hexChars[(h >> 0) & 0xF]; + + int hexColumn = offsetBlock; + int charColumn = byteBlock; + + for (int j = 0; j < bytesPerLine; j++) { - result[(numNewLines * (3 * 16 + 17)) + (3 * 16) + (16)] = '\n'; - numNewLines++; + if (j > 0 && (j & 7) == 0) + { + hexColumn++; + } + + if (i + j >= bytes.Length) + { + line[hexColumn] = ' '; + line[hexColumn + 1] = ' '; + line[charColumn] = ' '; + } + else + { + byte by = bytes[i + j]; + line[hexColumn] = hexChars[(by >> 4) & 0xF]; + line[hexColumn + 1] = hexChars[by & 0xF]; + line[charColumn] = (by < 32 ? '.' : (char)by); + } + + hexColumn += 3; + charColumn++; } + sb.Append(line); } - return new string(result); + + return sb.ToString(); } public static UInt32 UnixTimeStampUTC() @@ -67,7 +107,7 @@ namespace FFXIVClassic_Lobby_Server.common return unixTimeStamp; } - public static ulong swapEndian(ulong input) + public static ulong SwapEndian(ulong input) { return ((0x00000000000000FF) & (input >> 56) | (0x000000000000FF00) & (input >> 40) | @@ -79,7 +119,7 @@ namespace FFXIVClassic_Lobby_Server.common (0xFF00000000000000) & (input << 56)); } - public static uint swapEndian(uint input) + public static uint SwapEndian(uint input) { return ((input >> 24) & 0xff) | ((input << 8) & 0xff0000) | @@ -87,7 +127,7 @@ namespace FFXIVClassic_Lobby_Server.common ((input << 24) & 0xff000000); } - public static int swapEndian(int input) + public static int SwapEndian(int input) { uint inputAsUint = (uint)input; @@ -178,6 +218,16 @@ namespace FFXIVClassic_Lobby_Server.common } return data; + } + + public static string ToStringBase63(int number) + { + string lookup = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + string secondDigit = lookup.Substring((int)Math.Floor((double)number / (double)lookup.Length), 1); + string firstDigit = lookup.Substring(number % lookup.Length, 1); + + return secondDigit + firstDigit; } } } diff --git a/FFXIVClassic Common Class Lib/packages.config b/FFXIVClassic Common Class Lib/packages.config new file mode 100644 index 00000000..c171747f --- /dev/null +++ b/FFXIVClassic Common Class Lib/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/FFXIVClassic Lobby Server/ClientConnection.cs b/FFXIVClassic Lobby Server/ClientConnection.cs index 76e77fd9..02747492 100644 --- a/FFXIVClassic Lobby Server/ClientConnection.cs +++ b/FFXIVClassic Lobby Server/ClientConnection.cs @@ -1,14 +1,8 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Net.Sockets; using FFXIVClassic_Lobby_Server.packets; -using System.Diagnostics; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using System.Collections.Concurrent; -using System.IO; using Cyotek.Collections.Generic; using System.Net; @@ -21,7 +15,7 @@ namespace FFXIVClassic_Lobby_Server public Socket socket; public byte[] buffer = new byte[0xffff]; public CircularBuffer incomingStream = new CircularBuffer(1024); - public BlockingCollection sendPacketQueue = new BlockingCollection(100); + public BlockingCollection SendPacketQueue = new BlockingCollection(100); public int lastPartialSize = 0; //Instance Stuff @@ -37,7 +31,7 @@ namespace FFXIVClassic_Lobby_Server public ushort newCharaWorldId; - public void processIncoming(int bytesIn) + public void ProcessIncoming(int bytesIn) { if (bytesIn == 0) return; @@ -45,36 +39,36 @@ namespace FFXIVClassic_Lobby_Server incomingStream.Put(buffer, 0, bytesIn); } - public void queuePacket(BasePacket packet) + public void QueuePacket(BasePacket packet) { - sendPacketQueue.Add(packet); + SendPacketQueue.Add(packet); } - public void flushQueuedSendPackets() + public void FlushQueuedSendPackets() { if (!socket.Connected) return; - while (sendPacketQueue.Count > 0) + while (SendPacketQueue.Count > 0) { - BasePacket packet = sendPacketQueue.Take(); - byte[] packetBytes = packet.getPacketBytes(); + BasePacket packet = SendPacketQueue.Take(); + byte[] packetBytes = packet.GetPacketBytes(); byte[] buffer = new byte[0xffff]; Array.Copy(packetBytes, buffer, packetBytes.Length); try { socket.Send(packetBytes); } catch(Exception e) - { Log.error(String.Format("Weird case, socket was d/ced: {0}", e)); } + { Program.Log.Error("Weird case, socket was d/ced: {0}", e); } } } - public String getAddress() + public String GetAddress() { return String.Format("{0}:{1}", (socket.RemoteEndPoint as IPEndPoint).Address, (socket.RemoteEndPoint as IPEndPoint).Port); } - public void disconnect() + public void Disconnect() { socket.Shutdown(SocketShutdown.Both); socket.Disconnect(false); diff --git a/FFXIVClassic Lobby Server/ConfigConstants.cs b/FFXIVClassic Lobby Server/ConfigConstants.cs index 7968aa5e..5f625a60 100644 --- a/FFXIVClassic Lobby Server/ConfigConstants.cs +++ b/FFXIVClassic Lobby Server/ConfigConstants.cs @@ -1,18 +1,14 @@ -using FFXIVClassic_Lobby_Server.common; -using STA.Settings; +using FFXIVClassic.Common; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server { class ConfigConstants { public static String OPTIONS_BINDIP; - public static bool OPTIONS_TIMESTAMP = false; + public static String OPTIONS_PORT; + public static bool OPTIONS_TIMESTAMP = false; public static String DATABASE_HOST; public static String DATABASE_PORT; @@ -20,22 +16,23 @@ namespace FFXIVClassic_Lobby_Server public static String DATABASE_USERNAME; public static String DATABASE_PASSWORD; - public static bool load() + public static bool Load() { - Console.Write("Loading config.ini file... "); + Console.Write("Loading lobby_config.ini file... "); - if (!File.Exists("./config.ini")) + if (!File.Exists("./lobby_config.ini")) { Console.ForegroundColor = ConsoleColor.Red; - Console.WriteLine("[FILE NOT FOUND]"); + Console.WriteLine(String.Format("[FILE NOT FOUND]")); Console.ForegroundColor = ConsoleColor.Gray; return false; } - INIFile configIni = new INIFile("./config.ini"); + INIFile configIni = new INIFile("./lobby_config.ini"); ConfigConstants.OPTIONS_BINDIP = configIni.GetValue("General", "server_ip", "127.0.0.1"); - ConfigConstants.OPTIONS_TIMESTAMP = configIni.GetValue("General", "showtimestamp", "true").ToLower().Equals("true"); + ConfigConstants.OPTIONS_PORT = configIni.GetValue("General", "server_port", "54994"); + ConfigConstants.OPTIONS_TIMESTAMP = configIni.GetValue("General", "showtimestamp", "true").ToLower().Equals("true"); ConfigConstants.DATABASE_HOST = configIni.GetValue("Database", "host", ""); ConfigConstants.DATABASE_PORT = configIni.GetValue("Database", "port", ""); diff --git a/FFXIVClassic Lobby Server/Database.cs b/FFXIVClassic Lobby Server/Database.cs index 1f7ec710..deb776b4 100644 --- a/FFXIVClassic Lobby Server/Database.cs +++ b/FFXIVClassic Lobby Server/Database.cs @@ -1,14 +1,11 @@ using FFXIVClassic_Lobby_Server.dataobjects; using MySql.Data.MySqlClient; using Dapper; -using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; -using FFXIVClassic_Lobby_Server.common; using FFXIVClassic_Lobby_Server.utils; +using FFXIVClassic.Common; namespace FFXIVClassic_Lobby_Server { @@ -16,7 +13,7 @@ namespace FFXIVClassic_Lobby_Server class Database { - public static uint getUserIdFromSession(String sessionId) + public static uint GetUserIdFromSession(String sessionId) { uint id = 0; using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -35,7 +32,10 @@ namespace FFXIVClassic_Lobby_Server } } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + + } finally { conn.Dispose(); @@ -44,7 +44,7 @@ namespace FFXIVClassic_Lobby_Server return id; } - public static bool reserveCharacter(uint userId, uint slot, uint serverId, String name, out uint pid, out uint cid) + public static bool ReserveCharacter(uint userId, uint slot, uint serverId, String name, out uint pid, out uint cid) { bool alreadyExists = false; using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -88,6 +88,10 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Program.Log.Error(e.ToString()); + + Program.Log.Error(e.ToString()); + pid = 0; cid = 0; } @@ -96,13 +100,13 @@ namespace FFXIVClassic_Lobby_Server conn.Dispose(); } - Log.database(String.Format("CID={0} created on 'characters' table.", cid)); + Program.Log.Debug("[SQL] CID={0} Created on 'characters' table.", cid); } return alreadyExists; } - public static void makeCharacter(uint accountId, uint cid, CharaInfo charaInfo) + public static void MakeCharacter(uint accountId, uint cid, CharaInfo charaInfo) { //Update character entry using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -179,6 +183,8 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Program.Log.Error(e.ToString()); + conn.Dispose(); return; } @@ -202,6 +208,8 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Program.Log.Error(e.ToString()); + conn.Dispose(); return; } @@ -222,6 +230,8 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Program.Log.Error(e.ToString()); + } finally @@ -232,10 +242,10 @@ namespace FFXIVClassic_Lobby_Server } - Log.database(String.Format("CID={0} state updated to active(2).", cid)); + Program.Log.Debug("[SQL] CID={0} state updated to active(2).", cid); } - public static bool renameCharacter(uint userId, uint characterId, uint serverId, String newName) + public static bool RenameCharacter(uint userId, uint characterId, uint serverId, String newName) { using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -257,7 +267,7 @@ namespace FFXIVClassic_Lobby_Server cmd = new MySqlCommand(); cmd.Connection = conn; - cmd.CommandText = "UPDATE characters SET name=@name, doRename=0 WHERE id=@cid AND userId=@uid"; + cmd.CommandText = "UPDATE characters SET name=@name, DoRename=0 WHERE id=@cid AND userId=@uid"; cmd.Prepare(); cmd.Parameters.AddWithValue("@uid", userId); cmd.Parameters.AddWithValue("@cid", characterId); @@ -267,6 +277,8 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Program.Log.Error(e.ToString()); + } finally @@ -274,13 +286,13 @@ namespace FFXIVClassic_Lobby_Server conn.Dispose(); } - Log.database(String.Format("CID={0} name updated to \"{1}\".", characterId, newName)); + Program.Log.Debug("[SQL] CID={0} name updated to \"{1}\".", characterId, newName); return false; } } - public static void deleteCharacter(uint characterId, String name) + public static void DeleteCharacter(uint characterId, String name) { using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -298,6 +310,8 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Program.Log.Error(e.ToString()); + } finally @@ -306,10 +320,10 @@ namespace FFXIVClassic_Lobby_Server } } - Log.database(String.Format("CID={0} deleted.", characterId)); + Program.Log.Debug("[SQL] CID={0} deleted.", characterId); } - public static List getServers() + public static List GetServers() { using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -320,7 +334,9 @@ namespace FFXIVClassic_Lobby_Server worldList = conn.Query("SELECT * FROM servers WHERE isActive=true").ToList(); } catch (MySqlException e) - { worldList = new List(); } + { + Program.Log.Error(e.ToString()); + worldList = new List(); } finally { conn.Dispose(); @@ -329,7 +345,7 @@ namespace FFXIVClassic_Lobby_Server } } - public static World getServer(uint serverId) + public static World GetServer(uint serverId) { using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -340,7 +356,9 @@ namespace FFXIVClassic_Lobby_Server world = conn.Query("SELECT * FROM servers WHERE id=@ServerId", new {ServerId = serverId}).SingleOrDefault(); } catch (MySqlException e) - { + { + Program.Log.Error(e.ToString()); + } finally { @@ -351,7 +369,7 @@ namespace FFXIVClassic_Lobby_Server } } - public static List getCharacters(uint userId) + public static List GetCharacters(uint userId) { List characters = new List(); using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -409,7 +427,7 @@ namespace FFXIVClassic_Lobby_Server return characters; } - public static Character getCharacter(uint userId, uint charId) + public static Character GetCharacter(uint userId, uint charId) { Character chara = null; using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -464,7 +482,7 @@ namespace FFXIVClassic_Lobby_Server return chara; } - public static Appearance getAppearance(uint charaId) + public static Appearance GetAppearance(uint charaId) { using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -476,6 +494,8 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Program.Log.Error(e.ToString()); + } finally { @@ -486,7 +506,7 @@ namespace FFXIVClassic_Lobby_Server } } - public static List getReservedNames(uint userId) + public static List GetReservedNames(uint userId) { using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -497,7 +517,9 @@ namespace FFXIVClassic_Lobby_Server nameList = conn.Query("SELECT name FROM reserved_names WHERE userId=@UserId", new { UserId = userId }).ToList(); } catch (MySqlException e) - { nameList = new List(); } + { + Program.Log.Error(e.ToString()); + nameList = new List(); } finally { conn.Dispose(); @@ -506,7 +528,7 @@ namespace FFXIVClassic_Lobby_Server } } - public static List getRetainers(uint userId) + public static List GetRetainers(uint userId) { using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -517,7 +539,9 @@ namespace FFXIVClassic_Lobby_Server retainerList = conn.Query("SELECT * FROM retainers WHERE id=@UserId ORDER BY characterId, slot", new { UserId = userId }).ToList(); } catch (MySqlException e) - { retainerList = new List(); } + { + Program.Log.Error(e.ToString()); + retainerList = new List(); } finally { conn.Dispose(); diff --git a/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj b/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj index b3ade4da..550b75a0 100644 --- a/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj +++ b/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj @@ -11,6 +11,21 @@ FFXIVClassic_Lobby_Server v4.5 512 + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true AnyCPU @@ -40,6 +55,9 @@ ..\packages\Dapper.1.42\lib\net45\Dapper.dll + + ..\FFXIVClassic Common Class Lib\bin\Debug\FFXIVClassic.Common.dll + ..\packages\MySql.Data.6.9.7\lib\net45\MySql.Data.dll @@ -47,6 +65,10 @@ ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll True + + ..\packages\NLog.4.3.4\lib\net45\NLog.dll + True + @@ -56,17 +78,12 @@ - - - - - @@ -92,11 +109,29 @@ + + Always + + + Designer + + + + False + Microsoft .NET Framework 4.5 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + - copy "$(SolutionDir)data\config.ini" "$(SolutionDir)$(ProjectName)\$(OutDir)" + copy "$(SolutionDir)data\lobby_config.ini" "$(SolutionDir)$(ProjectName)\$(OutDir)" + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FFXIVClassic Lobby Server/NLog.xsd b/FFXIVClassic Lobby Server/NLog.xsd new file mode 100644 index 00000000..395075c9 --- /dev/null +++ b/FFXIVClassic Lobby Server/NLog.xsd @@ -0,0 +1,2601 @@ + + + + + + + + + + + + + + + Watch config file for changes and reload automatically. + + + + + Print internal NLog messages to the console. Default value is: false + + + + + Print internal NLog messages to the console error output. Default value is: false + + + + + Write internal NLog messages to the specified file. + + + + + Log level threshold for internal log messages. Default value is: Info. + + + + + Global log level threshold for application log messages. Messages below this level won't be logged.. + + + + + Pass NLog internal exceptions to the application. Default value is: false. + + + + + Write internal NLog messages to the the System.Diagnostics.Trace. Default value is: false + + + + + + + + + + + + + + Make all targets within this section asynchronous (Creates additional threads but the calling thread isn't blocked by any target writes). + + + + + + + + + + + + + + + + + Prefix for targets/layout renderers/filters/conditions loaded from this assembly. + + + + + Load NLog extensions from the specified file (*.dll) + + + + + Load NLog extensions from the specified assembly. Assembly name should be fully qualified. + + + + + + + + + + Name of the logger. May include '*' character which acts like a wildcard. Allowed forms are: *, Name, *Name, Name* and *Name* + + + + + Comma separated list of levels that this rule matches. + + + + + Minimum level that this rule matches. + + + + + Maximum level that this rule matches. + + + + + Level that this rule matches. + + + + + Comma separated list of target names. + + + + + Ignore further rules if this one matches. + + + + + Enable or disable logging rule. Disabled rules are ignored. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the file to be included. The name is relative to the name of the current config file. + + + + + Ignore any errors in the include file. + + + + + + + Variable name. + + + + + Variable value. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Indicates whether to add <!-- --> comments around all written texts. + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Number of log events that should be processed in a batch by the lazy writer thread. + + + + + Action to be taken when the lazy writer thread request queue count exceeds the set limit. + + + + + Limit on the number of requests in the lazy writer thread request queue. + + + + + Time in milliseconds to sleep between batches. + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + + + + + + + + + + + + + Name of the target. + + + + + Number of log events to be buffered. + + + + + Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. + + + + + Indicates whether to use sliding timeout. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Encoding to be used. + + + + + Instance of that is used to format log messages. + + + + + Maximum message size in bytes. + + + + + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the will be more connections than . + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Indicates whether to keep connection open whenever possible. + + + + + Size of the connection cache (number of connections which are kept alive). + + + + + Maximum current connections. 0 = no maximum. + + + + + Network address. + + + + + Maximum queue size. + + + + + Indicates whether to include source info (file name and line number) in the information sent over the network. + + + + + NDC item separator. + + + + + Indicates whether to include stack contents. + + + + + Indicates whether to include call site (class and method name) in the information sent over the network. + + + + + AppInfo field. By default it's the friendly name of the current AppDomain. + + + + + Indicates whether to include NLog-specific extensions to log4j schema. + + + + + Indicates whether to include dictionary contents. + + + + + + + + + + + + + + + + + + + + + + + + + + + Layout that should be use to calcuate the value for the parameter. + + + + + Viewer parameter name. + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Text to be rendered. + + + + + Header. + + + + + Footer. + + + + + Indicates whether to use default row highlighting rules. + + + + + The encoding for writing messages to the . + + + + + Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Condition that must be met in order to set the specified foreground and background color. + + + + + Background color. + + + + + Foreground color. + + + + + + + + + + + + + + + + Indicates whether to ignore case when comparing texts. + + + + + Regular expression to be matched. You must specify either text or regex. + + + + + Text to be matched. You must specify either text or regex. + + + + + Indicates whether to match whole words only. + + + + + Compile the ? This can improve the performance, but at the costs of more memory usage. If false, the Regex Cache is used. + + + + + Background color. + + + + + Foreground color. + + + + + + + + + + + + + + + + + Name of the target. + + + + + Text to be rendered. + + + + + Header. + + + + + Footer. + + + + + Indicates whether to send the log messages to the standard error instead of the standard output. + + + + + The encoding for writing messages to the . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. + + + + + Name of the connection string (as specified in <connectionStrings> configuration section. + + + + + Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. + + + + + Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. + + + + + Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. + + + + + Name of the database provider. + + + + + Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. + + + + + Indicates whether to keep the database connection open between the log events. + + + + + Obsolete - value will be ignored! The logging code always runs outside of transaction. Gets or sets a value indicating whether to use database transactions. Some data providers require this. + + + + + Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. + + + + + Text of the SQL command to be run on each log level. + + + + + Type of the SQL command to be run on each log level. + + + + + + + + + + + + + + + + + + + + + + + Type of the command. + + + + + Connection string to run the command against. If not provided, connection string from the target is used. + + + + + Indicates whether to ignore failures. + + + + + Command text. + + + + + + + + + + + + + + Layout that should be use to calcuate the value for the parameter. + + + + + Database parameter name. + + + + + Database parameter precision. + + + + + Database parameter scale. + + + + + Database parameter size. + + + + + + + + + + + + + + + Name of the target. + + + + + Text to be rendered. + + + + + Header. + + + + + Footer. + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Layout that renders event Category. + + + + + Layout that renders event ID. + + + + + Name of the Event Log to write to. This can be System, Application or any user-defined name. + + + + + Name of the machine on which Event Log service is running. + + + + + Value to be used as the event Source. + + + + + Action to take if the message is larger than the option. + + + + + Optional entrytype. When not set, or when not convertable to then determined by + + + + + Message length limit to write to the Event Log. + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to return to the first target after any successful write. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Text to be rendered. + + + + + Header. + + + + + Footer. + + + + + File encoding. + + + + + Line ending mode. + + + + + Way file archives are numbered. + + + + + Name of the file to be used for an archive. + + + + + Indicates whether to automatically archive log files every time the specified time passes. + + + + + Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot Create multiple archive files, if they should have the same name. Choose: + + + + + Maximum number of archive files that should be kept. + + + + + Indicates whether to compress archive files into the zip archive format. + + + + + Gets or set a value indicating whether a managed file stream is forced, instead of used the native implementation. + + + + + Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing Gets written when the filename is wrong. + + + + + Name of the file to write to. + + + + + Value specifying the date format to use when archiving files. + + + + + Indicates whether to archive old log file on startup. + + + + + Indicates whether to Create directories if they Do not exist. + + + + + Indicates whether to enable log file(s) to be deleted. + + + + + File attributes (Windows only). + + + + + Indicates whether to delete old log file on startup. + + + + + Indicates whether to replace file contents on each write instead of appending log message at the end. + + + + + Indicates whether concurrent writes to the log file by multiple processes on the same host. + + + + + Delay in milliseconds to wait before attempting to write to the file again. + + + + + Maximum number of log filenames that should be stored as existing. + + + + + Indicates whether concurrent writes to the log file by multiple processes on different network hosts. + + + + + Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). + + + + + Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. + + + + + Log file buffer size in bytes. + + + + + Indicates whether to automatically flush the file buffers after each log message. + + + + + Number of times the write is appended on the file before NLog discards the log message. + + + + + Indicates whether to keep log file open instead of opening and closing it on each logging event. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Condition expression. Log events who meet this condition will be forwarded to the wrapped target. + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Windows Domain name to change context to. + + + + + Required impersonation level. + + + + + Type of the logon provider. + + + + + Logon Type. + + + + + User account password. + + + + + Indicates whether to revert to the credentials of the process instead of impersonating another user. + + + + + Username to change context to. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Endpoint address. + + + + + Name of the endpoint configuration in WCF configuration file. + + + + + Indicates whether to use a WCF service contract that is one way (fire and forGet) or two way (request-reply) + + + + + Client ID. + + + + + Indicates whether to include per-event properties in the payload sent to the server. + + + + + Indicates whether to use binary message encoding. + + + + + + + + + + + + + + Layout that should be use to calculate the value for the parameter. + + + + + Name of the parameter. + + + + + Type of the parameter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Text to be rendered. + + + + + Header. + + + + + Footer. + + + + + Indicates whether to send message as HTML instead of plain text. + + + + + Encoding to be used for sending e-mail. + + + + + Indicates whether to add new lines between log entries. + + + + + CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). + + + + + Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). + + + + + BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). + + + + + Mail message body (repeated for each log message send in one mail). + + + + + Mail subject. + + + + + Sender's email address (e.g. joe@domain.com). + + + + + Indicates whether NewLine characters in the body should be replaced with tags. + + + + + Priority used for sending mails. + + + + + Indicates the SMTP client timeout. + + + + + SMTP Server to be used for sending. + + + + + SMTP Authentication mode. + + + + + Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). + + + + + Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). + + + + + Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server. + + + + + Port number that SMTP Server is listening on. + + + + + Indicates whether the default Settings from System.Net.MailSettings should be used. + + + + + Folder where applications save mail messages to be processed by the local SMTP server. + + + + + Specifies how outgoing email messages will be handled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Encoding to be used when writing text to the queue. + + + + + Indicates whether to use the XML format when serializing message. This will also disable creating queues. + + + + + Indicates whether to check if a queue exists before writing to it. + + + + + Indicates whether to Create the queue if it Doesn't exists. + + + + + Label to associate with each message. + + + + + Name of the queue to write to. + + + + + Indicates whether to use recoverable messages (with guaranteed delivery). + + + + + + + + + + + + + + + + + Name of the target. + + + + + Class name. + + + + + Method name. The method must be public and static. Use the AssemblyQualifiedName , https://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx e.g. + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Encoding to be used. + + + + + Maximum message size in bytes. + + + + + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the will be more connections than . + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Network address. + + + + + Size of the connection cache (number of connections which are kept alive). + + + + + Indicates whether to keep connection open whenever possible. + + + + + Maximum current connections. 0 = no maximum. + + + + + Maximum queue size. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Encoding to be used. + + + + + Instance of that is used to format log messages. + + + + + Maximum message size in bytes. + + + + + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the will be more connections than . + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Indicates whether to keep connection open whenever possible. + + + + + Size of the connection cache (number of connections which are kept alive). + + + + + Maximum current connections. 0 = no maximum. + + + + + Network address. + + + + + Maximum queue size. + + + + + Indicates whether to include source info (file name and line number) in the information sent over the network. + + + + + NDC item separator. + + + + + Indicates whether to include stack contents. + + + + + Indicates whether to include call site (class and method name) in the information sent over the network. + + + + + AppInfo field. By default it's the friendly name of the current AppDomain. + + + + + Indicates whether to include NLog-specific extensions to log4j schema. + + + + + Indicates whether to include dictionary contents. + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Indicates whether to perform layout calculation. + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether performance counter should be automatically Created. + + + + + Name of the performance counter category. + + + + + Counter help text. + + + + + Name of the performance counter. + + + + + Performance counter type. + + + + + The value by which to increment the counter. + + + + + Performance counter instance name. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Default filter to be applied when no specific rule matches. + + + + + + + + + + + + + Condition to be tested. + + + + + Resulting filter to be applied when the condition matches. + + + + + + + + + + + + Name of the target. + + + + + + + + + + + + + + + Name of the target. + + + + + Number of times to repeat each log message. + + + + + + + + + + + + + + + + Name of the target. + + + + + Number of retries that should be attempted on the wrapped target in case of a failure. + + + + + Time to wait between retries in milliseconds. + + + + + + + + + + + + + + Name of the target. + + + + + + + + + + + + + + Name of the target. + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Should we include the BOM (Byte-order-mark) for UTF? Influences the property. This will only work for UTF-8. + + + + + Encoding. + + + + + Web service method name. Only used with Soap. + + + + + Web service namespace. Only used with Soap. + + + + + Protocol to be used when calling web service. + + + + + Web service URL. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Footer layout. + + + + + Header layout. + + + + + Body layout (can be repeated multiple times). + + + + + Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom'). + + + + + Column delimiter. + + + + + Quote Character. + + + + + Quoting mode. + + + + + Indicates whether CVS should include header. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Layout of the column. + + + + + Name of the column. + + + + + + + + + + + + + Option to suppress the extra spaces in the output json + + + + + + + + + + + + + + Determines wether or not this attribute will be Json encoded. + + + + + Layout that will be rendered as the attribute's value. + + + + + Name of the attribute. + + + + + + + + + + + + + + Footer layout. + + + + + Header layout. + + + + + Body layout (can be repeated multiple times). + + + + + + + + + + + + + + + + + + + + + Layout text. + + + + + + + + + + + + + + + Action to be taken when filter matches. + + + + + Condition expression. + + + + + + + + + + + + + + + + + + + + + + + + + + Action to be taken when filter matches. + + + + + Indicates whether to ignore case when comparing strings. + + + + + Layout to be used to filter log messages. + + + + + Substring to be matched. + + + + + + + + + + + + + + + + + Action to be taken when filter matches. + + + + + String to compare the layout to. + + + + + Indicates whether to ignore case when comparing strings. + + + + + Layout to be used to filter log messages. + + + + + + + + + + + + + + + + + Action to be taken when filter matches. + + + + + Indicates whether to ignore case when comparing strings. + + + + + Layout to be used to filter log messages. + + + + + Substring to be matched. + + + + + + + + + + + + + + + + + Action to be taken when filter matches. + + + + + String to compare the layout to. + + + + + Indicates whether to ignore case when comparing strings. + + + + + Layout to be used to filter log messages. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FFXIVClassic Lobby Server/PacketProcessor.cs b/FFXIVClassic Lobby Server/PacketProcessor.cs index db2dcaaf..8ccbbf08 100644 --- a/FFXIVClassic Lobby Server/PacketProcessor.cs +++ b/FFXIVClassic Lobby Server/PacketProcessor.cs @@ -1,43 +1,38 @@ -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Lobby_Server.dataobjects; using FFXIVClassic_Lobby_Server.packets; using FFXIVClassic_Lobby_Server.packets.receive; using FFXIVClassic_Lobby_Server.utils; -using MySql.Data.MySqlClient; using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; -using System.Linq; using System.Security.Cryptography; using System.Text; -using System.Threading; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server { class PacketProcessor { - public void processPacket(ClientConnection client, BasePacket packet) + public void ProcessPacket(ClientConnection client, BasePacket packet) { if ((packet.header.packetSize == 0x288) && (packet.data[0x34] == 'T')) //Test Ticket Data { - packet.debugPrintPacket(); + packet.DebugPrintPacket(); //Crypto handshake ProcessStartSession(client, packet); return; } - BasePacket.decryptPacket(client.blowfish, ref packet); + BasePacket.DecryptPacket(client.blowfish, ref packet); - packet.debugPrintPacket(); + packet.DebugPrintPacket(); - List subPackets = packet.getSubpackets(); + List subPackets = packet.GetSubpackets(); foreach (SubPacket subpacket in subPackets) { - subpacket.debugPrintSubPacket(); + subpacket.DebugPrintSubPacket(); if (subpacket.header.type == 3) { @@ -58,7 +53,7 @@ namespace FFXIVClassic_Lobby_Server case 0x0F: //Mod Retainers default: - Log.debug(String.Format("Unknown command 0x{0:X} received.", subpacket.gameMessage.opcode)); + Program.Log.Debug("Unknown command 0x{0:X} received.", subpacket.gameMessage.opcode); break; } } @@ -72,40 +67,40 @@ namespace FFXIVClassic_Lobby_Server byte[] blowfishKey = GenerateKey(securityHandshake.ticketPhrase, securityHandshake.clientNumber); client.blowfish = new Blowfish(blowfishKey); - Log.info(String.Format("SecCNum: 0x{0:X}", securityHandshake.clientNumber)); + Program.Log.Info("SecCNum: 0x{0:X}", securityHandshake.clientNumber); //Respond with acknowledgment BasePacket outgoingPacket = new BasePacket(HardCoded_Packets.g_secureConnectionAcknowledgment); - BasePacket.encryptPacket(client.blowfish, outgoingPacket); - client.queuePacket(outgoingPacket); + BasePacket.EncryptPacket(client.blowfish, outgoingPacket); + client.QueuePacket(outgoingPacket); } private void ProcessSessionAcknowledgement(ClientConnection client, SubPacket packet) { - packet.debugPrintSubPacket(); + packet.DebugPrintSubPacket(); SessionPacket sessionPacket = new SessionPacket(packet.data); String clientVersion = sessionPacket.version; - Log.info(String.Format("Got acknowledgment for secure session.")); - Log.info(String.Format("CLIENT VERSION: {0}", clientVersion)); + Program.Log.Info("Got acknowledgment for secure session."); + Program.Log.Info("CLIENT VERSION: {0}", clientVersion); - uint userId = Database.getUserIdFromSession(sessionPacket.session); + uint userId = Database.GetUserIdFromSession(sessionPacket.session); client.currentUserId = userId; client.currentSessionToken = sessionPacket.session; ; if (userId == 0) { ErrorPacket errorPacket = new ErrorPacket(sessionPacket.sequence, 0, 0, 13001, "Your session has expired, please login again."); - SubPacket subpacket = errorPacket.buildPacket(); - BasePacket errorBasePacket = BasePacket.createPacket(subpacket, true, false); - BasePacket.encryptPacket(client.blowfish, errorBasePacket); - client.queuePacket(errorBasePacket); + SubPacket subpacket = errorPacket.BuildPacket(); + BasePacket errorBasePacket = BasePacket.CreatePacket(subpacket, true, false); + BasePacket.EncryptPacket(client.blowfish, errorBasePacket); + client.QueuePacket(errorBasePacket); - Log.info(String.Format("Invalid session, kicking...")); + Program.Log.Info("Invalid session, kicking..."); return; } - Log.info(String.Format("USER ID: {0}", userId)); + Program.Log.Info("USER ID: {0}", userId); List accountList = new List(); Account defaultAccount = new Account(); @@ -113,19 +108,19 @@ namespace FFXIVClassic_Lobby_Server defaultAccount.name = "FINAL FANTASY XIV"; accountList.Add(defaultAccount); AccountListPacket listPacket = new AccountListPacket(1, accountList); - BasePacket basePacket = BasePacket.createPacket(listPacket.buildPackets(), true, false); - BasePacket.encryptPacket(client.blowfish, basePacket); - client.queuePacket(basePacket); + BasePacket basePacket = BasePacket.CreatePacket(listPacket.BuildPackets(), true, false); + BasePacket.EncryptPacket(client.blowfish, basePacket); + client.QueuePacket(basePacket); } private void ProcessGetCharacters(ClientConnection client, SubPacket packet) { - Log.info(String.Format("{0} => Get characters", client.currentUserId == 0 ? client.getAddress() : "User " + client.currentUserId)); + Program.Log.Info("{0} => Get characters", client.currentUserId == 0 ? client.GetAddress() : "User " + client.currentUserId); - sendWorldList(client, packet); - sendImportList(client, packet); - sendRetainerList(client, packet); - sendCharacterList(client, packet); + SendWorldList(client, packet); + SendImportList(client, packet); + SendRetainerList(client, packet); + SendCharacterList(client, packet); } @@ -133,29 +128,29 @@ namespace FFXIVClassic_Lobby_Server { SelectCharacterPacket selectCharRequest = new SelectCharacterPacket(packet.data); - Log.info(String.Format("{0} => Select character id {1}", client.currentUserId == 0 ? client.getAddress() : "User " + client.currentUserId, selectCharRequest.characterId)); + Program.Log.Info("{0} => Select character id {1}", client.currentUserId == 0 ? client.GetAddress() : "User " + client.currentUserId, selectCharRequest.characterId); - Character chara = Database.getCharacter(client.currentUserId, selectCharRequest.characterId); + Character chara = Database.GetCharacter(client.currentUserId, selectCharRequest.characterId); World world = null; if (chara != null) - world = Database.getServer(chara.serverId); + world = Database.GetServer(chara.serverId); if (world == null) { - ErrorPacket errorPacket = new ErrorPacket(selectCharRequest.sequence, 0, 0, 13001, "World does not exist or is inactive."); - SubPacket subpacket = errorPacket.buildPacket(); - BasePacket basePacket = BasePacket.createPacket(subpacket, true, false); - BasePacket.encryptPacket(client.blowfish, basePacket); - client.queuePacket(basePacket); + ErrorPacket errorPacket = new ErrorPacket(selectCharRequest.sequence, 0, 0, 13001, "World Does not exist or is inactive."); + SubPacket subpacket = errorPacket.BuildPacket(); + BasePacket basePacket = BasePacket.CreatePacket(subpacket, true, false); + BasePacket.EncryptPacket(client.blowfish, basePacket); + client.QueuePacket(basePacket); return; } SelectCharacterConfirmPacket connectCharacter = new SelectCharacterConfirmPacket(selectCharRequest.sequence, selectCharRequest.characterId, client.currentSessionToken, world.address, world.port, selectCharRequest.ticket); - BasePacket outgoingPacket = BasePacket.createPacket(connectCharacter.buildPackets(), true, false); - BasePacket.encryptPacket(client.blowfish, outgoingPacket); - client.queuePacket(outgoingPacket); + BasePacket outgoingPacket = BasePacket.CreatePacket(connectCharacter.BuildPackets(), true, false); + BasePacket.EncryptPacket(client.blowfish, outgoingPacket); + client.QueuePacket(outgoingPacket); } private void ProcessModifyCharacter(ClientConnection client, SubPacket packet) @@ -171,28 +166,28 @@ namespace FFXIVClassic_Lobby_Server if (worldId == 0) worldId = client.newCharaWorldId; - //Check if this character exists, get world from there + //Check if this character exists, Get world from there if (worldId == 0 && charaReq.characterId != 0) { - Character chara = Database.getCharacter(client.currentUserId, charaReq.characterId); + Character chara = Database.GetCharacter(client.currentUserId, charaReq.characterId); if (chara != null) worldId = chara.serverId; } string worldName = null; - World world = Database.getServer(worldId); + World world = Database.GetServer(worldId); if (world != null) worldName = world.name; if (worldName == null) { - ErrorPacket errorPacket = new ErrorPacket(charaReq.sequence, 0, 0, 13001, "World does not exist or is inactive."); - SubPacket subpacket = errorPacket.buildPacket(); - BasePacket basePacket = BasePacket.createPacket(subpacket, true, false); - BasePacket.encryptPacket(client.blowfish, basePacket); - client.queuePacket(basePacket); + ErrorPacket errorPacket = new ErrorPacket(charaReq.sequence, 0, 0, 13001, "World Does not exist or is inactive."); + SubPacket subpacket = errorPacket.BuildPacket(); + BasePacket basePacket = BasePacket.CreatePacket(subpacket, true, false); + BasePacket.EncryptPacket(client.blowfish, basePacket); + client.QueuePacket(basePacket); - Log.info(String.Format("User {0} => Error; invalid server id: \"{1}\"", client.currentUserId, worldId)); + Program.Log.Info("User {0} => Error; invalid server id: \"{1}\"", client.currentUserId, worldId); return; } @@ -202,17 +197,17 @@ namespace FFXIVClassic_Lobby_Server { case 0x01://Reserve - alreadyTaken = Database.reserveCharacter(client.currentUserId, slot, worldId, name, out pid, out cid); + alreadyTaken = Database.ReserveCharacter(client.currentUserId, slot, worldId, name, out pid, out cid); if (alreadyTaken) { ErrorPacket errorPacket = new ErrorPacket(charaReq.sequence, 1003, 0, 13005, ""); //BDB - Chara Name Used, //1003 - Bad Word - SubPacket subpacket = errorPacket.buildPacket(); - BasePacket basePacket = BasePacket.createPacket(subpacket, true, false); - BasePacket.encryptPacket(client.blowfish, basePacket); - client.queuePacket(basePacket); + SubPacket subpacket = errorPacket.BuildPacket(); + BasePacket basePacket = BasePacket.CreatePacket(subpacket, true, false); + BasePacket.EncryptPacket(client.blowfish, basePacket); + client.QueuePacket(basePacket); - Log.info(String.Format("User {0} => Error; name taken: \"{1}\"", client.currentUserId, charaReq.characterName)); + Program.Log.Info("User {0} => Error; name taken: \"{1}\"", client.currentUserId, charaReq.characterName); return; } else @@ -224,10 +219,10 @@ namespace FFXIVClassic_Lobby_Server client.newCharaName = name; } - Log.info(String.Format("User {0} => Character reserved \"{1}\"", client.currentUserId, name)); + Program.Log.Info("User {0} => Character reserved \"{1}\"", client.currentUserId, name); break; case 0x02://Make - CharaInfo info = CharaInfo.getFromNewCharRequest(charaReq.characterInfoEncoded); + CharaInfo info = CharaInfo.GetFromNewCharRequest(charaReq.characterInfoEncoded); //Set Initial Appearance (items will be loaded in by map server) uint[] classAppearance = CharacterCreatorUtils.GetEquipmentForClass(info.currentClass); @@ -271,96 +266,96 @@ namespace FFXIVClassic_Lobby_Server break; } - Database.makeCharacter(client.currentUserId, client.newCharaCid, info); + Database.MakeCharacter(client.currentUserId, client.newCharaCid, info); pid = 1; cid = client.newCharaCid; name = client.newCharaName; - Log.info(String.Format("User {0} => Character created \"{1}\"", client.currentUserId, name)); + Program.Log.Info("User {0} => Character Created \"{1}\"", client.currentUserId, name); break; case 0x03://Rename - alreadyTaken = Database.renameCharacter(client.currentUserId, charaReq.characterId, worldId, charaReq.characterName); + alreadyTaken = Database.RenameCharacter(client.currentUserId, charaReq.characterId, worldId, charaReq.characterName); if (alreadyTaken) { ErrorPacket errorPacket = new ErrorPacket(charaReq.sequence, 1003, 0, 13005, ""); //BDB - Chara Name Used, //1003 - Bad Word - SubPacket subpacket = errorPacket.buildPacket(); - BasePacket basePacket = BasePacket.createPacket(subpacket, true, false); - BasePacket.encryptPacket(client.blowfish, basePacket); - client.queuePacket(basePacket); + SubPacket subpacket = errorPacket.BuildPacket(); + BasePacket basePacket = BasePacket.CreatePacket(subpacket, true, false); + BasePacket.EncryptPacket(client.blowfish, basePacket); + client.QueuePacket(basePacket); - Log.info(String.Format("User {0} => Error; name taken: \"{1}\"", client.currentUserId, charaReq.characterName)); + Program.Log.Info("User {0} => Error; name taken: \"{1}\"", client.currentUserId, charaReq.characterName); return; } - Log.info(String.Format("User {0} => Character renamed \"{1}\"", client.currentUserId, name)); + Program.Log.Info("User {0} => Character renamed \"{1}\"", client.currentUserId, name); break; case 0x04://Delete - Database.deleteCharacter(charaReq.characterId, charaReq.characterName); + Database.DeleteCharacter(charaReq.characterId, charaReq.characterName); - Log.info(String.Format("User {0} => Character deleted \"{1}\"", client.currentUserId, name)); + Program.Log.Info("User {0} => Character deleted \"{1}\"", client.currentUserId, name); break; case 0x06://Rename Retainer - Log.info(String.Format("User {0} => Retainer renamed \"{1}\"", client.currentUserId, name)); + Program.Log.Info("User {0} => Retainer renamed \"{1}\"", client.currentUserId, name); break; } CharaCreatorPacket charaCreator = new CharaCreatorPacket(charaReq.sequence, charaReq.command, pid, cid, 1, name, worldName); - BasePacket charaCreatorPacket = BasePacket.createPacket(charaCreator.buildPacket(), true, false); - BasePacket.encryptPacket(client.blowfish, charaCreatorPacket); - client.queuePacket(charaCreatorPacket); + BasePacket charaCreatorPacket = BasePacket.CreatePacket(charaCreator.BuildPacket(), true, false); + BasePacket.EncryptPacket(client.blowfish, charaCreatorPacket); + client.QueuePacket(charaCreatorPacket); } - private void sendWorldList(ClientConnection client, SubPacket packet) + private void SendWorldList(ClientConnection client, SubPacket packet) { - List serverList = Database.getServers(); + List serverList = Database.GetServers(); WorldListPacket worldlistPacket = new WorldListPacket(0, serverList); - List subPackets = worldlistPacket.buildPackets(); + List subPackets = worldlistPacket.BuildPackets(); - BasePacket basePacket = BasePacket.createPacket(subPackets, true, false); - BasePacket.encryptPacket(client.blowfish, basePacket); - client.queuePacket(basePacket); + BasePacket basePacket = BasePacket.CreatePacket(subPackets, true, false); + BasePacket.EncryptPacket(client.blowfish, basePacket); + client.QueuePacket(basePacket); } - private void sendImportList(ClientConnection client, SubPacket packet) + private void SendImportList(ClientConnection client, SubPacket packet) { - List names = Database.getReservedNames(client.currentUserId); + List names = Database.GetReservedNames(client.currentUserId); ImportListPacket importListPacket = new ImportListPacket(0, names); - List subPackets = importListPacket.buildPackets(); - BasePacket basePacket = BasePacket.createPacket(subPackets, true, false); - BasePacket.encryptPacket(client.blowfish, basePacket); - client.queuePacket(basePacket); + List subPackets = importListPacket.BuildPackets(); + BasePacket basePacket = BasePacket.CreatePacket(subPackets, true, false); + BasePacket.EncryptPacket(client.blowfish, basePacket); + client.QueuePacket(basePacket); } - private void sendRetainerList(ClientConnection client, SubPacket packet) + private void SendRetainerList(ClientConnection client, SubPacket packet) { - List retainers = Database.getRetainers(client.currentUserId); + List retainers = Database.GetRetainers(client.currentUserId); RetainerListPacket retainerListPacket = new RetainerListPacket(0, retainers); - List subPackets = retainerListPacket.buildPackets(); - BasePacket basePacket = BasePacket.createPacket(subPackets, true, false); - BasePacket.encryptPacket(client.blowfish, basePacket); - client.queuePacket(basePacket); + List subPackets = retainerListPacket.BuildPackets(); + BasePacket basePacket = BasePacket.CreatePacket(subPackets, true, false); + BasePacket.EncryptPacket(client.blowfish, basePacket); + client.QueuePacket(basePacket); } - private void sendCharacterList(ClientConnection client, SubPacket packet) + private void SendCharacterList(ClientConnection client, SubPacket packet) { - List characterList = Database.getCharacters(client.currentUserId); + List characterList = Database.GetCharacters(client.currentUserId); if (characterList.Count > 8) - Log.error("Warning, got more than 8 characters. List truncated, check DB for issues."); + Program.Log.Error("Warning, got more than 8 characters. List truncated, check DB for issues."); CharacterListPacket characterlistPacket = new CharacterListPacket(0, characterList); - List subPackets = characterlistPacket.buildPackets(); - BasePacket basePacket = BasePacket.createPacket(subPackets, true, false); - BasePacket.encryptPacket(client.blowfish, basePacket); - client.queuePacket(basePacket); + List subPackets = characterlistPacket.BuildPackets(); + BasePacket basePacket = BasePacket.CreatePacket(subPackets, true, false); + BasePacket.EncryptPacket(client.blowfish, basePacket); + client.QueuePacket(basePacket); } private byte[] GenerateKey(string ticketPhrase, uint clientNumber) diff --git a/FFXIVClassic Lobby Server/Program.cs b/FFXIVClassic Lobby Server/Program.cs index af827314..df2c4771 100644 --- a/FFXIVClassic Lobby Server/Program.cs +++ b/FFXIVClassic Lobby Server/Program.cs @@ -1,16 +1,15 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; +using System; using System.Diagnostics; using System.Threading; -using FFXIVClassic_Lobby_Server.common; -using System.Runtime.InteropServices; using MySql.Data.MySqlClient; using System.Reflection; - +using FFXIVClassic.Common; +using NLog; namespace FFXIVClassic_Lobby_Server { class Program { + public static Logger Log; static void Main(string[] args) { @@ -21,36 +20,35 @@ namespace FFXIVClassic_Lobby_Server bool startServer = true; - Console.ForegroundColor = ConsoleColor.Yellow; - Console.WriteLine("--------FFXIV 1.0 Lobby Server--------"); - Console.ForegroundColor = ConsoleColor.Gray; + //Load Config + if (!ConfigConstants.Load()) + startServer = false; + + Log = LogManager.GetCurrentClassLogger(); + + Program.Log.Info("--------FFXIV 1.0 Lobby Server--------"); Assembly assem = Assembly.GetExecutingAssembly(); Version vers = assem.GetName().Version; - Console.WriteLine("Version: " + vers.ToString()); - - //Load Config - if (!ConfigConstants.load()) - startServer = false; + Program.Log.Info("Version: " + vers.ToString()); //Test DB Connection - Console.Write("Testing DB connection to \"{0}\"... ", ConfigConstants.DATABASE_HOST); + Program.Log.Info("Testing DB connection to \"{0}\"... ", ConfigConstants.DATABASE_HOST); using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { try { conn.Open(); conn.Close(); - Console.ForegroundColor = ConsoleColor.Green; - Console.WriteLine("[OK]"); - Console.ForegroundColor = ConsoleColor.Gray; + + Program.Log.Info("[OK]"); } catch (MySqlException e) { - Console.ForegroundColor = ConsoleColor.Red; - Console.WriteLine("[FAILED]"); - Console.ForegroundColor = ConsoleColor.Gray; + Program.Log.Error(e.ToString()); + Program.Log.Error("[FAILED]"); + startServer = false; } } @@ -59,12 +57,10 @@ namespace FFXIVClassic_Lobby_Server if (startServer) { Server server = new Server(); - server.startServer(); - - while (true) Thread.Sleep(10000); + server.StartServer(); } - Console.WriteLine("Press any key to continue..."); + Program.Log.Info("Press any key to continue..."); Console.ReadKey(); } diff --git a/FFXIVClassic Lobby Server/Properties/AssemblyInfo.cs b/FFXIVClassic Lobby Server/Properties/AssemblyInfo.cs index ff86b3cf..d5b223c0 100644 --- a/FFXIVClassic Lobby Server/Properties/AssemblyInfo.cs +++ b/FFXIVClassic Lobby Server/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/FFXIVClassic Lobby Server/Server.cs b/FFXIVClassic Lobby Server/Server.cs index 47bfd73d..20b08be8 100644 --- a/FFXIVClassic Lobby Server/Server.cs +++ b/FFXIVClassic Lobby Server/Server.cs @@ -1,13 +1,11 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Net; using System.Net.Sockets; -using System.Threading.Tasks; using System.Threading; -using FFXIVClassic_Lobby_Server.common; using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic.Common; +using NLog; namespace FFXIVClassic_Lobby_Server { @@ -26,9 +24,9 @@ namespace FFXIVClassic_Lobby_Server private Thread cleanupThread; private bool killCleanupThread = false; - private void socketCleanup() + private void SocketCleanup() { - Console.WriteLine("Cleanup thread started; it will run every {0} seconds.", CLEANUP_THREAD_SLEEP_TIME); + Program.Log.Info("Cleanup thread started; it will run every {0} seconds.", CLEANUP_THREAD_SLEEP_TIME); while (!killCleanupThread) { int count = 0; @@ -43,26 +41,26 @@ namespace FFXIVClassic_Lobby_Server } } if (count != 0) - Log.conn(String.Format("{0} connections were cleaned up.", count)); + Program.Log.Info("{0} connections were cleaned up.", count); Thread.Sleep(CLEANUP_THREAD_SLEEP_TIME*1000); } } #region Socket Handling - public bool startServer() + public bool StartServer() { //cleanupThread = new Thread(new ThreadStart(socketCleanup)); //cleanupThread.Name = "LobbyThread:Cleanup"; //cleanupThread.Start(); - IPEndPoint serverEndPoint = new System.Net.IPEndPoint(IPAddress.Parse(ConfigConstants.OPTIONS_BINDIP), FFXIV_LOBBY_PORT); + IPEndPoint serverEndPoint = new System.Net.IPEndPoint(IPAddress.Parse(ConfigConstants.OPTIONS_BINDIP), int.Parse(ConfigConstants.OPTIONS_PORT)); try{ mServerSocket = new System.Net.Sockets.Socket(serverEndPoint.Address.AddressFamily, SocketType.Stream, ProtocolType.Tcp); } catch (Exception e) { - throw new ApplicationException("Could not create socket, check to make sure not duplicating port", e); + throw new ApplicationException("Could not Create socket, check to make sure not duplicating port", e); } try { @@ -75,16 +73,15 @@ namespace FFXIVClassic_Lobby_Server } try { - mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket); + mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket); } catch (Exception e) { throw new ApplicationException("Error occured starting listeners, check inner exception", e); } - Console.Write("Server has started @ "); Console.ForegroundColor = ConsoleColor.White; - Console.WriteLine("{0}:{1}", (mServerSocket.LocalEndPoint as IPEndPoint).Address, (mServerSocket.LocalEndPoint as IPEndPoint).Port); + Program.Log.Debug("Lobby Server has started @ {0}:{1}", (mServerSocket.LocalEndPoint as IPEndPoint).Address, (mServerSocket.LocalEndPoint as IPEndPoint).Port); Console.ForegroundColor = ConsoleColor.Gray; mProcessor = new PacketProcessor(); @@ -92,7 +89,7 @@ namespace FFXIVClassic_Lobby_Server return true; } - private void acceptCallback(IAsyncResult result) + private void AcceptCallback(IAsyncResult result) { ClientConnection conn = null; try @@ -106,10 +103,10 @@ namespace FFXIVClassic_Lobby_Server mConnectionList.Add(conn); } //Queue recieving of data from the connection - conn.socket.BeginReceive(conn.buffer, 0, conn.buffer.Length, SocketFlags.None, new AsyncCallback(receiveCallback), conn); + conn.socket.BeginReceive(conn.buffer, 0, conn.buffer.Length, SocketFlags.None, new AsyncCallback(ReceiveCallback), conn); //Queue the accept of the next incomming connection - mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket); - Log.conn(String.Format("Connection {0}:{1} has connected.", (conn.socket.RemoteEndPoint as IPEndPoint).Address, (conn.socket.RemoteEndPoint as IPEndPoint).Port)); + mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket); + Program.Log.Info("Connection {0}:{1} has connected.", (conn.socket.RemoteEndPoint as IPEndPoint).Address, (conn.socket.RemoteEndPoint as IPEndPoint).Port); } catch (SocketException) { @@ -121,7 +118,7 @@ namespace FFXIVClassic_Lobby_Server mConnectionList.Remove(conn); } } - mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket); + mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket); } catch (Exception) { @@ -133,11 +130,11 @@ namespace FFXIVClassic_Lobby_Server mConnectionList.Remove(conn); } } - mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket); + mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket); } } - private void receiveCallback(IAsyncResult result) + private void ReceiveCallback(IAsyncResult result) { ClientConnection conn = (ClientConnection)result.AsyncState; @@ -154,13 +151,13 @@ namespace FFXIVClassic_Lobby_Server //Build packets until can no longer or out of data while (true) { - BasePacket basePacket = buildPacket(ref offset, conn.buffer, bytesRead); + BasePacket basePacket = BuildPacket(ref offset, conn.buffer, bytesRead); //If can't build packet, break, else process another if (basePacket == null) break; else - mProcessor.processPacket(conn, basePacket); + mProcessor.ProcessPacket(conn, basePacket); } //Not all bytes consumed, transfer leftover to beginning @@ -172,22 +169,22 @@ namespace FFXIVClassic_Lobby_Server conn.lastPartialSize = bytesRead - offset; //Build any queued subpackets into basepackets and send - conn.flushQueuedSendPackets(); + conn.FlushQueuedSendPackets(); if (offset < bytesRead) //Need offset since not all bytes consumed - conn.socket.BeginReceive(conn.buffer, bytesRead - offset, conn.buffer.Length - (bytesRead - offset), SocketFlags.None, new AsyncCallback(receiveCallback), conn); + conn.socket.BeginReceive(conn.buffer, bytesRead - offset, conn.buffer.Length - (bytesRead - offset), SocketFlags.None, new AsyncCallback(ReceiveCallback), conn); else //All bytes consumed, full buffer available - conn.socket.BeginReceive(conn.buffer, 0, conn.buffer.Length, SocketFlags.None, new AsyncCallback(receiveCallback), conn); + conn.socket.BeginReceive(conn.buffer, 0, conn.buffer.Length, SocketFlags.None, new AsyncCallback(ReceiveCallback), conn); } else { - Log.conn(String.Format("{0} has disconnected.", conn.currentUserId == 0 ? conn.getAddress() : "User " + conn.currentUserId)); + Program.Log.Info("{0} has disconnected.", conn.currentUserId == 0 ? conn.GetAddress() : "User " + conn.currentUserId); lock (mConnectionList) { - conn.disconnect(); + conn.Disconnect(); mConnectionList.Remove(conn); } } @@ -196,7 +193,7 @@ namespace FFXIVClassic_Lobby_Server { if (conn.socket != null) { - Log.conn(String.Format("{0} has disconnected.", conn.currentUserId == 0 ? conn.getAddress() : "User " + conn.currentUserId)); + Program.Log.Info("{0} has disconnected.", conn.currentUserId == 0 ? conn.GetAddress() : "User " + conn.currentUserId); lock (mConnectionList) { @@ -212,7 +209,7 @@ namespace FFXIVClassic_Lobby_Server /// Current offset in buffer. /// Incoming buffer. /// Returns either a BasePacket or null if not enough data. - public BasePacket buildPacket(ref int offset, byte[] buffer, int bytesRead) + public BasePacket BuildPacket(ref int offset, byte[] buffer, int bytesRead) { BasePacket newPacket = null; diff --git a/FFXIVClassic Lobby Server/common/Blowfish.cs b/FFXIVClassic Lobby Server/common/Blowfish.cs deleted file mode 100644 index 92305b58..00000000 --- a/FFXIVClassic Lobby Server/common/Blowfish.cs +++ /dev/null @@ -1,460 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Lobby_Server.common -{ - public class Blowfish - { - const int N = 16; - UInt32 [] P = new uint[16 + 2]; - UInt32 [,] S = new UInt32[4,256]; - - #region P and S Values - - byte [] P_values = - { - 0x88, 0x6A, 0x3F, 0x24, 0xD3, 0x08, 0xA3, 0x85, 0x2E, 0x8A, 0x19, 0x13, 0x44, 0x73, 0x70, 0x03, - 0x22, 0x38, 0x09, 0xA4, 0xD0, 0x31, 0x9F, 0x29, 0x98, 0xFA, 0x2E, 0x08, 0x89, 0x6C, 0x4E, 0xEC, - 0xE6, 0x21, 0x28, 0x45, 0x77, 0x13, 0xD0, 0x38, 0xCF, 0x66, 0x54, 0xBE, 0x6C, 0x0C, 0xE9, 0x34, - 0xB7, 0x29, 0xAC, 0xC0, 0xDD, 0x50, 0x7C, 0xC9, 0xB5, 0xD5, 0x84, 0x3F, 0x17, 0x09, 0x47, 0xB5, - 0xD9, 0xD5, 0x16, 0x92, 0x1B, 0xFB, 0x79, 0x89 - }; - - byte [] S_values = - { - 0xA6, 0x0B, 0x31, 0xD1, 0xAC, 0xB5, 0xDF, 0x98, 0xDB, 0x72, 0xFD, 0x2F, 0xB7, 0xDF, 0x1A, 0xD0, - 0xED, 0xAF, 0xE1, 0xB8, 0x96, 0x7E, 0x26, 0x6A, 0x45, 0x90, 0x7C, 0xBA, 0x99, 0x7F, 0x2C, 0xF1, - 0x47, 0x99, 0xA1, 0x24, 0xF7, 0x6C, 0x91, 0xB3, 0xE2, 0xF2, 0x01, 0x08, 0x16, 0xFC, 0x8E, 0x85, - 0xD8, 0x20, 0x69, 0x63, 0x69, 0x4E, 0x57, 0x71, 0xA3, 0xFE, 0x58, 0xA4, 0x7E, 0x3D, 0x93, 0xF4, - 0x8F, 0x74, 0x95, 0x0D, 0x58, 0xB6, 0x8E, 0x72, 0x58, 0xCD, 0x8B, 0x71, 0xEE, 0x4A, 0x15, 0x82, - 0x1D, 0xA4, 0x54, 0x7B, 0xB5, 0x59, 0x5A, 0xC2, 0x39, 0xD5, 0x30, 0x9C, 0x13, 0x60, 0xF2, 0x2A, - 0x23, 0xB0, 0xD1, 0xC5, 0xF0, 0x85, 0x60, 0x28, 0x18, 0x79, 0x41, 0xCA, 0xEF, 0x38, 0xDB, 0xB8, - 0xB0, 0xDC, 0x79, 0x8E, 0x0E, 0x18, 0x3A, 0x60, 0x8B, 0x0E, 0x9E, 0x6C, 0x3E, 0x8A, 0x1E, 0xB0, - 0xC1, 0x77, 0x15, 0xD7, 0x27, 0x4B, 0x31, 0xBD, 0xDA, 0x2F, 0xAF, 0x78, 0x60, 0x5C, 0x60, 0x55, - 0xF3, 0x25, 0x55, 0xE6, 0x94, 0xAB, 0x55, 0xAA, 0x62, 0x98, 0x48, 0x57, 0x40, 0x14, 0xE8, 0x63, - 0x6A, 0x39, 0xCA, 0x55, 0xB6, 0x10, 0xAB, 0x2A, 0x34, 0x5C, 0xCC, 0xB4, 0xCE, 0xE8, 0x41, 0x11, - 0xAF, 0x86, 0x54, 0xA1, 0x93, 0xE9, 0x72, 0x7C, 0x11, 0x14, 0xEE, 0xB3, 0x2A, 0xBC, 0x6F, 0x63, - 0x5D, 0xC5, 0xA9, 0x2B, 0xF6, 0x31, 0x18, 0x74, 0x16, 0x3E, 0x5C, 0xCE, 0x1E, 0x93, 0x87, 0x9B, - 0x33, 0xBA, 0xD6, 0xAF, 0x5C, 0xCF, 0x24, 0x6C, 0x81, 0x53, 0x32, 0x7A, 0x77, 0x86, 0x95, 0x28, - 0x98, 0x48, 0x8F, 0x3B, 0xAF, 0xB9, 0x4B, 0x6B, 0x1B, 0xE8, 0xBF, 0xC4, 0x93, 0x21, 0x28, 0x66, - 0xCC, 0x09, 0xD8, 0x61, 0x91, 0xA9, 0x21, 0xFB, 0x60, 0xAC, 0x7C, 0x48, 0x32, 0x80, 0xEC, 0x5D, - 0x5D, 0x5D, 0x84, 0xEF, 0xB1, 0x75, 0x85, 0xE9, 0x02, 0x23, 0x26, 0xDC, 0x88, 0x1B, 0x65, 0xEB, - 0x81, 0x3E, 0x89, 0x23, 0xC5, 0xAC, 0x96, 0xD3, 0xF3, 0x6F, 0x6D, 0x0F, 0x39, 0x42, 0xF4, 0x83, - 0x82, 0x44, 0x0B, 0x2E, 0x04, 0x20, 0x84, 0xA4, 0x4A, 0xF0, 0xC8, 0x69, 0x5E, 0x9B, 0x1F, 0x9E, - 0x42, 0x68, 0xC6, 0x21, 0x9A, 0x6C, 0xE9, 0xF6, 0x61, 0x9C, 0x0C, 0x67, 0xF0, 0x88, 0xD3, 0xAB, - 0xD2, 0xA0, 0x51, 0x6A, 0x68, 0x2F, 0x54, 0xD8, 0x28, 0xA7, 0x0F, 0x96, 0xA3, 0x33, 0x51, 0xAB, - 0x6C, 0x0B, 0xEF, 0x6E, 0xE4, 0x3B, 0x7A, 0x13, 0x50, 0xF0, 0x3B, 0xBA, 0x98, 0x2A, 0xFB, 0x7E, - 0x1D, 0x65, 0xF1, 0xA1, 0x76, 0x01, 0xAF, 0x39, 0x3E, 0x59, 0xCA, 0x66, 0x88, 0x0E, 0x43, 0x82, - 0x19, 0x86, 0xEE, 0x8C, 0xB4, 0x9F, 0x6F, 0x45, 0xC3, 0xA5, 0x84, 0x7D, 0xBE, 0x5E, 0x8B, 0x3B, - 0xD8, 0x75, 0x6F, 0xE0, 0x73, 0x20, 0xC1, 0x85, 0x9F, 0x44, 0x1A, 0x40, 0xA6, 0x6A, 0xC1, 0x56, - 0x62, 0xAA, 0xD3, 0x4E, 0x06, 0x77, 0x3F, 0x36, 0x72, 0xDF, 0xFE, 0x1B, 0x3D, 0x02, 0x9B, 0x42, - 0x24, 0xD7, 0xD0, 0x37, 0x48, 0x12, 0x0A, 0xD0, 0xD3, 0xEA, 0x0F, 0xDB, 0x9B, 0xC0, 0xF1, 0x49, - 0xC9, 0x72, 0x53, 0x07, 0x7B, 0x1B, 0x99, 0x80, 0xD8, 0x79, 0xD4, 0x25, 0xF7, 0xDE, 0xE8, 0xF6, - 0x1A, 0x50, 0xFE, 0xE3, 0x3B, 0x4C, 0x79, 0xB6, 0xBD, 0xE0, 0x6C, 0x97, 0xBA, 0x06, 0xC0, 0x04, - 0xB6, 0x4F, 0xA9, 0xC1, 0xC4, 0x60, 0x9F, 0x40, 0xC2, 0x9E, 0x5C, 0x5E, 0x63, 0x24, 0x6A, 0x19, - 0xAF, 0x6F, 0xFB, 0x68, 0xB5, 0x53, 0x6C, 0x3E, 0xEB, 0xB2, 0x39, 0x13, 0x6F, 0xEC, 0x52, 0x3B, - 0x1F, 0x51, 0xFC, 0x6D, 0x2C, 0x95, 0x30, 0x9B, 0x44, 0x45, 0x81, 0xCC, 0x09, 0xBD, 0x5E, 0xAF, - 0x04, 0xD0, 0xE3, 0xBE, 0xFD, 0x4A, 0x33, 0xDE, 0x07, 0x28, 0x0F, 0x66, 0xB3, 0x4B, 0x2E, 0x19, - 0x57, 0xA8, 0xCB, 0xC0, 0x0F, 0x74, 0xC8, 0x45, 0x39, 0x5F, 0x0B, 0xD2, 0xDB, 0xFB, 0xD3, 0xB9, - 0xBD, 0xC0, 0x79, 0x55, 0x0A, 0x32, 0x60, 0x1A, 0xC6, 0x00, 0xA1, 0xD6, 0x79, 0x72, 0x2C, 0x40, - 0xFE, 0x25, 0x9F, 0x67, 0xCC, 0xA3, 0x1F, 0xFB, 0xF8, 0xE9, 0xA5, 0x8E, 0xF8, 0x22, 0x32, 0xDB, - 0xDF, 0x16, 0x75, 0x3C, 0x15, 0x6B, 0x61, 0xFD, 0xC8, 0x1E, 0x50, 0x2F, 0xAB, 0x52, 0x05, 0xAD, - 0xFA, 0xB5, 0x3D, 0x32, 0x60, 0x87, 0x23, 0xFD, 0x48, 0x7B, 0x31, 0x53, 0x82, 0xDF, 0x00, 0x3E, - 0xBB, 0x57, 0x5C, 0x9E, 0xA0, 0x8C, 0x6F, 0xCA, 0x2E, 0x56, 0x87, 0x1A, 0xDB, 0x69, 0x17, 0xDF, - 0xF6, 0xA8, 0x42, 0xD5, 0xC3, 0xFF, 0x7E, 0x28, 0xC6, 0x32, 0x67, 0xAC, 0x73, 0x55, 0x4F, 0x8C, - 0xB0, 0x27, 0x5B, 0x69, 0xC8, 0x58, 0xCA, 0xBB, 0x5D, 0xA3, 0xFF, 0xE1, 0xA0, 0x11, 0xF0, 0xB8, - 0x98, 0x3D, 0xFA, 0x10, 0xB8, 0x83, 0x21, 0xFD, 0x6C, 0xB5, 0xFC, 0x4A, 0x5B, 0xD3, 0xD1, 0x2D, - 0x79, 0xE4, 0x53, 0x9A, 0x65, 0x45, 0xF8, 0xB6, 0xBC, 0x49, 0x8E, 0xD2, 0x90, 0x97, 0xFB, 0x4B, - 0xDA, 0xF2, 0xDD, 0xE1, 0x33, 0x7E, 0xCB, 0xA4, 0x41, 0x13, 0xFB, 0x62, 0xE8, 0xC6, 0xE4, 0xCE, - 0xDA, 0xCA, 0x20, 0xEF, 0x01, 0x4C, 0x77, 0x36, 0xFE, 0x9E, 0x7E, 0xD0, 0xB4, 0x1F, 0xF1, 0x2B, - 0x4D, 0xDA, 0xDB, 0x95, 0x98, 0x91, 0x90, 0xAE, 0x71, 0x8E, 0xAD, 0xEA, 0xA0, 0xD5, 0x93, 0x6B, - 0xD0, 0xD1, 0x8E, 0xD0, 0xE0, 0x25, 0xC7, 0xAF, 0x2F, 0x5B, 0x3C, 0x8E, 0xB7, 0x94, 0x75, 0x8E, - 0xFB, 0xE2, 0xF6, 0x8F, 0x64, 0x2B, 0x12, 0xF2, 0x12, 0xB8, 0x88, 0x88, 0x1C, 0xF0, 0x0D, 0x90, - 0xA0, 0x5E, 0xAD, 0x4F, 0x1C, 0xC3, 0x8F, 0x68, 0x91, 0xF1, 0xCF, 0xD1, 0xAD, 0xC1, 0xA8, 0xB3, - 0x18, 0x22, 0x2F, 0x2F, 0x77, 0x17, 0x0E, 0xBE, 0xFE, 0x2D, 0x75, 0xEA, 0xA1, 0x1F, 0x02, 0x8B, - 0x0F, 0xCC, 0xA0, 0xE5, 0xE8, 0x74, 0x6F, 0xB5, 0xD6, 0xF3, 0xAC, 0x18, 0x99, 0xE2, 0x89, 0xCE, - 0xE0, 0x4F, 0xA8, 0xB4, 0xB7, 0xE0, 0x13, 0xFD, 0x81, 0x3B, 0xC4, 0x7C, 0xD9, 0xA8, 0xAD, 0xD2, - 0x66, 0xA2, 0x5F, 0x16, 0x05, 0x77, 0x95, 0x80, 0x14, 0x73, 0xCC, 0x93, 0x77, 0x14, 0x1A, 0x21, - 0x65, 0x20, 0xAD, 0xE6, 0x86, 0xFA, 0xB5, 0x77, 0xF5, 0x42, 0x54, 0xC7, 0xCF, 0x35, 0x9D, 0xFB, - 0x0C, 0xAF, 0xCD, 0xEB, 0xA0, 0x89, 0x3E, 0x7B, 0xD3, 0x1B, 0x41, 0xD6, 0x49, 0x7E, 0x1E, 0xAE, - 0x2D, 0x0E, 0x25, 0x00, 0x5E, 0xB3, 0x71, 0x20, 0xBB, 0x00, 0x68, 0x22, 0xAF, 0xE0, 0xB8, 0x57, - 0x9B, 0x36, 0x64, 0x24, 0x1E, 0xB9, 0x09, 0xF0, 0x1D, 0x91, 0x63, 0x55, 0xAA, 0xA6, 0xDF, 0x59, - 0x89, 0x43, 0xC1, 0x78, 0x7F, 0x53, 0x5A, 0xD9, 0xA2, 0x5B, 0x7D, 0x20, 0xC5, 0xB9, 0xE5, 0x02, - 0x76, 0x03, 0x26, 0x83, 0xA9, 0xCF, 0x95, 0x62, 0x68, 0x19, 0xC8, 0x11, 0x41, 0x4A, 0x73, 0x4E, - 0xCA, 0x2D, 0x47, 0xB3, 0x4A, 0xA9, 0x14, 0x7B, 0x52, 0x00, 0x51, 0x1B, 0x15, 0x29, 0x53, 0x9A, - 0x3F, 0x57, 0x0F, 0xD6, 0xE4, 0xC6, 0x9B, 0xBC, 0x76, 0xA4, 0x60, 0x2B, 0x00, 0x74, 0xE6, 0x81, - 0xB5, 0x6F, 0xBA, 0x08, 0x1F, 0xE9, 0x1B, 0x57, 0x6B, 0xEC, 0x96, 0xF2, 0x15, 0xD9, 0x0D, 0x2A, - 0x21, 0x65, 0x63, 0xB6, 0xB6, 0xF9, 0xB9, 0xE7, 0x2E, 0x05, 0x34, 0xFF, 0x64, 0x56, 0x85, 0xC5, - 0x5D, 0x2D, 0xB0, 0x53, 0xA1, 0x8F, 0x9F, 0xA9, 0x99, 0x47, 0xBA, 0x08, 0x6A, 0x07, 0x85, 0x6E, - 0xE9, 0x70, 0x7A, 0x4B, 0x44, 0x29, 0xB3, 0xB5, 0x2E, 0x09, 0x75, 0xDB, 0x23, 0x26, 0x19, 0xC4, - 0xB0, 0xA6, 0x6E, 0xAD, 0x7D, 0xDF, 0xA7, 0x49, 0xB8, 0x60, 0xEE, 0x9C, 0x66, 0xB2, 0xED, 0x8F, - 0x71, 0x8C, 0xAA, 0xEC, 0xFF, 0x17, 0x9A, 0x69, 0x6C, 0x52, 0x64, 0x56, 0xE1, 0x9E, 0xB1, 0xC2, - 0xA5, 0x02, 0x36, 0x19, 0x29, 0x4C, 0x09, 0x75, 0x40, 0x13, 0x59, 0xA0, 0x3E, 0x3A, 0x18, 0xE4, - 0x9A, 0x98, 0x54, 0x3F, 0x65, 0x9D, 0x42, 0x5B, 0xD6, 0xE4, 0x8F, 0x6B, 0xD6, 0x3F, 0xF7, 0x99, - 0x07, 0x9C, 0xD2, 0xA1, 0xF5, 0x30, 0xE8, 0xEF, 0xE6, 0x38, 0x2D, 0x4D, 0xC1, 0x5D, 0x25, 0xF0, - 0x86, 0x20, 0xDD, 0x4C, 0x26, 0xEB, 0x70, 0x84, 0xC6, 0xE9, 0x82, 0x63, 0x5E, 0xCC, 0x1E, 0x02, - 0x3F, 0x6B, 0x68, 0x09, 0xC9, 0xEF, 0xBA, 0x3E, 0x14, 0x18, 0x97, 0x3C, 0xA1, 0x70, 0x6A, 0x6B, - 0x84, 0x35, 0x7F, 0x68, 0x86, 0xE2, 0xA0, 0x52, 0x05, 0x53, 0x9C, 0xB7, 0x37, 0x07, 0x50, 0xAA, - 0x1C, 0x84, 0x07, 0x3E, 0x5C, 0xAE, 0xDE, 0x7F, 0xEC, 0x44, 0x7D, 0x8E, 0xB8, 0xF2, 0x16, 0x57, - 0x37, 0xDA, 0x3A, 0xB0, 0x0D, 0x0C, 0x50, 0xF0, 0x04, 0x1F, 0x1C, 0xF0, 0xFF, 0xB3, 0x00, 0x02, - 0x1A, 0xF5, 0x0C, 0xAE, 0xB2, 0x74, 0xB5, 0x3C, 0x58, 0x7A, 0x83, 0x25, 0xBD, 0x21, 0x09, 0xDC, - 0xF9, 0x13, 0x91, 0xD1, 0xF6, 0x2F, 0xA9, 0x7C, 0x73, 0x47, 0x32, 0x94, 0x01, 0x47, 0xF5, 0x22, - 0x81, 0xE5, 0xE5, 0x3A, 0xDC, 0xDA, 0xC2, 0x37, 0x34, 0x76, 0xB5, 0xC8, 0xA7, 0xDD, 0xF3, 0x9A, - 0x46, 0x61, 0x44, 0xA9, 0x0E, 0x03, 0xD0, 0x0F, 0x3E, 0xC7, 0xC8, 0xEC, 0x41, 0x1E, 0x75, 0xA4, - 0x99, 0xCD, 0x38, 0xE2, 0x2F, 0x0E, 0xEA, 0x3B, 0xA1, 0xBB, 0x80, 0x32, 0x31, 0xB3, 0x3E, 0x18, - 0x38, 0x8B, 0x54, 0x4E, 0x08, 0xB9, 0x6D, 0x4F, 0x03, 0x0D, 0x42, 0x6F, 0xBF, 0x04, 0x0A, 0xF6, - 0x90, 0x12, 0xB8, 0x2C, 0x79, 0x7C, 0x97, 0x24, 0x72, 0xB0, 0x79, 0x56, 0xAF, 0x89, 0xAF, 0xBC, - 0x1F, 0x77, 0x9A, 0xDE, 0x10, 0x08, 0x93, 0xD9, 0x12, 0xAE, 0x8B, 0xB3, 0x2E, 0x3F, 0xCF, 0xDC, - 0x1F, 0x72, 0x12, 0x55, 0x24, 0x71, 0x6B, 0x2E, 0xE6, 0xDD, 0x1A, 0x50, 0x87, 0xCD, 0x84, 0x9F, - 0x18, 0x47, 0x58, 0x7A, 0x17, 0xDA, 0x08, 0x74, 0xBC, 0x9A, 0x9F, 0xBC, 0x8C, 0x7D, 0x4B, 0xE9, - 0x3A, 0xEC, 0x7A, 0xEC, 0xFA, 0x1D, 0x85, 0xDB, 0x66, 0x43, 0x09, 0x63, 0xD2, 0xC3, 0x64, 0xC4, - 0x47, 0x18, 0x1C, 0xEF, 0x08, 0xD9, 0x15, 0x32, 0x37, 0x3B, 0x43, 0xDD, 0x16, 0xBA, 0xC2, 0x24, - 0x43, 0x4D, 0xA1, 0x12, 0x51, 0xC4, 0x65, 0x2A, 0x02, 0x00, 0x94, 0x50, 0xDD, 0xE4, 0x3A, 0x13, - 0x9E, 0xF8, 0xDF, 0x71, 0x55, 0x4E, 0x31, 0x10, 0xD6, 0x77, 0xAC, 0x81, 0x9B, 0x19, 0x11, 0x5F, - 0xF1, 0x56, 0x35, 0x04, 0x6B, 0xC7, 0xA3, 0xD7, 0x3B, 0x18, 0x11, 0x3C, 0x09, 0xA5, 0x24, 0x59, - 0xED, 0xE6, 0x8F, 0xF2, 0xFA, 0xFB, 0xF1, 0x97, 0x2C, 0xBF, 0xBA, 0x9E, 0x6E, 0x3C, 0x15, 0x1E, - 0x70, 0x45, 0xE3, 0x86, 0xB1, 0x6F, 0xE9, 0xEA, 0x0A, 0x5E, 0x0E, 0x86, 0xB3, 0x2A, 0x3E, 0x5A, - 0x1C, 0xE7, 0x1F, 0x77, 0xFA, 0x06, 0x3D, 0x4E, 0xB9, 0xDC, 0x65, 0x29, 0x0F, 0x1D, 0xE7, 0x99, - 0xD6, 0x89, 0x3E, 0x80, 0x25, 0xC8, 0x66, 0x52, 0x78, 0xC9, 0x4C, 0x2E, 0x6A, 0xB3, 0x10, 0x9C, - 0xBA, 0x0E, 0x15, 0xC6, 0x78, 0xEA, 0xE2, 0x94, 0x53, 0x3C, 0xFC, 0xA5, 0xF4, 0x2D, 0x0A, 0x1E, - 0xA7, 0x4E, 0xF7, 0xF2, 0x3D, 0x2B, 0x1D, 0x36, 0x0F, 0x26, 0x39, 0x19, 0x60, 0x79, 0xC2, 0x19, - 0x08, 0xA7, 0x23, 0x52, 0xB6, 0x12, 0x13, 0xF7, 0x6E, 0xFE, 0xAD, 0xEB, 0x66, 0x1F, 0xC3, 0xEA, - 0x95, 0x45, 0xBC, 0xE3, 0x83, 0xC8, 0x7B, 0xA6, 0xD1, 0x37, 0x7F, 0xB1, 0x28, 0xFF, 0x8C, 0x01, - 0xEF, 0xDD, 0x32, 0xC3, 0xA5, 0x5A, 0x6C, 0xBE, 0x85, 0x21, 0x58, 0x65, 0x02, 0x98, 0xAB, 0x68, - 0x0F, 0xA5, 0xCE, 0xEE, 0x3B, 0x95, 0x2F, 0xDB, 0xAD, 0x7D, 0xEF, 0x2A, 0x84, 0x2F, 0x6E, 0x5B, - 0x28, 0xB6, 0x21, 0x15, 0x70, 0x61, 0x07, 0x29, 0x75, 0x47, 0xDD, 0xEC, 0x10, 0x15, 0x9F, 0x61, - 0x30, 0xA8, 0xCC, 0x13, 0x96, 0xBD, 0x61, 0xEB, 0x1E, 0xFE, 0x34, 0x03, 0xCF, 0x63, 0x03, 0xAA, - 0x90, 0x5C, 0x73, 0xB5, 0x39, 0xA2, 0x70, 0x4C, 0x0B, 0x9E, 0x9E, 0xD5, 0x14, 0xDE, 0xAA, 0xCB, - 0xBC, 0x86, 0xCC, 0xEE, 0xA7, 0x2C, 0x62, 0x60, 0xAB, 0x5C, 0xAB, 0x9C, 0x6E, 0x84, 0xF3, 0xB2, - 0xAF, 0x1E, 0x8B, 0x64, 0xCA, 0xF0, 0xBD, 0x19, 0xB9, 0x69, 0x23, 0xA0, 0x50, 0xBB, 0x5A, 0x65, - 0x32, 0x5A, 0x68, 0x40, 0xB3, 0xB4, 0x2A, 0x3C, 0xD5, 0xE9, 0x9E, 0x31, 0xF7, 0xB8, 0x21, 0xC0, - 0x19, 0x0B, 0x54, 0x9B, 0x99, 0xA0, 0x5F, 0x87, 0x7E, 0x99, 0xF7, 0x95, 0xA8, 0x7D, 0x3D, 0x62, - 0x9A, 0x88, 0x37, 0xF8, 0x77, 0x2D, 0xE3, 0x97, 0x5F, 0x93, 0xED, 0x11, 0x81, 0x12, 0x68, 0x16, - 0x29, 0x88, 0x35, 0x0E, 0xD6, 0x1F, 0xE6, 0xC7, 0xA1, 0xDF, 0xDE, 0x96, 0x99, 0xBA, 0x58, 0x78, - 0xA5, 0x84, 0xF5, 0x57, 0x63, 0x72, 0x22, 0x1B, 0xFF, 0xC3, 0x83, 0x9B, 0x96, 0x46, 0xC2, 0x1A, - 0xEB, 0x0A, 0xB3, 0xCD, 0x54, 0x30, 0x2E, 0x53, 0xE4, 0x48, 0xD9, 0x8F, 0x28, 0x31, 0xBC, 0x6D, - 0xEF, 0xF2, 0xEB, 0x58, 0xEA, 0xFF, 0xC6, 0x34, 0x61, 0xED, 0x28, 0xFE, 0x73, 0x3C, 0x7C, 0xEE, - 0xD9, 0x14, 0x4A, 0x5D, 0xE3, 0xB7, 0x64, 0xE8, 0x14, 0x5D, 0x10, 0x42, 0xE0, 0x13, 0x3E, 0x20, - 0xB6, 0xE2, 0xEE, 0x45, 0xEA, 0xAB, 0xAA, 0xA3, 0x15, 0x4F, 0x6C, 0xDB, 0xD0, 0x4F, 0xCB, 0xFA, - 0x42, 0xF4, 0x42, 0xC7, 0xB5, 0xBB, 0x6A, 0xEF, 0x1D, 0x3B, 0x4F, 0x65, 0x05, 0x21, 0xCD, 0x41, - 0x9E, 0x79, 0x1E, 0xD8, 0xC7, 0x4D, 0x85, 0x86, 0x6A, 0x47, 0x4B, 0xE4, 0x50, 0x62, 0x81, 0x3D, - 0xF2, 0xA1, 0x62, 0xCF, 0x46, 0x26, 0x8D, 0x5B, 0xA0, 0x83, 0x88, 0xFC, 0xA3, 0xB6, 0xC7, 0xC1, - 0xC3, 0x24, 0x15, 0x7F, 0x92, 0x74, 0xCB, 0x69, 0x0B, 0x8A, 0x84, 0x47, 0x85, 0xB2, 0x92, 0x56, - 0x00, 0xBF, 0x5B, 0x09, 0x9D, 0x48, 0x19, 0xAD, 0x74, 0xB1, 0x62, 0x14, 0x00, 0x0E, 0x82, 0x23, - 0x2A, 0x8D, 0x42, 0x58, 0xEA, 0xF5, 0x55, 0x0C, 0x3E, 0xF4, 0xAD, 0x1D, 0x61, 0x70, 0x3F, 0x23, - 0x92, 0xF0, 0x72, 0x33, 0x41, 0x7E, 0x93, 0x8D, 0xF1, 0xEC, 0x5F, 0xD6, 0xDB, 0x3B, 0x22, 0x6C, - 0x59, 0x37, 0xDE, 0x7C, 0x60, 0x74, 0xEE, 0xCB, 0xA7, 0xF2, 0x85, 0x40, 0x6E, 0x32, 0x77, 0xCE, - 0x84, 0x80, 0x07, 0xA6, 0x9E, 0x50, 0xF8, 0x19, 0x55, 0xD8, 0xEF, 0xE8, 0x35, 0x97, 0xD9, 0x61, - 0xAA, 0xA7, 0x69, 0xA9, 0xC2, 0x06, 0x0C, 0xC5, 0xFC, 0xAB, 0x04, 0x5A, 0xDC, 0xCA, 0x0B, 0x80, - 0x2E, 0x7A, 0x44, 0x9E, 0x84, 0x34, 0x45, 0xC3, 0x05, 0x67, 0xD5, 0xFD, 0xC9, 0x9E, 0x1E, 0x0E, - 0xD3, 0xDB, 0x73, 0xDB, 0xCD, 0x88, 0x55, 0x10, 0x79, 0xDA, 0x5F, 0x67, 0x40, 0x43, 0x67, 0xE3, - 0x65, 0x34, 0xC4, 0xC5, 0xD8, 0x38, 0x3E, 0x71, 0x9E, 0xF8, 0x28, 0x3D, 0x20, 0xFF, 0x6D, 0xF1, - 0xE7, 0x21, 0x3E, 0x15, 0x4A, 0x3D, 0xB0, 0x8F, 0x2B, 0x9F, 0xE3, 0xE6, 0xF7, 0xAD, 0x83, 0xDB, - 0x68, 0x5A, 0x3D, 0xE9, 0xF7, 0x40, 0x81, 0x94, 0x1C, 0x26, 0x4C, 0xF6, 0x34, 0x29, 0x69, 0x94, - 0xF7, 0x20, 0x15, 0x41, 0xF7, 0xD4, 0x02, 0x76, 0x2E, 0x6B, 0xF4, 0xBC, 0x68, 0x00, 0xA2, 0xD4, - 0x71, 0x24, 0x08, 0xD4, 0x6A, 0xF4, 0x20, 0x33, 0xB7, 0xD4, 0xB7, 0x43, 0xAF, 0x61, 0x00, 0x50, - 0x2E, 0xF6, 0x39, 0x1E, 0x46, 0x45, 0x24, 0x97, 0x74, 0x4F, 0x21, 0x14, 0x40, 0x88, 0x8B, 0xBF, - 0x1D, 0xFC, 0x95, 0x4D, 0xAF, 0x91, 0xB5, 0x96, 0xD3, 0xDD, 0xF4, 0x70, 0x45, 0x2F, 0xA0, 0x66, - 0xEC, 0x09, 0xBC, 0xBF, 0x85, 0x97, 0xBD, 0x03, 0xD0, 0x6D, 0xAC, 0x7F, 0x04, 0x85, 0xCB, 0x31, - 0xB3, 0x27, 0xEB, 0x96, 0x41, 0x39, 0xFD, 0x55, 0xE6, 0x47, 0x25, 0xDA, 0x9A, 0x0A, 0xCA, 0xAB, - 0x25, 0x78, 0x50, 0x28, 0xF4, 0x29, 0x04, 0x53, 0xDA, 0x86, 0x2C, 0x0A, 0xFB, 0x6D, 0xB6, 0xE9, - 0x62, 0x14, 0xDC, 0x68, 0x00, 0x69, 0x48, 0xD7, 0xA4, 0xC0, 0x0E, 0x68, 0xEE, 0x8D, 0xA1, 0x27, - 0xA2, 0xFE, 0x3F, 0x4F, 0x8C, 0xAD, 0x87, 0xE8, 0x06, 0xE0, 0x8C, 0xB5, 0xB6, 0xD6, 0xF4, 0x7A, - 0x7C, 0x1E, 0xCE, 0xAA, 0xEC, 0x5F, 0x37, 0xD3, 0x99, 0xA3, 0x78, 0xCE, 0x42, 0x2A, 0x6B, 0x40, - 0x35, 0x9E, 0xFE, 0x20, 0xB9, 0x85, 0xF3, 0xD9, 0xAB, 0xD7, 0x39, 0xEE, 0x8B, 0x4E, 0x12, 0x3B, - 0xF7, 0xFA, 0xC9, 0x1D, 0x56, 0x18, 0x6D, 0x4B, 0x31, 0x66, 0xA3, 0x26, 0xB2, 0x97, 0xE3, 0xEA, - 0x74, 0xFA, 0x6E, 0x3A, 0x32, 0x43, 0x5B, 0xDD, 0xF7, 0xE7, 0x41, 0x68, 0xFB, 0x20, 0x78, 0xCA, - 0x4E, 0xF5, 0x0A, 0xFB, 0x97, 0xB3, 0xFE, 0xD8, 0xAC, 0x56, 0x40, 0x45, 0x27, 0x95, 0x48, 0xBA, - 0x3A, 0x3A, 0x53, 0x55, 0x87, 0x8D, 0x83, 0x20, 0xB7, 0xA9, 0x6B, 0xFE, 0x4B, 0x95, 0x96, 0xD0, - 0xBC, 0x67, 0xA8, 0x55, 0x58, 0x9A, 0x15, 0xA1, 0x63, 0x29, 0xA9, 0xCC, 0x33, 0xDB, 0xE1, 0x99, - 0x56, 0x4A, 0x2A, 0xA6, 0xF9, 0x25, 0x31, 0x3F, 0x1C, 0x7E, 0xF4, 0x5E, 0x7C, 0x31, 0x29, 0x90, - 0x02, 0xE8, 0xF8, 0xFD, 0x70, 0x2F, 0x27, 0x04, 0x5C, 0x15, 0xBB, 0x80, 0xE3, 0x2C, 0x28, 0x05, - 0x48, 0x15, 0xC1, 0x95, 0x22, 0x6D, 0xC6, 0xE4, 0x3F, 0x13, 0xC1, 0x48, 0xDC, 0x86, 0x0F, 0xC7, - 0xEE, 0xC9, 0xF9, 0x07, 0x0F, 0x1F, 0x04, 0x41, 0xA4, 0x79, 0x47, 0x40, 0x17, 0x6E, 0x88, 0x5D, - 0xEB, 0x51, 0x5F, 0x32, 0xD1, 0xC0, 0x9B, 0xD5, 0x8F, 0xC1, 0xBC, 0xF2, 0x64, 0x35, 0x11, 0x41, - 0x34, 0x78, 0x7B, 0x25, 0x60, 0x9C, 0x2A, 0x60, 0xA3, 0xE8, 0xF8, 0xDF, 0x1B, 0x6C, 0x63, 0x1F, - 0xC2, 0xB4, 0x12, 0x0E, 0x9E, 0x32, 0xE1, 0x02, 0xD1, 0x4F, 0x66, 0xAF, 0x15, 0x81, 0xD1, 0xCA, - 0xE0, 0x95, 0x23, 0x6B, 0xE1, 0x92, 0x3E, 0x33, 0x62, 0x0B, 0x24, 0x3B, 0x22, 0xB9, 0xBE, 0xEE, - 0x0E, 0xA2, 0xB2, 0x85, 0x99, 0x0D, 0xBA, 0xE6, 0x8C, 0x0C, 0x72, 0xDE, 0x28, 0xF7, 0xA2, 0x2D, - 0x45, 0x78, 0x12, 0xD0, 0xFD, 0x94, 0xB7, 0x95, 0x62, 0x08, 0x7D, 0x64, 0xF0, 0xF5, 0xCC, 0xE7, - 0x6F, 0xA3, 0x49, 0x54, 0xFA, 0x48, 0x7D, 0x87, 0x27, 0xFD, 0x9D, 0xC3, 0x1E, 0x8D, 0x3E, 0xF3, - 0x41, 0x63, 0x47, 0x0A, 0x74, 0xFF, 0x2E, 0x99, 0xAB, 0x6E, 0x6F, 0x3A, 0x37, 0xFD, 0xF8, 0xF4, - 0x60, 0xDC, 0x12, 0xA8, 0xF8, 0xDD, 0xEB, 0xA1, 0x4C, 0xE1, 0x1B, 0x99, 0x0D, 0x6B, 0x6E, 0xDB, - 0x10, 0x55, 0x7B, 0xC6, 0x37, 0x2C, 0x67, 0x6D, 0x3B, 0xD4, 0x65, 0x27, 0x04, 0xE8, 0xD0, 0xDC, - 0xC7, 0x0D, 0x29, 0xF1, 0xA3, 0xFF, 0x00, 0xCC, 0x92, 0x0F, 0x39, 0xB5, 0x0B, 0xED, 0x0F, 0x69, - 0xFB, 0x9F, 0x7B, 0x66, 0x9C, 0x7D, 0xDB, 0xCE, 0x0B, 0xCF, 0x91, 0xA0, 0xA3, 0x5E, 0x15, 0xD9, - 0x88, 0x2F, 0x13, 0xBB, 0x24, 0xAD, 0x5B, 0x51, 0xBF, 0x79, 0x94, 0x7B, 0xEB, 0xD6, 0x3B, 0x76, - 0xB3, 0x2E, 0x39, 0x37, 0x79, 0x59, 0x11, 0xCC, 0x97, 0xE2, 0x26, 0x80, 0x2D, 0x31, 0x2E, 0xF4, - 0xA7, 0xAD, 0x42, 0x68, 0x3B, 0x2B, 0x6A, 0xC6, 0xCC, 0x4C, 0x75, 0x12, 0x1C, 0xF1, 0x2E, 0x78, - 0x37, 0x42, 0x12, 0x6A, 0xE7, 0x51, 0x92, 0xB7, 0xE6, 0xBB, 0xA1, 0x06, 0x50, 0x63, 0xFB, 0x4B, - 0x18, 0x10, 0x6B, 0x1A, 0xFA, 0xED, 0xCA, 0x11, 0xD8, 0xBD, 0x25, 0x3D, 0xC9, 0xC3, 0xE1, 0xE2, - 0x59, 0x16, 0x42, 0x44, 0x86, 0x13, 0x12, 0x0A, 0x6E, 0xEC, 0x0C, 0xD9, 0x2A, 0xEA, 0xAB, 0xD5, - 0x4E, 0x67, 0xAF, 0x64, 0x5F, 0xA8, 0x86, 0xDA, 0x88, 0xE9, 0xBF, 0xBE, 0xFE, 0xC3, 0xE4, 0x64, - 0x57, 0x80, 0xBC, 0x9D, 0x86, 0xC0, 0xF7, 0xF0, 0xF8, 0x7B, 0x78, 0x60, 0x4D, 0x60, 0x03, 0x60, - 0x46, 0x83, 0xFD, 0xD1, 0xB0, 0x1F, 0x38, 0xF6, 0x04, 0xAE, 0x45, 0x77, 0xCC, 0xFC, 0x36, 0xD7, - 0x33, 0x6B, 0x42, 0x83, 0x71, 0xAB, 0x1E, 0xF0, 0x87, 0x41, 0x80, 0xB0, 0x5F, 0x5E, 0x00, 0x3C, - 0xBE, 0x57, 0xA0, 0x77, 0x24, 0xAE, 0xE8, 0xBD, 0x99, 0x42, 0x46, 0x55, 0x61, 0x2E, 0x58, 0xBF, - 0x8F, 0xF4, 0x58, 0x4E, 0xA2, 0xFD, 0xDD, 0xF2, 0x38, 0xEF, 0x74, 0xF4, 0xC2, 0xBD, 0x89, 0x87, - 0xC3, 0xF9, 0x66, 0x53, 0x74, 0x8E, 0xB3, 0xC8, 0x55, 0xF2, 0x75, 0xB4, 0xB9, 0xD9, 0xFC, 0x46, - 0x61, 0x26, 0xEB, 0x7A, 0x84, 0xDF, 0x1D, 0x8B, 0x79, 0x0E, 0x6A, 0x84, 0xE2, 0x95, 0x5F, 0x91, - 0x8E, 0x59, 0x6E, 0x46, 0x70, 0x57, 0xB4, 0x20, 0x91, 0x55, 0xD5, 0x8C, 0x4C, 0xDE, 0x02, 0xC9, - 0xE1, 0xAC, 0x0B, 0xB9, 0xD0, 0x05, 0x82, 0xBB, 0x48, 0x62, 0xA8, 0x11, 0x9E, 0xA9, 0x74, 0x75, - 0xB6, 0x19, 0x7F, 0xB7, 0x09, 0xDC, 0xA9, 0xE0, 0xA1, 0x09, 0x2D, 0x66, 0x33, 0x46, 0x32, 0xC4, - 0x02, 0x1F, 0x5A, 0xE8, 0x8C, 0xBE, 0xF0, 0x09, 0x25, 0xA0, 0x99, 0x4A, 0x10, 0xFE, 0x6E, 0x1D, - 0x1D, 0x3D, 0xB9, 0x1A, 0xDF, 0xA4, 0xA5, 0x0B, 0x0F, 0xF2, 0x86, 0xA1, 0x69, 0xF1, 0x68, 0x28, - 0x83, 0xDA, 0xB7, 0xDC, 0xFE, 0x06, 0x39, 0x57, 0x9B, 0xCE, 0xE2, 0xA1, 0x52, 0x7F, 0xCD, 0x4F, - 0x01, 0x5E, 0x11, 0x50, 0xFA, 0x83, 0x06, 0xA7, 0xC4, 0xB5, 0x02, 0xA0, 0x27, 0xD0, 0xE6, 0x0D, - 0x27, 0x8C, 0xF8, 0x9A, 0x41, 0x86, 0x3F, 0x77, 0x06, 0x4C, 0x60, 0xC3, 0xB5, 0x06, 0xA8, 0x61, - 0x28, 0x7A, 0x17, 0xF0, 0xE0, 0x86, 0xF5, 0xC0, 0xAA, 0x58, 0x60, 0x00, 0x62, 0x7D, 0xDC, 0x30, - 0xD7, 0x9E, 0xE6, 0x11, 0x63, 0xEA, 0x38, 0x23, 0x94, 0xDD, 0xC2, 0x53, 0x34, 0x16, 0xC2, 0xC2, - 0x56, 0xEE, 0xCB, 0xBB, 0xDE, 0xB6, 0xBC, 0x90, 0xA1, 0x7D, 0xFC, 0xEB, 0x76, 0x1D, 0x59, 0xCE, - 0x09, 0xE4, 0x05, 0x6F, 0x88, 0x01, 0x7C, 0x4B, 0x3D, 0x0A, 0x72, 0x39, 0x24, 0x7C, 0x92, 0x7C, - 0x5F, 0x72, 0xE3, 0x86, 0xB9, 0x9D, 0x4D, 0x72, 0xB4, 0x5B, 0xC1, 0x1A, 0xFC, 0xB8, 0x9E, 0xD3, - 0x78, 0x55, 0x54, 0xED, 0xB5, 0xA5, 0xFC, 0x08, 0xD3, 0x7C, 0x3D, 0xD8, 0xC4, 0x0F, 0xAD, 0x4D, - 0x5E, 0xEF, 0x50, 0x1E, 0xF8, 0xE6, 0x61, 0xB1, 0xD9, 0x14, 0x85, 0xA2, 0x3C, 0x13, 0x51, 0x6C, - 0xE7, 0xC7, 0xD5, 0x6F, 0xC4, 0x4E, 0xE1, 0x56, 0xCE, 0xBF, 0x2A, 0x36, 0x37, 0xC8, 0xC6, 0xDD, - 0x34, 0x32, 0x9A, 0xD7, 0x12, 0x82, 0x63, 0x92, 0x8E, 0xFA, 0x0E, 0x67, 0xE0, 0x00, 0x60, 0x40, - 0x37, 0xCE, 0x39, 0x3A, 0xCF, 0xF5, 0xFA, 0xD3, 0x37, 0x77, 0xC2, 0xAB, 0x1B, 0x2D, 0xC5, 0x5A, - 0x9E, 0x67, 0xB0, 0x5C, 0x42, 0x37, 0xA3, 0x4F, 0x40, 0x27, 0x82, 0xD3, 0xBE, 0x9B, 0xBC, 0x99, - 0x9D, 0x8E, 0x11, 0xD5, 0x15, 0x73, 0x0F, 0xBF, 0x7E, 0x1C, 0x2D, 0xD6, 0x7B, 0xC4, 0x00, 0xC7, - 0x6B, 0x1B, 0x8C, 0xB7, 0x45, 0x90, 0xA1, 0x21, 0xBE, 0xB1, 0x6E, 0xB2, 0xB4, 0x6E, 0x36, 0x6A, - 0x2F, 0xAB, 0x48, 0x57, 0x79, 0x6E, 0x94, 0xBC, 0xD2, 0x76, 0xA3, 0xC6, 0xC8, 0xC2, 0x49, 0x65, - 0xEE, 0xF8, 0x0F, 0x53, 0x7D, 0xDE, 0x8D, 0x46, 0x1D, 0x0A, 0x73, 0xD5, 0xC6, 0x4D, 0xD0, 0x4C, - 0xDB, 0xBB, 0x39, 0x29, 0x50, 0x46, 0xBA, 0xA9, 0xE8, 0x26, 0x95, 0xAC, 0x04, 0xE3, 0x5E, 0xBE, - 0xF0, 0xD5, 0xFA, 0xA1, 0x9A, 0x51, 0x2D, 0x6A, 0xE2, 0x8C, 0xEF, 0x63, 0x22, 0xEE, 0x86, 0x9A, - 0xB8, 0xC2, 0x89, 0xC0, 0xF6, 0x2E, 0x24, 0x43, 0xAA, 0x03, 0x1E, 0xA5, 0xA4, 0xD0, 0xF2, 0x9C, - 0xBA, 0x61, 0xC0, 0x83, 0x4D, 0x6A, 0xE9, 0x9B, 0x50, 0x15, 0xE5, 0x8F, 0xD6, 0x5B, 0x64, 0xBA, - 0xF9, 0xA2, 0x26, 0x28, 0xE1, 0x3A, 0x3A, 0xA7, 0x86, 0x95, 0xA9, 0x4B, 0xE9, 0x62, 0x55, 0xEF, - 0xD3, 0xEF, 0x2F, 0xC7, 0xDA, 0xF7, 0x52, 0xF7, 0x69, 0x6F, 0x04, 0x3F, 0x59, 0x0A, 0xFA, 0x77, - 0x15, 0xA9, 0xE4, 0x80, 0x01, 0x86, 0xB0, 0x87, 0xAD, 0xE6, 0x09, 0x9B, 0x93, 0xE5, 0x3E, 0x3B, - 0x5A, 0xFD, 0x90, 0xE9, 0x97, 0xD7, 0x34, 0x9E, 0xD9, 0xB7, 0xF0, 0x2C, 0x51, 0x8B, 0x2B, 0x02, - 0x3A, 0xAC, 0xD5, 0x96, 0x7D, 0xA6, 0x7D, 0x01, 0xD6, 0x3E, 0xCF, 0xD1, 0x28, 0x2D, 0x7D, 0x7C, - 0xCF, 0x25, 0x9F, 0x1F, 0x9B, 0xB8, 0xF2, 0xAD, 0x72, 0xB4, 0xD6, 0x5A, 0x4C, 0xF5, 0x88, 0x5A, - 0x71, 0xAC, 0x29, 0xE0, 0xE6, 0xA5, 0x19, 0xE0, 0xFD, 0xAC, 0xB0, 0x47, 0x9B, 0xFA, 0x93, 0xED, - 0x8D, 0xC4, 0xD3, 0xE8, 0xCC, 0x57, 0x3B, 0x28, 0x29, 0x66, 0xD5, 0xF8, 0x28, 0x2E, 0x13, 0x79, - 0x91, 0x01, 0x5F, 0x78, 0x55, 0x60, 0x75, 0xED, 0x44, 0x0E, 0x96, 0xF7, 0x8C, 0x5E, 0xD3, 0xE3, - 0xD4, 0x6D, 0x05, 0x15, 0xBA, 0x6D, 0xF4, 0x88, 0x25, 0x61, 0xA1, 0x03, 0xBD, 0xF0, 0x64, 0x05, - 0x15, 0x9E, 0xEB, 0xC3, 0xA2, 0x57, 0x90, 0x3C, 0xEC, 0x1A, 0x27, 0x97, 0x2A, 0x07, 0x3A, 0xA9, - 0x9B, 0x6D, 0x3F, 0x1B, 0xF5, 0x21, 0x63, 0x1E, 0xFB, 0x66, 0x9C, 0xF5, 0x19, 0xF3, 0xDC, 0x26, - 0x28, 0xD9, 0x33, 0x75, 0xF5, 0xFD, 0x55, 0xB1, 0x82, 0x34, 0x56, 0x03, 0xBB, 0x3C, 0xBA, 0x8A, - 0x11, 0x77, 0x51, 0x28, 0xF8, 0xD9, 0x0A, 0xC2, 0x67, 0x51, 0xCC, 0xAB, 0x5F, 0x92, 0xAD, 0xCC, - 0x51, 0x17, 0xE8, 0x4D, 0x8E, 0xDC, 0x30, 0x38, 0x62, 0x58, 0x9D, 0x37, 0x91, 0xF9, 0x20, 0x93, - 0xC2, 0x90, 0x7A, 0xEA, 0xCE, 0x7B, 0x3E, 0xFB, 0x64, 0xCE, 0x21, 0x51, 0x32, 0xBE, 0x4F, 0x77, - 0x7E, 0xE3, 0xB6, 0xA8, 0x46, 0x3D, 0x29, 0xC3, 0x69, 0x53, 0xDE, 0x48, 0x80, 0xE6, 0x13, 0x64, - 0x10, 0x08, 0xAE, 0xA2, 0x24, 0xB2, 0x6D, 0xDD, 0xFD, 0x2D, 0x85, 0x69, 0x66, 0x21, 0x07, 0x09, - 0x0A, 0x46, 0x9A, 0xB3, 0xDD, 0xC0, 0x45, 0x64, 0xCF, 0xDE, 0x6C, 0x58, 0xAE, 0xC8, 0x20, 0x1C, - 0xDD, 0xF7, 0xBE, 0x5B, 0x40, 0x8D, 0x58, 0x1B, 0x7F, 0x01, 0xD2, 0xCC, 0xBB, 0xE3, 0xB4, 0x6B, - 0x7E, 0x6A, 0xA2, 0xDD, 0x45, 0xFF, 0x59, 0x3A, 0x44, 0x0A, 0x35, 0x3E, 0xD5, 0xCD, 0xB4, 0xBC, - 0xA8, 0xCE, 0xEA, 0x72, 0xBB, 0x84, 0x64, 0xFA, 0xAE, 0x12, 0x66, 0x8D, 0x47, 0x6F, 0x3C, 0xBF, - 0x63, 0xE4, 0x9B, 0xD2, 0x9E, 0x5D, 0x2F, 0x54, 0x1B, 0x77, 0xC2, 0xAE, 0x70, 0x63, 0x4E, 0xF6, - 0x8D, 0x0D, 0x0E, 0x74, 0x57, 0x13, 0x5B, 0xE7, 0x71, 0x16, 0x72, 0xF8, 0x5D, 0x7D, 0x53, 0xAF, - 0x08, 0xCB, 0x40, 0x40, 0xCC, 0xE2, 0xB4, 0x4E, 0x6A, 0x46, 0xD2, 0x34, 0x84, 0xAF, 0x15, 0x01, - 0x28, 0x04, 0xB0, 0xE1, 0x1D, 0x3A, 0x98, 0x95, 0xB4, 0x9F, 0xB8, 0x06, 0x48, 0xA0, 0x6E, 0xCE, - 0x82, 0x3B, 0x3F, 0x6F, 0x82, 0xAB, 0x20, 0x35, 0x4B, 0x1D, 0x1A, 0x01, 0xF8, 0x27, 0x72, 0x27, - 0xB1, 0x60, 0x15, 0x61, 0xDC, 0x3F, 0x93, 0xE7, 0x2B, 0x79, 0x3A, 0xBB, 0xBD, 0x25, 0x45, 0x34, - 0xE1, 0x39, 0x88, 0xA0, 0x4B, 0x79, 0xCE, 0x51, 0xB7, 0xC9, 0x32, 0x2F, 0xC9, 0xBA, 0x1F, 0xA0, - 0x7E, 0xC8, 0x1C, 0xE0, 0xF6, 0xD1, 0xC7, 0xBC, 0xC3, 0x11, 0x01, 0xCF, 0xC7, 0xAA, 0xE8, 0xA1, - 0x49, 0x87, 0x90, 0x1A, 0x9A, 0xBD, 0x4F, 0xD4, 0xCB, 0xDE, 0xDA, 0xD0, 0x38, 0xDA, 0x0A, 0xD5, - 0x2A, 0xC3, 0x39, 0x03, 0x67, 0x36, 0x91, 0xC6, 0x7C, 0x31, 0xF9, 0x8D, 0x4F, 0x2B, 0xB1, 0xE0, - 0xB7, 0x59, 0x9E, 0xF7, 0x3A, 0xBB, 0xF5, 0x43, 0xFF, 0x19, 0xD5, 0xF2, 0x9C, 0x45, 0xD9, 0x27, - 0x2C, 0x22, 0x97, 0xBF, 0x2A, 0xFC, 0xE6, 0x15, 0x71, 0xFC, 0x91, 0x0F, 0x25, 0x15, 0x94, 0x9B, - 0x61, 0x93, 0xE5, 0xFA, 0xEB, 0x9C, 0xB6, 0xCE, 0x59, 0x64, 0xA8, 0xC2, 0xD1, 0xA8, 0xBA, 0x12, - 0x5E, 0x07, 0xC1, 0xB6, 0x0C, 0x6A, 0x05, 0xE3, 0x65, 0x50, 0xD2, 0x10, 0x42, 0xA4, 0x03, 0xCB, - 0x0E, 0x6E, 0xEC, 0xE0, 0x3B, 0xDB, 0x98, 0x16, 0xBE, 0xA0, 0x98, 0x4C, 0x64, 0xE9, 0x78, 0x32, - 0x32, 0x95, 0x1F, 0x9F, 0xDF, 0x92, 0xD3, 0xE0, 0x2B, 0x34, 0xA0, 0xD3, 0x1E, 0xF2, 0x71, 0x89, - 0x41, 0x74, 0x0A, 0x1B, 0x8C, 0x34, 0xA3, 0x4B, 0x20, 0x71, 0xBE, 0xC5, 0xD8, 0x32, 0x76, 0xC3, - 0x8D, 0x9F, 0x35, 0xDF, 0x2E, 0x2F, 0x99, 0x9B, 0x47, 0x6F, 0x0B, 0xE6, 0x1D, 0xF1, 0xE3, 0x0F, - 0x54, 0xDA, 0x4C, 0xE5, 0x91, 0xD8, 0xDA, 0x1E, 0xCF, 0x79, 0x62, 0xCE, 0x6F, 0x7E, 0x3E, 0xCD, - 0x66, 0xB1, 0x18, 0x16, 0x05, 0x1D, 0x2C, 0xFD, 0xC5, 0xD2, 0x8F, 0x84, 0x99, 0x22, 0xFB, 0xF6, - 0x57, 0xF3, 0x23, 0xF5, 0x23, 0x76, 0x32, 0xA6, 0x31, 0x35, 0xA8, 0x93, 0x02, 0xCD, 0xCC, 0x56, - 0x62, 0x81, 0xF0, 0xAC, 0xB5, 0xEB, 0x75, 0x5A, 0x97, 0x36, 0x16, 0x6E, 0xCC, 0x73, 0xD2, 0x88, - 0x92, 0x62, 0x96, 0xDE, 0xD0, 0x49, 0xB9, 0x81, 0x1B, 0x90, 0x50, 0x4C, 0x14, 0x56, 0xC6, 0x71, - 0xBD, 0xC7, 0xC6, 0xE6, 0x0A, 0x14, 0x7A, 0x32, 0x06, 0xD0, 0xE1, 0x45, 0x9A, 0x7B, 0xF2, 0xC3, - 0xFD, 0x53, 0xAA, 0xC9, 0x00, 0x0F, 0xA8, 0x62, 0xE2, 0xBF, 0x25, 0xBB, 0xF6, 0xD2, 0xBD, 0x35, - 0x05, 0x69, 0x12, 0x71, 0x22, 0x02, 0x04, 0xB2, 0x7C, 0xCF, 0xCB, 0xB6, 0x2B, 0x9C, 0x76, 0xCD, - 0xC0, 0x3E, 0x11, 0x53, 0xD3, 0xE3, 0x40, 0x16, 0x60, 0xBD, 0xAB, 0x38, 0xF0, 0xAD, 0x47, 0x25, - 0x9C, 0x20, 0x38, 0xBA, 0x76, 0xCE, 0x46, 0xF7, 0xC5, 0xA1, 0xAF, 0x77, 0x60, 0x60, 0x75, 0x20, - 0x4E, 0xFE, 0xCB, 0x85, 0xD8, 0x8D, 0xE8, 0x8A, 0xB0, 0xF9, 0xAA, 0x7A, 0x7E, 0xAA, 0xF9, 0x4C, - 0x5C, 0xC2, 0x48, 0x19, 0x8C, 0x8A, 0xFB, 0x02, 0xE4, 0x6A, 0xC3, 0x01, 0xF9, 0xE1, 0xEB, 0xD6, - 0x69, 0xF8, 0xD4, 0x90, 0xA0, 0xDE, 0x5C, 0xA6, 0x2D, 0x25, 0x09, 0x3F, 0x9F, 0xE6, 0x08, 0xC2, - 0x32, 0x61, 0x4E, 0xB7, 0x5B, 0xE2, 0x77, 0xCE, 0xE3, 0xDF, 0x8F, 0x57, 0xE6, 0x72, 0xC3, 0x3A - }; - - #endregion - - public Blowfish(byte[] key) - { - initializeBlowfish(key); - } - - public void Encipher(byte[] data, int offset, int length) - { - if ((length - offset) % 8 != 0) - throw new ArgumentException("Needs to be a multiple of 8"); - - for (int i = offset; i < offset + length; i += 8) - { - uint xl = (uint)((data[i + 0]) | (data[i + 1] << 8) | (data[i + 2] << 16) | (data[i + 3] << 24)); - uint xr = (uint)((data[i + 4]) | (data[i + 5] << 8) | (data[i + 6] << 16) | (data[i + 7] << 24)); - blowfish_encipher(ref xl, ref xr); - data[i + 0] = (byte)(xl >> 0); - data[i + 1] = (byte)(xl >> 8); - data[i + 2] = (byte)(xl >> 16); - data[i + 3] = (byte)(xl >> 24); - data[i + 4] = (byte)(xr >> 0); - data[i + 5] = (byte)(xr >> 8); - data[i + 6] = (byte)(xr >> 16); - data[i + 7] = (byte)(xr >> 24); - } - } - - public void Decipher(byte[] data, int offset, int length) - { - if ((length - offset) % 8 != 0) - throw new ArgumentException("Needs to be a multiple of 8"); - - for (int i = offset; i < offset + length; i += 8) - { - uint xl = (uint)((data[i + 0]) | (data[i + 1] << 8) | (data[i + 2] << 16) | (data[i + 3] << 24)); - uint xr = (uint)((data[i + 4]) | (data[i + 5] << 8) | (data[i + 6] << 16) | (data[i + 7] << 24)); - blowfish_decipher(ref xl, ref xr); - data[i + 0] = (byte)(xl >> 0); - data[i + 1] = (byte)(xl >> 8); - data[i + 2] = (byte)(xl >> 16); - data[i + 3] = (byte)(xl >> 24); - data[i + 4] = (byte)(xr >> 0); - data[i + 5] = (byte)(xr >> 8); - data[i + 6] = (byte)(xr >> 16); - data[i + 7] = (byte)(xr >> 24); - } - } - - private UInt32 F(UInt32 x) - { - UInt16 a; - UInt16 b; - UInt16 c; - UInt16 d; - UInt32 y; - - d = (UInt16)(x & 0x00FF); - x >>= 8; - c = (UInt16)(x & 0x00FF); - x >>= 8; - b = (UInt16)(x & 0x00FF); - x >>= 8; - a = (UInt16)(x & 0x00FF); - //y = ((S[0][a] + S[1][b]) ^ S[2][c]) + S[3][d]; - y = S[0,a] + S[1,b]; - y = y ^ S[2,c]; - y = y + S[3,d]; - - return y; - } - - private void blowfish_encipher(ref UInt32 xl, ref UInt32 xr) - { - UInt32 temp; - Int32 i; - - for (i = 0; i < N; ++i) { - xl = xl ^ P[i]; - xr = F(xl) ^ xr; - - temp = xl; - xl = xr; - xr = temp; - } - - temp = xl; - xl = xr; - xr = temp; - - xr = xr ^ P[N]; - xl = xl ^ P[N + 1]; - - } - - private void blowfish_decipher(ref UInt32 xl, ref UInt32 xr) - { - UInt32 temp; - Int32 i; - - for (i = N + 1; i > 1; --i) { - xl = xl ^ P[i]; - xr = F(xl) ^ xr; - - /* Exchange xl and xr */ - temp = xl; - xl = xr; - xr = temp; - } - - /* Exchange xl and xr */ - temp = xl; - xl = xr; - xr = temp; - - xr = xr ^ P[1]; - xl = xl ^ P[0]; - - } - - private int initializeBlowfish(byte [] key) - { - Int16 i; - Int16 j; - Int16 k; - - int data; - uint datal; - uint datar; - - Buffer.BlockCopy(P_values, 0, P, 0, P_values.Length); - Buffer.BlockCopy(S_values, 0, S, 0, S_values.Length); - - j = 0; - for (i = 0; i < N + 2; ++i) - { - data = 0x00000000; - for (k = 0; k < 4; ++k) - { - data = (data << 8) | (SByte)key[j]; - j = (short)(j + 1); - if (j >= key.Length) - { - j = 0; - } - } - P[i] = P[i] ^ (uint)data; - } - - datal = 0x00000000; - datar = 0x00000000; - - for (i = 0; i < N + 2; i += 2) - { - blowfish_encipher(ref datal, ref datar); - - P[i] = datal; - P[i + 1] = datar; - } - - for (i = 0; i < 4; ++i) - { - for (j = 0; j < 256; j += 2) - { - blowfish_encipher(ref datal, ref datar); - S[i,j] = datal; - S[i,j + 1] = datar; - } - } - - return 0; - } - - } -} diff --git a/FFXIVClassic Lobby Server/common/Log.cs b/FFXIVClassic Lobby Server/common/Log.cs deleted file mode 100644 index 93ab8533..00000000 --- a/FFXIVClassic Lobby Server/common/Log.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Lobby_Server.common -{ - class Log - { - public static void error(String message) - { - Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm")); - Console.ForegroundColor = ConsoleColor.Red; - Console.Write("[ERROR] "); - Console.ForegroundColor = ConsoleColor.Gray ; - Console.WriteLine(message); - } - - public static void debug(String message) - { - Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm")); - Console.ForegroundColor = ConsoleColor.Yellow; - Console.Write("[DEBUG] "); - Console.ForegroundColor = ConsoleColor.Gray; - Console.WriteLine(message); - } - - public static void info(String message) - { - Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm")); - Console.ForegroundColor = ConsoleColor.Cyan; - Console.Write("[INFO] "); - Console.ForegroundColor = ConsoleColor.Gray; - Console.WriteLine(message); - } - - public static void database(String message) - { - Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm")); - Console.ForegroundColor = ConsoleColor.Magenta; - Console.Write("[SQL] "); - Console.ForegroundColor = ConsoleColor.Gray; - Console.WriteLine(message); - } - - public static void conn(String message) - { - Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm")); - Console.ForegroundColor = ConsoleColor.Green; - Console.Write("[CONN] "); - Console.ForegroundColor = ConsoleColor.Gray; - Console.WriteLine(message); - } - } -} diff --git a/FFXIVClassic Lobby Server/common/STA_INIFile.cs b/FFXIVClassic Lobby Server/common/STA_INIFile.cs deleted file mode 100644 index 52f1f188..00000000 --- a/FFXIVClassic Lobby Server/common/STA_INIFile.cs +++ /dev/null @@ -1,533 +0,0 @@ -// ******************************* -// *** INIFile class V2.1 *** -// ******************************* -// *** (C)2009-2013 S.T.A. snc *** -// ******************************* -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Text; - -namespace STA.Settings -{ - - internal class INIFile - { - -#region "Declarations" - - // *** Lock for thread-safe access to file and local cache *** - private object m_Lock = new object(); - - // *** File name *** - private string m_FileName = null; - internal string FileName - { - get - { - return m_FileName; - } - } - - // *** Lazy loading flag *** - private bool m_Lazy = false; - - // *** Automatic flushing flag *** - private bool m_AutoFlush = false; - - // *** Local cache *** - private Dictionary> m_Sections = new Dictionary>(); - private Dictionary> m_Modified = new Dictionary>(); - - // *** Local cache modified flag *** - private bool m_CacheModified = false; - -#endregion - -#region "Methods" - - // *** Constructor *** - public INIFile(string FileName) - { - Initialize(FileName, false, false); - } - - public INIFile(string FileName, bool Lazy, bool AutoFlush) - { - Initialize(FileName, Lazy, AutoFlush); - } - - // *** Initialization *** - private void Initialize(string FileName, bool Lazy, bool AutoFlush) - { - m_FileName = FileName; - m_Lazy = Lazy; - m_AutoFlush = AutoFlush; - if (!m_Lazy) Refresh(); - } - - // *** Parse section name *** - private string ParseSectionName(string Line) - { - if (!Line.StartsWith("[")) return null; - if (!Line.EndsWith("]")) return null; - if (Line.Length < 3) return null; - return Line.Substring(1, Line.Length - 2); - } - - // *** Parse key+value pair *** - private bool ParseKeyValuePair(string Line, ref string Key, ref string Value) - { - // *** Check for key+value pair *** - int i; - if ((i = Line.IndexOf('=')) <= 0) return false; - - int j = Line.Length - i - 1; - Key = Line.Substring(0, i).Trim(); - if (Key.Length <= 0) return false; - - Value = (j > 0) ? (Line.Substring(i + 1, j).Trim()) : (""); - return true; - } - - // *** Read file contents into local cache *** - internal void Refresh() - { - lock (m_Lock) - { - StreamReader sr = null; - try - { - // *** Clear local cache *** - m_Sections.Clear(); - m_Modified.Clear(); - - // *** Open the INI file *** - try - { - sr = new StreamReader(m_FileName); - } - catch (FileNotFoundException) - { - return; - } - - // *** Read up the file content *** - Dictionary CurrentSection = null; - string s; - string SectionName; - string Key = null; - string Value = null; - while ((s = sr.ReadLine()) != null) - { - s = s.Trim(); - - // *** Check for section names *** - SectionName = ParseSectionName(s); - if (SectionName != null) - { - // *** Only first occurrence of a section is loaded *** - if (m_Sections.ContainsKey(SectionName)) - { - CurrentSection = null; - } - else - { - CurrentSection = new Dictionary(); - m_Sections.Add(SectionName, CurrentSection); - } - } - else if (CurrentSection != null) - { - // *** Check for key+value pair *** - if (ParseKeyValuePair(s, ref Key, ref Value)) - { - // *** Only first occurrence of a key is loaded *** - if (!CurrentSection.ContainsKey(Key)) - { - CurrentSection.Add(Key, Value); - } - } - } - } - } - finally - { - // *** Cleanup: close file *** - if (sr != null) sr.Close(); - sr = null; - } - } - } - - // *** Flush local cache content *** - internal void Flush() - { - lock (m_Lock) - { - PerformFlush(); - } - } - - private void PerformFlush() - { - // *** If local cache was not modified, exit *** - if (!m_CacheModified) return; - m_CacheModified = false; - - // *** Check if original file exists *** - bool OriginalFileExists = File.Exists(m_FileName); - - // *** Get temporary file name *** - string TmpFileName = Path.ChangeExtension(m_FileName, "$n$"); - - // *** Copy content of original file to temporary file, replace modified values *** - StreamWriter sw = null; - - // *** Create the temporary file *** - sw = new StreamWriter(TmpFileName); - - try - { - Dictionary CurrentSection = null; - if (OriginalFileExists) - { - StreamReader sr = null; - try - { - // *** Open the original file *** - sr = new StreamReader(m_FileName); - - // *** Read the file original content, replace changes with local cache values *** - string s; - string SectionName; - string Key = null; - string Value = null; - bool Unmodified; - bool Reading = true; - while (Reading) - { - s = sr.ReadLine(); - Reading = (s != null); - - // *** Check for end of file *** - if (Reading) - { - Unmodified = true; - s = s.Trim(); - SectionName = ParseSectionName(s); - } - else - { - Unmodified = false; - SectionName = null; - } - - // *** Check for section names *** - if ((SectionName != null) || (!Reading)) - { - if (CurrentSection != null) - { - // *** Write all remaining modified values before leaving a section **** - if (CurrentSection.Count > 0) - { - foreach (string fkey in CurrentSection.Keys) - { - if (CurrentSection.TryGetValue(fkey, out Value)) - { - sw.Write(fkey); - sw.Write('='); - sw.WriteLine(Value); - } - } - sw.WriteLine(); - CurrentSection.Clear(); - } - } - - if (Reading) - { - // *** Check if current section is in local modified cache *** - if (!m_Modified.TryGetValue(SectionName, out CurrentSection)) - { - CurrentSection = null; - } - } - } - else if (CurrentSection != null) - { - // *** Check for key+value pair *** - if (ParseKeyValuePair(s, ref Key, ref Value)) - { - if (CurrentSection.TryGetValue(Key, out Value)) - { - // *** Write modified value to temporary file *** - Unmodified = false; - CurrentSection.Remove(Key); - - sw.Write(Key); - sw.Write('='); - sw.WriteLine(Value); - } - } - } - - // *** Write unmodified lines from the original file *** - if (Unmodified) - { - sw.WriteLine(s); - } - } - - // *** Close the original file *** - sr.Close(); - sr = null; - } - finally - { - // *** Cleanup: close files *** - if (sr != null) sr.Close(); - sr = null; - } - } - - // *** Cycle on all remaining modified values *** - foreach (KeyValuePair> SectionPair in m_Modified) - { - CurrentSection = SectionPair.Value; - if (CurrentSection.Count > 0) - { - sw.WriteLine(); - - // *** Write the section name *** - sw.Write('['); - sw.Write(SectionPair.Key); - sw.WriteLine(']'); - - // *** Cycle on all key+value pairs in the section *** - foreach (KeyValuePair ValuePair in CurrentSection) - { - // *** Write the key+value pair *** - sw.Write(ValuePair.Key); - sw.Write('='); - sw.WriteLine(ValuePair.Value); - } - CurrentSection.Clear(); - } - } - m_Modified.Clear(); - - // *** Close the temporary file *** - sw.Close(); - sw = null; - - // *** Rename the temporary file *** - File.Copy(TmpFileName, m_FileName, true); - - // *** Delete the temporary file *** - File.Delete(TmpFileName); - } - finally - { - // *** Cleanup: close files *** - if (sw != null) sw.Close(); - sw = null; - } - } - - // *** Read a value from local cache *** - internal string GetValue(string SectionName, string Key, string DefaultValue) - { - // *** Lazy loading *** - if (m_Lazy) - { - m_Lazy = false; - Refresh(); - } - - lock (m_Lock) - { - // *** Check if the section exists *** - Dictionary Section; - if (!m_Sections.TryGetValue(SectionName, out Section)) return DefaultValue; - - // *** Check if the key exists *** - string Value; - if (!Section.TryGetValue(Key, out Value)) return DefaultValue; - - // *** Return the found value *** - return Value; - } - } - - // *** Insert or modify a value in local cache *** - internal void SetValue(string SectionName, string Key, string Value) - { - // *** Lazy loading *** - if (m_Lazy) - { - m_Lazy = false; - Refresh(); - } - - lock (m_Lock) - { - // *** Flag local cache modification *** - m_CacheModified = true; - - // *** Check if the section exists *** - Dictionary Section; - if (!m_Sections.TryGetValue(SectionName, out Section)) - { - // *** If it doesn't, add it *** - Section = new Dictionary(); - m_Sections.Add(SectionName,Section); - } - - // *** Modify the value *** - if (Section.ContainsKey(Key)) Section.Remove(Key); - Section.Add(Key, Value); - - // *** Add the modified value to local modified values cache *** - if (!m_Modified.TryGetValue(SectionName, out Section)) - { - Section = new Dictionary(); - m_Modified.Add(SectionName, Section); - } - - if (Section.ContainsKey(Key)) Section.Remove(Key); - Section.Add(Key, Value); - - // *** Automatic flushing : immediately write any modification to the file *** - if (m_AutoFlush) PerformFlush(); - } - } - - // *** Encode byte array *** - private string EncodeByteArray(byte[] Value) - { - if (Value == null) return null; - - StringBuilder sb = new StringBuilder(); - foreach (byte b in Value) - { - string hex = Convert.ToString(b, 16); - int l = hex.Length; - if (l > 2) - { - sb.Append(hex.Substring(l - 2, 2)); - } - else - { - if (l < 2) sb.Append("0"); - sb.Append(hex); - } - } - return sb.ToString(); - } - - // *** Decode byte array *** - private byte[] DecodeByteArray(string Value) - { - if (Value == null) return null; - - int l = Value.Length; - if (l < 2) return new byte[] { }; - - l /= 2; - byte[] Result = new byte[l]; - for (int i = 0; i < l; i++) Result[i] = Convert.ToByte(Value.Substring(i * 2, 2), 16); - return Result; - } - - // *** Getters for various types *** - internal bool GetValue(string SectionName, string Key, bool DefaultValue) - { - string StringValue = GetValue(SectionName, Key, DefaultValue.ToString(System.Globalization.CultureInfo.InvariantCulture)); - int Value; - if (int.TryParse(StringValue, out Value)) return (Value != 0); - return DefaultValue; - } - - internal int GetValue(string SectionName, string Key, int DefaultValue) - { - string StringValue = GetValue(SectionName, Key, DefaultValue.ToString(CultureInfo.InvariantCulture)); - int Value; - if (int.TryParse(StringValue, NumberStyles.Any, CultureInfo.InvariantCulture, out Value)) return Value; - return DefaultValue; - } - - internal long GetValue(string SectionName, string Key, long DefaultValue) - { - string StringValue = GetValue(SectionName, Key, DefaultValue.ToString(CultureInfo.InvariantCulture)); - long Value; - if (long.TryParse(StringValue, NumberStyles.Any, CultureInfo.InvariantCulture, out Value)) return Value; - return DefaultValue; - } - - internal double GetValue(string SectionName, string Key, double DefaultValue) - { - string StringValue = GetValue(SectionName, Key, DefaultValue.ToString(CultureInfo.InvariantCulture)); - double Value; - if (double.TryParse(StringValue, NumberStyles.Any, CultureInfo.InvariantCulture, out Value)) return Value; - return DefaultValue; - } - - internal byte[] GetValue(string SectionName, string Key, byte[] DefaultValue) - { - string StringValue = GetValue(SectionName, Key, EncodeByteArray(DefaultValue)); - try - { - return DecodeByteArray(StringValue); - } - catch (FormatException) - { - return DefaultValue; - } - } - - internal DateTime GetValue(string SectionName, string Key, DateTime DefaultValue) - { - string StringValue = GetValue(SectionName, Key, DefaultValue.ToString(CultureInfo.InvariantCulture)); - DateTime Value; - if (DateTime.TryParse(StringValue, CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces | DateTimeStyles.NoCurrentDateDefault | DateTimeStyles.AssumeLocal, out Value)) return Value; - return DefaultValue; - } - - // *** Setters for various types *** - internal void SetValue(string SectionName, string Key, bool Value) - { - SetValue(SectionName, Key, (Value) ? ("1") : ("0")); - } - - internal void SetValue(string SectionName, string Key, int Value) - { - SetValue(SectionName, Key, Value.ToString(CultureInfo.InvariantCulture)); - } - - internal void SetValue(string SectionName, string Key, long Value) - { - SetValue(SectionName, Key, Value.ToString(CultureInfo.InvariantCulture)); - } - - internal void SetValue(string SectionName, string Key, double Value) - { - SetValue(SectionName, Key, Value.ToString(CultureInfo.InvariantCulture)); - } - - internal void SetValue(string SectionName, string Key, byte[] Value) - { - SetValue(SectionName, Key, EncodeByteArray(Value)); - } - - internal void SetValue(string SectionName, string Key, DateTime Value) - { - SetValue(SectionName, Key, Value.ToString(CultureInfo.InvariantCulture)); - } - -#endregion - - } - -} diff --git a/FFXIVClassic Lobby Server/dataobjects/Account.cs b/FFXIVClassic Lobby Server/dataobjects/Account.cs index 437b85ab..26415924 100644 --- a/FFXIVClassic Lobby Server/dataobjects/Account.cs +++ b/FFXIVClassic Lobby Server/dataobjects/Account.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.dataobjects { diff --git a/FFXIVClassic Lobby Server/dataobjects/Appearance.cs b/FFXIVClassic Lobby Server/dataobjects/Appearance.cs index 6d4457aa..a0b68817 100644 --- a/FFXIVClassic Lobby Server/dataobjects/Appearance.cs +++ b/FFXIVClassic Lobby Server/dataobjects/Appearance.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Lobby_Server.dataobjects +namespace FFXIVClassic_Lobby_Server.dataobjects { class Appearance { diff --git a/FFXIVClassic Lobby Server/dataobjects/CharaInfo.cs b/FFXIVClassic Lobby Server/dataobjects/CharaInfo.cs index 008e5f2b..857131b5 100644 --- a/FFXIVClassic Lobby Server/dataobjects/CharaInfo.cs +++ b/FFXIVClassic Lobby Server/dataobjects/CharaInfo.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using System.IO; namespace FFXIVClassic_Lobby_Server.dataobjects @@ -60,7 +56,7 @@ namespace FFXIVClassic_Lobby_Server.dataobjects public uint feet; public uint belt; - public static CharaInfo getFromNewCharRequest(String encoded) + public static CharaInfo GetFromNewCharRequest(String encoded) { byte[] data = Convert.FromBase64String(encoded.Replace('-', '+').Replace('_', '/')); @@ -120,7 +116,7 @@ namespace FFXIVClassic_Lobby_Server.dataobjects return info; } - public static String buildForCharaList(Character chara, Appearance appearance) + public static String BuildForCharaList(Character chara, Appearance appearance) { byte[] data; @@ -150,7 +146,7 @@ namespace FFXIVClassic_Lobby_Server.dataobjects writer.Write(System.Text.Encoding.UTF8.GetBytes(chara.name + '\0')); writer.Write((UInt32)0x1c); writer.Write((UInt32)0x04); - writer.Write((UInt32)getTribeModel(chara.tribe)); + writer.Write((UInt32)GetTribeModel(chara.tribe)); writer.Write((UInt32)appearance.size); uint colorVal = appearance.skinColor | (uint)(appearance.hairColor << 10) | (uint)(appearance.eyeColor << 20); writer.Write((UInt32)colorVal); @@ -227,16 +223,16 @@ namespace FFXIVClassic_Lobby_Server.dataobjects return Convert.ToBase64String(data).Replace('+', '-').Replace('/', '_'); } - public static String debug() + public static String Debug() { byte[] bytes = File.ReadAllBytes("./packets/charaappearance.bin"); - Console.WriteLine(Utils.ByteArrayToHex(bytes)); + Program.Log.Debug(Utils.ByteArrayToHex(bytes)); return Convert.ToBase64String(bytes).Replace('+', '-').Replace('/', '_'); } - public static UInt32 getTribeModel(byte tribe) + public static UInt32 GetTribeModel(byte tribe) { switch (tribe) { diff --git a/FFXIVClassic Lobby Server/dataobjects/Character.cs b/FFXIVClassic Lobby Server/dataobjects/Character.cs index b59c84a7..e120d431 100644 --- a/FFXIVClassic Lobby Server/dataobjects/Character.cs +++ b/FFXIVClassic Lobby Server/dataobjects/Character.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Lobby_Server.dataobjects; namespace FFXIVClassic_Lobby_Server @@ -37,9 +33,9 @@ namespace FFXIVClassic_Lobby_Server charaInfo.Replace("/", "_"); byte[] data = System.Convert.FromBase64String(charaInfo); - Console.WriteLine("------------Base64 printout------------------"); - Console.WriteLine(Utils.ByteArrayToHex(data)); - Console.WriteLine("------------Base64 printout------------------"); + Program.Log.Debug("------------Base64 printout------------------"); + Program.Log.Debug(Utils.ByteArrayToHex(data)); + Program.Log.Debug("------------Base64 printout------------------"); CharaInfo chara = new CharaInfo(); diff --git a/FFXIVClassic Lobby Server/dataobjects/Retainer.cs b/FFXIVClassic Lobby Server/dataobjects/Retainer.cs index 9980d1b7..465747e4 100644 --- a/FFXIVClassic Lobby Server/dataobjects/Retainer.cs +++ b/FFXIVClassic Lobby Server/dataobjects/Retainer.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using FFXIVClassic_Lobby_Server.common; - -namespace FFXIVClassic_Lobby_Server +namespace FFXIVClassic_Lobby_Server { class Retainer { diff --git a/FFXIVClassic Lobby Server/dataobjects/World.cs b/FFXIVClassic Lobby Server/dataobjects/World.cs index 20569fcc..8cab7502 100644 --- a/FFXIVClassic Lobby Server/dataobjects/World.cs +++ b/FFXIVClassic Lobby Server/dataobjects/World.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Lobby_Server.dataobjects +namespace FFXIVClassic_Lobby_Server.dataobjects { class World { diff --git a/FFXIVClassic Lobby Server/packages.config b/FFXIVClassic Lobby Server/packages.config index 1fb7142b..5a3427bf 100644 --- a/FFXIVClassic Lobby Server/packages.config +++ b/FFXIVClassic Lobby Server/packages.config @@ -1,7 +1,10 @@ - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/FFXIVClassic Lobby Server/packets/BasePacket.cs b/FFXIVClassic Lobby Server/packets/BasePacket.cs index 485c60cf..2ac99336 100644 --- a/FFXIVClassic Lobby Server/packets/BasePacket.cs +++ b/FFXIVClassic Lobby Server/packets/BasePacket.cs @@ -1,11 +1,8 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Runtime.InteropServices; using System.Diagnostics; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using System.IO; namespace FFXIVClassic_Lobby_Server.packets @@ -106,7 +103,7 @@ namespace FFXIVClassic_Lobby_Server.packets this.data = data; } - public List getSubpackets() + public List GetSubpackets() { List subpackets = new List(header.numSubpackets); @@ -118,7 +115,7 @@ namespace FFXIVClassic_Lobby_Server.packets return subpackets; } - public unsafe static BasePacketHeader getHeader(byte[] bytes) + public unsafe static BasePacketHeader GetHeader(byte[] bytes) { BasePacketHeader header; if (bytes.Length < BASEPACKET_SIZE) @@ -132,7 +129,7 @@ namespace FFXIVClassic_Lobby_Server.packets return header; } - public byte[] getHeaderBytes() + public byte[] GetHeaderBytes() { int size = Marshal.SizeOf(header); byte[] arr = new byte[size]; @@ -144,16 +141,16 @@ namespace FFXIVClassic_Lobby_Server.packets return arr; } - public byte[] getPacketBytes() + public byte[] GetPacketBytes() { byte[] outBytes = new byte[header.packetSize]; - Array.Copy(getHeaderBytes(), 0, outBytes, 0, BASEPACKET_SIZE); + Array.Copy(GetHeaderBytes(), 0, outBytes, 0, BASEPACKET_SIZE); Array.Copy(data, 0, outBytes, BASEPACKET_SIZE, data.Length); return outBytes; } //Replaces all instances of the sniffed actorID with the given one - public void replaceActorID(uint actorID) + public void ReplaceActorID(uint actorID) { using (MemoryStream mem = new MemoryStream(data)) { @@ -176,7 +173,7 @@ namespace FFXIVClassic_Lobby_Server.packets } //Replaces all instances of the sniffed actorID with the given one - public void replaceActorID(uint fromActorID, uint actorID) + public void ReplaceActorID(uint fromActorID, uint actorID) { using (MemoryStream mem = new MemoryStream(data)) { @@ -199,7 +196,7 @@ namespace FFXIVClassic_Lobby_Server.packets } #region Utility Functions - public static BasePacket createPacket(List subpackets, bool isAuthed, bool isEncrypted) + public static BasePacket CreatePacket(List subpackets, bool isAuthed, bool isEncrypted) { //Create Header BasePacketHeader header = new BasePacketHeader(); @@ -221,7 +218,7 @@ namespace FFXIVClassic_Lobby_Server.packets int offset = 0; foreach (SubPacket subpacket in subpackets) { - byte[] subpacketData = subpacket.getBytes(); + byte[] subpacketData = subpacket.GetBytes(); Array.Copy(subpacketData, 0, data, offset, subpacketData.Length); offset += (ushort)subpacketData.Length; } @@ -232,7 +229,7 @@ namespace FFXIVClassic_Lobby_Server.packets return packet; } - public static BasePacket createPacket(SubPacket subpacket, bool isAuthed, bool isEncrypted) + public static BasePacket CreatePacket(SubPacket subpacket, bool isAuthed, bool isEncrypted) { //Create Header BasePacketHeader header = new BasePacketHeader(); @@ -250,7 +247,7 @@ namespace FFXIVClassic_Lobby_Server.packets data = new byte[header.packetSize - 0x10]; //Add Subpackets - byte[] subpacketData = subpacket.getBytes(); + byte[] subpacketData = subpacket.GetBytes(); Array.Copy(subpacketData, 0, data, 0, subpacketData.Length); Debug.Assert(data != null); @@ -259,7 +256,7 @@ namespace FFXIVClassic_Lobby_Server.packets return packet; } - public static BasePacket createPacket(byte[] data, bool isAuthed, bool isEncrypted) + public static BasePacket CreatePacket(byte[] data, bool isAuthed, bool isEncrypted) { Debug.Assert(data != null); @@ -280,7 +277,7 @@ namespace FFXIVClassic_Lobby_Server.packets return packet; } - public static unsafe void encryptPacket(Blowfish blowfish, BasePacket packet) + public static unsafe void EncryptPacket(Blowfish blowfish, BasePacket packet) { byte[] data = packet.data; int size = packet.header.packetSize; @@ -307,7 +304,7 @@ namespace FFXIVClassic_Lobby_Server.packets } - public static unsafe void decryptPacket(Blowfish blowfish, ref BasePacket packet) + public static unsafe void DecryptPacket(Blowfish blowfish, ref BasePacket packet) { byte[] data = packet.data; int size = packet.header.packetSize; @@ -334,14 +331,18 @@ namespace FFXIVClassic_Lobby_Server.packets } #endregion - public void debugPrintPacket() + public void DebugPrintPacket() { #if DEBUG Console.BackgroundColor = ConsoleColor.DarkYellow; - Console.WriteLine("IsAuthed: {0}, IsEncrypted: {1}, Size: 0x{2:X}, Num Subpackets: {3}", header.isAuthenticated, header.isEncrypted, header.packetSize, header.numSubpackets); - Console.WriteLine("{0}", Utils.ByteArrayToHex(getHeaderBytes())); - foreach (SubPacket sub in getSubpackets()) - sub.debugPrintSubPacket(); + + Program.Log.Debug("IsAuth: {0} Size: 0x{1:X}, NumSubpackets: {2}{3}{4}", header.isAuthenticated, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(GetHeaderBytes())); + + foreach (SubPacket sub in GetSubpackets()) + { + sub.DebugPrintSubPacket(); + } + Console.BackgroundColor = ConsoleColor.Black; #endif } diff --git a/FFXIVClassic Lobby Server/packets/HardCoded_Packets.cs b/FFXIVClassic Lobby Server/packets/HardCoded_Packets.cs index 624fa9a3..2d80bd74 100644 --- a/FFXIVClassic Lobby Server/packets/HardCoded_Packets.cs +++ b/FFXIVClassic Lobby Server/packets/HardCoded_Packets.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Lobby_Server.packets +namespace FFXIVClassic_Lobby_Server.packets { class HardCoded_Packets { diff --git a/FFXIVClassic Lobby Server/packets/SubPacket.cs b/FFXIVClassic Lobby Server/packets/SubPacket.cs index 4941d174..f30393b8 100644 --- a/FFXIVClassic Lobby Server/packets/SubPacket.cs +++ b/FFXIVClassic Lobby Server/packets/SubPacket.cs @@ -1,11 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Runtime.InteropServices; -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; namespace FFXIVClassic_Lobby_Server.packets { @@ -106,7 +101,7 @@ namespace FFXIVClassic_Lobby_Server.packets data = original.data; } - public byte[] getHeaderBytes() + public byte[] GetHeaderBytes() { int size = Marshal.SizeOf(header); byte[] arr = new byte[size]; @@ -118,7 +113,7 @@ namespace FFXIVClassic_Lobby_Server.packets return arr; } - public byte[] getGameMessageBytes() + public byte[] GetGameMessageBytes() { int size = Marshal.SizeOf(gameMessage); byte[] arr = new byte[size]; @@ -130,31 +125,29 @@ namespace FFXIVClassic_Lobby_Server.packets return arr; } - public byte[] getBytes() + public byte[] GetBytes() { byte[] outBytes = new byte[header.subpacketSize]; - Array.Copy(getHeaderBytes(), 0, outBytes, 0, SUBPACKET_SIZE); + Array.Copy(GetHeaderBytes(), 0, outBytes, 0, SUBPACKET_SIZE); if (header.type == 0x3) - Array.Copy(getGameMessageBytes(), 0, outBytes, SUBPACKET_SIZE, GAMEMESSAGE_SIZE); + Array.Copy(GetGameMessageBytes(), 0, outBytes, SUBPACKET_SIZE, GAMEMESSAGE_SIZE); Array.Copy(data, 0, outBytes, SUBPACKET_SIZE + (header.type == 0x3 ? GAMEMESSAGE_SIZE : 0), data.Length); return outBytes; } - public void debugPrintSubPacket() + public void DebugPrintSubPacket() { #if DEBUG - Console.BackgroundColor = ConsoleColor.DarkRed; - Console.WriteLine("Size: 0x{0:X}", header.subpacketSize); + Program.Log.Debug("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(GetHeaderBytes())); + if (header.type == 0x03) - Console.WriteLine("Opcode: 0x{0:X}", gameMessage.opcode); - Console.WriteLine("{0}", Utils.ByteArrayToHex(getHeaderBytes())); - if (header.type == 0x03) - Console.WriteLine("{0}", Utils.ByteArrayToHex(getGameMessageBytes())); - Console.BackgroundColor = ConsoleColor.DarkMagenta; - Console.WriteLine("{0}", Utils.ByteArrayToHex(data)); - Console.BackgroundColor = ConsoleColor.Black; + { + Program.Log.Debug("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(GetGameMessageBytes(), SUBPACKET_SIZE)); + } + + Program.Log.Debug("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE)); #endif } diff --git a/FFXIVClassic Lobby Server/packets/receive/CharacterModifyPacket.cs b/FFXIVClassic Lobby Server/packets/receive/CharacterModifyPacket.cs index cc4ebc7f..fc833926 100644 --- a/FFXIVClassic Lobby Server/packets/receive/CharacterModifyPacket.cs +++ b/FFXIVClassic Lobby Server/packets/receive/CharacterModifyPacket.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.packets.receive { diff --git a/FFXIVClassic Lobby Server/packets/receive/SecurityHandshakePacket.cs b/FFXIVClassic Lobby Server/packets/receive/SecurityHandshakePacket.cs index a5fb8b87..b6196ed6 100644 --- a/FFXIVClassic Lobby Server/packets/receive/SecurityHandshakePacket.cs +++ b/FFXIVClassic Lobby Server/packets/receive/SecurityHandshakePacket.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.packets.receive { diff --git a/FFXIVClassic Lobby Server/packets/receive/SelectCharacterPacket.cs b/FFXIVClassic Lobby Server/packets/receive/SelectCharacterPacket.cs index 4e93d593..e23cd88b 100644 --- a/FFXIVClassic Lobby Server/packets/receive/SelectCharacterPacket.cs +++ b/FFXIVClassic Lobby Server/packets/receive/SelectCharacterPacket.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.packets.receive { diff --git a/FFXIVClassic Lobby Server/packets/receive/SessionPacket.cs b/FFXIVClassic Lobby Server/packets/receive/SessionPacket.cs index 53555a8a..4499ca5f 100644 --- a/FFXIVClassic Lobby Server/packets/receive/SessionPacket.cs +++ b/FFXIVClassic Lobby Server/packets/receive/SessionPacket.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.packets.receive { diff --git a/FFXIVClassic Lobby Server/packets/send/AccountListPacket.cs b/FFXIVClassic Lobby Server/packets/send/AccountListPacket.cs index 743ace70..9bedc3d3 100644 --- a/FFXIVClassic Lobby Server/packets/send/AccountListPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/AccountListPacket.cs @@ -2,9 +2,7 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.packets { @@ -22,7 +20,7 @@ namespace FFXIVClassic_Lobby_Server.packets this.accountList = accountList; } - public List buildPackets() + public List BuildPackets() { List subPackets = new List(); diff --git a/FFXIVClassic Lobby Server/packets/send/CharaCreatorPacket.cs b/FFXIVClassic Lobby Server/packets/send/CharaCreatorPacket.cs index d78f1eaf..d5b9289b 100644 --- a/FFXIVClassic Lobby Server/packets/send/CharaCreatorPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/CharaCreatorPacket.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.packets { @@ -39,7 +36,7 @@ namespace FFXIVClassic_Lobby_Server.packets this.worldName = worldName; } - public SubPacket buildPacket() + public SubPacket BuildPacket() { MemoryStream memStream = new MemoryStream(0x1F0); BinaryWriter binWriter = new BinaryWriter(memStream); diff --git a/FFXIVClassic Lobby Server/packets/send/CharacterListPacket.cs b/FFXIVClassic Lobby Server/packets/send/CharacterListPacket.cs index 5d0927a2..2ad1b0b9 100644 --- a/FFXIVClassic Lobby Server/packets/send/CharacterListPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/CharacterListPacket.cs @@ -1,11 +1,8 @@ using FFXIVClassic_Lobby_Server.dataobjects; -using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.packets { @@ -23,7 +20,7 @@ namespace FFXIVClassic_Lobby_Server.packets this.characterList = characterList; } - public List buildPackets() + public List BuildPackets() { List subPackets = new List(); @@ -37,7 +34,7 @@ namespace FFXIVClassic_Lobby_Server.packets foreach (Character chara in characterList) { - Appearance appearance = Database.getAppearance(chara.id); + Appearance appearance = Database.GetAppearance(chara.id); if (totalCount == 0 || characterCount % MAXPERPACKET == 0) { @@ -56,7 +53,7 @@ namespace FFXIVClassic_Lobby_Server.packets binWriter.Seek(0x10 + (0x1D0 * characterCount), SeekOrigin.Begin); //Write Entries - World world = Database.getServer(chara.serverId); + World world = Database.GetServer(chara.serverId); string worldname = world == null ? "Unknown" : world.name; binWriter.Write((uint)0); //??? @@ -77,8 +74,8 @@ namespace FFXIVClassic_Lobby_Server.packets binWriter.Write(Encoding.ASCII.GetBytes(chara.name.PadRight(0x20, '\0'))); //Name binWriter.Write(Encoding.ASCII.GetBytes(worldname.PadRight(0xE, '\0'))); //World Name - binWriter.Write(CharaInfo.buildForCharaList(chara, appearance)); //Appearance Data - //binWriter.Write(CharaInfo.debug()); //Appearance Data + binWriter.Write(CharaInfo.BuildForCharaList(chara, appearance)); //Appearance Data + //binWriter.Write(CharaInfo.Debug()); //Appearance Data characterCount++; totalCount++; diff --git a/FFXIVClassic Lobby Server/packets/send/ErrorPacket.cs b/FFXIVClassic Lobby Server/packets/send/ErrorPacket.cs index 2b9b2e53..0e707e62 100644 --- a/FFXIVClassic Lobby Server/packets/send/ErrorPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/ErrorPacket.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.packets { @@ -26,7 +23,7 @@ namespace FFXIVClassic_Lobby_Server.packets this.message = message; } - public SubPacket buildPacket() + public SubPacket BuildPacket() { MemoryStream memStream = new MemoryStream(0x210); BinaryWriter binWriter = new BinaryWriter(memStream); diff --git a/FFXIVClassic Lobby Server/packets/send/ImportListPacket.cs b/FFXIVClassic Lobby Server/packets/send/ImportListPacket.cs index c8afd789..80bce85c 100644 --- a/FFXIVClassic Lobby Server/packets/send/ImportListPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/ImportListPacket.cs @@ -1,10 +1,7 @@ -using FFXIVClassic_Lobby_Server.dataobjects; -using System; +using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.packets { @@ -22,7 +19,7 @@ namespace FFXIVClassic_Lobby_Server.packets this.namesList = names; } - public List buildPackets() + public List BuildPackets() { List subPackets = new List(); diff --git a/FFXIVClassic Lobby Server/packets/send/RetainerListPacket.cs b/FFXIVClassic Lobby Server/packets/send/RetainerListPacket.cs index b00d2b2a..c12c245b 100644 --- a/FFXIVClassic Lobby Server/packets/send/RetainerListPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/RetainerListPacket.cs @@ -1,10 +1,7 @@ -using FFXIVClassic_Lobby_Server.dataobjects; -using System; +using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.packets { @@ -22,7 +19,7 @@ namespace FFXIVClassic_Lobby_Server.packets this.retainerList = retainerList; } - public List buildPackets() + public List BuildPackets() { List subPackets = new List(); diff --git a/FFXIVClassic Lobby Server/packets/send/SelectCharacterConfirmPacket.cs b/FFXIVClassic Lobby Server/packets/send/SelectCharacterConfirmPacket.cs index 5d00437f..352c11e3 100644 --- a/FFXIVClassic Lobby Server/packets/send/SelectCharacterConfirmPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/SelectCharacterConfirmPacket.cs @@ -1,9 +1,7 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.packets { @@ -28,7 +26,7 @@ namespace FFXIVClassic_Lobby_Server.packets this.selectCharTicket = selectCharTicket; } - public List buildPackets() + public List BuildPackets() { List subPackets = new List(); diff --git a/FFXIVClassic Lobby Server/packets/send/WorldListPacket.cs b/FFXIVClassic Lobby Server/packets/send/WorldListPacket.cs index e2912825..06866bfc 100644 --- a/FFXIVClassic Lobby Server/packets/send/WorldListPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/WorldListPacket.cs @@ -2,9 +2,7 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Lobby_Server.packets { @@ -22,7 +20,7 @@ namespace FFXIVClassic_Lobby_Server.packets this.worldList = serverList; } - public List buildPackets() + public List BuildPackets() { List subPackets = new List(); diff --git a/FFXIVClassic Lobby Server/utils/CharacterCreatorUtils.cs b/FFXIVClassic Lobby Server/utils/CharacterCreatorUtils.cs index e1c5f03e..d062bbbf 100644 --- a/FFXIVClassic Lobby Server/utils/CharacterCreatorUtils.cs +++ b/FFXIVClassic Lobby Server/utils/CharacterCreatorUtils.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; namespace FFXIVClassic_Lobby_Server.utils { diff --git a/FFXIVClassic Map Server/ClientConnection.cs b/FFXIVClassic Map Server/ClientConnection.cs index ae14c995..8592d78c 100644 --- a/FFXIVClassic Map Server/ClientConnection.cs +++ b/FFXIVClassic Map Server/ClientConnection.cs @@ -1,18 +1,11 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Net.Sockets; -using FFXIVClassic_Lobby_Server.packets; -using System.Diagnostics; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic_Map_Server.packets; +using FFXIVClassic.Common; using System.Collections.Concurrent; -using System.IO; -using Cyotek.Collections.Generic; using System.Net; -namespace FFXIVClassic_Lobby_Server +namespace FFXIVClassic_Map_Server { class ClientConnection { @@ -20,54 +13,54 @@ namespace FFXIVClassic_Lobby_Server public Blowfish blowfish; public Socket socket; public byte[] buffer; - private BlockingCollection sendPacketQueue = new BlockingCollection(1000); + private BlockingCollection SendPacketQueue = new BlockingCollection(1000); public int lastPartialSize = 0; //Instance Stuff public uint owner = 0; public int connType = 0; - public void queuePacket(BasePacket packet) + public void QueuePacket(BasePacket packet) { - sendPacketQueue.Add(packet); + SendPacketQueue.Add(packet); } - public void queuePacket(SubPacket subpacket, bool isAuthed, bool isEncrypted) + public void QueuePacket(SubPacket subpacket, bool isAuthed, bool isEncrypted) { - sendPacketQueue.Add(BasePacket.createPacket(subpacket, isAuthed, isEncrypted)); + SendPacketQueue.Add(BasePacket.CreatePacket(subpacket, isAuthed, isEncrypted)); } - public void flushQueuedSendPackets() + public void FlushQueuedSendPackets() { if (!socket.Connected) return; - while (sendPacketQueue.Count > 0) + while (SendPacketQueue.Count > 0) { - BasePacket packet = sendPacketQueue.Take(); + BasePacket packet = SendPacketQueue.Take(); - byte[] packetBytes = packet.getPacketBytes(); + byte[] packetBytes = packet.GetPacketBytes(); try { socket.Send(packetBytes); } catch (Exception e) - { Log.error(String.Format("Weird case, socket was d/ced: {0}", e)); } + { Program.Log.Error("Weird case, socket was d/ced: {0}", e); } } } - public String getAddress() + public String GetAddress() { return String.Format("{0}:{1}", (socket.RemoteEndPoint as IPEndPoint).Address, (socket.RemoteEndPoint as IPEndPoint).Port); } - public bool isConnected() + public bool IsConnected() { return (socket.Poll(1, SelectMode.SelectRead) && socket.Available == 0); } - public void disconnect() + public void Disconnect() { if (socket.Connected) socket.Disconnect(false); diff --git a/FFXIVClassic Map Server/CommandProcessor.cs b/FFXIVClassic Map Server/CommandProcessor.cs index e39ecb88..23ea3d7c 100644 --- a/FFXIVClassic Map Server/CommandProcessor.cs +++ b/FFXIVClassic Map Server/CommandProcessor.cs @@ -6,9 +6,9 @@ using System.Net; using System.Net.Sockets; using System.Threading.Tasks; using System.Threading; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.dataobjects; -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server.packets; using System.IO; using FFXIVClassic_Map_Server.packets.send.actor; using FFXIVClassic_Map_Server; @@ -19,7 +19,7 @@ using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.actors.chara.player; using FFXIVClassic_Map_Server.Properties; -namespace FFXIVClassic_Lobby_Server +namespace FFXIVClassic_Map_Server { class CommandProcessor { @@ -35,45 +35,45 @@ namespace FFXIVClassic_Lobby_Server mConnectedPlayerList = playerList; } - public void sendPacket(ConnectedPlayer client, string path) + public void SendPacket(ConnectedPlayer client, string path) { BasePacket packet = new BasePacket(path); if (client != null) { - packet.replaceActorID(client.actorID); - client.queuePacket(packet); + packet.ReplaceActorID(client.actorID); + client.QueuePacket(packet); } else { foreach (KeyValuePair entry in mConnectedPlayerList) { - packet.replaceActorID(entry.Value.actorID); - entry.Value.queuePacket(packet); + packet.ReplaceActorID(entry.Value.actorID); + entry.Value.QueuePacket(packet); } } } - public void changeProperty(uint id, uint value, string target) + public void ChangeProperty(uint id, uint value, string target) { - SetActorPropetyPacket changeProperty = new SetActorPropetyPacket(target); + SetActorPropetyPacket ChangeProperty = new SetActorPropetyPacket(target); - changeProperty.setTarget(target); - changeProperty.addInt(id, value); - changeProperty.addTarget(); + ChangeProperty.SetTarget(target); + ChangeProperty.AddInt(id, value); + ChangeProperty.AddTarget(); foreach (KeyValuePair entry in mConnectedPlayerList) { - SubPacket changePropertyPacket = changeProperty.buildPacket((entry.Value.actorID), (entry.Value.actorID)); + SubPacket ChangePropertyPacket = ChangeProperty.BuildPacket((entry.Value.actorID), (entry.Value.actorID)); - BasePacket packet = BasePacket.createPacket(changePropertyPacket, true, false); - packet.debugPrintPacket(); + BasePacket packet = BasePacket.CreatePacket(ChangePropertyPacket, true, false); + packet.DebugPrintPacket(); - entry.Value.queuePacket(packet); + entry.Value.QueuePacket(packet); } } - public void doMusic(ConnectedPlayer client, string music) + public void DoMusic(ConnectedPlayer client, string music) { ushort musicId; @@ -83,13 +83,13 @@ namespace FFXIVClassic_Lobby_Server musicId = Convert.ToUInt16(music); if (client != null) - client.queuePacket(BasePacket.createPacket(SetMusicPacket.buildPacket(client.actorID, musicId, 1), true, false)); + client.QueuePacket(BasePacket.CreatePacket(SetMusicPacket.BuildPacket(client.actorID, musicId, 1), true, false)); else { foreach (KeyValuePair entry in mConnectedPlayerList) { - BasePacket musicPacket = BasePacket.createPacket(SetMusicPacket.buildPacket(entry.Value.actorID, musicId, 1), true, false); - entry.Value.queuePacket(musicPacket); + BasePacket musicPacket = BasePacket.CreatePacket(SetMusicPacket.BuildPacket(entry.Value.actorID, musicId, 1), true, false); + entry.Value.QueuePacket(musicPacket); } } } @@ -99,228 +99,228 @@ namespace FFXIVClassic_Lobby_Server /// /// The current player /// Predefined list: <ffxiv_database>\server_zones_spawnlocations - public void doWarp(ConnectedPlayer client, uint id) + public void DoWarp(ConnectedPlayer client, uint id) { WorldManager worldManager = Server.GetWorldManager(); - FFXIVClassic_Map_Server.WorldManager.ZoneEntrance ze = worldManager.getZoneEntrance(id); + FFXIVClassic_Map_Server.WorldManager.ZoneEntrance ze = worldManager.GetZoneEntrance(id); if (ze == null) return; if (client != null) - worldManager.DoZoneChange(client.getActor(), ze.zoneId, ze.privateAreaName, ze.spawnType, ze.spawnX, ze.spawnY, ze.spawnZ, ze.spawnRotation); + worldManager.DoZoneChange(client.GetActor(), ze.zoneId, ze.privateAreaName, ze.spawnType, ze.spawnX, ze.spawnY, ze.spawnZ, ze.spawnRotation); else { foreach (KeyValuePair entry in mConnectedPlayerList) { - worldManager.DoZoneChange(entry.Value.getActor(), ze.zoneId, ze.privateAreaName, ze.spawnType, ze.spawnX, ze.spawnY, ze.spawnZ, ze.spawnRotation); + worldManager.DoZoneChange(entry.Value.GetActor(), ze.zoneId, ze.privateAreaName, ze.spawnType, ze.spawnX, ze.spawnY, ze.spawnZ, ze.spawnRotation); } } } - public void doWarp(ConnectedPlayer client, uint zoneId, string privateArea, byte spawnType, float x, float y, float z, float r) + public void DoWarp(ConnectedPlayer client, uint zoneId, string privateArea, byte spawnType, float x, float y, float z, float r) { WorldManager worldManager = Server.GetWorldManager(); if (worldManager.GetZone(zoneId) == null) { if (client != null) - client.queuePacket(BasePacket.createPacket(SendMessagePacket.buildPacket(client.actorID, client.actorID, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", "Zone does not exist or setting isn't valid."), true, false)); - Log.error("Zone does not exist or setting isn't valid."); + client.QueuePacket(BasePacket.CreatePacket(SendMessagePacket.BuildPacket(client.actorID, client.actorID, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", "Zone does not exist or setting isn't valid."), true, false)); + Program.Log.Error("Zone does not exist or setting isn't valid."); } if (client != null) - worldManager.DoZoneChange(client.getActor(), zoneId, privateArea, spawnType, x, y, z, r); + worldManager.DoZoneChange(client.GetActor(), zoneId, privateArea, spawnType, x, y, z, r); else { foreach (KeyValuePair entry in mConnectedPlayerList) { - worldManager.DoZoneChange(entry.Value.getActor(), zoneId, privateArea, spawnType, x, y, z, r); + worldManager.DoZoneChange(entry.Value.GetActor(), zoneId, privateArea, spawnType, x, y, z, r); } } } - public void printPos(ConnectedPlayer client) + public void PrintPos(ConnectedPlayer client) { if (client != null) { - Player p = client.getActor(); - client.queuePacket(BasePacket.createPacket(SendMessagePacket.buildPacket(client.actorID, client.actorID, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", String.Format("{0}\'s position: ZoneID: {1}, X: {2}, Y: {3}, Z: {4}, Rotation: {5}", p.customDisplayName, p.zoneId, p.positionX, p.positionY, p.positionZ, p.rotation)), true, false)); + Player p = client.GetActor(); + client.QueuePacket(BasePacket.CreatePacket(SendMessagePacket.BuildPacket(client.actorID, client.actorID, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", String.Format("{0}\'s position: ZoneID: {1}, X: {2}, Y: {3}, Z: {4}, Rotation: {5}", p.customDisplayName, p.zoneId, p.positionX, p.positionY, p.positionZ, p.rotation)), true, false)); } else { foreach (KeyValuePair entry in mConnectedPlayerList) { - Player p = entry.Value.getActor(); - Log.info(String.Format("{0}\'s position: ZoneID: {1}, X: {2}, Y: {3}, Z: {4}, Rotation: {5}", p.customDisplayName, p.zoneId, p.positionX, p.positionY, p.positionZ, p.rotation)); + Player p = entry.Value.GetActor(); + Program.Log.Info(String.Format("{0}\'s position: ZoneID: {1}, X: {2}, Y: {3}, Z: {4}, Rotation: {5}", p.customDisplayName, p.zoneId, p.positionX, p.positionY, p.positionZ, p.rotation)); } } } - private void setGraphic(ConnectedPlayer client, uint slot, uint wId, uint eId, uint vId, uint cId) + private void SetGraphic(ConnectedPlayer client, uint slot, uint wId, uint eId, uint vId, uint cId) { if (client != null) { - Player p = client.getActor(); - p.graphicChange(slot, wId, eId, vId, cId); - p.sendAppearance(); + Player p = client.GetActor(); + p.GraphicChange(slot, wId, eId, vId, cId); + p.SendAppearance(); } else { foreach (KeyValuePair entry in mConnectedPlayerList) { - Player p = entry.Value.getActor(); - p.graphicChange(slot, wId, eId, vId, cId); - p.sendAppearance(); + Player p = entry.Value.GetActor(); + p.GraphicChange(slot, wId, eId, vId, cId); + p.SendAppearance(); } } } - private void giveItem(ConnectedPlayer client, uint itemId, int quantity) + private void GiveItem(ConnectedPlayer client, uint itemId, int quantity) { if (client != null) { - Player p = client.getActor(); - p.getInventory(Inventory.NORMAL).addItem(itemId, quantity); + Player p = client.GetActor(); + p.GetInventory(Inventory.NORMAL).AddItem(itemId, quantity); } else { foreach (KeyValuePair entry in mConnectedPlayerList) { - Player p = entry.Value.getActor(); - p.getInventory(Inventory.NORMAL).addItem(itemId, quantity); + Player p = entry.Value.GetActor(); + p.GetInventory(Inventory.NORMAL).AddItem(itemId, quantity); } } } - private void giveItem(ConnectedPlayer client, uint itemId, int quantity, ushort type) + private void GiveItem(ConnectedPlayer client, uint itemId, int quantity, ushort type) { if (client != null) { - Player p = client.getActor(); + Player p = client.GetActor(); - if (p.getInventory(type) != null) - p.getInventory(type).addItem(itemId, quantity); + if (p.GetInventory(type) != null) + p.GetInventory(type).AddItem(itemId, quantity); } else { foreach (KeyValuePair entry in mConnectedPlayerList) { - Player p = entry.Value.getActor(); + Player p = entry.Value.GetActor(); - if (p.getInventory(type) != null) - p.getInventory(type).addItem(itemId, quantity); + if (p.GetInventory(type) != null) + p.GetInventory(type).AddItem(itemId, quantity); } } } - private void removeItem(ConnectedPlayer client, uint itemId, int quantity) + private void RemoveItem(ConnectedPlayer client, uint itemId, int quantity) { if (client != null) { - Player p = client.getActor(); - p.getInventory(Inventory.NORMAL).removeItem(itemId, quantity); + Player p = client.GetActor(); + p.GetInventory(Inventory.NORMAL).RemoveItem(itemId, quantity); } else { foreach (KeyValuePair entry in mConnectedPlayerList) { - Player p = entry.Value.getActor(); - p.getInventory(Inventory.NORMAL).removeItem(itemId, quantity); + Player p = entry.Value.GetActor(); + p.GetInventory(Inventory.NORMAL).RemoveItem(itemId, quantity); } } } - private void removeItem(ConnectedPlayer client, uint itemId, int quantity, ushort type) + private void RemoveItem(ConnectedPlayer client, uint itemId, int quantity, ushort type) { if (client != null) { - Player p = client.getActor(); + Player p = client.GetActor(); - if (p.getInventory(type) != null) - p.getInventory(type).removeItem(itemId, quantity); + if (p.GetInventory(type) != null) + p.GetInventory(type).RemoveItem(itemId, quantity); } else { foreach (KeyValuePair entry in mConnectedPlayerList) { - Player p = entry.Value.getActor(); + Player p = entry.Value.GetActor(); - if (p.getInventory(type) != null) - p.getInventory(type).removeItem(itemId, quantity); + if (p.GetInventory(type) != null) + p.GetInventory(type).RemoveItem(itemId, quantity); } } } - private void giveCurrency(ConnectedPlayer client, uint itemId, int quantity) + private void GiveCurrency(ConnectedPlayer client, uint itemId, int quantity) { if (client != null) { - Player p = client.getActor(); - p.getInventory(Inventory.CURRENCY).addItem(itemId, quantity); + Player p = client.GetActor(); + p.GetInventory(Inventory.CURRENCY).AddItem(itemId, quantity); } else { foreach (KeyValuePair entry in mConnectedPlayerList) { - Player p = entry.Value.getActor(); - p.getInventory(Inventory.CURRENCY).addItem(itemId, quantity); + Player p = entry.Value.GetActor(); + p.GetInventory(Inventory.CURRENCY).AddItem(itemId, quantity); } } } - // TODO: make removeCurrency() remove all quantity of a currency if quantity_to_remove > quantity_in_inventory instead of silently failing - private void removeCurrency(ConnectedPlayer client, uint itemId, int quantity) + // TODO: make RemoveCurrency() Remove all quantity of a currency if quantity_to_Remove > quantity_in_inventory instead of silently failing + private void RemoveCurrency(ConnectedPlayer client, uint itemId, int quantity) { if (client != null) { - Player p = client.getActor(); - p.getInventory(Inventory.CURRENCY).removeItem(itemId, quantity); + Player p = client.GetActor(); + p.GetInventory(Inventory.CURRENCY).RemoveItem(itemId, quantity); } else { foreach (KeyValuePair entry in mConnectedPlayerList) { - Player p = entry.Value.getActor(); - p.getInventory(Inventory.CURRENCY).removeItem(itemId, quantity); + Player p = entry.Value.GetActor(); + p.GetInventory(Inventory.CURRENCY).RemoveItem(itemId, quantity); } } } - private void giveKeyItem(ConnectedPlayer client, uint itemId) + private void GiveKeyItem(ConnectedPlayer client, uint itemId) { if (client != null) { - Player p = client.getActor(); - p.getInventory(Inventory.KEYITEMS).addItem(itemId, 1); + Player p = client.GetActor(); + p.GetInventory(Inventory.KEYITEMS).AddItem(itemId, 1); } else { foreach (KeyValuePair entry in mConnectedPlayerList) { - Player p = entry.Value.getActor(); - p.getInventory(Inventory.KEYITEMS).addItem(itemId, 1); + Player p = entry.Value.GetActor(); + p.GetInventory(Inventory.KEYITEMS).AddItem(itemId, 1); } } } - private void removeKeyItem(ConnectedPlayer client, uint itemId) + private void RemoveKeyItem(ConnectedPlayer client, uint itemId) { if (client != null) { - Player p = client.getActor(); - p.getInventory(Inventory.KEYITEMS).removeItem(itemId, 1); + Player p = client.GetActor(); + p.GetInventory(Inventory.KEYITEMS).RemoveItem(itemId, 1); } else { foreach (KeyValuePair entry in mConnectedPlayerList) { - Player p = entry.Value.getActor(); - p.getInventory(Inventory.KEYITEMS).removeItem(itemId, 1); + Player p = entry.Value.GetActor(); + p.GetInventory(Inventory.KEYITEMS).RemoveItem(itemId, 1); } } } - private void parseWarp(ConnectedPlayer client, string[] split) + private void ParseWarp(ConnectedPlayer client, string[] split) { float x = 0, y = 0, z = 0, r = 0.0f; uint zoneId = 0; @@ -340,7 +340,7 @@ namespace FFXIVClassic_Lobby_Server catch{return;} #endregion - doWarp(client, zoneId); + DoWarp(client, zoneId); } else if (split.Length == 4) { @@ -352,7 +352,7 @@ namespace FFXIVClassic_Lobby_Server if (String.IsNullOrEmpty(split[1])) split[1] = "0"; - try { x = Single.Parse(split[1]) + client.getActor().positionX; } + try { x = Single.Parse(split[1]) + client.GetActor().positionX; } catch{return;} split[1] = x.ToString(); @@ -364,7 +364,7 @@ namespace FFXIVClassic_Lobby_Server if (String.IsNullOrEmpty(split[2])) split[2] = "0"; - try { y = Single.Parse(split[2]) + client.getActor().positionY; } + try { y = Single.Parse(split[2]) + client.GetActor().positionY; } catch{return;} split[2] = y.ToString(); @@ -376,7 +376,7 @@ namespace FFXIVClassic_Lobby_Server if (String.IsNullOrEmpty(split[3])) split[3] = "0"; - try { z = Single.Parse(split[3]) + client.getActor().positionZ; } + try { z = Single.Parse(split[3]) + client.GetActor().positionZ; } catch{return;} split[3] = z.ToString(); @@ -390,12 +390,12 @@ namespace FFXIVClassic_Lobby_Server } catch{return;} - zoneId = client.getActor().zoneId; - r = client.getActor().rotation; + zoneId = client.GetActor().zoneId; + r = client.GetActor().rotation; #endregion - sendMessage(client, String.Format("Warping to: ZoneID: {0} X: {1}, Y: {2}, Z: {3}", zoneId, x, y, z)); - doWarp(client, zoneId, privatearea, 0x00, x, y, z, r); + SendMessage(client, String.Format("Warping to: ZoneID: {0} X: {1}, Y: {2}, Z: {3}", zoneId, x, y, z)); + DoWarp(client, zoneId, privatearea, 0x00, x, y, z, r); } else if (split.Length == 5) { @@ -420,8 +420,8 @@ namespace FFXIVClassic_Lobby_Server } #endregion - sendMessage(client, String.Format("Warping to: ZoneID: {0} X: {1}, Y: {2}, Z: {3}", zoneId, x, y, z)); - doWarp(client, zoneId, privatearea, 0x2, x, y, z, r); + SendMessage(client, String.Format("Warping to: ZoneID: {0} X: {1}, Y: {2}, Z: {3}", zoneId, x, y, z)); + DoWarp(client, zoneId, privatearea, 0x2, x, y, z, r); } else if (split.Length == 6) { @@ -448,8 +448,8 @@ namespace FFXIVClassic_Lobby_Server privatearea = split[2]; #endregion - sendMessage(client, String.Format("Warping to: ZoneID: {0} X: {1}, Y: {2}, Z: {3}", zoneId, x, y, z)); - doWarp(client, zoneId, privatearea, 0x2, x, y, z, r); + SendMessage(client, String.Format("Warping to: ZoneID: {0} X: {1}, Y: {2}, Z: {3}", zoneId, x, y, z)); + DoWarp(client, zoneId, privatearea, 0x2, x, y, z, r); } else return; // catch any invalid warps here @@ -461,7 +461,7 @@ namespace FFXIVClassic_Lobby_Server if (client != null) { - client.queuePacket(BasePacket.createPacket(SetWeatherPacket.buildPacket(client.actorID, weather, Convert.ToUInt16(value)), true, false)); + client.QueuePacket(BasePacket.CreatePacket(SetWeatherPacket.BuildPacket(client.actorID, weather, Convert.ToUInt16(value)), true, false)); } /* @@ -470,15 +470,15 @@ namespace FFXIVClassic_Lobby_Server uint currentZoneID; if (client != null) { - currentZoneID = client.getActor().zoneId; + currentZoneID = client.GetActor().zoneId; foreach (KeyValuePair entry in mConnectedPlayerList) { // Change the weather for everyone in the same zone - if (currentZoneID == entry.Value.getActor().zoneId) + if (currentZoneID == entry.Value.GetActor().zoneId) { - BasePacket weatherPacket = BasePacket.createPacket(SetWeatherPacket.buildPacket(entry.Value.actorID, weather), true, false); - entry.Value.queuePacket(weatherPacket); + BasePacket weatherPacket = BasePacket.CreatePacket(SetWeatherPacket.BuildPacket(entry.Value.actorID, weather), true, false); + entry.Value.QueuePacket(weatherPacket); } } } @@ -491,13 +491,13 @@ namespace FFXIVClassic_Lobby_Server /// /// /// - private void sendMessage(ConnectedPlayer client, String message) + private void SendMessage(ConnectedPlayer client, String message) { if (client != null) - client.getActor().queuePacket(SendMessagePacket.buildPacket(client.actorID, client.actorID, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", message)); + client.GetActor().QueuePacket(SendMessagePacket.BuildPacket(client.actorID, client.actorID, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", message)); } - internal bool doCommand(string input, ConnectedPlayer client) + internal bool DoCommand(string input, ConnectedPlayer client) { input.Trim(); if (input.StartsWith("!")) @@ -508,7 +508,7 @@ namespace FFXIVClassic_Lobby_Server split = split.Where(temp => temp != "").ToArray(); // strips extra whitespace from commands // Debug - //sendMessage(client, string.Join(",", split)); + //SendMessage(client, string.Join(",", split)); if (split.Length >= 1) { @@ -517,41 +517,41 @@ namespace FFXIVClassic_Lobby_Server { if (split.Length == 1) { - sendMessage(client, Resources.CPhelp); + SendMessage(client, Resources.CPhelp); } if (split.Length == 2) { if (split[1].Equals("mypos")) - sendMessage(client, Resources.CPmypos); + SendMessage(client, Resources.CPmypos); else if (split[1].Equals("music")) - sendMessage(client, Resources.CPmusic); + SendMessage(client, Resources.CPmusic); else if (split[1].Equals("warp")) - sendMessage(client, Resources.CPwarp); + SendMessage(client, Resources.CPwarp); else if (split[1].Equals("givecurrency")) - sendMessage(client, Resources.CPgivecurrency); + SendMessage(client, Resources.CPgivecurrency); else if (split[1].Equals("giveitem")) - sendMessage(client, Resources.CPgiveitem); + SendMessage(client, Resources.CPgiveitem); else if (split[1].Equals("givekeyitem")) - sendMessage(client, Resources.CPgivekeyitem); - else if (split[1].Equals("removecurrency")) - sendMessage(client, Resources.CPremovecurrency); - else if (split[1].Equals("removeitem")) - sendMessage(client, Resources.CPremoveitem); - else if (split[1].Equals("removekeyitem")) - sendMessage(client, Resources.CPremovekeyitem); + SendMessage(client, Resources.CPgivekeyitem); + else if (split[1].Equals("Removecurrency")) + SendMessage(client, Resources.CPRemovecurrency); + else if (split[1].Equals("Removeitem")) + SendMessage(client, Resources.CPRemoveitem); + else if (split[1].Equals("Removekeyitem")) + SendMessage(client, Resources.CPRemovekeyitem); else if (split[1].Equals("reloaditems")) - sendMessage(client, Resources.CPreloaditems); + SendMessage(client, Resources.CPreloaditems); else if (split[1].Equals("reloadzones")) - sendMessage(client, Resources.CPreloadzones); + SendMessage(client, Resources.CPreloadzones); /* else if (split[1].Equals("property")) - sendMessage(client, Resources.CPproperty); + SendMessage(client, Resources.CPproperty); else if (split[1].Equals("property2")) - sendMessage(client, Resources.CPproperty2); + SendMessage(client, Resources.CPproperty2); else if (split[1].Equals("sendpacket")) - sendMessage(client, Resources.CPsendpacket); + SendMessage(client, Resources.CPsendpacket); else if (split[1].Equals("setgraphic")) - sendMessage(client, Resources.CPsetgraphic); + SendMessage(client, Resources.CPsetgraphic); */ } if (split.Length == 3) @@ -559,7 +559,7 @@ namespace FFXIVClassic_Lobby_Server if(split[1].Equals("test")) { if (split[2].Equals("weather")) - sendMessage(client, Resources.CPtestweather); + SendMessage(client, Resources.CPtestweather); } } @@ -573,7 +573,7 @@ namespace FFXIVClassic_Lobby_Server if (split.Length == 1) { // catch invalid commands - sendMessage(client, Resources.CPhelp); + SendMessage(client, Resources.CPhelp); } else if (split.Length >= 2) { @@ -587,7 +587,7 @@ namespace FFXIVClassic_Lobby_Server } catch (Exception e) { - Log.error("Could not change weather: " + e); + Program.Log.Error("Could not change weather: " + e); } } #endregion @@ -601,12 +601,12 @@ namespace FFXIVClassic_Lobby_Server { try { - printPos(client); + PrintPos(client); return true; } catch (Exception e) { - Log.error("Could not load packet: " + e); + Program.Log.Error("Could not load packet: " + e); } } #endregion @@ -616,13 +616,13 @@ namespace FFXIVClassic_Lobby_Server { if (client != null) { - Log.info(String.Format("Got request to reset zone: {0}", client.getActor().zoneId)); - client.getActor().zone.clear(); - client.getActor().zone.addActorToZone(client.getActor()); - client.getActor().sendInstanceUpdate(); - client.queuePacket(BasePacket.createPacket(SendMessagePacket.buildPacket(client.actorID, client.actorID, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", String.Format("Reseting zone {0}...", client.getActor().zoneId)), true, false)); + Program.Log.Info(String.Format("Got request to reset zone: {0}", client.GetActor().zoneId)); + client.GetActor().zone.Clear(); + client.GetActor().zone.AddActorToZone(client.GetActor()); + client.GetActor().SendInstanceUpdate(); + client.QueuePacket(BasePacket.CreatePacket(SendMessagePacket.BuildPacket(client.actorID, client.actorID, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", String.Format("Reseting zone {0}...", client.GetActor().zoneId)), true, false)); } - Server.GetWorldManager().reloadZone(client.getActor().zoneId); + Server.GetWorldManager().reloadZone(client.GetActor().zoneId); return true; } #endregion @@ -630,12 +630,12 @@ namespace FFXIVClassic_Lobby_Server #region !reloaditems else if (split[0].Equals("reloaditems")) { - Log.info(String.Format("Got request to reload item gamedata")); - sendMessage(client, "Reloading Item Gamedata..."); + Program.Log.Info(String.Format("Got request to reload item gamedata")); + SendMessage(client, "Reloading Item Gamedata..."); gamedataItems.Clear(); - gamedataItems = Database.getItemGamedata(); - Log.info(String.Format("Loaded {0} items.", gamedataItems.Count)); - sendMessage(client, String.Format("Loaded {0} items.", gamedataItems.Count)); + gamedataItems = Database.GetItemGamedata(); + Program.Log.Info(String.Format("Loaded {0} items.", gamedataItems.Count)); + SendMessage(client, String.Format("Loaded {0} items.", gamedataItems.Count)); return true; } #endregion @@ -648,12 +648,12 @@ namespace FFXIVClassic_Lobby_Server try { - sendPacket(client, "./packets/" + split[1]); + SendPacket(client, "./packets/" + split[1]); return true; } catch (Exception e) { - Log.error("Could not load packet: " + e); + Program.Log.Error("Could not load packet: " + e); } } #endregion @@ -664,12 +664,12 @@ namespace FFXIVClassic_Lobby_Server try { if (split.Length == 6) - setGraphic(client, UInt32.Parse(split[1]), UInt32.Parse(split[2]), UInt32.Parse(split[3]), UInt32.Parse(split[4]), UInt32.Parse(split[5])); + SetGraphic(client, UInt32.Parse(split[1]), UInt32.Parse(split[2]), UInt32.Parse(split[3]), UInt32.Parse(split[4]), UInt32.Parse(split[5])); return true; } catch (Exception e) { - Log.error("Could not give item."); + Program.Log.Error("Could not give item."); } } #endregion @@ -680,22 +680,22 @@ namespace FFXIVClassic_Lobby_Server try { if (split.Length == 2) - giveItem(client, UInt32.Parse(split[1]), 1); + GiveItem(client, UInt32.Parse(split[1]), 1); else if (split.Length == 3) - giveItem(client, UInt32.Parse(split[1]), Int32.Parse(split[2])); + GiveItem(client, UInt32.Parse(split[1]), Int32.Parse(split[2])); else if (split.Length == 4) - giveItem(client, UInt32.Parse(split[1]), Int32.Parse(split[2]), UInt16.Parse(split[3])); + GiveItem(client, UInt32.Parse(split[1]), Int32.Parse(split[2]), UInt16.Parse(split[3])); return true; } catch (Exception e) { - Log.error("Could not give item."); + Program.Log.Error("Could not give item."); } } #endregion - #region !removeitem - else if (split[0].Equals("removeitem")) + #region !Removeitem + else if (split[0].Equals("Removeitem")) { if (split.Length < 2) return false; @@ -703,16 +703,16 @@ namespace FFXIVClassic_Lobby_Server try { if (split.Length == 2) - removeItem(client, UInt32.Parse(split[1]), 1); + RemoveItem(client, UInt32.Parse(split[1]), 1); else if (split.Length == 3) - removeItem(client, UInt32.Parse(split[1]), Int32.Parse(split[2])); + RemoveItem(client, UInt32.Parse(split[1]), Int32.Parse(split[2])); else if (split.Length == 4) - removeItem(client, UInt32.Parse(split[1]), Int32.Parse(split[2]), UInt16.Parse(split[3])); + RemoveItem(client, UInt32.Parse(split[1]), Int32.Parse(split[2]), UInt16.Parse(split[3])); return true; } catch (Exception e) { - Log.error("Could not remove item."); + Program.Log.Error("Could not Remove item."); } } #endregion @@ -723,17 +723,17 @@ namespace FFXIVClassic_Lobby_Server try { if (split.Length == 2) - giveKeyItem(client, UInt32.Parse(split[1])); + GiveKeyItem(client, UInt32.Parse(split[1])); } catch (Exception e) { - Log.error("Could not give keyitem."); + Program.Log.Error("Could not give keyitem."); } } #endregion - #region !removekeyitem - else if (split[0].Equals("removekeyitem")) + #region !Removekeyitem + else if (split[0].Equals("Removekeyitem")) { if (split.Length < 2) return false; @@ -741,12 +741,12 @@ namespace FFXIVClassic_Lobby_Server try { if (split.Length == 2) - removeKeyItem(client, UInt32.Parse(split[1])); + RemoveKeyItem(client, UInt32.Parse(split[1])); return true; } catch (Exception e) { - Log.error("Could not remove keyitem."); + Program.Log.Error("Could not Remove keyitem."); } } #endregion @@ -757,19 +757,19 @@ namespace FFXIVClassic_Lobby_Server try { if (split.Length == 2) - giveCurrency(client, ITEM_GIL, Int32.Parse(split[1])); + GiveCurrency(client, ITEM_GIL, Int32.Parse(split[1])); else if (split.Length == 3) - giveCurrency(client, UInt32.Parse(split[1]), Int32.Parse(split[2])); + GiveCurrency(client, UInt32.Parse(split[1]), Int32.Parse(split[2])); } catch (Exception e) { - Log.error("Could not give currency."); + Program.Log.Error("Could not give currency."); } } #endregion - #region !removecurrency - else if (split[0].Equals("removecurrency")) + #region !Removecurrency + else if (split[0].Equals("Removecurrency")) { if (split.Length < 2) return false; @@ -777,14 +777,14 @@ namespace FFXIVClassic_Lobby_Server try { if (split.Length == 2) - removeCurrency(client, ITEM_GIL, Int32.Parse(split[1])); + RemoveCurrency(client, ITEM_GIL, Int32.Parse(split[1])); else if (split.Length == 3) - removeCurrency(client, UInt32.Parse(split[1]), Int32.Parse(split[2])); + RemoveCurrency(client, UInt32.Parse(split[1]), Int32.Parse(split[2])); return true; } catch (Exception e) { - Log.error("Could not remove currency."); + Program.Log.Error("Could not Remove currency."); } } #endregion @@ -797,12 +797,12 @@ namespace FFXIVClassic_Lobby_Server try { - doMusic(client, split[1]); + DoMusic(client, split[1]); return true; } catch (Exception e) { - Log.error("Could not change music: " + e); + Program.Log.Error("Could not change music: " + e); } } #endregion @@ -810,7 +810,7 @@ namespace FFXIVClassic_Lobby_Server #region !warp else if (split[0].Equals("warp")) { - parseWarp(client, split); + ParseWarp(client, split); return true; } #endregion @@ -820,7 +820,7 @@ namespace FFXIVClassic_Lobby_Server { if (split.Length == 4) { - changeProperty(Utils.MurmurHash2(split[1], 0), Convert.ToUInt32(split[2], 16), split[3]); + ChangeProperty(Utils.MurmurHash2(split[1], 0), Convert.ToUInt32(split[2], 16), split[3]); } return true; } @@ -831,7 +831,7 @@ namespace FFXIVClassic_Lobby_Server { if (split.Length == 4) { - changeProperty(Convert.ToUInt32(split[1], 16), Convert.ToUInt32(split[2], 16), split[3]); + ChangeProperty(Convert.ToUInt32(split[1], 16), Convert.ToUInt32(split[2], 16), split[3]); } return true; } diff --git a/FFXIVClassic Map Server/ConfigConstants.cs b/FFXIVClassic Map Server/ConfigConstants.cs index 13174ca4..1509ee58 100644 --- a/FFXIVClassic Map Server/ConfigConstants.cs +++ b/FFXIVClassic Map Server/ConfigConstants.cs @@ -1,17 +1,13 @@ -using FFXIVClassic_Lobby_Server.common; -using STA.Settings; +using FFXIVClassic.Common; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace FFXIVClassic_Lobby_Server +namespace FFXIVClassic_Map_Server { class ConfigConstants { public static String OPTIONS_BINDIP; + public static String OPTIONS_PORT; public static bool OPTIONS_TIMESTAMP = false; public static uint DATABASE_WORLDID; @@ -21,24 +17,25 @@ namespace FFXIVClassic_Lobby_Server public static String DATABASE_USERNAME; public static String DATABASE_PASSWORD; - public static bool load() + public static bool Load() { - Console.Write("Loading config.ini file... "); + Console.Write("Loading map_config.ini file... "); - if (!File.Exists("./config.ini")) + if (!File.Exists("./map_config.ini")) { Console.ForegroundColor = ConsoleColor.Red; - Console.WriteLine("[FILE NOT FOUND]"); + Console.WriteLine(String.Format("[FILE NOT FOUND]")); Console.ForegroundColor = ConsoleColor.Gray; return false; } - INIFile configIni = new INIFile("./config.ini"); + INIFile configIni = new INIFile("./map_config.ini"); ConfigConstants.OPTIONS_BINDIP = configIni.GetValue("General", "server_ip", "127.0.0.1"); + ConfigConstants.OPTIONS_PORT = configIni.GetValue("General", "server_port", "54992"); ConfigConstants.OPTIONS_TIMESTAMP = configIni.GetValue("General", "showtimestamp", "true").ToLower().Equals("true"); - ConfigConstants.DATABASE_WORLDID = configIni.GetValue("Database", "worldid", (uint)0); + ConfigConstants.DATABASE_WORLDID = UInt32.Parse(configIni.GetValue("Database", "worldid", "0")); ConfigConstants.DATABASE_HOST = configIni.GetValue("Database", "host", ""); ConfigConstants.DATABASE_PORT = configIni.GetValue("Database", "port", ""); ConfigConstants.DATABASE_NAME = configIni.GetValue("Database", "database", ""); diff --git a/FFXIVClassic Map Server/Database.cs b/FFXIVClassic Map Server/Database.cs index 2342574f..55e1b9fd 100644 --- a/FFXIVClassic Map Server/Database.cs +++ b/FFXIVClassic Map Server/Database.cs @@ -1,30 +1,23 @@ using MySql.Data.MySqlClient; using Dapper; -using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.utils; -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.packets.send.player; -using FFXIVClassic_Lobby_Server.dataobjects; -using FFXIVClassic_Map_Server; -using FFXIVClassic_Map_Server.common.EfficientHashTables; -using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.dataobjects; -using FFXIVClassic_Map_Server.packets.send.Actor.inventory; +using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.actors.chara.player; -namespace FFXIVClassic_Lobby_Server +namespace FFXIVClassic_Map_Server { class Database { - public static uint getUserIdFromSession(String sessionId) + public static uint GetUserIdFromSession(String sessionId) { uint id = 0; using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -43,7 +36,9 @@ namespace FFXIVClassic_Lobby_Server } } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -52,7 +47,7 @@ namespace FFXIVClassic_Lobby_Server return id; } - public static DBWorld getServer(uint serverId) + public static DBWorld GetServer(uint serverId) { using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -63,7 +58,8 @@ namespace FFXIVClassic_Lobby_Server world = conn.Query("SELECT * FROM servers WHERE id=@ServerId", new {ServerId = serverId}).SingleOrDefault(); } catch (MySqlException e) - { + { + Program.Log.Error(e.ToString()); } finally { @@ -74,7 +70,7 @@ namespace FFXIVClassic_Lobby_Server } } - public static List getNpcList() + public static List GetNpcList() { using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -86,6 +82,7 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Program.Log.Error(e.ToString()); } finally { @@ -96,7 +93,7 @@ namespace FFXIVClassic_Lobby_Server } } - public static Dictionary getItemGamedata() + public static Dictionary GetItemGamedata() { using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -140,7 +137,9 @@ namespace FFXIVClassic_Lobby_Server } } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -150,7 +149,7 @@ namespace FFXIVClassic_Lobby_Server } } - public static void savePlayerAppearance(Player player) + public static void SavePlayerAppearance(Player player) { string query; MySqlCommand cmd; @@ -196,7 +195,9 @@ namespace FFXIVClassic_Lobby_Server cmd.ExecuteNonQuery(); } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -204,7 +205,7 @@ namespace FFXIVClassic_Lobby_Server } } - public static void savePlayerCurrentClass(Player player) + public static void SavePlayerCurrentClass(Player player) { string query; MySqlCommand cmd; @@ -230,7 +231,9 @@ namespace FFXIVClassic_Lobby_Server cmd.ExecuteNonQuery(); } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -238,7 +241,7 @@ namespace FFXIVClassic_Lobby_Server } } - public static void savePlayerPosition(Player player) + public static void SavePlayerPosition(Player player) { string query; MySqlCommand cmd; @@ -270,7 +273,9 @@ namespace FFXIVClassic_Lobby_Server cmd.ExecuteNonQuery(); } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -278,7 +283,7 @@ namespace FFXIVClassic_Lobby_Server } } - public static void savePlayerPlayTime(Player player) + public static void SavePlayerPlayTime(Player player) { string query; MySqlCommand cmd; @@ -297,12 +302,14 @@ namespace FFXIVClassic_Lobby_Server cmd = new MySqlCommand(query, conn); cmd.Parameters.AddWithValue("@charaId", player.actorId); - cmd.Parameters.AddWithValue("@playtime", player.getPlayTime(true)); + cmd.Parameters.AddWithValue("@playtime", player.GetPlayTime(true)); cmd.ExecuteNonQuery(); } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -310,19 +317,19 @@ namespace FFXIVClassic_Lobby_Server } } - public static void saveQuest(Player player, Quest quest) + public static void SaveQuest(Player player, Quest quest) { - int slot = player.getQuestSlot(quest.actorId); + int slot = player.GetQuestSlot(quest.actorId); if (slot == -1) { - Log.error(String.Format("Tried saving quest player didn't have: Player: {0:x}, QuestId: {0:x}", player.actorId, quest.actorId)); + Program.Log.Error("Tried saving quest player didn't have: Player: {0:x}, QuestId: {0:x}", player.actorId, quest.actorId); return; } else - saveQuest(player, quest, slot); + SaveQuest(player, quest, slot); } - public static void saveQuest(Player player, Quest quest, int slot) + public static void SaveQuest(Player player, Quest quest, int slot) { string query; MySqlCommand cmd; @@ -352,7 +359,9 @@ namespace FFXIVClassic_Lobby_Server cmd.ExecuteNonQuery(); } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -360,7 +369,7 @@ namespace FFXIVClassic_Lobby_Server } } - public static void loadPlayerCharacter(Player player) + public static void LoadPlayerCharacter(Player player) { string query; MySqlCommand cmd; @@ -550,12 +559,12 @@ namespace FFXIVClassic_Lobby_Server if (reader.Read()) { if (reader.GetUInt32(0) == 0xFFFFFFFF) - player.modelId = CharacterUtils.getTribeModel(player.playerWork.tribe); + player.modelId = CharacterUtils.GetTribeModel(player.playerWork.tribe); else player.modelId = reader.GetUInt32(0); player.appearanceIds[Character.SIZE] = reader.GetByte(1); player.appearanceIds[Character.COLORINFO] = (uint)(reader.GetUInt16(3) | (reader.GetUInt16(5) << 10) | (reader.GetUInt16(7) << 20)); - player.appearanceIds[Character.FACEINFO] = PrimitiveConversion.ToUInt32(CharacterUtils.getFaceInfo(reader.GetByte(8), reader.GetByte(9), reader.GetByte(10), reader.GetByte(11), reader.GetByte(12), reader.GetByte(13), reader.GetByte(14), reader.GetByte(15), reader.GetByte(16), reader.GetByte(17))); + player.appearanceIds[Character.FACEINFO] = PrimitiveConversion.ToUInt32(CharacterUtils.GetFaceInfo(reader.GetByte(8), reader.GetByte(9), reader.GetByte(10), reader.GetByte(11), reader.GetByte(12), reader.GetByte(13), reader.GetByte(14), reader.GetByte(15), reader.GetByte(16), reader.GetByte(17))); player.appearanceIds[Character.HIGHLIGHT_HAIR] = (uint)(reader.GetUInt16(6) | reader.GetUInt16(4) << 10); player.appearanceIds[Character.VOICE] = reader.GetByte(2); player.appearanceIds[Character.MAINHAND] = reader.GetUInt32(18); @@ -702,7 +711,7 @@ namespace FFXIVClassic_Lobby_Server else questFlags = 0; - string questName = Server.getStaticActors(player.playerWork.questScenario[index]).actorName; + string questName = Server.GetStaticActors(player.playerWork.questScenario[index]).actorName; player.questScenario[index] = new Quest(player, player.playerWork.questScenario[index], questName, questData, questFlags); } } @@ -769,17 +778,19 @@ namespace FFXIVClassic_Lobby_Server } } - player.getInventory(Inventory.NORMAL).initList(getInventory(player, 0, Inventory.NORMAL)); - player.getInventory(Inventory.KEYITEMS).initList(getInventory(player, 0, Inventory.KEYITEMS)); - player.getInventory(Inventory.CURRENCY).initList(getInventory(player, 0, Inventory.CURRENCY)); - player.getInventory(Inventory.BAZAAR).initList(getInventory(player, 0, Inventory.BAZAAR)); - player.getInventory(Inventory.MELDREQUEST).initList(getInventory(player, 0, Inventory.MELDREQUEST)); - player.getInventory(Inventory.LOOT).initList(getInventory(player, 0, Inventory.LOOT)); + player.GetInventory(Inventory.NORMAL).InitList(GetInventory(player, 0, Inventory.NORMAL)); + player.GetInventory(Inventory.KEYITEMS).InitList(GetInventory(player, 0, Inventory.KEYITEMS)); + player.GetInventory(Inventory.CURRENCY).InitList(GetInventory(player, 0, Inventory.CURRENCY)); + player.GetInventory(Inventory.BAZAAR).InitList(GetInventory(player, 0, Inventory.BAZAAR)); + player.GetInventory(Inventory.MELDREQUEST).InitList(GetInventory(player, 0, Inventory.MELDREQUEST)); + player.GetInventory(Inventory.LOOT).InitList(GetInventory(player, 0, Inventory.LOOT)); - player.getEquipment().SetEquipment(getEquipment(player, player.charaWork.parameterSave.state_mainSkill[0])); + player.GetEquipment().SetEquipment(GetEquipment(player, player.charaWork.parameterSave.state_mainSkill[0])); } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -788,9 +799,9 @@ namespace FFXIVClassic_Lobby_Server } - public static InventoryItem[] getEquipment(Player player, ushort classId) + public static InventoryItem[] GetEquipment(Player player, ushort classId) { - InventoryItem[] equipment = new InventoryItem[player.getEquipment().GetCapacity()]; + InventoryItem[] equipment = new InventoryItem[player.GetEquipment().GetCapacity()]; using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -815,13 +826,15 @@ namespace FFXIVClassic_Lobby_Server { ushort equipSlot = reader.GetUInt16(0); ulong uniqueItemId = reader.GetUInt16(1); - InventoryItem item = player.getInventory(Inventory.NORMAL).getItemById(uniqueItemId); + InventoryItem item = player.GetInventory(Inventory.NORMAL).GetItemById(uniqueItemId); equipment[equipSlot] = item; } } } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -831,7 +844,7 @@ namespace FFXIVClassic_Lobby_Server return equipment; } - public static void equipItem(Player player, ushort equipSlot, ulong uniqueItemId) + public static void EquipItem(Player player, ushort equipSlot, ulong uniqueItemId) { using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -857,7 +870,9 @@ namespace FFXIVClassic_Lobby_Server cmd.ExecuteNonQuery(); } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -866,7 +881,7 @@ namespace FFXIVClassic_Lobby_Server } - public static void unequipItem(Player player, ushort equipSlot) + public static void UnequipItem(Player player, ushort equipSlot) { using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -888,7 +903,9 @@ namespace FFXIVClassic_Lobby_Server cmd.ExecuteNonQuery(); } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -897,7 +914,7 @@ namespace FFXIVClassic_Lobby_Server } - public static List getInventory(Player player, uint slotOffset, uint type) + public static List GetInventory(Player player, uint slotOffset, uint type) { List items = new List(); @@ -957,7 +974,9 @@ namespace FFXIVClassic_Lobby_Server } } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -967,7 +986,7 @@ namespace FFXIVClassic_Lobby_Server return items; } - public static InventoryItem addItem(Player player, uint itemId, int quantity, byte quality, byte itemType, int durability, ushort type) + public static InventoryItem AddItem(Player player, uint itemId, int quantity, byte quality, byte itemType, int durability, ushort type) { InventoryItem insertedItem = null; @@ -1008,10 +1027,12 @@ namespace FFXIVClassic_Lobby_Server cmd.ExecuteNonQuery(); cmd2.ExecuteNonQuery(); - insertedItem = new InventoryItem((uint)cmd.LastInsertedId, itemId, quantity, (ushort)player.getInventory(type).getNextEmptySlot(), itemType, quality, durability, 0, 0, 0, 0, 0, 0); + insertedItem = new InventoryItem((uint)cmd.LastInsertedId, itemId, quantity, (ushort)player.GetInventory(type).GetNextEmptySlot(), itemType, quality, durability, 0, 0, 0, 0, 0, 0); } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -1021,7 +1042,7 @@ namespace FFXIVClassic_Lobby_Server return insertedItem; } - public static void setQuantity(Player player, uint slot, ushort type, int quantity) + public static void SetQuantity(Player player, uint slot, ushort type, int quantity) { using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -1044,7 +1065,9 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -1053,7 +1076,7 @@ namespace FFXIVClassic_Lobby_Server } - public static void removeItem(Player player, ulong serverItemId, ushort type) + public static void RemoveItem(Player player, ulong serverItemId, ushort type) { using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}; Allow User Variables=True", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -1082,7 +1105,9 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -1091,7 +1116,7 @@ namespace FFXIVClassic_Lobby_Server } - public static void removeItem(Player player, ushort slot, ushort type) + public static void RemoveItem(Player player, ushort slot, ushort type) { using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}; Allow User Variables=True", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { @@ -1121,7 +1146,9 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -1130,7 +1157,7 @@ namespace FFXIVClassic_Lobby_Server } - public static SubPacket getLatestAchievements(Player player) + public static SubPacket GetLatestAchievements(Player player) { uint[] latestAchievements = new uint[5]; using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -1159,17 +1186,19 @@ namespace FFXIVClassic_Lobby_Server } } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); } } - return SetLatestAchievementsPacket.buildPacket(player.actorId, latestAchievements); + return SetLatestAchievementsPacket.BuildPacket(player.actorId, latestAchievements); } - public static SubPacket getAchievementsPacket(Player player) + public static SubPacket GetAchievementsPacket(Player player) { SetCompletedAchievementsPacket cheevosPacket = new SetCompletedAchievementsPacket(); @@ -1195,7 +1224,7 @@ namespace FFXIVClassic_Lobby_Server if (offset < 0 || offset >= cheevosPacket.achievementFlags.Length) { - Log.error("SQL Error; achievement flag offset id out of range: " + offset); + Program.Log.Error("SQL Error; achievement flag offset id out of range: " + offset); continue; } cheevosPacket.achievementFlags[offset] = true; @@ -1203,14 +1232,16 @@ namespace FFXIVClassic_Lobby_Server } } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); } } - return cheevosPacket.buildPacket(player.actorId); + return cheevosPacket.BuildPacket(player.actorId); } diff --git a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj index 0746e1ca..f01958b6 100644 --- a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj +++ b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj @@ -42,6 +42,10 @@ ..\packages\Dapper.1.42\lib\net45\Dapper.dll True + + False + ..\FFXIVClassic Common Class Lib\bin\Debug\FFXIVClassic.Common.dll + ..\packages\MoonSharp.1.2.1.0\lib\net40-client\MoonSharp.Interpreter.dll @@ -53,6 +57,10 @@ ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll True + + ..\packages\NLog.4.3.5\lib\net45\NLog.dll + True + @@ -85,12 +93,6 @@ - - - - - - @@ -272,6 +274,12 @@ + + Always + + + Designer + @@ -282,8 +290,7 @@ - robocopy "$(SolutionDir)data" "$(SolutionDir)$(ProjectName)\$(OutDir)." /XO 2>nul 1>nul -EXIT 0 + copy "$(SolutionDir)data\map_config.ini" "$(SolutionDir)$(ProjectName)\$(OutDir)" + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FFXIVClassic Map Server/NLog.xsd b/FFXIVClassic Map Server/NLog.xsd new file mode 100644 index 00000000..395075c9 --- /dev/null +++ b/FFXIVClassic Map Server/NLog.xsd @@ -0,0 +1,2601 @@ + + + + + + + + + + + + + + + Watch config file for changes and reload automatically. + + + + + Print internal NLog messages to the console. Default value is: false + + + + + Print internal NLog messages to the console error output. Default value is: false + + + + + Write internal NLog messages to the specified file. + + + + + Log level threshold for internal log messages. Default value is: Info. + + + + + Global log level threshold for application log messages. Messages below this level won't be logged.. + + + + + Pass NLog internal exceptions to the application. Default value is: false. + + + + + Write internal NLog messages to the the System.Diagnostics.Trace. Default value is: false + + + + + + + + + + + + + + Make all targets within this section asynchronous (Creates additional threads but the calling thread isn't blocked by any target writes). + + + + + + + + + + + + + + + + + Prefix for targets/layout renderers/filters/conditions loaded from this assembly. + + + + + Load NLog extensions from the specified file (*.dll) + + + + + Load NLog extensions from the specified assembly. Assembly name should be fully qualified. + + + + + + + + + + Name of the logger. May include '*' character which acts like a wildcard. Allowed forms are: *, Name, *Name, Name* and *Name* + + + + + Comma separated list of levels that this rule matches. + + + + + Minimum level that this rule matches. + + + + + Maximum level that this rule matches. + + + + + Level that this rule matches. + + + + + Comma separated list of target names. + + + + + Ignore further rules if this one matches. + + + + + Enable or disable logging rule. Disabled rules are ignored. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the file to be included. The name is relative to the name of the current config file. + + + + + Ignore any errors in the include file. + + + + + + + Variable name. + + + + + Variable value. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Indicates whether to add <!-- --> comments around all written texts. + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Number of log events that should be processed in a batch by the lazy writer thread. + + + + + Action to be taken when the lazy writer thread request queue count exceeds the set limit. + + + + + Limit on the number of requests in the lazy writer thread request queue. + + + + + Time in milliseconds to sleep between batches. + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + + + + + + + + + + + + + Name of the target. + + + + + Number of log events to be buffered. + + + + + Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. + + + + + Indicates whether to use sliding timeout. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Encoding to be used. + + + + + Instance of that is used to format log messages. + + + + + Maximum message size in bytes. + + + + + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the will be more connections than . + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Indicates whether to keep connection open whenever possible. + + + + + Size of the connection cache (number of connections which are kept alive). + + + + + Maximum current connections. 0 = no maximum. + + + + + Network address. + + + + + Maximum queue size. + + + + + Indicates whether to include source info (file name and line number) in the information sent over the network. + + + + + NDC item separator. + + + + + Indicates whether to include stack contents. + + + + + Indicates whether to include call site (class and method name) in the information sent over the network. + + + + + AppInfo field. By default it's the friendly name of the current AppDomain. + + + + + Indicates whether to include NLog-specific extensions to log4j schema. + + + + + Indicates whether to include dictionary contents. + + + + + + + + + + + + + + + + + + + + + + + + + + + Layout that should be use to calcuate the value for the parameter. + + + + + Viewer parameter name. + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Text to be rendered. + + + + + Header. + + + + + Footer. + + + + + Indicates whether to use default row highlighting rules. + + + + + The encoding for writing messages to the . + + + + + Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Condition that must be met in order to set the specified foreground and background color. + + + + + Background color. + + + + + Foreground color. + + + + + + + + + + + + + + + + Indicates whether to ignore case when comparing texts. + + + + + Regular expression to be matched. You must specify either text or regex. + + + + + Text to be matched. You must specify either text or regex. + + + + + Indicates whether to match whole words only. + + + + + Compile the ? This can improve the performance, but at the costs of more memory usage. If false, the Regex Cache is used. + + + + + Background color. + + + + + Foreground color. + + + + + + + + + + + + + + + + + Name of the target. + + + + + Text to be rendered. + + + + + Header. + + + + + Footer. + + + + + Indicates whether to send the log messages to the standard error instead of the standard output. + + + + + The encoding for writing messages to the . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. + + + + + Name of the connection string (as specified in <connectionStrings> configuration section. + + + + + Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. + + + + + Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. + + + + + Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. + + + + + Name of the database provider. + + + + + Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. + + + + + Indicates whether to keep the database connection open between the log events. + + + + + Obsolete - value will be ignored! The logging code always runs outside of transaction. Gets or sets a value indicating whether to use database transactions. Some data providers require this. + + + + + Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. + + + + + Text of the SQL command to be run on each log level. + + + + + Type of the SQL command to be run on each log level. + + + + + + + + + + + + + + + + + + + + + + + Type of the command. + + + + + Connection string to run the command against. If not provided, connection string from the target is used. + + + + + Indicates whether to ignore failures. + + + + + Command text. + + + + + + + + + + + + + + Layout that should be use to calcuate the value for the parameter. + + + + + Database parameter name. + + + + + Database parameter precision. + + + + + Database parameter scale. + + + + + Database parameter size. + + + + + + + + + + + + + + + Name of the target. + + + + + Text to be rendered. + + + + + Header. + + + + + Footer. + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Layout that renders event Category. + + + + + Layout that renders event ID. + + + + + Name of the Event Log to write to. This can be System, Application or any user-defined name. + + + + + Name of the machine on which Event Log service is running. + + + + + Value to be used as the event Source. + + + + + Action to take if the message is larger than the option. + + + + + Optional entrytype. When not set, or when not convertable to then determined by + + + + + Message length limit to write to the Event Log. + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to return to the first target after any successful write. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Text to be rendered. + + + + + Header. + + + + + Footer. + + + + + File encoding. + + + + + Line ending mode. + + + + + Way file archives are numbered. + + + + + Name of the file to be used for an archive. + + + + + Indicates whether to automatically archive log files every time the specified time passes. + + + + + Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot Create multiple archive files, if they should have the same name. Choose: + + + + + Maximum number of archive files that should be kept. + + + + + Indicates whether to compress archive files into the zip archive format. + + + + + Gets or set a value indicating whether a managed file stream is forced, instead of used the native implementation. + + + + + Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing Gets written when the filename is wrong. + + + + + Name of the file to write to. + + + + + Value specifying the date format to use when archiving files. + + + + + Indicates whether to archive old log file on startup. + + + + + Indicates whether to Create directories if they Do not exist. + + + + + Indicates whether to enable log file(s) to be deleted. + + + + + File attributes (Windows only). + + + + + Indicates whether to delete old log file on startup. + + + + + Indicates whether to replace file contents on each write instead of appending log message at the end. + + + + + Indicates whether concurrent writes to the log file by multiple processes on the same host. + + + + + Delay in milliseconds to wait before attempting to write to the file again. + + + + + Maximum number of log filenames that should be stored as existing. + + + + + Indicates whether concurrent writes to the log file by multiple processes on different network hosts. + + + + + Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). + + + + + Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. + + + + + Log file buffer size in bytes. + + + + + Indicates whether to automatically flush the file buffers after each log message. + + + + + Number of times the write is appended on the file before NLog discards the log message. + + + + + Indicates whether to keep log file open instead of opening and closing it on each logging event. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Condition expression. Log events who meet this condition will be forwarded to the wrapped target. + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Windows Domain name to change context to. + + + + + Required impersonation level. + + + + + Type of the logon provider. + + + + + Logon Type. + + + + + User account password. + + + + + Indicates whether to revert to the credentials of the process instead of impersonating another user. + + + + + Username to change context to. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Endpoint address. + + + + + Name of the endpoint configuration in WCF configuration file. + + + + + Indicates whether to use a WCF service contract that is one way (fire and forGet) or two way (request-reply) + + + + + Client ID. + + + + + Indicates whether to include per-event properties in the payload sent to the server. + + + + + Indicates whether to use binary message encoding. + + + + + + + + + + + + + + Layout that should be use to calculate the value for the parameter. + + + + + Name of the parameter. + + + + + Type of the parameter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Text to be rendered. + + + + + Header. + + + + + Footer. + + + + + Indicates whether to send message as HTML instead of plain text. + + + + + Encoding to be used for sending e-mail. + + + + + Indicates whether to add new lines between log entries. + + + + + CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). + + + + + Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). + + + + + BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). + + + + + Mail message body (repeated for each log message send in one mail). + + + + + Mail subject. + + + + + Sender's email address (e.g. joe@domain.com). + + + + + Indicates whether NewLine characters in the body should be replaced with tags. + + + + + Priority used for sending mails. + + + + + Indicates the SMTP client timeout. + + + + + SMTP Server to be used for sending. + + + + + SMTP Authentication mode. + + + + + Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). + + + + + Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). + + + + + Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server. + + + + + Port number that SMTP Server is listening on. + + + + + Indicates whether the default Settings from System.Net.MailSettings should be used. + + + + + Folder where applications save mail messages to be processed by the local SMTP server. + + + + + Specifies how outgoing email messages will be handled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Encoding to be used when writing text to the queue. + + + + + Indicates whether to use the XML format when serializing message. This will also disable creating queues. + + + + + Indicates whether to check if a queue exists before writing to it. + + + + + Indicates whether to Create the queue if it Doesn't exists. + + + + + Label to associate with each message. + + + + + Name of the queue to write to. + + + + + Indicates whether to use recoverable messages (with guaranteed delivery). + + + + + + + + + + + + + + + + + Name of the target. + + + + + Class name. + + + + + Method name. The method must be public and static. Use the AssemblyQualifiedName , https://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx e.g. + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Encoding to be used. + + + + + Maximum message size in bytes. + + + + + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the will be more connections than . + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Network address. + + + + + Size of the connection cache (number of connections which are kept alive). + + + + + Indicates whether to keep connection open whenever possible. + + + + + Maximum current connections. 0 = no maximum. + + + + + Maximum queue size. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Encoding to be used. + + + + + Instance of that is used to format log messages. + + + + + Maximum message size in bytes. + + + + + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the will be more connections than . + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Indicates whether to keep connection open whenever possible. + + + + + Size of the connection cache (number of connections which are kept alive). + + + + + Maximum current connections. 0 = no maximum. + + + + + Network address. + + + + + Maximum queue size. + + + + + Indicates whether to include source info (file name and line number) in the information sent over the network. + + + + + NDC item separator. + + + + + Indicates whether to include stack contents. + + + + + Indicates whether to include call site (class and method name) in the information sent over the network. + + + + + AppInfo field. By default it's the friendly name of the current AppDomain. + + + + + Indicates whether to include NLog-specific extensions to log4j schema. + + + + + Indicates whether to include dictionary contents. + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Indicates whether to perform layout calculation. + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether performance counter should be automatically Created. + + + + + Name of the performance counter category. + + + + + Counter help text. + + + + + Name of the performance counter. + + + + + Performance counter type. + + + + + The value by which to increment the counter. + + + + + Performance counter instance name. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Default filter to be applied when no specific rule matches. + + + + + + + + + + + + + Condition to be tested. + + + + + Resulting filter to be applied when the condition matches. + + + + + + + + + + + + Name of the target. + + + + + + + + + + + + + + + Name of the target. + + + + + Number of times to repeat each log message. + + + + + + + + + + + + + + + + Name of the target. + + + + + Number of retries that should be attempted on the wrapped target in case of a failure. + + + + + Time to wait between retries in milliseconds. + + + + + + + + + + + + + + Name of the target. + + + + + + + + + + + + + + Name of the target. + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Should we include the BOM (Byte-order-mark) for UTF? Influences the property. This will only work for UTF-8. + + + + + Encoding. + + + + + Web service method name. Only used with Soap. + + + + + Web service namespace. Only used with Soap. + + + + + Protocol to be used when calling web service. + + + + + Web service URL. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Footer layout. + + + + + Header layout. + + + + + Body layout (can be repeated multiple times). + + + + + Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom'). + + + + + Column delimiter. + + + + + Quote Character. + + + + + Quoting mode. + + + + + Indicates whether CVS should include header. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Layout of the column. + + + + + Name of the column. + + + + + + + + + + + + + Option to suppress the extra spaces in the output json + + + + + + + + + + + + + + Determines wether or not this attribute will be Json encoded. + + + + + Layout that will be rendered as the attribute's value. + + + + + Name of the attribute. + + + + + + + + + + + + + + Footer layout. + + + + + Header layout. + + + + + Body layout (can be repeated multiple times). + + + + + + + + + + + + + + + + + + + + + Layout text. + + + + + + + + + + + + + + + Action to be taken when filter matches. + + + + + Condition expression. + + + + + + + + + + + + + + + + + + + + + + + + + + Action to be taken when filter matches. + + + + + Indicates whether to ignore case when comparing strings. + + + + + Layout to be used to filter log messages. + + + + + Substring to be matched. + + + + + + + + + + + + + + + + + Action to be taken when filter matches. + + + + + String to compare the layout to. + + + + + Indicates whether to ignore case when comparing strings. + + + + + Layout to be used to filter log messages. + + + + + + + + + + + + + + + + + Action to be taken when filter matches. + + + + + Indicates whether to ignore case when comparing strings. + + + + + Layout to be used to filter log messages. + + + + + Substring to be matched. + + + + + + + + + + + + + + + + + Action to be taken when filter matches. + + + + + String to compare the layout to. + + + + + Indicates whether to ignore case when comparing strings. + + + + + Layout to be used to filter log messages. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FFXIVClassic Map Server/PacketProcessor.cs b/FFXIVClassic Map Server/PacketProcessor.cs index 2e210934..09b203aa 100644 --- a/FFXIVClassic Map Server/PacketProcessor.cs +++ b/FFXIVClassic Map Server/PacketProcessor.cs @@ -1,40 +1,25 @@ -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; -using MySql.Data.MySqlClient; +using FFXIVClassic.Common; +using FFXIVClassic_Map_Server.packets; using System; using System.Collections.Generic; -using System.Threading; -using System.Diagnostics; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; using FFXIVClassic_Map_Server.dataobjects; -using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.packets.receive; using FFXIVClassic_Map_Server.packets.send; using FFXIVClassic_Map_Server.packets.send.login; -using FFXIVClassic_Map_Server.packets.send.Actor.inventory; -using FFXIVClassic_Map_Server.packets.send.Actor; using FFXIVClassic_Map_Server.packets.send.actor; -using FFXIVClassic_Map_Server; -using FFXIVClassic_Map_Server.packets.send.player; -using FFXIVClassic_Map_Server.dataobjects.chara; using FFXIVClassic_Map_Server.packets.send.supportdesk; using FFXIVClassic_Map_Server.packets.receive.social; using FFXIVClassic_Map_Server.packets.send.social; using FFXIVClassic_Map_Server.packets.receive.supportdesk; using FFXIVClassic_Map_Server.packets.receive.recruitment; using FFXIVClassic_Map_Server.packets.send.recruitment; -using FFXIVClassic_Map_Server.packets.send.list; using FFXIVClassic_Map_Server.packets.receive.events; -using FFXIVClassic_Map_Server.packets.send.events; using FFXIVClassic_Map_Server.lua; -using System.Net; -using FFXIVClassic_Map_Server.common.EfficientHashTables; using FFXIVClassic_Map_Server.Actors; -namespace FFXIVClassic_Lobby_Server +namespace FFXIVClassic_Map_Server { class PacketProcessor { @@ -51,17 +36,17 @@ namespace FFXIVClassic_Lobby_Server cp = new CommandProcessor(playerList); } - public void processPacket(ClientConnection client, BasePacket packet) + public void ProcessPacket(ClientConnection client, BasePacket packet) { if (packet.header.isCompressed == 0x01) - BasePacket.decryptPacket(client.blowfish, ref packet); + BasePacket.DecryptPacket(client.blowfish, ref packet); - List subPackets = packet.getSubpackets(); + List subPackets = packet.GetSubpackets(); foreach (SubPacket subpacket in subPackets) { if (subpacket.header.type == 0x01) { - packet.debugPrintPacket(); + packet.DebugPrintPacket(); byte[] reply1Data = { 0x01, 0x00, 0x00, 0x00, 0x28, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFD, 0xFF, 0xFF, @@ -132,35 +117,35 @@ namespace FFXIVClassic_Lobby_Server player = mPlayers[client.owner]; } - //Create connected player if not created + //Create connected player if not Created if (player == null) { player = new ConnectedPlayer(actorID); mPlayers[actorID] = player; } - player.setConnection(packet.header.connectionType, client); + player.SetConnection(packet.header.connectionType, client); if (packet.header.connectionType == BasePacket.TYPE_ZONE) - Log.debug(String.Format("Got {0} connection for ActorID {1} @ {2}.", "zone", actorID, client.getAddress())); + Program.Log.Debug("Got {0} connection for ActorID {1} @ {2}.", "zone", actorID, client.GetAddress()); else if (packet.header.connectionType == BasePacket.TYPE_CHAT) - Log.debug(String.Format("Got {0} connection for ActorID {1} @ {2}.", "chat", actorID, client.getAddress())); + Program.Log.Debug("Got {0} connection for ActorID {1} @ {2}.", "chat", actorID, client.GetAddress()); //Create player actor - reply1.debugPrintPacket(); - client.queuePacket(reply1); - client.queuePacket(reply2); + reply1.DebugPrintPacket(); + client.QueuePacket(reply1); + client.QueuePacket(reply2); break; } else if (subpacket.header.type == 0x07) { - BasePacket init = Login0x7ResponsePacket.buildPacket(BitConverter.ToUInt32(packet.data, 0x10), Utils.UnixTimeStampUTC()); - //client.queuePacket(init); + BasePacket init = Login0x7ResponsePacket.BuildPacket(BitConverter.ToUInt32(packet.data, 0x10), Utils.UnixTimeStampUTC()); + //client.QueuePacket(init); } else if (subpacket.header.type == 0x08) { //Response, client's current [actorID][time] - packet.debugPrintPacket(); + packet.DebugPrintPacket(); } else if (subpacket.header.type == 0x03) { @@ -177,34 +162,34 @@ namespace FFXIVClassic_Lobby_Server { //Ping case 0x0001: - //subpacket.debugPrintSubPacket(); + //subpacket.DebugPrintSubPacket(); PingPacket pingPacket = new PingPacket(subpacket.data); - client.queuePacket(BasePacket.createPacket(PongPacket.buildPacket(player.actorID, pingPacket.time), true, false)); - player.ping(); + client.QueuePacket(BasePacket.CreatePacket(PongPacket.BuildPacket(player.actorID, pingPacket.time), true, false)); + player.Ping(); break; //Unknown case 0x0002: - subpacket.debugPrintSubPacket(); - client.queuePacket(_0x2Packet.buildPacket(player.actorID), true, false); + subpacket.DebugPrintSubPacket(); + client.QueuePacket(_0x2Packet.BuildPacket(player.actorID), true, false); - Server.GetWorldManager().DoLogin(player.getActor()); + Server.GetWorldManager().DoLogin(player.GetActor()); break; //Chat Received case 0x0003: ChatMessagePacket chatMessage = new ChatMessagePacket(subpacket.data); - Log.info(String.Format("Got type-{5} message: {0} @ {1}, {2}, {3}, Rot: {4}", chatMessage.message, chatMessage.posX, chatMessage.posY, chatMessage.posZ, chatMessage.posRot, chatMessage.logType)); - subpacket.debugPrintSubPacket(); + Program.Log.Info("Got type-{5} message: {0} @ {1}, {2}, {3}, Rot: {4}", chatMessage.message, chatMessage.posX, chatMessage.posY, chatMessage.posZ, chatMessage.posRot, chatMessage.logType); + subpacket.DebugPrintSubPacket(); if (chatMessage.message.StartsWith("!")) { - if (cp.doCommand(chatMessage.message, player)) + if (cp.DoCommand(chatMessage.message, player)) continue; } - player.getActor().broadcastPacket(SendMessagePacket.buildPacket(player.actorID, player.actorID, chatMessage.logType, player.getActor().customDisplayName, chatMessage.message), false); + player.GetActor().BroadcastPacket(SendMessagePacket.BuildPacket(player.actorID, player.actorID, chatMessage.logType, player.GetActor().customDisplayName, chatMessage.message), false); break; //Langauge Code @@ -214,37 +199,37 @@ namespace FFXIVClassic_Lobby_Server break; //Unknown - Happens a lot at login, then once every time player zones case 0x0007: - //subpacket.debugPrintSubPacket(); + //subpacket.DebugPrintSubPacket(); _0x07Packet unknown07 = new _0x07Packet(subpacket.data); break; //Update Position case 0x00CA: //Update Position - //subpacket.debugPrintSubPacket(); + //subpacket.DebugPrintSubPacket(); UpdatePlayerPositionPacket posUpdate = new UpdatePlayerPositionPacket(subpacket.data); - player.updatePlayerActorPosition(posUpdate.x, posUpdate.y, posUpdate.z, posUpdate.rot, posUpdate.moveState); - player.getActor().sendInstanceUpdate(); + player.UpdatePlayerActorPosition(posUpdate.x, posUpdate.y, posUpdate.z, posUpdate.rot, posUpdate.moveState); + player.GetActor().SendInstanceUpdate(); - if (player.getActor().isInZoneChange()) - player.getActor().setZoneChanging(false); + if (player.GetActor().IsInZoneChange()) + player.GetActor().SetZoneChanging(false); break; //Set Target case 0x00CD: - //subpacket.debugPrintSubPacket(); + //subpacket.DebugPrintSubPacket(); SetTargetPacket setTarget = new SetTargetPacket(subpacket.data); - player.getActor().currentTarget = setTarget.actorID; - player.getActor().broadcastPacket(SetActorTargetAnimatedPacket.buildPacket(player.actorID, player.actorID, setTarget.actorID), true); + player.GetActor().currentTarget = setTarget.actorID; + player.GetActor().BroadcastPacket(SetActorTargetAnimatedPacket.BuildPacket(player.actorID, player.actorID, setTarget.actorID), true); break; //Lock Target case 0x00CC: LockTargetPacket lockTarget = new LockTargetPacket(subpacket.data); - player.getActor().currentLockedTarget = lockTarget.actorID; + player.GetActor().currentLockedTarget = lockTarget.actorID; break; //Start Event case 0x012D: - subpacket.debugPrintSubPacket(); + subpacket.DebugPrintSubPacket(); EventStartPacket eventStart = new EventStartPacket(subpacket.data); /* @@ -253,90 +238,90 @@ namespace FFXIVClassic_Lobby_Server player.errorMessage += eventStart.error; if (eventStart.errorIndex == eventStart.errorNum - 1) - Log.error("\n"+player.errorMessage); + Program.Log.Error("\n"+player.errorMessage); break; } */ - Actor ownerActor = Server.getStaticActors(eventStart.scriptOwnerActorID); + Actor ownerActor = Server.GetStaticActors(eventStart.scriptOwnerActorID); if (ownerActor != null && ownerActor is Command) { - player.getActor().currentCommand = eventStart.scriptOwnerActorID; - player.getActor().currentCommandName = eventStart.triggerName; + player.GetActor().currentCommand = eventStart.scriptOwnerActorID; + player.GetActor().currentCommandName = eventStart.triggerName; } else { - player.getActor().currentEventOwner = eventStart.scriptOwnerActorID; - player.getActor().currentEventName = eventStart.triggerName; + player.GetActor().currentEventOwner = eventStart.scriptOwnerActorID; + player.GetActor().currentEventName = eventStart.triggerName; } if (ownerActor == null) { //Is it a instance actor? - ownerActor = Server.GetWorldManager().GetActorInWorld(player.getActor().currentEventOwner); + ownerActor = Server.GetWorldManager().GetActorInWorld(player.GetActor().currentEventOwner); if (ownerActor == null) { //Is it a Director? - if (player.getActor().currentDirector != null && player.getActor().currentEventOwner == player.getActor().currentDirector.actorId) - ownerActor = player.getActor().currentDirector; + if (player.GetActor().currentDirector != null && player.GetActor().currentEventOwner == player.GetActor().currentDirector.actorId) + ownerActor = player.GetActor().currentDirector; else { - Log.debug(String.Format("\n===Event START===\nCould not find actor 0x{0:X} for event started by caller: 0x{1:X}\nEvent Starter: {2}\nParams: {3}", eventStart.actorID, eventStart.scriptOwnerActorID, eventStart.triggerName, LuaUtils.dumpParams(eventStart.luaParams))); + Program.Log.Debug("\n===Event START===\nCould not find actor 0x{0:X} for event started by caller: 0x{1:X}\nEvent Starter: {2}\nParams: {3}", eventStart.actorID, eventStart.scriptOwnerActorID, eventStart.triggerName, LuaUtils.DumpParams(eventStart.luaParams)); break; } } } - LuaEngine.doActorOnEventStarted(player.getActor(), ownerActor, eventStart); + LuaEngine.DoActorOnEventStarted(player.GetActor(), ownerActor, eventStart); - Log.debug(String.Format("\n===Event START===\nSource Actor: 0x{0:X}\nCaller Actor: 0x{1:X}\nVal1: 0x{2:X}\nVal2: 0x{3:X}\nEvent Starter: {4}\nParams: {5}", eventStart.actorID, eventStart.scriptOwnerActorID, eventStart.val1, eventStart.val2, eventStart.triggerName, LuaUtils.dumpParams(eventStart.luaParams))); + Program.Log.Debug("\n===Event START===\nSource Actor: 0x{0:X}\nCaller Actor: 0x{1:X}\nVal1: 0x{2:X}\nVal2: 0x{3:X}\nEvent Starter: {4}\nParams: {5}", eventStart.actorID, eventStart.scriptOwnerActorID, eventStart.val1, eventStart.val2, eventStart.triggerName, LuaUtils.DumpParams(eventStart.luaParams)); break; //Unknown, happens at npc spawn and cutscene play???? case 0x00CE: break; //Event Result case 0x012E: - subpacket.debugPrintSubPacket(); + subpacket.DebugPrintSubPacket(); EventUpdatePacket eventUpdate = new EventUpdatePacket(subpacket.data); - Log.debug(String.Format("\n===Event UPDATE===\nSource Actor: 0x{0:X}\nCaller Actor: 0x{1:X}\nVal1: 0x{2:X}\nVal2: 0x{3:X}\nStep: 0x{4:X}\nParams: {5}", eventUpdate.actorID, eventUpdate.scriptOwnerActorID, eventUpdate.val1, eventUpdate.val2, eventUpdate.step, LuaUtils.dumpParams(eventUpdate.luaParams))); + Program.Log.Debug("\n===Event UPDATE===\nSource Actor: 0x{0:X}\nCaller Actor: 0x{1:X}\nVal1: 0x{2:X}\nVal2: 0x{3:X}\nStep: 0x{4:X}\nParams: {5}", eventUpdate.actorID, eventUpdate.scriptOwnerActorID, eventUpdate.val1, eventUpdate.val2, eventUpdate.step, LuaUtils.DumpParams(eventUpdate.luaParams)); //Is it a static actor? If not look in the player's instance - Actor updateOwnerActor = Server.getStaticActors(player.getActor().currentEventOwner); + Actor updateOwnerActor = Server.GetStaticActors(player.GetActor().currentEventOwner); if (updateOwnerActor == null) { - updateOwnerActor = Server.GetWorldManager().GetActorInWorld(player.getActor().currentEventOwner); + updateOwnerActor = Server.GetWorldManager().GetActorInWorld(player.GetActor().currentEventOwner); - if (player.getActor().currentDirector != null && player.getActor().currentEventOwner == player.getActor().currentDirector.actorId) - updateOwnerActor = player.getActor().currentDirector; + if (player.GetActor().currentDirector != null && player.GetActor().currentEventOwner == player.GetActor().currentDirector.actorId) + updateOwnerActor = player.GetActor().currentDirector; if (updateOwnerActor == null) break; } - LuaEngine.doActorOnEventUpdated(player.getActor(), updateOwnerActor, eventUpdate); + LuaEngine.DoActorOnEventUpdated(player.GetActor(), updateOwnerActor, eventUpdate); break; case 0x012F: - subpacket.debugPrintSubPacket(); + subpacket.DebugPrintSubPacket(); ParameterDataRequestPacket paramRequest = new ParameterDataRequestPacket(subpacket.data); if (paramRequest.paramName.Equals("charaWork/exp")) - player.getActor().sendCharaExpInfo(); + player.GetActor().SendCharaExpInfo(); break; /* RECRUITMENT */ //Start Recruiting case 0x01C3: StartRecruitingRequestPacket recruitRequestPacket = new StartRecruitingRequestPacket(subpacket.data); - client.queuePacket(BasePacket.createPacket(StartRecruitingResponse.buildPacket(player.actorID, true), true, false)); + client.QueuePacket(BasePacket.CreatePacket(StartRecruitingResponse.BuildPacket(player.actorID, true), true, false)); break; //End Recruiting case 0x01C4: - client.queuePacket(BasePacket.createPacket(EndRecruitmentPacket.buildPacket(player.actorID), true, false)); + client.QueuePacket(BasePacket.CreatePacket(EndRecruitmentPacket.BuildPacket(player.actorID), true, false)); break; //Party Window Opened, Request State case 0x01C5: - client.queuePacket(BasePacket.createPacket(RecruiterStatePacket.buildPacket(player.actorID, true, true, 1), true, false)); + client.QueuePacket(BasePacket.CreatePacket(RecruiterStatePacket.BuildPacket(player.actorID, true, true, 1), true, false)); break; //Search Recruiting case 0x01C7: @@ -350,84 +335,84 @@ namespace FFXIVClassic_Lobby_Server details.purposeId = 2; details.locationId = 1; details.subTaskId = 1; - details.comment = "This is a test details packet sent by the server. No implementation has been created yet..."; + details.comment = "This is a test details packet sent by the server. No implementation has been Created yet..."; details.num[0] = 1; - client.queuePacket(BasePacket.createPacket(CurrentRecruitmentDetailsPacket.buildPacket(player.actorID, details), true, false)); + client.QueuePacket(BasePacket.CreatePacket(CurrentRecruitmentDetailsPacket.BuildPacket(player.actorID, details), true, false)); break; //Accepted Recruiting case 0x01C6: - subpacket.debugPrintSubPacket(); + subpacket.DebugPrintSubPacket(); break; /* SOCIAL STUFF */ case 0x01C9: AddRemoveSocialPacket addBlackList = new AddRemoveSocialPacket(subpacket.data); - client.queuePacket(BasePacket.createPacket(BlacklistAddedPacket.buildPacket(player.actorID, true, addBlackList.name), true, false)); + client.QueuePacket(BasePacket.CreatePacket(BlacklistAddedPacket.BuildPacket(player.actorID, true, addBlackList.name), true, false)); break; case 0x01CA: - AddRemoveSocialPacket removeBlackList = new AddRemoveSocialPacket(subpacket.data); - client.queuePacket(BasePacket.createPacket(BlacklistRemovedPacket.buildPacket(player.actorID, true, removeBlackList.name), true, false)); + AddRemoveSocialPacket RemoveBlackList = new AddRemoveSocialPacket(subpacket.data); + client.QueuePacket(BasePacket.CreatePacket(BlacklistRemovedPacket.BuildPacket(player.actorID, true, RemoveBlackList.name), true, false)); break; case 0x01CB: int offset1 = 0; - client.queuePacket(BasePacket.createPacket(SendBlacklistPacket.buildPacket(player.actorID, new String[] { "Test" }, ref offset1), true, false)); + client.QueuePacket(BasePacket.CreatePacket(SendBlacklistPacket.BuildPacket(player.actorID, new String[] { "Test" }, ref offset1), true, false)); break; case 0x01CC: AddRemoveSocialPacket addFriendList = new AddRemoveSocialPacket(subpacket.data); - client.queuePacket(BasePacket.createPacket(FriendlistAddedPacket.buildPacket(player.actorID, true, (uint)addFriendList.name.GetHashCode(), true, addFriendList.name), true, false)); + client.QueuePacket(BasePacket.CreatePacket(FriendlistAddedPacket.BuildPacket(player.actorID, true, (uint)addFriendList.name.GetHashCode(), true, addFriendList.name), true, false)); break; case 0x01CD: - AddRemoveSocialPacket removeFriendList = new AddRemoveSocialPacket(subpacket.data); - client.queuePacket(BasePacket.createPacket(FriendlistRemovedPacket.buildPacket(player.actorID, true, removeFriendList.name), true, false)); + AddRemoveSocialPacket RemoveFriendList = new AddRemoveSocialPacket(subpacket.data); + client.QueuePacket(BasePacket.CreatePacket(FriendlistRemovedPacket.BuildPacket(player.actorID, true, RemoveFriendList.name), true, false)); break; case 0x01CE: int offset2 = 0; - client.queuePacket(BasePacket.createPacket(SendFriendlistPacket.buildPacket(player.actorID, new Tuple[] { new Tuple(01, "Test2") }, ref offset2), true, false)); + client.QueuePacket(BasePacket.CreatePacket(SendFriendlistPacket.BuildPacket(player.actorID, new Tuple[] { new Tuple(01, "Test2") }, ref offset2), true, false)); break; case 0x01CF: - client.queuePacket(BasePacket.createPacket(FriendStatusPacket.buildPacket(player.actorID, null), true, false)); + client.QueuePacket(BasePacket.CreatePacket(FriendStatusPacket.BuildPacket(player.actorID, null), true, false)); break; /* SUPPORT DESK STUFF */ //Request for FAQ/Info List case 0x01D0: FaqListRequestPacket faqRequest = new FaqListRequestPacket(subpacket.data); - client.queuePacket(BasePacket.createPacket(FaqListResponsePacket.buildPacket(player.actorID, new string[] { "Testing FAQ1", "Coded style!" }), true, false)); + client.QueuePacket(BasePacket.CreatePacket(FaqListResponsePacket.BuildPacket(player.actorID, new string[] { "Testing FAQ1", "Coded style!" }), true, false)); break; //Request for body of a faq/info selection case 0x01D1: FaqBodyRequestPacket faqBodyRequest = new FaqBodyRequestPacket(subpacket.data); - client.queuePacket(BasePacket.createPacket(FaqBodyResponsePacket.buildPacket(player.actorID, "HERE IS A GIANT BODY. Nothing else to say!"), true, false)); + client.QueuePacket(BasePacket.CreatePacket(FaqBodyResponsePacket.BuildPacket(player.actorID, "HERE IS A GIANT BODY. Nothing else to say!"), true, false)); break; //Request issue list case 0x01D2: GMTicketIssuesRequestPacket issuesRequest = new GMTicketIssuesRequestPacket(subpacket.data); - client.queuePacket(BasePacket.createPacket(IssueListResponsePacket.buildPacket(player.actorID, new string[] { "Test1", "Test2", "Test3", "Test4", "Test5" }), true, false)); + client.QueuePacket(BasePacket.CreatePacket(IssueListResponsePacket.BuildPacket(player.actorID, new string[] { "Test1", "Test2", "Test3", "Test4", "Test5" }), true, false)); break; //Request if GM ticket exists case 0x01D3: - client.queuePacket(BasePacket.createPacket(StartGMTicketPacket.buildPacket(player.actorID, false), true, false)); + client.QueuePacket(BasePacket.CreatePacket(StartGMTicketPacket.BuildPacket(player.actorID, false), true, false)); break; //Request for GM response message case 0x01D4: - client.queuePacket(BasePacket.createPacket(GMTicketPacket.buildPacket(player.actorID, "This is a GM Ticket Title", "This is a GM Ticket Body."), true, false)); + client.QueuePacket(BasePacket.CreatePacket(GMTicketPacket.BuildPacket(player.actorID, "This is a GM Ticket Title", "This is a GM Ticket Body."), true, false)); break; //GM Ticket Sent case 0x01D5: GMSupportTicketPacket gmTicket = new GMSupportTicketPacket(subpacket.data); - Log.info("Got GM Ticket: \n" + gmTicket.ticketTitle + "\n" + gmTicket.ticketBody); - client.queuePacket(BasePacket.createPacket(GMTicketSentResponsePacket.buildPacket(player.actorID, true), true, false)); + Program.Log.Info("Got GM Ticket: \n" + gmTicket.ticketTitle + "\n" + gmTicket.ticketBody); + client.QueuePacket(BasePacket.CreatePacket(GMTicketSentResponsePacket.BuildPacket(player.actorID, true), true, false)); break; //Request to end ticket case 0x01D6: - client.queuePacket(BasePacket.createPacket(EndGMTicketPacket.buildPacket(player.actorID), true, false)); + client.QueuePacket(BasePacket.CreatePacket(EndGMTicketPacket.BuildPacket(player.actorID), true, false)); break; default: - Log.debug(String.Format("Unknown command 0x{0:X} received.", subpacket.gameMessage.opcode)); - subpacket.debugPrintSubPacket(); + Program.Log.Debug("Unknown command 0x{0:X} received.", subpacket.gameMessage.opcode); + subpacket.DebugPrintSubPacket(); break; } } else - packet.debugPrintPacket(); + packet.DebugPrintPacket(); } } diff --git a/FFXIVClassic Map Server/Program.cs b/FFXIVClassic Map Server/Program.cs index 4790bc0f..0f0ff4f8 100644 --- a/FFXIVClassic Map Server/Program.cs +++ b/FFXIVClassic Map Server/Program.cs @@ -1,20 +1,22 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; +using System; using System.Diagnostics; using System.Threading; -using FFXIVClassic_Lobby_Server.common; -using System.Runtime.InteropServices; +using System.Text; using MySql.Data.MySqlClient; using System.Reflection; -using System.IO; -using FFXIVClassic_Lobby_Server.dataobjects; -using System.Collections.Generic; -using System.Text; +using FFXIVClassic_Map_Server.dataobjects; +using FFXIVClassic.Common; +using NLog; +using NLog.Targets; +using NLog.Targets.Wrappers; +using NLog.Config; -namespace FFXIVClassic_Lobby_Server +namespace FFXIVClassic_Map_Server { class Program { + public static Logger Log; + static void Main(string[] args) { #if DEBUG @@ -23,62 +25,61 @@ namespace FFXIVClassic_Lobby_Server #endif bool startServer = true; - Console.ForegroundColor = ConsoleColor.Cyan; - Console.WriteLine("---------FFXIV 1.0 Map Server---------"); - Console.ForegroundColor = ConsoleColor.Gray; + //Load Config + if (!ConfigConstants.Load()) + startServer = false; + // set up logging + + Log = LogManager.GetCurrentClassLogger(); + + Program.Log.Info("---------FFXIV 1.0 Map Server---------"); Assembly assem = Assembly.GetExecutingAssembly(); Version vers = assem.GetName().Version; - Console.WriteLine("Version: " + vers.ToString()); - - //Load Config - if (!ConfigConstants.load()) - startServer = false; + Program.Log.Info("Version: " + vers.ToString()); //Test DB Connection - Console.Write("Testing DB connection... "); + Program.Log.Info("Testing DB connection... "); using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) { try { conn.Open(); conn.Close(); - Console.ForegroundColor = ConsoleColor.Green; - Console.WriteLine("[OK]"); - Console.ForegroundColor = ConsoleColor.Gray; + + Program.Log.Info("[OK]"); } catch (MySqlException e) { - Console.ForegroundColor = ConsoleColor.Red; - Console.WriteLine("[FAILED]"); - Console.ForegroundColor = ConsoleColor.Gray; + Program.Log.Error(e.ToString()); startServer = false; } } //Check World ID - DBWorld thisWorld = Database.getServer(ConfigConstants.DATABASE_WORLDID); + DBWorld thisWorld = Database.GetServer(ConfigConstants.DATABASE_WORLDID); if (thisWorld != null) - Console.WriteLine("Successfully pulled world info from DB. Server name is {0}.", thisWorld.name); + Program.Log.Info("Successfully pulled world info from DB. Server name is {0}.", thisWorld.name); else - Console.WriteLine("World info could not be retrieved from the DB. Welcome and MOTD will not be displayed."); + Program.Log.Info("World info could not be retrieved from the DB. Welcome and MOTD will not be displayed."); //Start server if A-OK if (startServer) { Server server = new Server(); - CommandProcessor cp = new CommandProcessor(server.getConnectedPlayerList()); - server.startServer(); + CommandProcessor cp = new CommandProcessor(server.GetConnectedPlayerList()); + server.StartServer(); - while (true) + while (startServer) { String input = Console.ReadLine(); - cp.doCommand(input, null); + Log.Info("[Console Input] " + input); + cp.DoCommand(input, null); } } - Console.WriteLine("Press any key to continue..."); + Program.Log.Info("Press any key to continue..."); Console.ReadKey(); } diff --git a/FFXIVClassic Map Server/Properties/AssemblyInfo.cs b/FFXIVClassic Map Server/Properties/AssemblyInfo.cs index 8a40d90d..e6832007 100644 --- a/FFXIVClassic Map Server/Properties/AssemblyInfo.cs +++ b/FFXIVClassic Map Server/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/FFXIVClassic Map Server/Properties/Resources.Designer.cs b/FFXIVClassic Map Server/Properties/Resources.Designer.cs index 62ed5ea5..75ee4efc 100644 --- a/FFXIVClassic Map Server/Properties/Resources.Designer.cs +++ b/FFXIVClassic Map Server/Properties/Resources.Designer.cs @@ -17,7 +17,7 @@ namespace FFXIVClassic_Map_Server.Properties { /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen + // To add or Remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -105,7 +105,7 @@ namespace FFXIVClassic_Map_Server.Properties { /// ///Available commands: ///Standard: mypos, music, warp - ///Server Administration: givecurrency, giveitem, givekeyitem, removecurrency, removekeyitem, reloaditems, reloadzones + ///Server Administration: givecurrency, giveitem, givekeyitem, Removecurrency, Removekeyitem, reloaditems, reloadzones ///Test: test weather. /// public static string CPhelp { @@ -129,7 +129,7 @@ namespace FFXIVClassic_Map_Server.Properties { /// /// Looks up a localized string similar to Prints out your current location /// - ///*Note: The X/Y/Z coordinates do not correspond to the coordinates listed in the in-game map, they are based on the underlying game data. + ///*Note: The X/Y/Z coordinates Do not correspond to the coordinates listed in the in-game map, they are based on the underlying game data. /// public static string CPmypos { get { @@ -176,38 +176,38 @@ namespace FFXIVClassic_Map_Server.Properties { /// /// Looks up a localized string similar to Removes the specified currency from the current player's inventory /// - ///*Syntax: removecurrency <quantity> - /// removecurrency <type> <quantity> + ///*Syntax: Removecurrency <quantity> + /// Removecurrency <type> <quantity> ///<type> is the specific type of currency desired, defaults to gil if no type specified. /// - public static string CPremovecurrency { + public static string CPRemovecurrency { get { - return ResourceManager.GetString("CPremovecurrency", resourceCulture); + return ResourceManager.GetString("CPRemovecurrency", resourceCulture); } } /// /// Looks up a localized string similar to Removes the specified items to the current player's inventory /// - ///*Syntax: removeitem <itemid> - /// removeitem <itemid> <quantity> + ///*Syntax: Removeitem <itemid> + /// Removeitem <itemid> <quantity> ///<item id> is the item's specific id as defined in the server database. /// - public static string CPremoveitem { + public static string CPRemoveitem { get { - return ResourceManager.GetString("CPremoveitem", resourceCulture); + return ResourceManager.GetString("CPRemoveitem", resourceCulture); } } /// /// Looks up a localized string similar to Removes the specified key item to the current player's inventory /// - ///*Syntax: removekeyitem <itemid> + ///*Syntax: Removekeyitem <itemid> ///<item id> is the key item's specific id as defined in the server database. /// - public static string CPremovekeyitem { + public static string CPRemovekeyitem { get { - return ResourceManager.GetString("CPremovekeyitem", resourceCulture); + return ResourceManager.GetString("CPRemovekeyitem", resourceCulture); } } @@ -226,7 +226,7 @@ namespace FFXIVClassic_Map_Server.Properties { /// /// Looks up a localized string similar to Overrides the currently displayed character equipment in a specific slot /// - ///*Note: Similar to Glamours in FFXIV:ARR, the overridden graphics are purely cosmetic, they do not affect the underlying stats of whatever is equipped on that slot + ///*Note: Similar to Glamours in FFXIV:ARR, the overridden graphics are purely cosmetic, they Do not affect the underlying stats of whatever is equipped on that slot /// ///*Syntax: sendpacket <slot> <wid> <eid> <vid> <cid> ///<w/e/v/c id> are as defined in the client game data. diff --git a/FFXIVClassic Map Server/Properties/Resources.resx b/FFXIVClassic Map Server/Properties/Resources.resx index 0413ecca..a5538877 100644 --- a/FFXIVClassic Map Server/Properties/Resources.resx +++ b/FFXIVClassic Map Server/Properties/Resources.resx @@ -7,7 +7,7 @@ The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes + various data types are Done through the TypeConverter classes associated with the data types. Example: @@ -33,7 +33,7 @@ Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the + Classes that Don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the @@ -156,7 +156,7 @@ Test: test weather Prints out your current location -*Note: The X/Y/Z coordinates do not correspond to the coordinates listed in the in-game map, they are based on the underlying game data +*Note: The X/Y/Z coordinates Do not correspond to the coordinates listed in the in-game map, they are based on the underlying game data *Syntax: property <value 1> <value 2> <value 3> @@ -199,7 +199,7 @@ Test: test weather Overrides the currently displayed character equipment in a specific slot -*Note: Similar to Glamours in FFXIV:ARR, the overridden graphics are purely cosmetic, they do not affect the underlying stats of whatever is equipped on that slot +*Note: Similar to Glamours in FFXIV:ARR, the overridden graphics are purely cosmetic, they Do not affect the underlying stats of whatever is equipped on that slot *Syntax: sendpacket <slot> <wid> <eid> <vid> <cid> <w/e/v/c id> are as defined in the client game data diff --git a/FFXIVClassic Map Server/Server.cs b/FFXIVClassic Map Server/Server.cs index 08f5e9fb..f5005496 100644 --- a/FFXIVClassic Map Server/Server.cs +++ b/FFXIVClassic Map Server/Server.cs @@ -1,24 +1,16 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Net; using System.Net.Sockets; -using System.Threading.Tasks; using System.Threading; -using FFXIVClassic_Lobby_Server.common; using FFXIVClassic_Map_Server.dataobjects; -using FFXIVClassic_Lobby_Server.packets; -using System.IO; -using FFXIVClassic_Map_Server.packets.send.actor; -using FFXIVClassic_Map_Server; -using FFXIVClassic_Map_Server.packets.send; -using FFXIVClassic_Map_Server.dataobjects.chara; +using FFXIVClassic_Map_Server.packets; +using FFXIVClassic.Common; +using NLog; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; -using FFXIVClassic_Map_Server.actors.chara.player; -namespace FFXIVClassic_Lobby_Server +namespace FFXIVClassic_Map_Server { class Server { @@ -46,9 +38,9 @@ namespace FFXIVClassic_Lobby_Server private Thread mConnectionHealthThread; private bool killHealthThread = false; - private void connectionHealth() + private void ConnectionHealth() { - Log.info(String.Format("Connection Health thread started; it will run every {0} seconds.", HEALTH_THREAD_SLEEP_TIME)); + Program.Log.Info("Connection Health thread started; it will run every {0} seconds.", HEALTH_THREAD_SLEEP_TIME); while (!killHealthThread) { lock (mConnectedPlayerList) @@ -56,12 +48,12 @@ namespace FFXIVClassic_Lobby_Server List dcedPlayers = new List(); foreach (ConnectedPlayer cp in mConnectedPlayerList.Values) { - if (cp.checkIfDCing()) + if (cp.CheckIfDCing()) dcedPlayers.Add(cp); } foreach (ConnectedPlayer cp in dcedPlayers) - cp.getActor().cleanupAndSave(); + cp.GetActor().CleanupAndSave(); } Thread.Sleep(HEALTH_THREAD_SLEEP_TIME * 1000); } @@ -72,30 +64,30 @@ namespace FFXIVClassic_Lobby_Server mSelf = this; } - public static Server getServer() + public static Server GetServer() { return mSelf; } - public bool startServer() + public bool StartServer() { - mConnectionHealthThread = new Thread(new ThreadStart(connectionHealth)); + mConnectionHealthThread = new Thread(new ThreadStart(ConnectionHealth)); mConnectionHealthThread.Name = "MapThread:Health"; //mConnectionHealthThread.Start(); mStaticActors = new StaticActors(STATIC_ACTORS_PATH); - gamedataItems = Database.getItemGamedata(); - Log.info(String.Format("Loaded {0} items.", gamedataItems.Count)); + gamedataItems = Database.GetItemGamedata(); + Program.Log.Info("Loaded {0} items.", gamedataItems.Count); mWorldManager = new WorldManager(this); mWorldManager.LoadZoneList(); mWorldManager.LoadZoneEntranceList(); mWorldManager.LoadActorClasses(); mWorldManager.LoadSpawnLocations(); - mWorldManager.spawnAllActors(); + mWorldManager.SpawnAllActors(); - IPEndPoint serverEndPoint = new System.Net.IPEndPoint(IPAddress.Parse(ConfigConstants.OPTIONS_BINDIP), FFXIV_MAP_PORT); + IPEndPoint serverEndPoint = new System.Net.IPEndPoint(IPAddress.Parse(ConfigConstants.OPTIONS_BINDIP), int.Parse(ConfigConstants.OPTIONS_PORT)); try { @@ -103,7 +95,7 @@ namespace FFXIVClassic_Lobby_Server } catch (Exception e) { - throw new ApplicationException("Could not create socket, check to make sure not duplicating port", e); + throw new ApplicationException("Could not Create socket, check to make sure not duplicating port", e); } try { @@ -116,16 +108,15 @@ namespace FFXIVClassic_Lobby_Server } try { - mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket); + mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket); } catch (Exception e) { throw new ApplicationException("Error occured starting listeners, check inner exception", e); } - Console.Write("Game server has started @ "); Console.ForegroundColor = ConsoleColor.White; - Console.WriteLine("{0}:{1}", (mServerSocket.LocalEndPoint as IPEndPoint).Address, (mServerSocket.LocalEndPoint as IPEndPoint).Port); + Program.Log.Debug("Map Server has started @ {0}:{1}", (mServerSocket.LocalEndPoint as IPEndPoint).Address, (mServerSocket.LocalEndPoint as IPEndPoint).Port); Console.ForegroundColor = ConsoleColor.Gray; mProcessor = new PacketProcessor(this, mConnectedPlayerList, mConnectionList); @@ -135,7 +126,7 @@ namespace FFXIVClassic_Lobby_Server return true; } - public void removePlayer(Player player) + public void RemovePlayer(Player player) { lock (mConnectedPlayerList) { @@ -145,7 +136,7 @@ namespace FFXIVClassic_Lobby_Server } #region Socket Handling - private void acceptCallback(IAsyncResult result) + private void AcceptCallback(IAsyncResult result) { ClientConnection conn = null; Socket socket = (System.Net.Sockets.Socket)result.AsyncState; @@ -162,11 +153,11 @@ namespace FFXIVClassic_Lobby_Server mConnectionList.Add(conn); } - Log.conn(String.Format("Connection {0}:{1} has connected.", (conn.socket.RemoteEndPoint as IPEndPoint).Address, (conn.socket.RemoteEndPoint as IPEndPoint).Port)); + Program.Log.Info("Connection {0}:{1} has connected.", (conn.socket.RemoteEndPoint as IPEndPoint).Address, (conn.socket.RemoteEndPoint as IPEndPoint).Port); //Queue recieving of data from the connection - conn.socket.BeginReceive(conn.buffer, 0, conn.buffer.Length, SocketFlags.None, new AsyncCallback(receiveCallback), conn); + conn.socket.BeginReceive(conn.buffer, 0, conn.buffer.Length, SocketFlags.None, new AsyncCallback(ReceiveCallback), conn); //Queue the accept of the next incomming connection - mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket); + mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket); } catch (SocketException) { @@ -178,7 +169,7 @@ namespace FFXIVClassic_Lobby_Server mConnectionList.Remove(conn); } } - mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket); + mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket); } catch (Exception) { @@ -189,21 +180,21 @@ namespace FFXIVClassic_Lobby_Server mConnectionList.Remove(conn); } } - mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket); + mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket); } } - public static Actor getStaticActors(uint id) + public static Actor GetStaticActors(uint id) { - return mStaticActors.getActor(id); + return mStaticActors.GetActor(id); } - public static Actor getStaticActors(string name) + public static Actor GetStaticActors(string name) { - return mStaticActors.findStaticActor(name); + return mStaticActors.FindStaticActor(name); } - public static Item getItemGamedata(uint id) + public static Item GetItemGamedata(uint id) { if (gamedataItems.ContainsKey(id)) return gamedataItems[id]; @@ -215,7 +206,7 @@ namespace FFXIVClassic_Lobby_Server /// Receive Callback. Reads in incoming data, converting them to base packets. Base packets are sent to be parsed. If not enough data at the end to build a basepacket, move to the beginning and prepend. /// /// - private void receiveCallback(IAsyncResult result) + private void ReceiveCallback(IAsyncResult result) { ClientConnection conn = (ClientConnection)result.AsyncState; @@ -229,7 +220,7 @@ namespace FFXIVClassic_Lobby_Server mConnectionList.Remove(conn); } if (conn.connType == BasePacket.TYPE_ZONE) - Log.conn(String.Format("{0} has disconnected.", conn.owner == 0 ? conn.getAddress() : "User " + conn.owner)); + Program.Log.Info("{0} has disconnected.", conn.owner == 0 ? conn.GetAddress() : "User " + conn.owner); return; } @@ -246,13 +237,13 @@ namespace FFXIVClassic_Lobby_Server //Build packets until can no longer or out of data while (true) { - BasePacket basePacket = buildPacket(ref offset, conn.buffer, bytesRead); + BasePacket basePacket = BuildPacket(ref offset, conn.buffer, bytesRead); //If can't build packet, break, else process another if (basePacket == null) break; else - mProcessor.processPacket(conn, basePacket); + mProcessor.ProcessPacket(conn, basePacket); } //Not all bytes consumed, transfer leftover to beginning @@ -262,18 +253,18 @@ namespace FFXIVClassic_Lobby_Server conn.lastPartialSize = bytesRead - offset; //Build any queued subpackets into basepackets and send - conn.flushQueuedSendPackets(); + conn.FlushQueuedSendPackets(); if (offset < bytesRead) //Need offset since not all bytes consumed - conn.socket.BeginReceive(conn.buffer, bytesRead - offset, conn.buffer.Length - (bytesRead - offset), SocketFlags.None, new AsyncCallback(receiveCallback), conn); + conn.socket.BeginReceive(conn.buffer, bytesRead - offset, conn.buffer.Length - (bytesRead - offset), SocketFlags.None, new AsyncCallback(ReceiveCallback), conn); else //All bytes consumed, full buffer available - conn.socket.BeginReceive(conn.buffer, 0, conn.buffer.Length, SocketFlags.None, new AsyncCallback(receiveCallback), conn); + conn.socket.BeginReceive(conn.buffer, 0, conn.buffer.Length, SocketFlags.None, new AsyncCallback(ReceiveCallback), conn); } else { - Log.conn(String.Format("{0} has disconnected.", conn.owner == 0 ? conn.getAddress() : "User " + conn.owner)); + Program.Log.Info("{0} has disconnected.", conn.owner == 0 ? conn.GetAddress() : "User " + conn.owner); lock (mConnectionList) { @@ -285,7 +276,7 @@ namespace FFXIVClassic_Lobby_Server { if (conn.socket != null) { - Log.conn(String.Format("{0} has disconnected.", conn.owner == 0 ? conn.getAddress() : "User " + conn.owner)); + Program.Log.Info("{0} has disconnected.", conn.owner == 0 ? conn.GetAddress() : "User " + conn.owner); lock (mConnectionList) { @@ -301,7 +292,7 @@ namespace FFXIVClassic_Lobby_Server /// Current offset in buffer. /// Incoming buffer. /// Returns either a BasePacket or null if not enough data. - public BasePacket buildPacket(ref int offset, byte[] buffer, int bytesRead) + public BasePacket BuildPacket(ref int offset, byte[] buffer, int bytesRead) { BasePacket newPacket = null; @@ -338,7 +329,7 @@ namespace FFXIVClassic_Lobby_Server return mWorldManager; } - public Dictionary getConnectedPlayerList() + public Dictionary GetConnectedPlayerList() { return mConnectedPlayerList; } diff --git a/FFXIVClassic Map Server/WorldManager.cs b/FFXIVClassic Map Server/WorldManager.cs index 9142a53f..9f551555 100644 --- a/FFXIVClassic Map Server/WorldManager.cs +++ b/FFXIVClassic Map Server/WorldManager.cs @@ -1,9 +1,9 @@ -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic_Map_Server; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.actors.area; using FFXIVClassic_Map_Server.actors.chara.npc; using FFXIVClassic_Map_Server.Actors; -using FFXIVClassic_Map_Server.common.EfficientHashTables; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.dataobjects.chara; using FFXIVClassic_Map_Server.lua; @@ -113,7 +113,7 @@ namespace FFXIVClassic_Map_Server { Zone parent = zoneList[parentZoneId]; PrivateArea privArea = new PrivateArea(parent, reader.GetUInt32("id"), reader.GetString("className"), reader.GetString("privateAreaName"), 1, reader.GetUInt16("dayMusic"), reader.GetUInt16("nightMusic"), reader.GetUInt16("battleMusic")); - parent.addPrivateArea(privArea); + parent.AddPrivateArea(privArea); } else continue; @@ -130,7 +130,7 @@ namespace FFXIVClassic_Map_Server } } - Log.info(String.Format("Loaded {0} zones and {1} private areas.", count1, count2)); + Program.Log.Info(String.Format("Loaded {0} zones and {1} private areas.", count1, count2)); } public void LoadZoneEntranceList() @@ -181,7 +181,7 @@ namespace FFXIVClassic_Map_Server } } - Log.info(String.Format("Loaded {0} zone spawn locations.", count)); + Program.Log.Info(String.Format("Loaded {0} zone spawn locations.", count)); } public void LoadActorClasses() @@ -234,7 +234,7 @@ namespace FFXIVClassic_Map_Server } } - Log.info(String.Format("Loaded {0} actor classes.", count)); + Program.Log.Info(String.Format("Loaded {0} actor classes.", count)); } public void LoadSpawnLocations() @@ -296,7 +296,7 @@ namespace FFXIVClassic_Map_Server SpawnLocation spawn = new SpawnLocation(classId, uniqueId, zoneId, privAreaName, privAreaLevel, x, y, z, rot, state, animId); - zone.addSpawnLocation(spawn); + zone.AddSpawnLocation(spawn); count++; } @@ -311,14 +311,14 @@ namespace FFXIVClassic_Map_Server } } - Log.info(String.Format("Loaded {0} spawn(s).", count)); + Program.Log.Info(String.Format("Loaded {0} spawn(s).", count)); } - public void spawnAllActors() + public void SpawnAllActors() { - Log.info("Spawning actors..."); + Program.Log.Info("Spawning actors..."); foreach (Zone z in zoneList.Values) - z.spawnAllActors(true); + z.SpawnAllActors(true); } //Moves the actor to the new zone if exists. No packets are sent nor position changed. @@ -329,7 +329,7 @@ namespace FFXIVClassic_Map_Server if (player.zone != null) { oldZone = player.zone; - oldZone.removeActorFromZone(player); + oldZone.RemoveActorFromZone(player); } //Add player to new zone and update @@ -339,9 +339,9 @@ namespace FFXIVClassic_Map_Server if (newZone == null) return; - newZone.addActorToZone(player); + newZone.AddActorToZone(player); - LuaEngine.onZoneIn(player); + LuaEngine.OnZoneIn(player); } //Moves actor to new zone, and sends packets to spawn at the given zone entrance @@ -349,7 +349,7 @@ namespace FFXIVClassic_Map_Server { if (!zoneEntranceList.ContainsKey(zoneEntrance)) { - Log.error("Given zone entrance was not found: " + zoneEntrance); + Program.Log.Error("Given zone entrance was not found: " + zoneEntrance); return; } @@ -366,7 +366,7 @@ namespace FFXIVClassic_Map_Server if (player.zone != null) { oldZone = player.zone; - oldZone.removeActorFromZone(player); + oldZone.RemoveActorFromZone(player); } //Add player to new zone and update @@ -375,12 +375,12 @@ namespace FFXIVClassic_Map_Server if (destinationPrivateArea == null) newArea = GetZone(destinationZoneId); else - newArea = GetZone(destinationZoneId).getPrivateArea(destinationPrivateArea, 0); + newArea = GetZone(destinationZoneId).GetPrivateArea(destinationPrivateArea, 0); //This server does not contain that zoneId if (newArea == null) return; - newArea.addActorToZone(player); + newArea.AddActorToZone(player); //Update player actor's properties player.zoneId = newArea.actorId; @@ -391,13 +391,13 @@ namespace FFXIVClassic_Map_Server player.rotation = spawnRotation; //Send packets - player.playerSession.queuePacket(DeleteAllActorsPacket.buildPacket(player.actorId), true, false); - player.playerSession.queuePacket(_0xE2Packet.buildPacket(player.actorId, 0x0), true, false); - player.sendZoneInPackets(this, spawnType); - player.playerSession.clearInstance(); - player.sendInstanceUpdate(); + player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.actorId), true, false); + player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x0), true, false); + player.SendZoneInPackets(this, spawnType); + player.playerSession.ClearInstance(); + player.SendInstanceUpdate(); - LuaEngine.onZoneIn(player); + LuaEngine.OnZoneIn(player); } //Moves actor within zone to spawn position @@ -405,7 +405,7 @@ namespace FFXIVClassic_Map_Server { if (!zoneEntranceList.ContainsKey(zoneEntrance)) { - Log.error("Given zone entrance was not found: " + zoneEntrance); + Program.Log.Error("Given zone entrance was not found: " + zoneEntrance); return; } @@ -423,8 +423,8 @@ namespace FFXIVClassic_Map_Server //Remove player from currentZone if transfer else it's login if (player.zone != null) { - player.zone.removeActorFromZone(player); - player.zone.addActorToZone(player); + player.zone.RemoveActorFromZone(player); + player.zone.AddActorToZone(player); //Update player actor's properties; player.positionX = spawnX; @@ -433,9 +433,9 @@ namespace FFXIVClassic_Map_Server player.rotation = spawnRotation; //Send packets - player.playerSession.queuePacket(_0xE2Packet.buildPacket(player.actorId, 0x0), true, false); - player.playerSession.queuePacket(player.createSpawnTeleportPacket(player.actorId, spawnType), true, false); - player.sendInstanceUpdate(); + player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x0), true, false); + player.playerSession.QueuePacket(player.CreateSpawnTeleportPacket(player.actorId, spawnType), true, false); + player.SendInstanceUpdate(); } } @@ -453,15 +453,15 @@ namespace FFXIVClassic_Map_Server //Set the current zone and add player player.zone = zone; - LuaEngine.onBeginLogin(player); + LuaEngine.OnBeginLogin(player); - zone.addActorToZone(player); + zone.AddActorToZone(player); //Send packets - player.sendZoneInPackets(this, 0x1); + player.SendZoneInPackets(this, 0x1); - LuaEngine.onLogin(player); - LuaEngine.onZoneIn(player); + LuaEngine.OnLogin(player); + LuaEngine.OnZoneIn(player); } public void reloadZone(uint zoneId) @@ -547,7 +547,7 @@ namespace FFXIVClassic_Map_Server } } - public ZoneEntrance getZoneEntrance(uint entranceId) + public ZoneEntrance GetZoneEntrance(uint entranceId) { if (zoneEntranceList.ContainsKey(entranceId)) return zoneEntranceList[entranceId]; diff --git a/FFXIVClassic Map Server/actors/Actor.cs b/FFXIVClassic Map Server/actors/Actor.cs index d385912c..5db8a9dd 100644 --- a/FFXIVClassic Map Server/actors/Actor.cs +++ b/FFXIVClassic Map Server/actors/Actor.cs @@ -1,361 +1,354 @@ -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.actors; -using FFXIVClassic_Map_Server.actors.area; -using FFXIVClassic_Map_Server.dataobjects.chara; -using FFXIVClassic_Map_Server.lua; -using FFXIVClassic_Map_Server.packets.send.actor; -using FFXIVClassic_Map_Server.packets.send.actor.events; -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; - -namespace FFXIVClassic_Map_Server.Actors -{ - class Actor - { - public uint actorId; - public string actorName; - - public uint displayNameId = 0xFFFFFFFF; - public string customDisplayName; - - public ushort currentMainState = SetActorStatePacket.MAIN_STATE_PASSIVE; - public ushort currentSubState = SetActorStatePacket.SUB_STATE_NONE; - public float positionX, positionY, positionZ, rotation; - public float oldPositionX, oldPositionY, oldPositionZ, oldRotation; - public ushort moveState, oldMoveState; - public float[] moveSpeeds = new float[5]; - - public uint zoneId; - public Area zone = null; - public bool isZoning = false; - - public bool spawnedFirstTime = false; - - public string classPath; - public string className; - public List classParams; - - public EventList eventConditions; - - public Actor(uint actorId) - { - this.actorId = actorId; - } - - public Actor(uint actorId, string actorName, string className, List classParams) - { - this.actorId = actorId; - this.actorName = actorName; - this.className = className; - this.classParams = classParams; - - this.moveSpeeds[0] = SetActorSpeedPacket.DEFAULT_STOP; - this.moveSpeeds[1] = SetActorSpeedPacket.DEFAULT_WALK; - this.moveSpeeds[2] = SetActorSpeedPacket.DEFAULT_RUN; - this.moveSpeeds[3] = SetActorSpeedPacket.DEFAULT_RUN; - } - - public SubPacket createAddActorPacket(uint playerActorId, byte val) - { - return AddActorPacket.buildPacket(actorId, playerActorId, val); - } - - public SubPacket createNamePacket(uint playerActorId) - { - return SetActorNamePacket.buildPacket(actorId, playerActorId, displayNameId, displayNameId == 0xFFFFFFFF | displayNameId == 0x0 ? customDisplayName : ""); - } - - public SubPacket createSpeedPacket(uint playerActorId) - { - return SetActorSpeedPacket.buildPacket(actorId, playerActorId); - } - - public SubPacket createSpawnPositonPacket(uint playerActorId, uint spawnType) - { - SubPacket spawnPacket; - if (!spawnedFirstTime && playerActorId == actorId) - spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, 0, positionX, positionY, positionZ, rotation, 0x1, false); - else if (playerActorId == actorId) - spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, 0xFFFFFFFF, positionX, positionY, positionZ, rotation, spawnType, true); - else - { - if (this is Player) - spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, 0, positionX, positionY, positionZ, rotation, spawnType, false); - else - spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, actorId, positionX, positionY, positionZ, rotation, spawnType, false); - } - - //return SetActorPositionPacket.buildPacket(actorId, playerActorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE); - spawnedFirstTime = true; - - return spawnPacket; - } - - public SubPacket createSpawnTeleportPacket(uint playerActorId, uint spawnType) - { - SubPacket spawnPacket; - - spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, 0xFFFFFFFF, positionX, positionY, positionZ, rotation, spawnType, false); - - //return SetActorPositionPacket.buildPacket(actorId, playerActorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE); - - spawnPacket.debugPrintSubPacket(); - - return spawnPacket; - } - - public SubPacket createPositionUpdatePacket(uint playerActorId) - { - return MoveActorToPositionPacket.buildPacket(actorId, playerActorId, positionX, positionY, positionZ, rotation, moveState); - } - - public SubPacket createStatePacket(uint playerActorID) - { - return SetActorStatePacket.buildPacket(actorId, playerActorID, currentMainState, currentSubState); - } - - public List getEventConditionPackets(uint playerActorId) - { - List subpackets = new List(); - - //Return empty list - if (eventConditions == null) - return subpackets; - - if (eventConditions.talkEventConditions != null) - { - foreach (EventList.TalkEventCondition condition in eventConditions.talkEventConditions) - subpackets.Add(SetTalkEventCondition.buildPacket(playerActorId, actorId, condition)); - } - - if (eventConditions.noticeEventConditions != null) - { - foreach (EventList.NoticeEventCondition condition in eventConditions.noticeEventConditions) - subpackets.Add(SetNoticeEventCondition.buildPacket(playerActorId, actorId, condition)); - } - - if (eventConditions.emoteEventConditions != null) - { - foreach (EventList.EmoteEventCondition condition in eventConditions.emoteEventConditions) - subpackets.Add(SetEmoteEventCondition.buildPacket(playerActorId, actorId, condition)); - } - - if (eventConditions.pushWithCircleEventConditions != null) - { - foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions) - subpackets.Add(SetPushEventConditionWithCircle.buildPacket(playerActorId, actorId, condition)); - } - - if (eventConditions.pushWithFanEventConditions != null) - { - foreach (EventList.PushFanEventCondition condition in eventConditions.pushWithFanEventConditions) - subpackets.Add(SetPushEventConditionWithFan.buildPacket(playerActorId, actorId, condition)); - } - - if (eventConditions.pushWithBoxEventConditions != null) - { - foreach (EventList.PushBoxEventCondition condition in eventConditions.pushWithBoxEventConditions) - subpackets.Add(SetPushEventConditionWithTriggerBox.buildPacket(playerActorId, actorId, condition)); - } - - return subpackets; - } - - public BasePacket getSetEventStatusPackets(uint playerActorId) - { - List subpackets = new List(); - - //Return empty list - if (eventConditions == null) - return BasePacket.createPacket(subpackets, true, false); - - if (eventConditions.talkEventConditions != null) - { - foreach (EventList.TalkEventCondition condition in eventConditions.talkEventConditions) - subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, true, 1, condition.conditionName)); - } - - if (eventConditions.noticeEventConditions != null) - { - foreach (EventList.NoticeEventCondition condition in eventConditions.noticeEventConditions) - subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, true, 1, condition.conditionName)); - } - - if (eventConditions.emoteEventConditions != null) - { - foreach (EventList.EmoteEventCondition condition in eventConditions.emoteEventConditions) - subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, true, 3, condition.conditionName)); - } - - if (eventConditions.pushWithCircleEventConditions != null) - { - foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions) - subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, true, 2, condition.conditionName)); - } - - if (eventConditions.pushWithFanEventConditions != null) - { - foreach (EventList.PushFanEventCondition condition in eventConditions.pushWithFanEventConditions) - subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, true, 2, condition.conditionName)); - } - - if (eventConditions.pushWithBoxEventConditions != null) - { - foreach (EventList.PushBoxEventCondition condition in eventConditions.pushWithBoxEventConditions) - subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, true, 2, condition.conditionName)); - } - - return BasePacket.createPacket(subpackets, true, false); - } - - public SubPacket createIsZoneingPacket(uint playerActorId) - { - return SetActorIsZoningPacket.buildPacket(actorId, playerActorId, false); - } - - public virtual SubPacket createScriptBindPacket(uint playerActorId) - { - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, classParams); - } - - public virtual BasePacket getSpawnPackets(uint playerActorId) - { - return getSpawnPackets(playerActorId, 0x1); - } - - public virtual BasePacket getSpawnPackets(uint playerActorId, uint spawnType) - { - List subpackets = new List(); - subpackets.Add(createAddActorPacket(playerActorId, 8)); - subpackets.AddRange(getEventConditionPackets(playerActorId)); - subpackets.Add(createSpeedPacket(playerActorId)); - subpackets.Add(createSpawnPositonPacket(playerActorId, spawnType)); - subpackets.Add(createNamePacket(playerActorId)); - subpackets.Add(createStatePacket(playerActorId)); - subpackets.Add(createIsZoneingPacket(playerActorId)); - subpackets.Add(createScriptBindPacket(playerActorId)); - return BasePacket.createPacket(subpackets, true, false); - } - - public virtual BasePacket getInitPackets(uint playerActorId) - { - SetActorPropetyPacket initProperties = new SetActorPropetyPacket("/_init"); - initProperties.addByte(0xE14B0CA8, 1); - initProperties.addByte(0x2138FD71, 1); - initProperties.addByte(0xFBFBCFB1, 1); - initProperties.addTarget(); - return BasePacket.createPacket(initProperties.buildPacket(playerActorId, actorId), true, false); - } - - public override bool Equals(Object obj) - { - Actor actorObj = obj as Actor; - if (actorObj == null) - return false; - else - return actorId == actorObj.actorId; - } - - public string getName() - { - return actorName; - } - - public string getClassName() - { - return className; - } - - public ushort getState() - { - return currentMainState; - } - - public List getLuaParams() - { - return classParams; - } - - public void changeState(ushort newState) - { - currentMainState = newState; - SubPacket changeStatePacket = SetActorStatePacket.buildPacket(actorId, actorId, newState, currentSubState); - SubPacket battleActionPacket = BattleAction1Packet.buildPacket(actorId, actorId); - zone.broadcastPacketAroundActor(this, changeStatePacket); - zone.broadcastPacketAroundActor(this, battleActionPacket); - } - - public void changeSpeed(int type, float value) - { - moveSpeeds[type] = value; - SubPacket changeSpeedPacket = SetActorSpeedPacket.buildPacket(actorId, actorId, moveSpeeds[0], moveSpeeds[1], moveSpeeds[2]); - zone.broadcastPacketAroundActor(this, changeSpeedPacket); - } - - public void changeSpeed(float speedStop, float speedWalk, float speedRun) - { - moveSpeeds[0] = speedStop; - moveSpeeds[1] = speedWalk; - moveSpeeds[2] = speedRun; - moveSpeeds[3] = speedRun; - SubPacket changeSpeedPacket = SetActorSpeedPacket.buildPacket(actorId, actorId, moveSpeeds[0], moveSpeeds[1], moveSpeeds[2]); - zone.broadcastPacketAroundActor(this, changeSpeedPacket); - } - - public void generateActorName(int actorNumber) - { - //Format Class Name - string className = this.className.Replace("Populace", "Ppl") - .Replace("Monster", "Mon") - .Replace("Crowd", "Crd") - .Replace("MapObj", "Map") - .Replace("Object", "Obj") - .Replace("Retainer", "Rtn") - .Replace("Standard", "Std"); - className = Char.ToLowerInvariant(className[0]) + className.Substring(1); - - //Format Zone Name - string zoneName = zone.zoneName.Replace("Field", "Fld") - .Replace("Dungeon", "Dgn") - .Replace("Town", "Twn") - .Replace("Battle", "Btl") - .Replace("Test", "Tes") - .Replace("Event", "Evt") - .Replace("Ship", "Shp") - .Replace("Office", "Ofc"); - if (zone is PrivateArea) - { - //Check if "normal" - zoneName = zoneName.Remove(zoneName.Length - 1, 1) + "P"; - } - zoneName = Char.ToLowerInvariant(zoneName[0]) + zoneName.Substring(1); - - try - { - className = className.Substring(0, 20 - zoneName.Length); - } - catch (ArgumentOutOfRangeException e) - {} - - //Convert actor number to base 63 - string classNumber = Utils.ToStringBase63(actorNumber); - - //Get stuff after @ - uint zoneId = zone.actorId; - uint privLevel = 0; - if (zone is PrivateArea) - privLevel = ((PrivateArea)zone).getPrivateAreaLevel(); - - actorName = String.Format("{0}_{1}_{2}@{3:X3}{4:X2}", className, zoneName, classNumber, zoneId, privLevel); - } - - } -} - +using FFXIVClassic_Map_Server.packets; +using FFXIVClassic_Map_Server.actors; +using FFXIVClassic_Map_Server.lua; +using FFXIVClassic_Map_Server.packets.send.actor; +using FFXIVClassic_Map_Server.packets.send.actor.events; +using FFXIVClassic.Common; +using System; +using System.Collections.Generic; +using FFXIVClassic_Map_Server.actors.area; + +namespace FFXIVClassic_Map_Server.Actors +{ + class Actor + { + public uint actorId; + public string actorName; + + public uint displayNameId = 0xFFFFFFFF; + public string customDisplayName; + + public ushort currentMainState = SetActorStatePacket.MAIN_STATE_PASSIVE; + public ushort currentSubState = SetActorStatePacket.SUB_STATE_NONE; + public float positionX, positionY, positionZ, rotation; + public float oldPositionX, oldPositionY, oldPositionZ, oldRotation; + public ushort moveState, oldMoveState; + public float[] moveSpeeds = new float[5]; + + public uint zoneId; + public Area zone = null; + public bool isZoning = false; + + public bool spawnedFirstTime = false; + + public string classPath; + public string className; + public List classParams; + + public EventList eventConditions; + + public Actor(uint actorId) + { + this.actorId = actorId; + } + + public Actor(uint actorId, string actorName, string className, List classParams) + { + this.actorId = actorId; + this.actorName = actorName; + this.className = className; + this.classParams = classParams; + + this.moveSpeeds[0] = SetActorSpeedPacket.DEFAULT_STOP; + this.moveSpeeds[1] = SetActorSpeedPacket.DEFAULT_WALK; + this.moveSpeeds[2] = SetActorSpeedPacket.DEFAULT_RUN; + this.moveSpeeds[3] = SetActorSpeedPacket.DEFAULT_RUN; + } + + public SubPacket CreateAddActorPacket(uint playerActorId, byte val) + { + return AddActorPacket.BuildPacket(actorId, playerActorId, val); + } + + public SubPacket CreateNamePacket(uint playerActorId) + { + return SetActorNamePacket.BuildPacket(actorId, playerActorId, displayNameId, displayNameId == 0xFFFFFFFF | displayNameId == 0x0 ? customDisplayName : ""); + } + + public SubPacket CreateSpeedPacket(uint playerActorId) + { + return SetActorSpeedPacket.BuildPacket(actorId, playerActorId); + } + + public SubPacket CreateSpawnPositonPacket(uint playerActorId, uint spawnType) + { + SubPacket spawnPacket; + if (!spawnedFirstTime && playerActorId == actorId) + spawnPacket = SetActorPositionPacket.BuildPacket(actorId, playerActorId, 0, positionX, positionY, positionZ, rotation, 0x1, false); + else if (playerActorId == actorId) + spawnPacket = SetActorPositionPacket.BuildPacket(actorId, playerActorId, 0xFFFFFFFF, positionX, positionY, positionZ, rotation, spawnType, true); + else + { + if (this is Player) + spawnPacket = SetActorPositionPacket.BuildPacket(actorId, playerActorId, 0, positionX, positionY, positionZ, rotation, spawnType, false); + else + spawnPacket = SetActorPositionPacket.BuildPacket(actorId, playerActorId, actorId, positionX, positionY, positionZ, rotation, spawnType, false); + } + + //return SetActorPositionPacket.BuildPacket(actorId, playerActorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE); + spawnedFirstTime = true; + + return spawnPacket; + } + + public SubPacket CreateSpawnTeleportPacket(uint playerActorId, uint spawnType) + { + SubPacket spawnPacket; + + spawnPacket = SetActorPositionPacket.BuildPacket(actorId, playerActorId, 0xFFFFFFFF, positionX, positionY, positionZ, rotation, spawnType, false); + + //return SetActorPositionPacket.BuildPacket(actorId, playerActorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE); + + spawnPacket.DebugPrintSubPacket(); + + return spawnPacket; + } + + public SubPacket CreatePositionUpdatePacket(uint playerActorId) + { + return MoveActorToPositionPacket.BuildPacket(actorId, playerActorId, positionX, positionY, positionZ, rotation, moveState); + } + + public SubPacket CreateStatePacket(uint playerActorID) + { + return SetActorStatePacket.BuildPacket(actorId, playerActorID, currentMainState, currentSubState); + } + + public List GetEventConditionPackets(uint playerActorId) + { + List subpackets = new List(); + + //Return empty list + if (eventConditions == null) + return subpackets; + + if (eventConditions.talkEventConditions != null) + { + foreach (EventList.TalkEventCondition condition in eventConditions.talkEventConditions) + subpackets.Add(SetTalkEventCondition.BuildPacket(playerActorId, actorId, condition)); + } + + if (eventConditions.noticeEventConditions != null) + { + foreach (EventList.NoticeEventCondition condition in eventConditions.noticeEventConditions) + subpackets.Add(SetNoticeEventCondition.BuildPacket(playerActorId, actorId, condition)); + } + + if (eventConditions.emoteEventConditions != null) + { + foreach (EventList.EmoteEventCondition condition in eventConditions.emoteEventConditions) + subpackets.Add(SetEmoteEventCondition.BuildPacket(playerActorId, actorId, condition)); + } + + if (eventConditions.pushWithCircleEventConditions != null) + { + foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions) + subpackets.Add(SetPushEventConditionWithCircle.BuildPacket(playerActorId, actorId, condition)); + } + + if (eventConditions.pushWithFanEventConditions != null) + { + foreach (EventList.PushFanEventCondition condition in eventConditions.pushWithFanEventConditions) + subpackets.Add(SetPushEventConditionWithFan.BuildPacket(playerActorId, actorId, condition)); + } + + if (eventConditions.pushWithBoxEventConditions != null) + { + foreach (EventList.PushBoxEventCondition condition in eventConditions.pushWithBoxEventConditions) + subpackets.Add(SetPushEventConditionWithTriggerBox.BuildPacket(playerActorId, actorId, condition)); + } + + return subpackets; + } + + public BasePacket GetSetEventStatusPackets(uint playerActorId) + { + List subpackets = new List(); + + //Return empty list + if (eventConditions == null) + return BasePacket.CreatePacket(subpackets, true, false); + + if (eventConditions.talkEventConditions != null) + { + foreach (EventList.TalkEventCondition condition in eventConditions.talkEventConditions) + subpackets.Add(SetEventStatus.BuildPacket(playerActorId, actorId, true, 1, condition.conditionName)); + } + + if (eventConditions.noticeEventConditions != null) + { + foreach (EventList.NoticeEventCondition condition in eventConditions.noticeEventConditions) + subpackets.Add(SetEventStatus.BuildPacket(playerActorId, actorId, true, 1, condition.conditionName)); + } + + if (eventConditions.emoteEventConditions != null) + { + foreach (EventList.EmoteEventCondition condition in eventConditions.emoteEventConditions) + subpackets.Add(SetEventStatus.BuildPacket(playerActorId, actorId, true, 3, condition.conditionName)); + } + + if (eventConditions.pushWithCircleEventConditions != null) + { + foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions) + subpackets.Add(SetEventStatus.BuildPacket(playerActorId, actorId, true, 2, condition.conditionName)); + } + + if (eventConditions.pushWithFanEventConditions != null) + { + foreach (EventList.PushFanEventCondition condition in eventConditions.pushWithFanEventConditions) + subpackets.Add(SetEventStatus.BuildPacket(playerActorId, actorId, true, 2, condition.conditionName)); + } + + if (eventConditions.pushWithBoxEventConditions != null) + { + foreach (EventList.PushBoxEventCondition condition in eventConditions.pushWithBoxEventConditions) + subpackets.Add(SetEventStatus.BuildPacket(playerActorId, actorId, true, 2, condition.conditionName)); + } + + return BasePacket.CreatePacket(subpackets, true, false); + } + + public SubPacket CreateIsZoneingPacket(uint playerActorId) + { + return SetActorIsZoningPacket.BuildPacket(actorId, playerActorId, false); + } + + public virtual SubPacket CreateScriptBindPacket(uint playerActorId) + { + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, classParams); + } + + public virtual BasePacket GetSpawnPackets(uint playerActorId) + { + return GetSpawnPackets(playerActorId, 0x1); + } + + public virtual BasePacket GetSpawnPackets(uint playerActorId, uint spawnType) + { + List subpackets = new List(); + subpackets.Add(CreateAddActorPacket(playerActorId, 8)); + subpackets.AddRange(GetEventConditionPackets(playerActorId)); + subpackets.Add(CreateSpeedPacket(playerActorId)); + subpackets.Add(CreateSpawnPositonPacket(playerActorId, spawnType)); + subpackets.Add(CreateNamePacket(playerActorId)); + subpackets.Add(CreateStatePacket(playerActorId)); + subpackets.Add(CreateIsZoneingPacket(playerActorId)); + subpackets.Add(CreateScriptBindPacket(playerActorId)); + return BasePacket.CreatePacket(subpackets, true, false); + } + + public virtual BasePacket GetInitPackets(uint playerActorId) + { + SetActorPropetyPacket initProperties = new SetActorPropetyPacket("/_init"); + initProperties.AddByte(0xE14B0CA8, 1); + initProperties.AddByte(0x2138FD71, 1); + initProperties.AddByte(0xFBFBCFB1, 1); + initProperties.AddTarget(); + return BasePacket.CreatePacket(initProperties.BuildPacket(playerActorId, actorId), true, false); + } + + public override bool Equals(Object obj) + { + Actor actorObj = obj as Actor; + if (actorObj == null) + return false; + else + return actorId == actorObj.actorId; + } + + public string GetName() + { + return actorName; + } + + public string GetClassName() + { + return className; + } + + public ushort GetState() + { + return currentMainState; + } + + public List GetLuaParams() + { + return classParams; + } + + public void ChangeState(ushort newState) + { + currentMainState = newState; + SubPacket ChangeStatePacket = SetActorStatePacket.BuildPacket(actorId, actorId, newState, currentSubState); + SubPacket battleActionPacket = BattleAction1Packet.BuildPacket(actorId, actorId); + zone.BroadcastPacketAroundActor(this, ChangeStatePacket); + zone.BroadcastPacketAroundActor(this, battleActionPacket); + } + + public void ChangeSpeed(int type, float value) + { + moveSpeeds[type] = value; + SubPacket ChangeSpeedPacket = SetActorSpeedPacket.BuildPacket(actorId, actorId, moveSpeeds[0], moveSpeeds[1], moveSpeeds[2]); + zone.BroadcastPacketAroundActor(this, ChangeSpeedPacket); + } + + public void ChangeSpeed(float speedStop, float speedWalk, float speedRun) + { + moveSpeeds[0] = speedStop; + moveSpeeds[1] = speedWalk; + moveSpeeds[2] = speedRun; + moveSpeeds[3] = speedRun; + SubPacket ChangeSpeedPacket = SetActorSpeedPacket.BuildPacket(actorId, actorId, moveSpeeds[0], moveSpeeds[1], moveSpeeds[2]); + zone.BroadcastPacketAroundActor(this, ChangeSpeedPacket); + } + + public void generateActorName(int actorNumber) + { + //Format Class Name + string className = this.className.Replace("Populace", "Ppl") + .Replace("Monster", "Mon") + .Replace("Crowd", "Crd") + .Replace("MapObj", "Map") + .Replace("Object", "Obj") + .Replace("Retainer", "Rtn") + .Replace("Standard", "Std"); + className = Char.ToLowerInvariant(className[0]) + className.Substring(1); + + //Format Zone Name + string zoneName = zone.zoneName.Replace("Field", "Fld") + .Replace("Dungeon", "Dgn") + .Replace("Town", "Twn") + .Replace("Battle", "Btl") + .Replace("Test", "Tes") + .Replace("Event", "Evt") + .Replace("Ship", "Shp") + .Replace("Office", "Ofc"); + if (zone is PrivateArea) + { + //Check if "normal" + zoneName = zoneName.Remove(zoneName.Length - 1, 1) + "P"; + } + zoneName = Char.ToLowerInvariant(zoneName[0]) + zoneName.Substring(1); + + try + { + className = className.Substring(0, 20 - zoneName.Length); + } + catch (ArgumentOutOfRangeException e) + {} + + //Convert actor number to base 63 + string classNumber = Utils.ToStringBase63(actorNumber); + + //Get stuff after @ + uint zoneId = zone.actorId; + uint privLevel = 0; + if (zone is PrivateArea) + privLevel = ((PrivateArea)zone).GetPrivateAreaLevel(); + + actorName = String.Format("{0}_{1}_{2}@{3:X3}{4:X2}", className, zoneName, classNumber, zoneId, privLevel); + } + + } +} + diff --git a/FFXIVClassic Map Server/actors/EventList.cs b/FFXIVClassic Map Server/actors/EventList.cs index 7b7630c1..1e59f85c 100644 --- a/FFXIVClassic Map Server/actors/EventList.cs +++ b/FFXIVClassic Map Server/actors/EventList.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; namespace FFXIVClassic_Map_Server.actors { diff --git a/FFXIVClassic Map Server/actors/StaticActors.cs b/FFXIVClassic Map Server/actors/StaticActors.cs index 204e91da..998cdb06 100644 --- a/FFXIVClassic Map Server/actors/StaticActors.cs +++ b/FFXIVClassic Map Server/actors/StaticActors.cs @@ -1,11 +1,9 @@ -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Map_Server.dataobjects; +using FFXIVClassic.Common; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.Actors { @@ -20,7 +18,7 @@ namespace FFXIVClassic_Map_Server.Actors if (data[0] == 's' && data[1] == 'a' && data[2] == 'n' && data[3] == 'e') data = DecryptStaticActorsFile(data); - loadStaticActors(data); + LoadStaticActors(data); } private byte[] DecryptStaticActorsFile(byte[] encoded) @@ -52,7 +50,7 @@ namespace FFXIVClassic_Map_Server.Actors return decoded; } - private bool loadStaticActors(byte[] data) + private bool LoadStaticActors(byte[] data) { try { @@ -63,7 +61,7 @@ namespace FFXIVClassic_Map_Server.Actors while (binReader.BaseStream.Position != binReader.BaseStream.Length) { - uint id = Utils.swapEndian(binReader.ReadUInt32()) | 0xA0F00000; + uint id = Utils.SwapEndian(binReader.ReadUInt32()) | 0xA0F00000; List list = new List(); byte readByte; @@ -91,19 +89,19 @@ namespace FFXIVClassic_Map_Server.Actors } } catch(FileNotFoundException e) - { Log.error("Could not find staticactors file."); return false; } + { Program.Log.Error("Could not find staticactors file."); return false; } - Log.info(String.Format("Loaded {0} static actors.", mStaticActors.Count())); + Program.Log.Info("Loaded {0} static actors.", mStaticActors.Count()); return true; } - public bool exists(uint actorId) + public bool Exists(uint actorId) { return mStaticActors[actorId] != null; } - public Actor findStaticActor(string name) + public Actor FindStaticActor(string name) { foreach (Actor a in mStaticActors.Values) { @@ -114,7 +112,7 @@ namespace FFXIVClassic_Map_Server.Actors return null; } - public Actor getActor(uint actorId) + public Actor GetActor(uint actorId) { if (mStaticActors.ContainsKey(actorId)) return mStaticActors[actorId]; diff --git a/FFXIVClassic Map Server/actors/area/Area.cs b/FFXIVClassic Map Server/actors/area/Area.cs index 191e81cb..5b510fce 100644 --- a/FFXIVClassic Map Server/actors/area/Area.cs +++ b/FFXIVClassic Map Server/actors/area/Area.cs @@ -1,6 +1,6 @@ -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server; +using FFXIVClassic.Common; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.actors.area; using FFXIVClassic_Map_Server.actors.chara.npc; using FFXIVClassic_Map_Server.dataobjects; @@ -75,29 +75,29 @@ namespace FFXIVClassic_Map_Server.Actors } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; - lParams = LuaUtils.createLuaParamList(classPath, false, true, zoneName, "/Area/Zone/ZoneDefault", -1, (byte)1, true, false, false, false, false, false, false, false); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, "ZoneDefault", lParams); + lParams = LuaUtils.CreateLuaParamList(classPath, false, true, zoneName, "/Area/Zone/ZoneDefault", -1, (byte)1, true, false, false, false, false, false, false, false); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, "ZoneDefault", lParams); } - public override BasePacket getSpawnPackets(uint playerActorId) + public override BasePacket GetSpawnPackets(uint playerActorId) { List subpackets = new List(); - subpackets.Add(createAddActorPacket(playerActorId, 0)); - subpackets.Add(createSpeedPacket(playerActorId)); - subpackets.Add(createSpawnPositonPacket(playerActorId, 0x1)); - subpackets.Add(createNamePacket(playerActorId)); - subpackets.Add(createStatePacket(playerActorId)); - subpackets.Add(createIsZoneingPacket(playerActorId)); - subpackets.Add(createScriptBindPacket(playerActorId)); - return BasePacket.createPacket(subpackets, true, false); + subpackets.Add(CreateAddActorPacket(playerActorId, 0)); + subpackets.Add(CreateSpeedPacket(playerActorId)); + subpackets.Add(CreateSpawnPositonPacket(playerActorId, 0x1)); + subpackets.Add(CreateNamePacket(playerActorId)); + subpackets.Add(CreateStatePacket(playerActorId)); + subpackets.Add(CreateIsZoneingPacket(playerActorId)); + subpackets.Add(CreateScriptBindPacket(playerActorId)); + return BasePacket.CreatePacket(subpackets, true, false); } #region Actor Management - public void addActorToZone(Actor actor) + public void AddActorToZone(Actor actor) { if (!mActorList.ContainsKey(actor.actorId)) mActorList.Add(actor.actorId, actor); @@ -122,7 +122,7 @@ namespace FFXIVClassic_Map_Server.Actors mActorBlock[gridX, gridY].Add(actor); } - public void removeActorFromZone(Actor actor) + public void RemoveActorFromZone(Actor actor) { mActorList.Remove(actor.actorId); @@ -146,7 +146,7 @@ namespace FFXIVClassic_Map_Server.Actors mActorBlock[gridX, gridY].Remove(actor); } - public void updateActorPosition(Actor actor) + public void UpdateActorPosition(Actor actor) { int gridX = (int)actor.positionX / boundingGridSize; int gridY = (int)actor.positionZ / boundingGridSize; @@ -191,7 +191,7 @@ namespace FFXIVClassic_Map_Server.Actors } } - public List getActorsAroundPoint(float x, float y, int checkDistance) + public List GetActorsAroundPoint(float x, float y, int checkDistance) { checkDistance /= boundingGridSize; @@ -234,7 +234,7 @@ namespace FFXIVClassic_Map_Server.Actors return result; } - public List getActorsAroundActor(Actor actor, int checkDistance) + public List GetActorsAroundActor(Actor actor, int checkDistance) { checkDistance /= boundingGridSize; @@ -306,7 +306,7 @@ namespace FFXIVClassic_Map_Server.Actors return (Player)mActorList[id]; } - public void clear() + public void Clear() { //Clear All mActorList.Clear(); @@ -319,12 +319,12 @@ namespace FFXIVClassic_Map_Server.Actors } } - public void broadcastPacketAroundActor(Actor actor, SubPacket packet) + public void BroadcastPacketAroundActor(Actor actor, SubPacket packet) { if (isIsolated) return; - List aroundActor = getActorsAroundActor(actor, 50); + List aroundActor = GetActorsAroundActor(actor, 50); foreach (Actor a in aroundActor) { if (a is Player) @@ -334,12 +334,12 @@ namespace FFXIVClassic_Map_Server.Actors SubPacket clonedPacket = new SubPacket(packet, actor.actorId); Player p = (Player)a; - p.queuePacket(clonedPacket); + p.QueuePacket(clonedPacket); } } } - public void spawnActor(SpawnLocation location) + public void SpawnActor(SpawnLocation location) { ActorClass actorClass = Server.GetWorldManager().GetActorClass(location.classId); @@ -349,7 +349,7 @@ namespace FFXIVClassic_Map_Server.Actors Npc npc = new Npc(mActorList.Count + 1, actorClass.actorClassId, location.uniqueId, actorId, location.x, location.y, location.z, location.rot, location.state, location.animId, actorClass.displayNameId, null, actorClass.classPath); npc.loadEventConditions(actorClass.eventConditions); - addActorToZone(npc); + AddActorToZone(npc); } } diff --git a/FFXIVClassic Map Server/actors/area/PrivateArea.cs b/FFXIVClassic Map Server/actors/area/PrivateArea.cs index 217786c7..dd7cf9de 100644 --- a/FFXIVClassic Map Server/actors/area/PrivateArea.cs +++ b/FFXIVClassic Map Server/actors/area/PrivateArea.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.packets.send.actor; @@ -24,22 +24,22 @@ namespace FFXIVClassic_Map_Server.actors.area this.privateAreaLevel = privateAreaLevel; } - public string getPrivateAreaName() + public string GetPrivateAreaName() { return privateAreaName; } - public uint getPrivateAreaLevel() + public uint GetPrivateAreaLevel() { return privateAreaLevel; } - public Zone getParentZone() + public Zone GetParentZone() { return parentZone; } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; @@ -48,21 +48,21 @@ namespace FFXIVClassic_Map_Server.actors.area if (className.ToLower().Contains("content")) path = "Content/" + className; - lParams = LuaUtils.createLuaParamList("/Area/PrivateArea/" + path, false, true, zoneName, privateAreaName, 0x9E, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, false, false, false); - ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams).debugPrintSubPacket(); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams); + lParams = LuaUtils.CreateLuaParamList("/Area/PrivateArea/" + path, false, true, zoneName, privateAreaName, 0x9E, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, false, false, false); + ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams).DebugPrintSubPacket(); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); } - public void addSpawnLocation(SpawnLocation spawn) + public void AddSpawnLocation(SpawnLocation spawn) { mSpawnLocations.Add(spawn); } - public void spawnAllActors() + public void SpawnAllActors() { foreach (SpawnLocation spawn in mSpawnLocations) - spawnActor(spawn); + SpawnActor(spawn); } } } diff --git a/FFXIVClassic Map Server/actors/area/Zone.cs b/FFXIVClassic Map Server/actors/area/Zone.cs index fd3dcbd1..51622b36 100644 --- a/FFXIVClassic Map Server/actors/area/Zone.cs +++ b/FFXIVClassic Map Server/actors/area/Zone.cs @@ -1,6 +1,6 @@ -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server; +using FFXIVClassic.Common; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.actors.chara.npc; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; @@ -23,18 +23,18 @@ namespace FFXIVClassic_Map_Server.actors.area } - public void addPrivateArea(PrivateArea pa) + public void AddPrivateArea(PrivateArea pa) { - if (privateAreas.ContainsKey(pa.getPrivateAreaName())) - privateAreas[pa.getPrivateAreaName()][0] = pa; + if (privateAreas.ContainsKey(pa.GetPrivateAreaName())) + privateAreas[pa.GetPrivateAreaName()][0] = pa; else { - privateAreas[pa.getPrivateAreaName()] = new Dictionary(); - privateAreas[pa.getPrivateAreaName()][0] = pa; + privateAreas[pa.GetPrivateAreaName()] = new Dictionary(); + privateAreas[pa.GetPrivateAreaName()][0] = pa; } } - public PrivateArea getPrivateArea(string type, uint number) + public PrivateArea GetPrivateArea(string type, uint number) { if (privateAreas.ContainsKey(type)) { @@ -48,16 +48,16 @@ namespace FFXIVClassic_Map_Server.actors.area return null; } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { bool isEntranceDesion = false; List lParams; - lParams = LuaUtils.createLuaParamList("/Area/Zone/" + className, false, true, zoneName, "", -1, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, true, isInstanceRaid, isEntranceDesion); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams); + lParams = LuaUtils.CreateLuaParamList("/Area/Zone/" + className, false, true, zoneName, "", -1, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, true, isInstanceRaid, isEntranceDesion); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); } - public void addSpawnLocation(SpawnLocation spawn) + public void AddSpawnLocation(SpawnLocation spawn) { //Is it in a private area? if (!spawn.privAreaName.Equals("")) @@ -66,28 +66,28 @@ namespace FFXIVClassic_Map_Server.actors.area { Dictionary levels = privateAreas[spawn.privAreaName]; if (levels.ContainsKey(spawn.privAreaLevel)) - levels[spawn.privAreaLevel].addSpawnLocation(spawn); + levels[spawn.privAreaLevel].AddSpawnLocation(spawn); else - Log.error(String.Format("Tried to add a spawn location to non-existing private area level \"{0}\" in area {1} in zone {2}", spawn.privAreaName, spawn.privAreaLevel, zoneName)); + Program.Log.Error("Tried to add a spawn location to non-existing private area level \"{0}\" in area {1} in zone {2}", spawn.privAreaName, spawn.privAreaLevel, zoneName); } else - Log.error(String.Format("Tried to add a spawn location to non-existing private area \"{0}\" in zone {1}", spawn.privAreaName, zoneName)); + Program.Log.Error("Tried to add a spawn location to non-existing private area \"{0}\" in zone {1}", spawn.privAreaName, zoneName); } else mSpawnLocations.Add(spawn); } - public void spawnAllActors(bool doPrivAreas) + public void SpawnAllActors(bool doPrivAreas) { foreach (SpawnLocation spawn in mSpawnLocations) - spawnActor(spawn); + SpawnActor(spawn); if (doPrivAreas) { foreach (Dictionary areas in privateAreas.Values) { foreach (PrivateArea pa in areas.Values) - pa.spawnAllActors(); + pa.SpawnAllActors(); } } } diff --git a/FFXIVClassic Map Server/actors/chara/AetheryteWork.cs b/FFXIVClassic Map Server/actors/chara/AetheryteWork.cs index c58166f0..f301ca3c 100644 --- a/FFXIVClassic Map Server/actors/chara/AetheryteWork.cs +++ b/FFXIVClassic Map Server/actors/chara/AetheryteWork.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.Actors.Chara +namespace FFXIVClassic_Map_Server.Actors.Chara { class AetheryteWork { diff --git a/FFXIVClassic Map Server/actors/chara/BattleSave.cs b/FFXIVClassic Map Server/actors/chara/BattleSave.cs index 60d16106..bf9a6000 100644 --- a/FFXIVClassic Map Server/actors/chara/BattleSave.cs +++ b/FFXIVClassic Map Server/actors/chara/BattleSave.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.Actors.Chara +namespace FFXIVClassic_Map_Server.Actors.Chara { class BattleSave { diff --git a/FFXIVClassic Map Server/actors/chara/BattleTemp.cs b/FFXIVClassic Map Server/actors/chara/BattleTemp.cs index ab20425c..0d1c861f 100644 --- a/FFXIVClassic Map Server/actors/chara/BattleTemp.cs +++ b/FFXIVClassic Map Server/actors/chara/BattleTemp.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.Actors.Chara +namespace FFXIVClassic_Map_Server.Actors.Chara { class BattleTemp { diff --git a/FFXIVClassic Map Server/actors/chara/CharaWork.cs b/FFXIVClassic Map Server/actors/chara/CharaWork.cs index 8a35de68..652178d6 100644 --- a/FFXIVClassic Map Server/actors/chara/CharaWork.cs +++ b/FFXIVClassic Map Server/actors/chara/CharaWork.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.Actors.Chara +namespace FFXIVClassic_Map_Server.Actors.Chara { class CharaWork { diff --git a/FFXIVClassic Map Server/actors/chara/Character.cs b/FFXIVClassic Map Server/actors/chara/Character.cs index c453e82f..ddde616c 100644 --- a/FFXIVClassic Map Server/actors/chara/Character.cs +++ b/FFXIVClassic Map Server/actors/chara/Character.cs @@ -1,11 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.Actors.Chara; using FFXIVClassic_Map_Server.packets.send.actor; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.Actors { @@ -60,30 +55,30 @@ namespace FFXIVClassic_Map_Server.Actors charaWork.statusShownTime[i] = 0xFFFFFFFF; } - public SubPacket createAppearancePacket(uint playerActorId) + public SubPacket CreateAppearancePacket(uint playerActorId) { SetActorAppearancePacket setappearance = new SetActorAppearancePacket(modelId, appearanceIds); - return setappearance.buildPacket(actorId, playerActorId); + return setappearance.BuildPacket(actorId, playerActorId); } - public SubPacket createInitStatusPacket(uint playerActorId) + public SubPacket CreateInitStatusPacket(uint playerActorId) { - return (SetActorStatusAllPacket.buildPacket(actorId, playerActorId, charaWork.status)); + return (SetActorStatusAllPacket.BuildPacket(actorId, playerActorId, charaWork.status)); } - public SubPacket createSetActorIconPacket(uint playerActorId) + public SubPacket CreateSetActorIconPacket(uint playerActorId) { - return SetActorIconPacket.buildPacket(actorId, playerActorId, currentActorIcon); + return SetActorIconPacket.BuildPacket(actorId, playerActorId, currentActorIcon); } - public SubPacket createIdleAnimationPacket(uint playerActorId) + public SubPacket CreateIdleAnimationPacket(uint playerActorId) { - return SetActorIdleAnimationPacket.buildPacket(actorId, playerActorId, animationId); + return SetActorIdleAnimationPacket.BuildPacket(actorId, playerActorId, animationId); } - public void setQuestGraphic(Player player, int graphicNum) + public void SetQuestGraphic(Player player, int graphicNum) { - player.queuePacket(SetActorQuestGraphicPacket.buildPacket(player.actorId, actorId, graphicNum)); + player.QueuePacket(SetActorQuestGraphicPacket.BuildPacket(player.actorId, actorId, graphicNum)); } } diff --git a/FFXIVClassic Map Server/actors/chara/EventSave.cs b/FFXIVClassic Map Server/actors/chara/EventSave.cs index 21eebcf7..f6f9424d 100644 --- a/FFXIVClassic Map Server/actors/chara/EventSave.cs +++ b/FFXIVClassic Map Server/actors/chara/EventSave.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.Actors.Chara +namespace FFXIVClassic_Map_Server.Actors.Chara { class EventSave { diff --git a/FFXIVClassic Map Server/actors/chara/EventTemp.cs b/FFXIVClassic Map Server/actors/chara/EventTemp.cs index 4756ffee..70701df2 100644 --- a/FFXIVClassic Map Server/actors/chara/EventTemp.cs +++ b/FFXIVClassic Map Server/actors/chara/EventTemp.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.Actors.Chara +namespace FFXIVClassic_Map_Server.Actors.Chara { class EventTemp { diff --git a/FFXIVClassic Map Server/actors/chara/ParameterSave.cs b/FFXIVClassic Map Server/actors/chara/ParameterSave.cs index 499dfcbb..4dd9f52c 100644 --- a/FFXIVClassic Map Server/actors/chara/ParameterSave.cs +++ b/FFXIVClassic Map Server/actors/chara/ParameterSave.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.Actors.Chara +namespace FFXIVClassic_Map_Server.Actors.Chara { class ParameterSave { diff --git a/FFXIVClassic Map Server/actors/chara/ParameterTemp.cs b/FFXIVClassic Map Server/actors/chara/ParameterTemp.cs index 9a1b12d7..399e7e84 100644 --- a/FFXIVClassic Map Server/actors/chara/ParameterTemp.cs +++ b/FFXIVClassic Map Server/actors/chara/ParameterTemp.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.Actors.Chara +namespace FFXIVClassic_Map_Server.Actors.Chara { class ParameterTemp { diff --git a/FFXIVClassic Map Server/actors/chara/Work.cs b/FFXIVClassic Map Server/actors/chara/Work.cs index 4b62a316..8845bb07 100644 --- a/FFXIVClassic Map Server/actors/chara/Work.cs +++ b/FFXIVClassic Map Server/actors/chara/Work.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.Actors.Chara +namespace FFXIVClassic_Map_Server.Actors.Chara { class Work { diff --git a/FFXIVClassic Map Server/actors/chara/npc/Npc.cs b/FFXIVClassic Map Server/actors/chara/npc/Npc.cs index c0071cfe..eb4aea77 100644 --- a/FFXIVClassic Map Server/actors/chara/npc/Npc.cs +++ b/FFXIVClassic Map Server/actors/chara/npc/Npc.cs @@ -1,10 +1,9 @@ -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.actors; using FFXIVClassic_Map_Server.Actors.Chara; using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.lua; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.packets.receive.events; using FFXIVClassic_Map_Server.packets.send.actor; using FFXIVClassic_Map_Server.utils; @@ -77,13 +76,13 @@ namespace FFXIVClassic_Map_Server.Actors generateActorName((int)actorNumber); } - public SubPacket createAddActorPacket(uint playerActorId) + public SubPacket CreateAddActorPacket(uint playerActorId) { - return AddActorPacket.buildPacket(actorId, playerActorId, 8); + return AddActorPacket.BuildPacket(actorId, playerActorId, 8); } // actorClassId, [], [], numBattleCommon, [battleCommon], numEventCommon, [eventCommon], args for either initForBattle/initForEvent - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; @@ -94,9 +93,9 @@ namespace FFXIVClassic_Map_Server.Actors { string classPathFake = "/Chara/Npc/Populace/PopulaceStandard"; string classNameFake = "PopulaceStandard"; - lParams = LuaUtils.createLuaParamList(classPathFake, false, false, false, false, false, 0xF47F6, false, false, 0, 0); - ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, classNameFake, lParams).debugPrintSubPacket(); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, classNameFake, lParams); + lParams = LuaUtils.CreateLuaParamList(classPathFake, false, false, false, false, false, 0xF47F6, false, false, 0, 0); + ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, classNameFake, lParams).DebugPrintSubPacket(); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, classNameFake, lParams); } else { @@ -109,30 +108,30 @@ namespace FFXIVClassic_Map_Server.Actors lParams.Insert(6, new LuaParam(0, (int)actorClassId)); } - ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams).debugPrintSubPacket(); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams); + ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams).DebugPrintSubPacket(); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); } - public override BasePacket getSpawnPackets(uint playerActorId, uint spawnType) + public override BasePacket GetSpawnPackets(uint playerActorId, uint spawnType) { List subpackets = new List(); - subpackets.Add(createAddActorPacket(playerActorId)); - subpackets.AddRange(getEventConditionPackets(playerActorId)); - subpackets.Add(createSpeedPacket(playerActorId)); - subpackets.Add(createSpawnPositonPacket(playerActorId, 0x0)); - subpackets.Add(createAppearancePacket(playerActorId)); - subpackets.Add(createNamePacket(playerActorId)); - subpackets.Add(createStatePacket(playerActorId)); - subpackets.Add(createIdleAnimationPacket(playerActorId)); - subpackets.Add(createInitStatusPacket(playerActorId)); - subpackets.Add(createSetActorIconPacket(playerActorId)); - subpackets.Add(createIsZoneingPacket(playerActorId)); - subpackets.Add(createScriptBindPacket(playerActorId)); + subpackets.Add(CreateAddActorPacket(playerActorId)); + subpackets.AddRange(GetEventConditionPackets(playerActorId)); + subpackets.Add(CreateSpeedPacket(playerActorId)); + subpackets.Add(CreateSpawnPositonPacket(playerActorId, 0x0)); + subpackets.Add(CreateAppearancePacket(playerActorId)); + subpackets.Add(CreateNamePacket(playerActorId)); + subpackets.Add(CreateStatePacket(playerActorId)); + subpackets.Add(CreateIdleAnimationPacket(playerActorId)); + subpackets.Add(CreateInitStatusPacket(playerActorId)); + subpackets.Add(CreateSetActorIconPacket(playerActorId)); + subpackets.Add(CreateIsZoneingPacket(playerActorId)); + subpackets.Add(CreateScriptBindPacket(playerActorId)); - return BasePacket.createPacket(subpackets, true, false); + return BasePacket.CreatePacket(subpackets, true, false); } - public override BasePacket getInitPackets(uint playerActorId) + public override BasePacket GetInitPackets(uint playerActorId) { ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("/_init", this, playerActorId); @@ -140,49 +139,49 @@ namespace FFXIVClassic_Map_Server.Actors for (int i = 0; i < charaWork.property.Length; i++) { if (charaWork.property[i] != 0) - propPacketUtil.addProperty(String.Format("charaWork.property[{0}]", i)); + propPacketUtil.AddProperty(String.Format("charaWork.property[{0}]", i)); } //Parameters - propPacketUtil.addProperty("charaWork.parameterSave.hp[0]"); - propPacketUtil.addProperty("charaWork.parameterSave.hpMax[0]"); - propPacketUtil.addProperty("charaWork.parameterSave.mp"); - propPacketUtil.addProperty("charaWork.parameterSave.mpMax"); - propPacketUtil.addProperty("charaWork.parameterTemp.tp"); + propPacketUtil.AddProperty("charaWork.parameterSave.hp[0]"); + propPacketUtil.AddProperty("charaWork.parameterSave.hpMax[0]"); + propPacketUtil.AddProperty("charaWork.parameterSave.mp"); + propPacketUtil.AddProperty("charaWork.parameterSave.mpMax"); + propPacketUtil.AddProperty("charaWork.parameterTemp.tp"); if (charaWork.parameterSave.state_mainSkill[0] != 0) - propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkill[0]"); + propPacketUtil.AddProperty("charaWork.parameterSave.state_mainSkill[0]"); if (charaWork.parameterSave.state_mainSkill[1] != 0) - propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkill[1]"); + propPacketUtil.AddProperty("charaWork.parameterSave.state_mainSkill[1]"); if (charaWork.parameterSave.state_mainSkill[2] != 0) - propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkill[2]"); + propPacketUtil.AddProperty("charaWork.parameterSave.state_mainSkill[2]"); if (charaWork.parameterSave.state_mainSkill[3] != 0) - propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkill[3]"); + propPacketUtil.AddProperty("charaWork.parameterSave.state_mainSkill[3]"); - propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkillLevel"); + propPacketUtil.AddProperty("charaWork.parameterSave.state_mainSkillLevel"); //Status Times for (int i = 0; i < charaWork.statusShownTime.Length; i++) { if (charaWork.statusShownTime[i] != 0xFFFFFFFF) - propPacketUtil.addProperty(String.Format("charaWork.statusShownTime[{0}]", i)); + propPacketUtil.AddProperty(String.Format("charaWork.statusShownTime[{0}]", i)); } //General Parameters for (int i = 3; i < charaWork.battleTemp.generalParameter.Length; i++) { if (charaWork.battleTemp.generalParameter[i] != 0) - propPacketUtil.addProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i)); + propPacketUtil.AddProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i)); } - propPacketUtil.addProperty("npcWork.hateType"); - propPacketUtil.addProperty("npcWork.pushCommand"); - propPacketUtil.addProperty("npcWork.pushCommandPriority"); + propPacketUtil.AddProperty("npcWork.hateType"); + propPacketUtil.AddProperty("npcWork.pushCommand"); + propPacketUtil.AddProperty("npcWork.pushCommandPriority"); - return BasePacket.createPacket(propPacketUtil.done(), true, false); + return BasePacket.CreatePacket(propPacketUtil.Done(), true, false); } - public uint getActorClassId() + public uint GetActorClassId() { return actorClassId; } @@ -252,7 +251,7 @@ namespace FFXIVClassic_Map_Server.Actors modelId = reader.GetUInt32(0); appearanceIds[Character.SIZE] = reader.GetUInt32(1); appearanceIds[Character.COLORINFO] = (uint)(reader.GetUInt32(16) | (reader.GetUInt32(15) << 10) | (reader.GetUInt32(17) << 20)); //17 - Skin Color, 16 - Hair Color, 18 - Eye Color - appearanceIds[Character.FACEINFO] = PrimitiveConversion.ToUInt32(CharacterUtils.getFaceInfo(reader.GetByte(6), reader.GetByte(7), reader.GetByte(5), reader.GetByte(14), reader.GetByte(13), reader.GetByte(12), reader.GetByte(11), reader.GetByte(10), reader.GetByte(9), reader.GetByte(8))); + appearanceIds[Character.FACEINFO] = PrimitiveConversion.ToUInt32(CharacterUtils.GetFaceInfo(reader.GetByte(6), reader.GetByte(7), reader.GetByte(5), reader.GetByte(14), reader.GetByte(13), reader.GetByte(12), reader.GetByte(11), reader.GetByte(10), reader.GetByte(9), reader.GetByte(8))); appearanceIds[Character.HIGHLIGHT_HAIR] = (uint)(reader.GetUInt32(3) | reader.GetUInt32(2) << 10); //5- Hair Highlight, 4 - Hair Style appearanceIds[Character.VOICE] = reader.GetUInt32(17); appearanceIds[Character.MAINHAND] = reader.GetUInt32(19); @@ -300,13 +299,13 @@ namespace FFXIVClassic_Map_Server.Actors Script parent = null, child = null; if (File.Exists("./scripts/base/" + classPath + ".lua")) - parent = LuaEngine.loadScript("./scripts/base/" + classPath + ".lua"); + parent = LuaEngine.LoadScript("./scripts/base/" + classPath + ".lua"); if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier))) - child = LuaEngine.loadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)); + child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)); if (parent == null && child == null) { - LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", getName())); + LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", GetName())); return null; } @@ -319,7 +318,7 @@ namespace FFXIVClassic_Map_Server.Actors else return null; - List lparams = LuaUtils.createLuaParamList(result); + List lparams = LuaUtils.CreateLuaParamList(result); return lparams; } @@ -328,13 +327,13 @@ namespace FFXIVClassic_Map_Server.Actors Script parent = null, child = null; if (File.Exists("./scripts/base/" + classPath + ".lua")) - parent = LuaEngine.loadScript("./scripts/base/" + classPath + ".lua"); + parent = LuaEngine.LoadScript("./scripts/base/" + classPath + ".lua"); if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier))) - child = LuaEngine.loadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)); + child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)); if (parent == null) { - LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", getName())); + LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", GetName())); return; } @@ -345,7 +344,7 @@ namespace FFXIVClassic_Map_Server.Actors objects.Add(eventStart.triggerName); if (eventStart.luaParams != null) - objects.AddRange(LuaUtils.createLuaParamObjectList(eventStart.luaParams)); + objects.AddRange(LuaUtils.CreateLuaParamObjectList(eventStart.luaParams)); //Run Script DynValue result; @@ -364,13 +363,13 @@ namespace FFXIVClassic_Map_Server.Actors Script parent = null, child = null; if (File.Exists("./scripts/base/" + classPath + ".lua")) - parent = LuaEngine.loadScript("./scripts/base/" + classPath + ".lua"); + parent = LuaEngine.LoadScript("./scripts/base/" + classPath + ".lua"); if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier))) - child = LuaEngine.loadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)); + child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)); if (parent == null) { - LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", getName())); + LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", GetName())); return; } @@ -379,7 +378,7 @@ namespace FFXIVClassic_Map_Server.Actors objects.Add(player); objects.Add(this); objects.Add(eventUpdate.val2); - objects.AddRange(LuaUtils.createLuaParamObjectList(eventUpdate.luaParams)); + objects.AddRange(LuaUtils.CreateLuaParamObjectList(eventUpdate.luaParams)); //Run Script DynValue result; @@ -398,13 +397,13 @@ namespace FFXIVClassic_Map_Server.Actors Script parent = null, child = null; if (File.Exists("./scripts/base/" + classPath + ".lua")) - parent = LuaEngine.loadScript("./scripts/base/" + classPath + ".lua"); + parent = LuaEngine.LoadScript("./scripts/base/" + classPath + ".lua"); if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier))) - child = LuaEngine.loadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)); + child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)); if (parent == null) { - LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", getName())); + LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", GetName())); return; } diff --git a/FFXIVClassic Map Server/actors/chara/npc/NpcWork.cs b/FFXIVClassic Map Server/actors/chara/npc/NpcWork.cs index 1d069f8e..92189450 100644 --- a/FFXIVClassic Map Server/actors/chara/npc/NpcWork.cs +++ b/FFXIVClassic Map Server/actors/chara/npc/NpcWork.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.Actors.Chara +namespace FFXIVClassic_Map_Server.Actors.Chara { class NpcWork { diff --git a/FFXIVClassic Map Server/actors/chara/player/Equipment.cs b/FFXIVClassic Map Server/actors/chara/player/Equipment.cs index 2e622a10..ebe1f88d 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Equipment.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Equipment.cs @@ -1,13 +1,8 @@ -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Map_Server.Actors; +using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.packets.send.actor.inventory; using FFXIVClassic_Map_Server.packets.send.Actor.inventory; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.actors.chara.player { @@ -69,40 +64,40 @@ namespace FFXIVClassic_Map_Server.actors.chara.player } } - toPlayer.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, toPlayer.actorId, 0x23, Inventory.EQUIPMENT_OTHERPLAYER)); + toPlayer.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, toPlayer.actorId, 0x23, Inventory.EQUIPMENT_OTHERPLAYER)); int currentIndex = 0; while (true) { if (items.Count - currentIndex >= 16) - toPlayer.queuePacket(InventoryListX16Packet.buildPacket(owner.actorId, toPlayer.actorId, items, ref currentIndex)); + toPlayer.QueuePacket(InventoryListX16Packet.BuildPacket(owner.actorId, toPlayer.actorId, items, ref currentIndex)); else if (items.Count - currentIndex > 1) - toPlayer.queuePacket(InventoryListX08Packet.buildPacket(owner.actorId, toPlayer.actorId, items, ref currentIndex)); + toPlayer.QueuePacket(InventoryListX08Packet.BuildPacket(owner.actorId, toPlayer.actorId, items, ref currentIndex)); else if (items.Count - currentIndex == 1) { - toPlayer.queuePacket(InventoryListX01Packet.buildPacket(owner.actorId, toPlayer.actorId, items[currentIndex])); + toPlayer.QueuePacket(InventoryListX01Packet.BuildPacket(owner.actorId, toPlayer.actorId, items[currentIndex])); currentIndex++; } else break; } - toPlayer.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId, toPlayer.actorId)); + toPlayer.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId, toPlayer.actorId)); } - public void SendFullEquipment(bool doClear) + public void SendFullEquipment(bool DoClear) { List slotsToUpdate = new List(); for (ushort i = 0; i < list.Length; i++) { - if (list[i] == null && doClear) + if (list[i] == null && DoClear) slotsToUpdate.Add(0); else if (list[i] != null) slotsToUpdate.Add(i); } - owner.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, inventoryCapacity, inventoryCode)); + owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, inventoryCapacity, inventoryCode)); SendEquipmentPackets(slotsToUpdate); - owner.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); } public void SetEquipment(ushort[] slots, ushort[] itemSlots) @@ -112,18 +107,18 @@ namespace FFXIVClassic_Map_Server.actors.chara.player for (int i = 0; i < slots.Length; i++) { - InventoryItem item = normalInventory.getItemBySlot(itemSlots[i]); + InventoryItem item = normalInventory.GetItemBySlot(itemSlots[i]); if (item == null) continue; - Database.equipItem(owner, slots[i], item.uniqueId); - list[slots[i]] = normalInventory.getItemBySlot(itemSlots[i]); + Database.EquipItem(owner, slots[i], item.uniqueId); + list[slots[i]] = normalInventory.GetItemBySlot(itemSlots[i]); } - owner.queuePacket(InventoryBeginChangePacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); SendFullEquipment(false); - owner.queuePacket(InventoryEndChangePacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); } public void SetEquipment(InventoryItem[] toEquip) @@ -139,7 +134,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.player public void Equip(ushort slot, ushort invSlot) { - InventoryItem item = normalInventory.getItemBySlot(invSlot); + InventoryItem item = normalInventory.GetItemBySlot(invSlot); if (item == null) return; @@ -153,20 +148,20 @@ namespace FFXIVClassic_Map_Server.actors.chara.player return; if (writeToDB) - Database.equipItem(owner, slot, item.uniqueId); + Database.EquipItem(owner, slot, item.uniqueId); - owner.queuePacket(InventoryBeginChangePacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); if (list[slot] != null) normalInventory.RefreshItem(list[slot], item); else normalInventory.RefreshItem(item); - owner.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, inventoryCapacity, inventoryCode)); + owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, inventoryCapacity, inventoryCode)); SendEquipmentPackets(slot, item); - owner.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); - owner.queuePacket(InventoryEndChangePacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); list[slot] = item; } @@ -182,17 +177,17 @@ namespace FFXIVClassic_Map_Server.actors.chara.player return; if (writeToDB) - Database.unequipItem(owner, slot); + Database.UnequipItem(owner, slot); - owner.queuePacket(InventoryBeginChangePacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); normalInventory.RefreshItem(list[slot]); - owner.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, inventoryCapacity, inventoryCode)); + owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, inventoryCapacity, inventoryCode)); SendEquipmentPackets(slot, null); - owner.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); - owner.queuePacket(InventoryEndChangePacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); list[slot] = null; } @@ -200,9 +195,9 @@ namespace FFXIVClassic_Map_Server.actors.chara.player private void SendEquipmentPackets(ushort equipSlot, InventoryItem item) { if (item == null) - owner.queuePacket(InventoryRemoveX01Packet.buildPacket(owner.actorId, equipSlot)); + owner.QueuePacket(InventoryRemoveX01Packet.BuildPacket(owner.actorId, equipSlot)); else - owner.queuePacket(EquipmentListX01Packet.buildPacket(owner.actorId, equipSlot, item.slot)); + owner.QueuePacket(EquipmentListX01Packet.BuildPacket(owner.actorId, equipSlot, item.slot)); } private void SendEquipmentPackets(List slotsToUpdate) @@ -213,16 +208,16 @@ namespace FFXIVClassic_Map_Server.actors.chara.player while (true) { if (slotsToUpdate.Count - currentIndex >= 64) - owner.queuePacket(EquipmentListX64Packet.buildPacket(owner.actorId, list, slotsToUpdate, ref currentIndex)); + owner.QueuePacket(EquipmentListX64Packet.BuildPacket(owner.actorId, list, slotsToUpdate, ref currentIndex)); else if (slotsToUpdate.Count - currentIndex >= 32) - owner.queuePacket(EquipmentListX32Packet.buildPacket(owner.actorId, list, slotsToUpdate, ref currentIndex)); + owner.QueuePacket(EquipmentListX32Packet.BuildPacket(owner.actorId, list, slotsToUpdate, ref currentIndex)); else if (slotsToUpdate.Count - currentIndex >= 16) - owner.queuePacket(EquipmentListX16Packet.buildPacket(owner.actorId, list, slotsToUpdate, ref currentIndex)); + owner.QueuePacket(EquipmentListX16Packet.BuildPacket(owner.actorId, list, slotsToUpdate, ref currentIndex)); else if (slotsToUpdate.Count - currentIndex > 1) - owner.queuePacket(EquipmentListX08Packet.buildPacket(owner.actorId, list, slotsToUpdate, ref currentIndex)); + owner.QueuePacket(EquipmentListX08Packet.BuildPacket(owner.actorId, list, slotsToUpdate, ref currentIndex)); else if (slotsToUpdate.Count - currentIndex == 1) { - owner.queuePacket(EquipmentListX01Packet.buildPacket(owner.actorId, slotsToUpdate[currentIndex], list[slotsToUpdate[currentIndex]].slot)); + owner.QueuePacket(EquipmentListX01Packet.BuildPacket(owner.actorId, slotsToUpdate[currentIndex], list[slotsToUpdate[currentIndex]].slot)); currentIndex++; } else diff --git a/FFXIVClassic Map Server/actors/chara/player/Inventory.cs b/FFXIVClassic Map Server/actors/chara/player/Inventory.cs index 52c90ef2..38ec5ffe 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Inventory.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Inventory.cs @@ -1,5 +1,4 @@ -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.packets.send.actor.inventory; @@ -7,8 +6,6 @@ using FFXIVClassic_Map_Server.packets.send.Actor.inventory; using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.actors.chara.player { @@ -36,12 +33,12 @@ namespace FFXIVClassic_Map_Server.actors.chara.player } #region Inventory Management - public void initList(List itemsFromDB) + public void InitList(List itemsFromDB) { list = itemsFromDB; } - public InventoryItem getItemBySlot(ushort slot) + public InventoryItem GetItemBySlot(ushort slot) { if (slot < list.Count) return list[slot]; @@ -49,7 +46,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.player return null; } - public InventoryItem getItemById(ulong itemId) + public InventoryItem GetItemById(ulong itemId) { foreach (InventoryItem item in list) { @@ -61,41 +58,41 @@ namespace FFXIVClassic_Map_Server.actors.chara.player public void RefreshItem(InventoryItem item) { - owner.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, inventoryCapacity, inventoryCode)); - sendInventoryPackets(item); - owner.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, inventoryCapacity, inventoryCode)); + SendInventoryPackets(item); + owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); } public void RefreshItem(params InventoryItem[] items) { - owner.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, inventoryCapacity, inventoryCode)); - sendInventoryPackets(items.ToList()); - owner.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, inventoryCapacity, inventoryCode)); + SendInventoryPackets(items.ToList()); + owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); } public void RefreshItem(List items) { - owner.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, inventoryCapacity, inventoryCode)); - sendInventoryPackets(items); - owner.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, inventoryCapacity, inventoryCode)); + SendInventoryPackets(items); + owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); } - public void addItem(uint itemId) + public void AddItem(uint itemId) { - addItem(itemId, 1, 1); + AddItem(itemId, 1, 1); } - public void addItem(uint itemId, int quantity) + public void AddItem(uint itemId, int quantity) { - addItem(itemId, quantity, 1); + AddItem(itemId, quantity, 1); } - public void addItem(uint itemId, int quantity, byte quality) + public void AddItem(uint itemId, int quantity, byte quality) { - if (!isSpaceForAdd(itemId, quantity)) + if (!IsSpaceForAdd(itemId, quantity)) return; - Item gItem = Server.getItemGamedata(itemId); + Item gItem = Server.GetItemGamedata(itemId); List slotsToUpdate = new List(); List addItemPackets = new List(); @@ -124,73 +121,73 @@ namespace FFXIVClassic_Map_Server.actors.chara.player // return ITEMERROR_FULL; //Update lists and db - owner.queuePacket(InventoryBeginChangePacket.buildPacket(owner.actorId)); - owner.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, inventoryCapacity, inventoryCode)); + owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); + owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, inventoryCapacity, inventoryCode)); - //These had their quantities changed + //These had their quantities Changed foreach (ushort slot in slotsToUpdate) { - Database.setQuantity(owner, slot, inventoryCode, list[slot].quantity); + Database.SetQuantity(owner, slot, inventoryCode, list[slot].quantity); if (inventoryCode != CURRENCY && inventoryCode != KEYITEMS) - sendInventoryPackets(list[slot]); + SendInventoryPackets(list[slot]); } //New item that spilled over while (quantityCount > 0) { - InventoryItem addedItem = Database.addItem(owner, itemId, Math.Min(quantityCount, gItem.maxStack), quality, gItem.isExclusive ? (byte)0x3 : (byte)0x0, gItem.durability, inventoryCode); + InventoryItem addedItem = Database.AddItem(owner, itemId, Math.Min(quantityCount, gItem.maxStack), quality, gItem.isExclusive ? (byte)0x3 : (byte)0x0, gItem.durability, inventoryCode); list.Add(addedItem); if (inventoryCode != CURRENCY && inventoryCode != KEYITEMS) - sendInventoryPackets(addedItem); + SendInventoryPackets(addedItem); quantityCount -= gItem.maxStack; } if (inventoryCode == CURRENCY || inventoryCode == KEYITEMS) - sendFullInventory(); + SendFullInventory(); - owner.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId)); - owner.queuePacket(InventoryEndChangePacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); + owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); } - public void addItem(uint[] itemId) + public void AddItem(uint[] itemId) { - if (!isSpaceForAdd(itemId[0], itemId.Length)) + if (!IsSpaceForAdd(itemId[0], itemId.Length)) return; //Update lists and db - owner.queuePacket(InventoryBeginChangePacket.buildPacket(owner.actorId)); - owner.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, inventoryCapacity, inventoryCode)); + owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); + owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, inventoryCapacity, inventoryCode)); int startPos = list.Count; //New item that spilled over for (int i = 0; i < itemId.Length; i++) { - Item gItem = Server.getItemGamedata(itemId[i]); - InventoryItem addedItem = Database.addItem(owner, itemId[i], 1, (byte)1, gItem.isExclusive ? (byte)0x3 : (byte)0x0, gItem.durability, inventoryCode); + Item gItem = Server.GetItemGamedata(itemId[i]); + InventoryItem addedItem = Database.AddItem(owner, itemId[i], 1, (byte)1, gItem.isExclusive ? (byte)0x3 : (byte)0x0, gItem.durability, inventoryCode); list.Add(addedItem); } - sendInventoryPackets(startPos); + SendInventoryPackets(startPos); - owner.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId)); - owner.queuePacket(InventoryEndChangePacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); + owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); } - public void removeItem(uint itemId, int quantity) + public void RemoveItem(uint itemId, int quantity) { - if (!hasItem(itemId, quantity)) + if (!HasItem(itemId, quantity)) return; List slotsToUpdate = new List(); List itemsToRemove = new List(); List slotsToRemove = new List(); - List addItemPackets = new List(); + List AddItemPackets = new List(); //Remove as we go along int quantityCount = quantity; @@ -223,13 +220,13 @@ namespace FFXIVClassic_Map_Server.actors.chara.player for (int i = 0; i < slotsToUpdate.Count; i++) { - Database.setQuantity(owner, slotsToUpdate[i], inventoryCode, list[slotsToUpdate[i]].quantity); + Database.SetQuantity(owner, slotsToUpdate[i], inventoryCode, list[slotsToUpdate[i]].quantity); } int oldListSize = list.Count; for (int i = 0; i < itemsToRemove.Count; i++) { - Database.removeItem(owner, itemsToRemove[i].uniqueId, inventoryCode); + Database.RemoveItem(owner, itemsToRemove[i].uniqueId, inventoryCode); list.Remove(itemsToRemove[i]); } @@ -244,21 +241,21 @@ namespace FFXIVClassic_Map_Server.actors.chara.player slotsToRemove.Add((ushort)i); } - owner.queuePacket(InventoryBeginChangePacket.buildPacket(owner.actorId)); - owner.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, inventoryCapacity, inventoryCode)); + owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); + owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, inventoryCapacity, inventoryCode)); - sendInventoryPackets(lowestSlot); - sendInventoryRemovePackets(slotsToRemove); + SendInventoryPackets(lowestSlot); + SendInventoryRemovePackets(slotsToRemove); - owner.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); if (inventoryCode == NORMAL) - owner.getEquipment().SendFullEquipment(false); + owner.GetEquipment().SendFullEquipment(false); - owner.queuePacket(InventoryEndChangePacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); } - public void removeItem(ulong itemDBId) + public void RemoveItem(ulong itemDBId) { ushort slot = 0; InventoryItem toDelete = null; @@ -277,104 +274,104 @@ namespace FFXIVClassic_Map_Server.actors.chara.player int oldListSize = list.Count; list.RemoveAt(slot); - Database.removeItem(owner, itemDBId, inventoryCode); + Database.RemoveItem(owner, itemDBId, inventoryCode); //Realign slots for (int i = slot; i < list.Count; i++) list[i].slot = (ushort)i; - owner.queuePacket(InventoryBeginChangePacket.buildPacket(owner.actorId)); - owner.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, inventoryCapacity, inventoryCode)); + owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); + owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, inventoryCapacity, inventoryCode)); - sendInventoryPackets(slot); - sendInventoryRemovePackets(slot); + SendInventoryPackets(slot); + SendInventoryRemovePackets(slot); if (slot != oldListSize - 1) - sendInventoryRemovePackets((ushort)(oldListSize - 1)); + SendInventoryRemovePackets((ushort)(oldListSize - 1)); - owner.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); if (inventoryCode == NORMAL) - owner.getEquipment().SendFullEquipment(false); + owner.GetEquipment().SendFullEquipment(false); - owner.queuePacket(InventoryEndChangePacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); } - public void removeItem(ushort slot) + public void RemoveItem(ushort slot) { if (slot >= list.Count) return; int oldListSize = list.Count; list.RemoveAt((int)slot); - Database.removeItem(owner, slot, inventoryCode); + Database.RemoveItem(owner, slot, inventoryCode); //Realign slots for (int i = slot; i < list.Count; i++) list[i].slot = (ushort)i; - owner.queuePacket(InventoryBeginChangePacket.buildPacket(owner.actorId)); - owner.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, inventoryCapacity, inventoryCode)); + owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); + owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, inventoryCapacity, inventoryCode)); - sendInventoryPackets(slot); - sendInventoryRemovePackets(slot); + SendInventoryPackets(slot); + SendInventoryRemovePackets(slot); if (slot != oldListSize - 1) - sendInventoryRemovePackets((ushort)(oldListSize - 1)); + SendInventoryRemovePackets((ushort)(oldListSize - 1)); - owner.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); if (inventoryCode == NORMAL) - owner.getEquipment().SendFullEquipment(false); + owner.GetEquipment().SendFullEquipment(false); - owner.queuePacket(InventoryEndChangePacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); } - public void changeDurability(uint slot, uint durabilityChange) + public void ChangeDurability(uint slot, uint durabilityChange) { } - public void changeSpiritBind(uint slot, uint spiritBindChange) + public void ChangeSpiritBind(uint slot, uint spiritBindChange) { } - public void changeMateria(uint slot, byte materiaSlot, byte materiaId) + public void ChangeMateria(uint slot, byte materiaSlot, byte materiaId) { } #endregion #region Packet Functions - public void sendFullInventory() + public void SendFullInventory() { - owner.queuePacket(InventorySetBeginPacket.buildPacket(owner.actorId, inventoryCapacity, inventoryCode)); - sendInventoryPackets(0); - owner.queuePacket(InventorySetEndPacket.buildPacket(owner.actorId)); + owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, inventoryCapacity, inventoryCode)); + SendInventoryPackets(0); + owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); } - private void sendInventoryPackets(InventoryItem item) + private void SendInventoryPackets(InventoryItem item) { - owner.queuePacket(InventoryListX01Packet.buildPacket(owner.actorId, item)); + owner.QueuePacket(InventoryListX01Packet.BuildPacket(owner.actorId, item)); } - private void sendInventoryPackets(List items) + private void SendInventoryPackets(List items) { int currentIndex = 0; while (true) { if (items.Count - currentIndex >= 64) - owner.queuePacket(InventoryListX64Packet.buildPacket(owner.actorId, items, ref currentIndex)); + owner.QueuePacket(InventoryListX64Packet.BuildPacket(owner.actorId, items, ref currentIndex)); else if (items.Count - currentIndex >= 32) - owner.queuePacket(InventoryListX32Packet.buildPacket(owner.actorId, items, ref currentIndex)); + owner.QueuePacket(InventoryListX32Packet.BuildPacket(owner.actorId, items, ref currentIndex)); else if (items.Count - currentIndex >= 16) - owner.queuePacket(InventoryListX16Packet.buildPacket(owner.actorId, items, ref currentIndex)); + owner.QueuePacket(InventoryListX16Packet.BuildPacket(owner.actorId, items, ref currentIndex)); else if (items.Count - currentIndex > 1) - owner.queuePacket(InventoryListX08Packet.buildPacket(owner.actorId, items, ref currentIndex)); + owner.QueuePacket(InventoryListX08Packet.BuildPacket(owner.actorId, items, ref currentIndex)); else if (items.Count - currentIndex == 1) { - owner.queuePacket(InventoryListX01Packet.buildPacket(owner.actorId, items[currentIndex])); + owner.QueuePacket(InventoryListX01Packet.BuildPacket(owner.actorId, items[currentIndex])); currentIndex++; } else @@ -383,23 +380,23 @@ namespace FFXIVClassic_Map_Server.actors.chara.player } - private void sendInventoryPackets(int startOffset) + private void SendInventoryPackets(int startOffset) { int currentIndex = startOffset; while (true) { if (list.Count - currentIndex >= 64) - owner.queuePacket(InventoryListX64Packet.buildPacket(owner.actorId, list, ref currentIndex)); + owner.QueuePacket(InventoryListX64Packet.BuildPacket(owner.actorId, list, ref currentIndex)); else if (list.Count - currentIndex >= 32) - owner.queuePacket(InventoryListX32Packet.buildPacket(owner.actorId, list, ref currentIndex)); + owner.QueuePacket(InventoryListX32Packet.BuildPacket(owner.actorId, list, ref currentIndex)); else if (list.Count - currentIndex >= 16) - owner.queuePacket(InventoryListX16Packet.buildPacket(owner.actorId, list, ref currentIndex)); + owner.QueuePacket(InventoryListX16Packet.BuildPacket(owner.actorId, list, ref currentIndex)); else if (list.Count - currentIndex > 1) - owner.queuePacket(InventoryListX08Packet.buildPacket(owner.actorId, list, ref currentIndex)); + owner.QueuePacket(InventoryListX08Packet.BuildPacket(owner.actorId, list, ref currentIndex)); else if (list.Count - currentIndex == 1) { - owner.queuePacket(InventoryListX01Packet.buildPacket(owner.actorId, list[currentIndex])); + owner.QueuePacket(InventoryListX01Packet.BuildPacket(owner.actorId, list[currentIndex])); currentIndex++; } else @@ -408,28 +405,28 @@ namespace FFXIVClassic_Map_Server.actors.chara.player } - private void sendInventoryRemovePackets(ushort index) + private void SendInventoryRemovePackets(ushort index) { - owner.queuePacket(InventoryRemoveX01Packet.buildPacket(owner.actorId, index)); + owner.QueuePacket(InventoryRemoveX01Packet.BuildPacket(owner.actorId, index)); } - private void sendInventoryRemovePackets(List indexes) + private void SendInventoryRemovePackets(List indexes) { int currentIndex = 0; while (true) { if (indexes.Count - currentIndex >= 64) - owner.queuePacket(InventoryRemoveX64Packet.buildPacket(owner.actorId, indexes, ref currentIndex)); + owner.QueuePacket(InventoryRemoveX64Packet.BuildPacket(owner.actorId, indexes, ref currentIndex)); else if (indexes.Count - currentIndex >= 32) - owner.queuePacket(InventoryRemoveX32Packet.buildPacket(owner.actorId, indexes, ref currentIndex)); + owner.QueuePacket(InventoryRemoveX32Packet.BuildPacket(owner.actorId, indexes, ref currentIndex)); else if (indexes.Count - currentIndex >= 16) - owner.queuePacket(InventoryRemoveX16Packet.buildPacket(owner.actorId, indexes, ref currentIndex)); + owner.QueuePacket(InventoryRemoveX16Packet.BuildPacket(owner.actorId, indexes, ref currentIndex)); else if (indexes.Count - currentIndex > 1) - owner.queuePacket(InventoryRemoveX08Packet.buildPacket(owner.actorId, indexes, ref currentIndex)); + owner.QueuePacket(InventoryRemoveX08Packet.BuildPacket(owner.actorId, indexes, ref currentIndex)); else if (indexes.Count - currentIndex == 1) { - owner.queuePacket(InventoryRemoveX01Packet.buildPacket(owner.actorId, indexes[currentIndex])); + owner.QueuePacket(InventoryRemoveX01Packet.BuildPacket(owner.actorId, indexes[currentIndex])); currentIndex++; } else @@ -442,18 +439,18 @@ namespace FFXIVClassic_Map_Server.actors.chara.player #region Inventory Utils - public bool isFull() + public bool IsFull() { return list.Count >= inventoryCapacity; } - public bool isSpaceForAdd(uint itemId, int quantity) + public bool IsSpaceForAdd(uint itemId, int quantity) { int quantityCount = quantity; for (int i = 0; i < list.Count; i++) { InventoryItem item = list[i]; - Item gItem = Server.getItemGamedata(item.itemId); + Item gItem = Server.GetItemGamedata(item.itemId); if (item.itemId == itemId && item.quantity < gItem.maxStack) { quantityCount -= (gItem.maxStack - item.quantity); @@ -462,15 +459,15 @@ namespace FFXIVClassic_Map_Server.actors.chara.player } } - return quantityCount <= 0 || (quantityCount > 0 && !isFull()); + return quantityCount <= 0 || (quantityCount > 0 && !IsFull()); } - public bool hasItem(uint itemId) + public bool HasItem(uint itemId) { - return hasItem(itemId, 1); + return HasItem(itemId, 1); } - public bool hasItem(uint itemId, int minQuantity) + public bool HasItem(uint itemId, int minQuantity) { int count = 0; @@ -486,7 +483,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.player return false; } - public int getNextEmptySlot() + public int GetNextEmptySlot() { return list.Count == 0 ? 0 : list.Count(); } diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index 611fb69f..82f801de 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -1,7 +1,5 @@ -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.actors.area; +using FFXIVClassic.Common; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.actors.chara.player; using FFXIVClassic_Map_Server.actors.director; using FFXIVClassic_Map_Server.dataobjects; @@ -10,19 +8,13 @@ using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.packets.send; using FFXIVClassic_Map_Server.packets.send.actor; using FFXIVClassic_Map_Server.packets.send.actor.events; -using FFXIVClassic_Map_Server.packets.send.actor.inventory; using FFXIVClassic_Map_Server.packets.send.Actor.inventory; using FFXIVClassic_Map_Server.packets.send.events; using FFXIVClassic_Map_Server.packets.send.list; -using FFXIVClassic_Map_Server.packets.send.login; using FFXIVClassic_Map_Server.packets.send.player; using FFXIVClassic_Map_Server.utils; -using MySql.Data.MySqlClient; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.Actors { @@ -236,144 +228,144 @@ namespace FFXIVClassic_Map_Server.Actors charaWork.parameterTemp.tp = 3000; - Database.loadPlayerCharacter(this); + Database.LoadPlayerCharacter(this); lastPlayTimeUpdate = Utils.UnixTimeStampUTC(); } - public List create0x132Packets(uint playerActorId) + public List Create0x132Packets(uint playerActorId) { List packets = new List(); - packets.Add(_0x132Packet.buildPacket(playerActorId, 0xB, "commandForced")); - packets.Add(_0x132Packet.buildPacket(playerActorId, 0xA, "commandDefault")); - packets.Add(_0x132Packet.buildPacket(playerActorId, 0x6, "commandWeak")); - packets.Add(_0x132Packet.buildPacket(playerActorId, 0x4, "commandContent")); - packets.Add(_0x132Packet.buildPacket(playerActorId, 0x6, "commandJudgeMode")); - packets.Add(_0x132Packet.buildPacket(playerActorId, 0x100, "commandRequest")); - packets.Add(_0x132Packet.buildPacket(playerActorId, 0x100, "widgetCreate")); - packets.Add(_0x132Packet.buildPacket(playerActorId, 0x100, "macroRequest")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0xB, "commandForced")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0xA, "commandDefault")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x6, "commandWeak")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x4, "commandContent")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x6, "commandJudgeMode")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x100, "commandRequest")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x100, "widGetCreate")); + packets.Add(_0x132Packet.BuildPacket(playerActorId, 0x100, "macroRequest")); return packets; } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; - if (isMyPlayer(playerActorId)) + if (IsMyPlayer(playerActorId)) { if (currentDirector != null) - lParams = LuaUtils.createLuaParamList("/Chara/Player/Player_work", false, false, true, currentDirector, true, 0, false, timers, true); + lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, true, currentDirector, true, 0, false, timers, true); else - lParams = LuaUtils.createLuaParamList("/Chara/Player/Player_work", false, false, false, true, 0, false, timers, true); + lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, false, true, 0, false, timers, true); } else - lParams = LuaUtils.createLuaParamList("/Chara/Player/Player_work", false, false, false, false, false, true); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams); + lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, false, false, false, true); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); } - public override BasePacket getSpawnPackets(uint playerActorId, uint spawnType) + public override BasePacket GetSpawnPackets(uint playerActorId, uint spawnType) { List subpackets = new List(); - subpackets.Add(createAddActorPacket(playerActorId, 8)); - if (isMyPlayer(playerActorId)) - subpackets.AddRange(create0x132Packets(playerActorId)); - subpackets.Add(createSpeedPacket(playerActorId)); - subpackets.Add(createSpawnPositonPacket(playerActorId, spawnType)); - subpackets.Add(createAppearancePacket(playerActorId)); - subpackets.Add(createNamePacket(playerActorId)); - subpackets.Add(_0xFPacket.buildPacket(playerActorId, playerActorId)); - subpackets.Add(createStatePacket(playerActorId)); - subpackets.Add(createIdleAnimationPacket(playerActorId)); - subpackets.Add(createInitStatusPacket(playerActorId)); - subpackets.Add(createSetActorIconPacket(playerActorId)); - subpackets.Add(createIsZoneingPacket(playerActorId)); - subpackets.AddRange(createPlayerRelatedPackets(playerActorId)); - subpackets.Add(createScriptBindPacket(playerActorId)); - return BasePacket.createPacket(subpackets, true, false); + subpackets.Add(CreateAddActorPacket(playerActorId, 8)); + if (IsMyPlayer(playerActorId)) + subpackets.AddRange(Create0x132Packets(playerActorId)); + subpackets.Add(CreateSpeedPacket(playerActorId)); + subpackets.Add(CreateSpawnPositonPacket(playerActorId, spawnType)); + subpackets.Add(CreateAppearancePacket(playerActorId)); + subpackets.Add(CreateNamePacket(playerActorId)); + subpackets.Add(_0xFPacket.BuildPacket(playerActorId, playerActorId)); + subpackets.Add(CreateStatePacket(playerActorId)); + subpackets.Add(CreateIdleAnimationPacket(playerActorId)); + subpackets.Add(CreateInitStatusPacket(playerActorId)); + subpackets.Add(CreateSetActorIconPacket(playerActorId)); + subpackets.Add(CreateIsZoneingPacket(playerActorId)); + subpackets.AddRange(CreatePlayerRelatedPackets(playerActorId)); + subpackets.Add(CreateScriptBindPacket(playerActorId)); + return BasePacket.CreatePacket(subpackets, true, false); } - public List createPlayerRelatedPackets(uint playerActorId) + public List CreatePlayerRelatedPackets(uint playerActorId) { List subpackets = new List(); if (gcCurrent != 0) - subpackets.Add(SetGrandCompanyPacket.buildPacket(actorId, playerActorId, gcCurrent, gcRankLimsa, gcRankGridania, gcRankUldah)); + subpackets.Add(SetGrandCompanyPacket.BuildPacket(actorId, playerActorId, gcCurrent, gcRankLimsa, gcRankGridania, gcRankUldah)); if (currentTitle != 0) - subpackets.Add(SetPlayerTitlePacket.buildPacket(actorId, playerActorId, currentTitle)); + subpackets.Add(SetPlayerTitlePacket.BuildPacket(actorId, playerActorId, currentTitle)); if (currentJob != 0) - subpackets.Add(SetCurrentJobPacket.buildPacket(actorId, playerActorId, currentJob)); + subpackets.Add(SetCurrentJobPacket.BuildPacket(actorId, playerActorId, currentJob)); - if (isMyPlayer(playerActorId)) + if (IsMyPlayer(playerActorId)) { - subpackets.Add(_0x196Packet.buildPacket(playerActorId, playerActorId)); + subpackets.Add(_0x196Packet.BuildPacket(playerActorId, playerActorId)); if (hasChocobo && chocoboName != null && !chocoboName.Equals("")) { - subpackets.Add(SetChocoboNamePacket.buildPacket(actorId, playerActorId, chocoboName)); - subpackets.Add(SetHasChocoboPacket.buildPacket(playerActorId, hasChocobo)); + subpackets.Add(SetChocoboNamePacket.BuildPacket(actorId, playerActorId, chocoboName)); + subpackets.Add(SetHasChocoboPacket.BuildPacket(playerActorId, hasChocobo)); } if (hasGoobbue) - subpackets.Add(SetHasGoobbuePacket.buildPacket(playerActorId, hasGoobbue)); + subpackets.Add(SetHasGoobbuePacket.BuildPacket(playerActorId, hasGoobbue)); - subpackets.Add(SetAchievementPointsPacket.buildPacket(playerActorId, achievementPoints)); - subpackets.Add(Database.getLatestAchievements(this)); - subpackets.Add(Database.getAchievementsPacket(this)); + subpackets.Add(SetAchievementPointsPacket.BuildPacket(playerActorId, achievementPoints)); + subpackets.Add(Database.GetLatestAchievements(this)); + subpackets.Add(Database.GetAchievementsPacket(this)); } return subpackets; } - public override BasePacket getInitPackets(uint playerActorId) + public override BasePacket GetInitPackets(uint playerActorId) { ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("/_init", this, playerActorId); - propPacketUtil.addProperty("charaWork.eventSave.bazaarTax"); - propPacketUtil.addProperty("charaWork.battleSave.potencial"); + propPacketUtil.AddProperty("charaWork.eventSave.bazaarTax"); + propPacketUtil.AddProperty("charaWork.battleSave.potencial"); //Properties for (int i = 0; i < charaWork.property.Length; i++) { if (charaWork.property[i] != 0) - propPacketUtil.addProperty(String.Format("charaWork.property[{0}]", i)); + propPacketUtil.AddProperty(String.Format("charaWork.property[{0}]", i)); } //Parameters - propPacketUtil.addProperty("charaWork.parameterSave.hp[0]"); - propPacketUtil.addProperty("charaWork.parameterSave.hpMax[0]"); - propPacketUtil.addProperty("charaWork.parameterSave.mp"); - propPacketUtil.addProperty("charaWork.parameterSave.mpMax"); - propPacketUtil.addProperty("charaWork.parameterTemp.tp"); - propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkill[0]"); - propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkillLevel"); + propPacketUtil.AddProperty("charaWork.parameterSave.hp[0]"); + propPacketUtil.AddProperty("charaWork.parameterSave.hpMax[0]"); + propPacketUtil.AddProperty("charaWork.parameterSave.mp"); + propPacketUtil.AddProperty("charaWork.parameterSave.mpMax"); + propPacketUtil.AddProperty("charaWork.parameterTemp.tp"); + propPacketUtil.AddProperty("charaWork.parameterSave.state_mainSkill[0]"); + propPacketUtil.AddProperty("charaWork.parameterSave.state_mainSkillLevel"); //Status Times for (int i = 0; i < charaWork.statusShownTime.Length; i++) { if (charaWork.statusShownTime[i] != 0xFFFFFFFF) - propPacketUtil.addProperty(String.Format("charaWork.statusShownTime[{0}]", i)); + propPacketUtil.AddProperty(String.Format("charaWork.statusShownTime[{0}]", i)); } //General Parameters for (int i = 3; i < charaWork.battleTemp.generalParameter.Length; i++) { if (charaWork.battleTemp.generalParameter[i] != 0) - propPacketUtil.addProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i)); + propPacketUtil.AddProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i)); } - propPacketUtil.addProperty("charaWork.battleTemp.castGauge_speed[0]"); - propPacketUtil.addProperty("charaWork.battleTemp.castGauge_speed[1]"); + propPacketUtil.AddProperty("charaWork.battleTemp.castGauge_speed[0]"); + propPacketUtil.AddProperty("charaWork.battleTemp.castGauge_speed[1]"); //Battle Save Skillpoint //Commands - propPacketUtil.addProperty("charaWork.commandBorder"); + propPacketUtil.AddProperty("charaWork.commandBorder"); for (int i = 0; i < charaWork.command.Length; i++) { if (charaWork.command[i] != 0) - propPacketUtil.addProperty(String.Format("charaWork.command[{0}]", i)); + propPacketUtil.AddProperty(String.Format("charaWork.command[{0}]", i)); } @@ -381,110 +373,110 @@ namespace FFXIVClassic_Map_Server.Actors { charaWork.commandCategory[i] = 1; if (charaWork.commandCategory[i] != 0) - propPacketUtil.addProperty(String.Format("charaWork.commandCategory[{0}]", i)); + propPacketUtil.AddProperty(String.Format("charaWork.commandCategory[{0}]", i)); } for (int i = 0; i < charaWork.commandAcquired.Length; i++) { if (charaWork.commandAcquired[i] != false) - propPacketUtil.addProperty(String.Format("charaWork.commandAcquired[{0}]", i)); + propPacketUtil.AddProperty(String.Format("charaWork.commandAcquired[{0}]", i)); } for (int i = 0; i < charaWork.additionalCommandAcquired.Length; i++) { if (charaWork.additionalCommandAcquired[i] != false) - propPacketUtil.addProperty(String.Format("charaWork.additionalCommandAcquired[{0}]", i)); + propPacketUtil.AddProperty(String.Format("charaWork.AdditionalCommandAcquired[{0}]", i)); } for (int i = 0; i < charaWork.parameterSave.commandSlot_compatibility.Length; i++) { charaWork.parameterSave.commandSlot_compatibility[i] = true; if (charaWork.parameterSave.commandSlot_compatibility[i]) - propPacketUtil.addProperty(String.Format("charaWork.parameterSave.commandSlot_compatibility[{0}]", i)); + propPacketUtil.AddProperty(String.Format("charaWork.parameterSave.commandSlot_compatibility[{0}]", i)); } /* for (int i = 0; i < charaWork.parameterSave.commandSlot_recastTime.Length; i++) { if (charaWork.parameterSave.commandSlot_recastTime[i] != 0) - propPacketUtil.addProperty(String.Format("charaWork.parameterSave.commandSlot_recastTime[{0}]", i)); + propPacketUtil.AddProperty(String.Format("charaWork.parameterSave.commandSlot_recastTime[{0}]", i)); } */ //System - propPacketUtil.addProperty("charaWork.parameterTemp.forceControl_float_forClientSelf[0]"); - propPacketUtil.addProperty("charaWork.parameterTemp.forceControl_float_forClientSelf[1]"); - propPacketUtil.addProperty("charaWork.parameterTemp.forceControl_int16_forClientSelf[0]"); - propPacketUtil.addProperty("charaWork.parameterTemp.forceControl_int16_forClientSelf[1]"); + propPacketUtil.AddProperty("charaWork.parameterTemp.forceControl_float_forClientSelf[0]"); + propPacketUtil.AddProperty("charaWork.parameterTemp.forceControl_float_forClientSelf[1]"); + propPacketUtil.AddProperty("charaWork.parameterTemp.forceControl_int16_forClientSelf[0]"); + propPacketUtil.AddProperty("charaWork.parameterTemp.forceControl_int16_forClientSelf[1]"); charaWork.parameterTemp.otherClassAbilityCount[0] = 4; charaWork.parameterTemp.otherClassAbilityCount[1] = 5; charaWork.parameterTemp.giftCount[1] = 5; - propPacketUtil.addProperty("charaWork.parameterTemp.otherClassAbilityCount[0]"); - propPacketUtil.addProperty("charaWork.parameterTemp.otherClassAbilityCount[1]"); - propPacketUtil.addProperty("charaWork.parameterTemp.giftCount[1]"); + propPacketUtil.AddProperty("charaWork.parameterTemp.otherClassAbilityCount[0]"); + propPacketUtil.AddProperty("charaWork.parameterTemp.otherClassAbilityCount[1]"); + propPacketUtil.AddProperty("charaWork.parameterTemp.giftCount[1]"); - propPacketUtil.addProperty("charaWork.depictionJudge"); + propPacketUtil.AddProperty("charaWork.depictionJudge"); //Scenario for (int i = 0; i < playerWork.questScenario.Length; i++) { if (playerWork.questScenario[i] != 0) - propPacketUtil.addProperty(String.Format("playerWork.questScenario[{0}]", i)); + propPacketUtil.AddProperty(String.Format("playerWork.questScenario[{0}]", i)); } //Guildleve - Local for (int i = 0; i < playerWork.questGuildleve.Length; i++) { if (playerWork.questGuildleve[i] != 0) - propPacketUtil.addProperty(String.Format("playerWork.questGuildleve[{0}]", i)); + propPacketUtil.AddProperty(String.Format("playerWork.questGuildleve[{0}]", i)); } //Guildleve - Regional for (int i = 0; i < work.guildleveId.Length; i++) { if (work.guildleveId[i] != 0) - propPacketUtil.addProperty(String.Format("work.guildleveId[{0}]", i)); + propPacketUtil.AddProperty(String.Format("work.guildleveId[{0}]", i)); if (work.guildleveDone[i] != false) - propPacketUtil.addProperty(String.Format("work.guildleveDone[{0}]", i)); + propPacketUtil.AddProperty(String.Format("work.guildleveDone[{0}]", i)); if (work.guildleveChecked[i] != false) - propPacketUtil.addProperty(String.Format("work.guildleveChecked[{0}]", i)); + propPacketUtil.AddProperty(String.Format("work.guildleveChecked[{0}]", i)); } //NPC Linkshell for (int i = 0; i < playerWork.npcLinkshellChatCalling.Length; i++) { if (playerWork.npcLinkshellChatCalling[i] != false) - propPacketUtil.addProperty(String.Format("playerWork.npcLinkshellChatCalling[{0}]", i)); + propPacketUtil.AddProperty(String.Format("playerWork.npcLinkshellChatCalling[{0}]", i)); if (playerWork.npcLinkshellChatExtra[i] != false) - propPacketUtil.addProperty(String.Format("playerWork.npcLinkshellChatExtra[{0}]", i)); + propPacketUtil.AddProperty(String.Format("playerWork.npcLinkshellChatExtra[{0}]", i)); } - propPacketUtil.addProperty("playerWork.restBonusExpRate"); + propPacketUtil.AddProperty("playerWork.restBonusExpRate"); //Profile - propPacketUtil.addProperty("playerWork.tribe"); - propPacketUtil.addProperty("playerWork.guardian"); - propPacketUtil.addProperty("playerWork.birthdayMonth"); - propPacketUtil.addProperty("playerWork.birthdayDay"); - propPacketUtil.addProperty("playerWork.initialTown"); + propPacketUtil.AddProperty("playerWork.tribe"); + propPacketUtil.AddProperty("playerWork.guardian"); + propPacketUtil.AddProperty("playerWork.birthdayMonth"); + propPacketUtil.AddProperty("playerWork.birthdayDay"); + propPacketUtil.AddProperty("playerWork.initialTown"); - return BasePacket.createPacket(propPacketUtil.done(), true, false); + return BasePacket.CreatePacket(propPacketUtil.Done(), true, false); } - public void sendZoneInPackets(WorldManager world, ushort spawnType) + public void SendZoneInPackets(WorldManager world, ushort spawnType) { - queuePacket(SetActorIsZoningPacket.buildPacket(actorId, actorId, false)); - queuePacket(_0x10Packet.buildPacket(actorId, 0xFF)); - queuePacket(SetMusicPacket.buildPacket(actorId, zone.bgmDay, 0x01)); - queuePacket(SetWeatherPacket.buildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR, 1)); + QueuePacket(SetActorIsZoningPacket.BuildPacket(actorId, actorId, false)); + QueuePacket(_0x10Packet.BuildPacket(actorId, 0xFF)); + QueuePacket(SetMusicPacket.BuildPacket(actorId, zone.bgmDay, 0x01)); + QueuePacket(SetWeatherPacket.BuildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR, 1)); - queuePacket(SetMapPacket.buildPacket(actorId, zone.regionId, zone.actorId)); + QueuePacket(SetMapPacket.BuildPacket(actorId, zone.regionId, zone.actorId)); - queuePacket(getSpawnPackets(actorId, spawnType)); - getSpawnPackets(actorId, spawnType).debugPrintPacket(); + QueuePacket(GetSpawnPackets(actorId, spawnType)); + GetSpawnPackets(actorId, spawnType).DebugPrintPacket(); #region grouptest //Retainers @@ -493,52 +485,52 @@ namespace FFXIVClassic_Map_Server.Actors retainerListEntries.Add(new ListEntry(0x23, 0x0, 0xFFFFFFFF, false, false, "TEST1")); retainerListEntries.Add(new ListEntry(0x24, 0x0, 0xFFFFFFFF, false, false, "TEST2")); retainerListEntries.Add(new ListEntry(0x25, 0x0, 0xFFFFFFFF, false, false, "TEST3")); - BasePacket retainerListPacket = BasePacket.createPacket(ListUtils.createRetainerList(actorId, 0xF4, 1, 0x800000000004e639, retainerListEntries), true, false); - playerSession.queuePacket(retainerListPacket); + BasePacket retainerListPacket = BasePacket.CreatePacket(ListUtils.CreateRetainerList(actorId, 0xF4, 1, 0x800000000004e639, retainerListEntries), true, false); + playerSession.QueuePacket(retainerListPacket); //Party List partyListEntries = new List(); partyListEntries.Add(new ListEntry(actorId, 0xFFFFFFFF, 0xFFFFFFFF, false, true, customDisplayName)); partyListEntries.Add(new ListEntry(0x029B27D3, 0xFFFFFFFF, 0x195, false, true, "Valentine Bluefeather")); - BasePacket partyListPacket = BasePacket.createPacket(ListUtils.createPartyList(actorId, 0xF4, 1, 0x8000000000696df2, partyListEntries), true, false); - playerSession.queuePacket(partyListPacket); + BasePacket partyListPacket = BasePacket.CreatePacket(ListUtils.CreatePartyList(actorId, 0xF4, 1, 0x8000000000696df2, partyListEntries), true, false); + playerSession.QueuePacket(partyListPacket); #endregion #region Inventory & Equipment - queuePacket(InventoryBeginChangePacket.buildPacket(actorId)); - inventories[Inventory.NORMAL].sendFullInventory(); - inventories[Inventory.CURRENCY].sendFullInventory(); - inventories[Inventory.KEYITEMS].sendFullInventory(); - inventories[Inventory.BAZAAR].sendFullInventory(); - inventories[Inventory.MELDREQUEST].sendFullInventory(); - inventories[Inventory.LOOT].sendFullInventory(); + QueuePacket(InventoryBeginChangePacket.BuildPacket(actorId)); + inventories[Inventory.NORMAL].SendFullInventory(); + inventories[Inventory.CURRENCY].SendFullInventory(); + inventories[Inventory.KEYITEMS].SendFullInventory(); + inventories[Inventory.BAZAAR].SendFullInventory(); + inventories[Inventory.MELDREQUEST].SendFullInventory(); + inventories[Inventory.LOOT].SendFullInventory(); equipment.SendFullEquipment(false); - playerSession.queuePacket(InventoryEndChangePacket.buildPacket(actorId), true, false); + playerSession.QueuePacket(InventoryEndChangePacket.BuildPacket(actorId), true, false); #endregion - playerSession.queuePacket(getInitPackets(actorId)); + playerSession.QueuePacket(GetInitPackets(actorId)); - BasePacket areaMasterSpawn = zone.getSpawnPackets(actorId); - BasePacket debugSpawn = world.GetDebugActor().getSpawnPackets(actorId); - BasePacket worldMasterSpawn = world.GetActor().getSpawnPackets(actorId); - BasePacket weatherDirectorSpawn = new WeatherDirector(this, 8003).getSpawnPackets(actorId); + BasePacket areaMasterSpawn = zone.GetSpawnPackets(actorId); + BasePacket debugSpawn = world.GetDebugActor().GetSpawnPackets(actorId); + BasePacket worldMasterSpawn = world.GetActor().GetSpawnPackets(actorId); + BasePacket weatherDirectorSpawn = new WeatherDirector(this, 8003).GetSpawnPackets(actorId); BasePacket directorSpawn = null; if (currentDirector != null) - directorSpawn = currentDirector.getSpawnPackets(actorId); + directorSpawn = currentDirector.GetSpawnPackets(actorId); - playerSession.queuePacket(areaMasterSpawn); - playerSession.queuePacket(debugSpawn); + playerSession.QueuePacket(areaMasterSpawn); + playerSession.QueuePacket(debugSpawn); if (directorSpawn != null) { - //directorSpawn.debugPrintPacket(); - // currentDirector.getInitPackets(actorId).debugPrintPacket(); - queuePacket(directorSpawn); - queuePacket(currentDirector.getInitPackets(actorId)); - //queuePacket(currentDirector.getSetEventStatusPackets(actorId)); + //directorSpawn.DebugPrintPacket(); + // currentDirector.GetInitPackets(actorId).DebugPrintPacket(); + QueuePacket(directorSpawn); + QueuePacket(currentDirector.GetInitPackets(actorId)); + //QueuePacket(currentDirector.GetSetEventStatusPackets(actorId)); } - playerSession.queuePacket(worldMasterSpawn); + playerSession.QueuePacket(worldMasterSpawn); if (zone.isInn) { @@ -546,73 +538,73 @@ namespace FFXIVClassic_Map_Server.Actors for (int i = 0; i < 2048; i++) cutsceneBookPacket.cutsceneFlags[i] = true; - SubPacket packet = cutsceneBookPacket.buildPacket(actorId, "", 11, 1, 1); + SubPacket packet = cutsceneBookPacket.BuildPacket(actorId, "", 11, 1, 1); - packet.debugPrintSubPacket(); - queuePacket(packet); + packet.DebugPrintSubPacket(); + QueuePacket(packet); } - playerSession.queuePacket(weatherDirectorSpawn); + playerSession.QueuePacket(weatherDirectorSpawn); /* #region hardcode - BasePacket reply10 = new BasePacket("./packets/login/login10.bin"); //Item Storage, Inn Door created + BasePacket reply10 = new BasePacket("./packets/login/login10.bin"); //Item Storage, Inn Door Created BasePacket reply11 = new BasePacket("./packets/login/login11.bin"); //NPC Create ??? Final init - reply10.replaceActorID(actorId); - reply11.replaceActorID(actorId); - //playerSession.queuePacket(reply10); - // playerSession.queuePacket(reply11); + reply10.ReplaceActorID(actorId); + reply11.ReplaceActorID(actorId); + //playerSession.QueuePacket(reply10); + // playerSession.QueuePacket(reply11); #endregion */ } - private void sendRemoveInventoryPackets(List slots) + private void SendRemoveInventoryPackets(List slots) { int currentIndex = 0; while (true) { if (slots.Count - currentIndex >= 64) - queuePacket(InventoryRemoveX64Packet.buildPacket(actorId, slots, ref currentIndex)); + QueuePacket(InventoryRemoveX64Packet.BuildPacket(actorId, slots, ref currentIndex)); else if (slots.Count - currentIndex >= 32) - queuePacket(InventoryRemoveX32Packet.buildPacket(actorId, slots, ref currentIndex)); + QueuePacket(InventoryRemoveX32Packet.BuildPacket(actorId, slots, ref currentIndex)); else if (slots.Count - currentIndex >= 16) - queuePacket(InventoryRemoveX16Packet.buildPacket(actorId, slots, ref currentIndex)); + QueuePacket(InventoryRemoveX16Packet.BuildPacket(actorId, slots, ref currentIndex)); else if (slots.Count - currentIndex >= 8) - queuePacket(InventoryRemoveX08Packet.buildPacket(actorId, slots, ref currentIndex)); + QueuePacket(InventoryRemoveX08Packet.BuildPacket(actorId, slots, ref currentIndex)); else if (slots.Count - currentIndex == 1) - queuePacket(InventoryRemoveX01Packet.buildPacket(actorId, slots[currentIndex])); + QueuePacket(InventoryRemoveX01Packet.BuildPacket(actorId, slots[currentIndex])); else break; } } - public bool isMyPlayer(uint otherActorId) + public bool IsMyPlayer(uint otherActorId) { return actorId == otherActorId; } - public void queuePacket(BasePacket packet) + public void QueuePacket(BasePacket packet) { - playerSession.queuePacket(packet); + playerSession.QueuePacket(packet); } - public void queuePacket(SubPacket packet) + public void QueuePacket(SubPacket packet) { - playerSession.queuePacket(packet, true, false); + playerSession.QueuePacket(packet, true, false); } - public void queuePackets(List packets) + public void QueuePackets(List packets) { foreach (SubPacket subpacket in packets) - playerSession.queuePacket(subpacket, true, false); + playerSession.QueuePacket(subpacket, true, false); } - public void broadcastPacket(SubPacket packet, bool sendToSelf) + public void BroadcastPacket(SubPacket packet, bool sendToSelf) { if (sendToSelf) - queuePacket(packet); + QueuePacket(packet); foreach (Actor a in playerSession.actorInstanceList) { @@ -620,62 +612,62 @@ namespace FFXIVClassic_Map_Server.Actors { Player p = (Player)a; SubPacket clonedPacket = new SubPacket(packet, a.actorId); - p.queuePacket(clonedPacket); + p.QueuePacket(clonedPacket); } } } - public void setDCFlag(bool flag) + public void SetDCFlag(bool flag) { if (flag) { - broadcastPacket(SetActorIconPacket.buildPacket(actorId, actorId, SetActorIconPacket.DISCONNECTING), true); + BroadcastPacket(SetActorIconPacket.BuildPacket(actorId, actorId, SetActorIconPacket.DISCONNECTING), true); } else { if (isGM) - broadcastPacket(SetActorIconPacket.buildPacket(actorId, actorId, SetActorIconPacket.ISGM), true); + BroadcastPacket(SetActorIconPacket.BuildPacket(actorId, actorId, SetActorIconPacket.ISGM), true); else - broadcastPacket(SetActorIconPacket.buildPacket(actorId, actorId, 0), true); + BroadcastPacket(SetActorIconPacket.BuildPacket(actorId, actorId, 0), true); } } - public void cleanupAndSave() + public void CleanupAndSave() { //Remove actor from zone and main server list - zone.removeActorFromZone(this); - Server.getServer().removePlayer(this); + zone.RemoveActorFromZone(this); + Server.GetServer().RemovePlayer(this); //Save Player - Database.savePlayerPlayTime(this); - Database.savePlayerPosition(this); + Database.SavePlayerPlayTime(this); + Database.SavePlayerPosition(this); - Log.info(String.Format("{0} has been logged out and saved.", this.customDisplayName)); + Program.Log.Info("{0} has been logged out and saved.", this.customDisplayName); } - public Area getZone() + public Area GetZone() { return zone; } - public void sendMessage(uint logType, string sender, string message) + public void SendMessage(uint logType, string sender, string message) { - queuePacket(SendMessagePacket.buildPacket(actorId, actorId, logType, sender, message)); + QueuePacket(SendMessagePacket.BuildPacket(actorId, actorId, logType, sender, message)); } - public void logout() + public void Logout() { - queuePacket(LogoutPacket.buildPacket(actorId)); - cleanupAndSave(); + QueuePacket(LogoutPacket.BuildPacket(actorId)); + CleanupAndSave(); } - public void quitGame() + public void QuitGame() { - queuePacket(QuitPacket.buildPacket(actorId)); - cleanupAndSave(); + QueuePacket(QuitPacket.BuildPacket(actorId)); + CleanupAndSave(); } - public uint getPlayTime(bool doUpdate) + public uint GetPlayTime(bool doUpdate) { if (doUpdate) { @@ -687,82 +679,82 @@ namespace FFXIVClassic_Map_Server.Actors return playTime; } - public void changeMusic(ushort musicId) + public void ChangeMusic(ushort musicId) { - queuePacket(SetMusicPacket.buildPacket(actorId, musicId, 1)); + QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, 1)); } - public void sendChocoboAppearance() + public void SendChocoboAppearance() { - broadcastPacket(SetCurrentMountChocoboPacket.buildPacket(actorId, chocoboAppearance), true); + BroadcastPacket(SetCurrentMountChocoboPacket.BuildPacket(actorId, chocoboAppearance), true); } - public void sendGoobbueAppearance() + public void SendGoobbueAppearance() { - broadcastPacket(SetCurrentMountGoobbuePacket.buildPacket(actorId, 1), true); + BroadcastPacket(SetCurrentMountGoobbuePacket.BuildPacket(actorId, 1), true); } - public void setMountState(byte mountState) + public void SetMountState(byte mountState) { this.mountState = mountState; } - public byte getMountState() + public byte GetMountState() { return mountState; } - public void doEmote(uint emoteId) + public void DoEmote(uint emoteId) { - broadcastPacket(ActorDoEmotePacket.buildPacket(actorId, actorId, currentTarget, emoteId), true); + BroadcastPacket(ActorDoEmotePacket.BuildPacket(actorId, actorId, currentTarget, emoteId), true); } - public void sendGameMessage(Actor sourceActor, Actor textIdOwner, ushort textId, byte log, params object[] msgParams) + public void SendGameMessage(Actor sourceActor, Actor textIdOwner, ushort textId, byte log, params object[] msgParams) { if (msgParams.Length == 0) { - queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log)); + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log)); } else - queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log, LuaUtils.createLuaParamList(msgParams))); + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log, LuaUtils.CreateLuaParamList(msgParams))); } - public void sendGameMessage(Actor textIdOwner, ushort textId, byte log, params object[] msgParams) + public void SendGameMessage(Actor textIdOwner, ushort textId, byte log, params object[] msgParams) { if (msgParams.Length == 0) - queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log)); + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log)); else - queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log, LuaUtils.createLuaParamList(msgParams))); + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log, LuaUtils.CreateLuaParamList(msgParams))); } - public void sendGameMessage(Actor textIdOwner, ushort textId, byte log, string customSender, params object[] msgParams) + public void SendGameMessage(Actor textIdOwner, ushort textId, byte log, string customSender, params object[] msgParams) { if (msgParams.Length == 0) - queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log)); + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log)); else - queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log, LuaUtils.createLuaParamList(msgParams))); + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log, LuaUtils.CreateLuaParamList(msgParams))); } - public void sendGameMessage(Actor textIdOwner, ushort textId, byte log, uint displayId, params object[] msgParams) + public void SendGameMessage(Actor textIdOwner, ushort textId, byte log, uint displayId, params object[] msgParams) { if (msgParams.Length == 0) - queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log)); + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log)); else - queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log, LuaUtils.createLuaParamList(msgParams))); + QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log, LuaUtils.CreateLuaParamList(msgParams))); } - public void broadcastWorldMessage(ushort worldMasterId, params object[] msgParams) + public void BroadcastWorldMessage(ushort worldMasterId, params object[] msgParams) { //SubPacket worldMasterMessage = - //zone.broadcastPacketAroundActor(this, worldMasterMessage); + //zone.BroadcastPacketAroundActor(this, worldMasterMessage); } - public void graphicChange(uint slot, uint graphicId) + public void GraphicChange(uint slot, uint graphicId) { appearanceIds[slot] = graphicId; } - public void graphicChange(uint slot, uint weapId, uint equipId, uint variantId, uint colorId) + public void GraphicChange(uint slot, uint weapId, uint equipId, uint variantId, uint colorId) { uint mixedVariantId; @@ -781,12 +773,12 @@ namespace FFXIVClassic_Map_Server.Actors } - public void sendAppearance() + public void SendAppearance() { - broadcastPacket(createAppearancePacket(actorId), true); + BroadcastPacket(CreateAppearancePacket(actorId), true); } - public void sendCharaExpInfo() + public void SendCharaExpInfo() { if (lastStep == 0) { @@ -800,22 +792,22 @@ namespace FFXIVClassic_Map_Server.Actors Buffer.BlockCopy(charaWork.battleSave.skillLevel, 0, skillLevelBuffer, 0, skillLevelBuffer.Length); SetActorPropetyPacket charaInfo1 = new SetActorPropetyPacket("charaWork/exp"); - charaInfo1.setIsArrayMode(true); + charaInfo1.SetIsArrayMode(true); if (maxLength == 0x5E) { - charaInfo1.addBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevel", 0), skillLevelBuffer, 0, skillLevelBuffer.Length, 0x0); + charaInfo1.AddBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevel", 0), skillLevelBuffer, 0, skillLevelBuffer.Length, 0x0); lastPosition += maxLength; } else { - charaInfo1.addBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevel", 0), skillLevelBuffer, 0, skillLevelBuffer.Length, 0x3); + charaInfo1.AddBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevel", 0), skillLevelBuffer, 0, skillLevelBuffer.Length, 0x3); lastPosition = 0; lastStep++; } - charaInfo1.addTarget(); + charaInfo1.AddTarget(); - queuePacket(charaInfo1.buildPacket(actorId, actorId)); + QueuePacket(charaInfo1.BuildPacket(actorId, actorId)); } else if (lastStep == 1) { @@ -832,38 +824,38 @@ namespace FFXIVClassic_Map_Server.Actors if (maxLength == 0x5E) { - charaInfo1.setIsArrayMode(true); - charaInfo1.addBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevelCap", 0), skillCapBuffer, 0, skillCapBuffer.Length, 0x1); + charaInfo1.SetIsArrayMode(true); + charaInfo1.AddBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevelCap", 0), skillCapBuffer, 0, skillCapBuffer.Length, 0x1); lastPosition += maxLength; } else { - charaInfo1.setIsArrayMode(false); - charaInfo1.addBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevelCap", 0), skillCapBuffer, 0, skillCapBuffer.Length, 0x3); + charaInfo1.SetIsArrayMode(false); + charaInfo1.AddBuffer(Utils.MurmurHash2("charaWork.battleSave.skillLevelCap", 0), skillCapBuffer, 0, skillCapBuffer.Length, 0x3); lastStep = 0; lastPosition = 0; } - charaInfo1.addTarget(); + charaInfo1.AddTarget(); - queuePacket(charaInfo1.buildPacket(actorId, actorId)); + QueuePacket(charaInfo1.BuildPacket(actorId, actorId)); } } - public InventoryItem[] getGearset(ushort classId) + public InventoryItem[] GetGearset(ushort classId) { - return Database.getEquipment(this, classId); + return Database.GetEquipment(this, classId); } - public void prepareClassChange(byte classId) + public void PrepareClassChange(byte classId) { //If new class, init abilties and level - sendCharaExpInfo(); + SendCharaExpInfo(); } - public void doClassChange(byte classId) + public void DoClassChange(byte classId) { //load hotbars //Calculate stats @@ -894,26 +886,26 @@ namespace FFXIVClassic_Map_Server.Actors ActorPropertyPacketUtil propertyBuilder = new ActorPropertyPacketUtil("charaWork/stateForAll", this, actorId); - propertyBuilder.addProperty("charaWork.parameterSave.state_mainSkill[0]"); - propertyBuilder.addProperty("charaWork.parameterSave.state_mainSkillLevel"); - propertyBuilder.newTarget("playerWork/expBonus"); - propertyBuilder.addProperty("playerWork.restBonusExpRate"); + propertyBuilder.AddProperty("charaWork.parameterSave.state_mainSkill[0]"); + propertyBuilder.AddProperty("charaWork.parameterSave.state_mainSkillLevel"); + propertyBuilder.NewTarget("playerWork/expBonus"); + propertyBuilder.AddProperty("playerWork.restBonusExpRate"); - List packets = propertyBuilder.done(); + List packets = propertyBuilder.Done(); foreach (SubPacket packet in packets) - broadcastPacket(packet, true); + BroadcastPacket(packet, true); - Database.savePlayerCurrentClass(this); + Database.SavePlayerCurrentClass(this); } - public void graphicChange(int slot, InventoryItem invItem) + public void GraphicChange(int slot, InventoryItem invItem) { if (invItem == null) appearanceIds[slot] = 0; else { - Item item = Server.getItemGamedata(invItem.itemId); + Item item = Server.GetItemGamedata(invItem.itemId); if (item is EquipmentItem) { EquipmentItem eqItem = (EquipmentItem)item; @@ -934,12 +926,12 @@ namespace FFXIVClassic_Map_Server.Actors } } - Database.savePlayerAppearance(this); + Database.SavePlayerAppearance(this); - broadcastPacket(createAppearancePacket(actorId), true); + BroadcastPacket(CreateAppearancePacket(actorId), true); } - public Inventory getInventory(ushort type) + public Inventory GetInventory(ushort type) { if (inventories.ContainsKey(type)) return inventories[type]; @@ -947,7 +939,7 @@ namespace FFXIVClassic_Map_Server.Actors return null; } - public Actor getActorInInstance(uint actorId) + public Actor GetActorInInstance(uint actorId) { foreach (Actor a in playerSession.actorInstanceList) { @@ -958,27 +950,27 @@ namespace FFXIVClassic_Map_Server.Actors return null; } - public void setZoneChanging(bool flag) + public void SetZoneChanging(bool flag) { isZoneChanging = flag; } - public bool isInZoneChange() + public bool IsInZoneChange() { return isZoneChanging; } - public Equipment getEquipment() + public Equipment GetEquipment() { return equipment; } - public byte getInitialTown() + public byte GetInitialTown() { return playerWork.initialTown; } - public int getFreeQuestSlot() + public int GetFreeQuestSlot() { for (int i = 0; i < questScenario.Length; i++) { @@ -989,32 +981,32 @@ namespace FFXIVClassic_Map_Server.Actors return -1; } - public void addQuest(uint id) + public void AddQuest(uint id) { - Actor actor = Server.getStaticActors((0xA0F00000 | id)); - addQuest(actor.actorName); + Actor actor = Server.GetStaticActors((0xA0F00000 | id)); + AddQuest(actor.actorName); } - public void addQuest(string name) + public void AddQuest(string name) { - Actor actor = Server.getStaticActors(name); + Actor actor = Server.GetStaticActors(name); if (actor == null) return; uint id = actor.actorId; - int freeSlot = getFreeQuestSlot(); + int freeSlot = GetFreeQuestSlot(); if (freeSlot == -1) return; playerWork.questScenario[freeSlot] = id; questScenario[freeSlot] = new Quest(this, playerWork.questScenario[freeSlot], name, null, 0); - Database.saveQuest(this, questScenario[freeSlot]); + Database.SaveQuest(this, questScenario[freeSlot]); } - public Quest getQuest(uint id) + public Quest GetQuest(uint id) { for (int i = 0; i < questScenario.Length; i++) { @@ -1025,7 +1017,7 @@ namespace FFXIVClassic_Map_Server.Actors return null; } - public Quest getQuest(string name) + public Quest GetQuest(string name) { for (int i = 0; i < questScenario.Length; i++) { @@ -1036,7 +1028,7 @@ namespace FFXIVClassic_Map_Server.Actors return null; } - public bool hasQuest(string name) + public bool HasQuest(string name) { for (int i = 0; i < questScenario.Length; i++) { @@ -1047,7 +1039,7 @@ namespace FFXIVClassic_Map_Server.Actors return false; } - public bool hasQuest(uint id) + public bool HasQuest(uint id) { for (int i = 0; i < questScenario.Length; i++) { @@ -1058,7 +1050,7 @@ namespace FFXIVClassic_Map_Server.Actors return false; } - public int getQuestSlot(uint id) + public int GetQuestSlot(uint id) { for (int i = 0; i < questScenario.Length; i++) { @@ -1069,7 +1061,7 @@ namespace FFXIVClassic_Map_Server.Actors return -1; } - public void setDirector(string directorType, bool sendPackets) + public void SetDirector(string directorType, bool sendPackets) { if (directorType.Equals("openingDirector")) { @@ -1090,22 +1082,22 @@ namespace FFXIVClassic_Map_Server.Actors if (sendPackets) { - queuePacket(RemoveActorPacket.buildPacket(actorId, 0x46080012)); - queuePacket(currentDirector.getSpawnPackets(actorId)); - queuePacket(currentDirector.getInitPackets(actorId)); - //queuePacket(currentDirector.getSetEventStatusPackets(actorId)); - //currentDirector.getSpawnPackets(actorId).debugPrintPacket(); - //currentDirector.getInitPackets(actorId).debugPrintPacket(); + QueuePacket(RemoveActorPacket.BuildPacket(actorId, 0x46080012)); + QueuePacket(currentDirector.GetSpawnPackets(actorId)); + QueuePacket(currentDirector.GetInitPackets(actorId)); + //QueuePacket(currentDirector.GetSetEventStatusPackets(actorId)); + //currentDirector.GetSpawnPackets(actorId).DebugPrintPacket(); + //currentDirector.GetInitPackets(actorId).DebugPrintPacket(); } } - public Director getDirector() + public Director GetDirector() { return currentDirector; } - public void examinePlayer(Actor examinee) + public void ExaminePlayer(Actor examinee) { Player toBeExamined; if (examinee is Player) @@ -1113,79 +1105,79 @@ namespace FFXIVClassic_Map_Server.Actors else return; - queuePacket(InventoryBeginChangePacket.buildPacket(toBeExamined.actorId, actorId)); - toBeExamined.getEquipment().SendCheckEquipmentToPlayer(this); - queuePacket(InventoryEndChangePacket.buildPacket(toBeExamined.actorId, actorId)); + QueuePacket(InventoryBeginChangePacket.BuildPacket(toBeExamined.actorId, actorId)); + toBeExamined.GetEquipment().SendCheckEquipmentToPlayer(this); + QueuePacket(InventoryEndChangePacket.BuildPacket(toBeExamined.actorId, actorId)); } - public void sendRequestedInfo(params object[] parameters) + public void SendRequestedInfo(params object[] parameters) { - List lParams = LuaUtils.createLuaParamList(parameters); - SubPacket spacket = InfoRequestResponsePacket.buildPacket(actorId, actorId, lParams); - spacket.debugPrintSubPacket(); - queuePacket(spacket); + List lParams = LuaUtils.CreateLuaParamList(parameters); + SubPacket spacket = InfoRequestResponsePacket.BuildPacket(actorId, actorId, lParams); + spacket.DebugPrintSubPacket(); + QueuePacket(spacket); } - public void kickEvent(Actor actor, string conditionName, params object[] parameters) + public void KickEvent(Actor actor, string conditionName, params object[] parameters) { if (actor == null) return; - List lParams = LuaUtils.createLuaParamList(parameters); - SubPacket spacket = KickEventPacket.buildPacket(actorId, actor.actorId, conditionName, lParams); - spacket.debugPrintSubPacket(); - queuePacket(spacket); + List lParams = LuaUtils.CreateLuaParamList(parameters); + SubPacket spacket = KickEventPacket.BuildPacket(actorId, actor.actorId, conditionName, lParams); + spacket.DebugPrintSubPacket(); + QueuePacket(spacket); } - public void setEventStatus(Actor actor, string conditionName, bool enabled, byte unknown) + public void SetEventStatus(Actor actor, string conditionName, bool enabled, byte unknown) { - queuePacket(SetEventStatus.buildPacket(actorId, actor.actorId, enabled, unknown, conditionName)); + QueuePacket(packets.send.actor.events.SetEventStatus.BuildPacket(actorId, actor.actorId, enabled, unknown, conditionName)); } - public void runEventFunction(string functionName, params object[] parameters) + public void RunEventFunction(string functionName, params object[] parameters) { - List lParams = LuaUtils.createLuaParamList(parameters); - SubPacket spacket = RunEventFunctionPacket.buildPacket(actorId, currentEventOwner, currentEventName, functionName, lParams); - spacket.debugPrintSubPacket(); - queuePacket(spacket); + List lParams = LuaUtils.CreateLuaParamList(parameters); + SubPacket spacket = RunEventFunctionPacket.BuildPacket(actorId, currentEventOwner, currentEventName, functionName, lParams); + spacket.DebugPrintSubPacket(); + QueuePacket(spacket); } - public void endEvent() + public void EndEvent() { - SubPacket p = EndEventPacket.buildPacket(actorId, currentEventOwner, currentEventName); - p.debugPrintSubPacket(); - queuePacket(p); + SubPacket p = EndEventPacket.BuildPacket(actorId, currentEventOwner, currentEventName); + p.DebugPrintSubPacket(); + QueuePacket(p); currentEventOwner = 0; currentEventName = ""; eventMenuId = 0; } - public void endCommand() + public void EndCommand() { - SubPacket p = EndEventPacket.buildPacket(actorId, currentCommand, currentCommandName); - p.debugPrintSubPacket(); - queuePacket(p); + SubPacket p = EndEventPacket.BuildPacket(actorId, currentCommand, currentCommandName); + p.DebugPrintSubPacket(); + QueuePacket(p); currentCommand = 0; currentCommandName = ""; } - public void setCurrentMenuId(uint id) + public void SetCurrentMenuId(uint id) { eventMenuId = id; } - public uint getCurrentMenuId() + public uint GetCurrentMenuId() { return eventMenuId; } - public void sendInstanceUpdate() + public void SendInstanceUpdate() { //Update Instance - playerSession.updateInstance(zone.getActorsAroundActor(this, 50)); + playerSession.UpdateInstance(zone.GetActorsAroundActor(this, 50)); } diff --git a/FFXIVClassic Map Server/actors/chara/player/PlayerWork.cs b/FFXIVClassic Map Server/actors/chara/player/PlayerWork.cs index 050ec57d..b0b358cd 100644 --- a/FFXIVClassic Map Server/actors/chara/player/PlayerWork.cs +++ b/FFXIVClassic Map Server/actors/chara/player/PlayerWork.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.dataobjects.chara +namespace FFXIVClassic_Map_Server.dataobjects.chara { class PlayerWork { diff --git a/FFXIVClassic Map Server/actors/command/Command.cs b/FFXIVClassic Map Server/actors/command/Command.cs index 03e4e064..f4f0a538 100644 --- a/FFXIVClassic Map Server/actors/command/Command.cs +++ b/FFXIVClassic Map Server/actors/command/Command.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.Actors +namespace FFXIVClassic_Map_Server.Actors { class Command : Actor { diff --git a/FFXIVClassic Map Server/actors/debug/Debug.cs b/FFXIVClassic Map Server/actors/debug/Debug.cs index 1fbb3d59..8c84c223 100644 --- a/FFXIVClassic Map Server/actors/debug/Debug.cs +++ b/FFXIVClassic Map Server/actors/debug/Debug.cs @@ -1,12 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.packets.send.actor; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.Actors { @@ -23,24 +18,24 @@ namespace FFXIVClassic_Map_Server.Actors this.className = "Debug"; } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; - lParams = LuaUtils.createLuaParamList("/System/Debug.prog", false, false, false, false, true, 0xC51F, true, true); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams); + lParams = LuaUtils.CreateLuaParamList("/System/Debug.prog", false, false, false, false, true, 0xC51F, true, true); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); } - public override BasePacket getSpawnPackets(uint playerActorId) + public override BasePacket GetSpawnPackets(uint playerActorId) { List subpackets = new List(); - subpackets.Add(createAddActorPacket(playerActorId, 0)); - subpackets.Add(createSpeedPacket(playerActorId)); - subpackets.Add(createSpawnPositonPacket(playerActorId, 0x1)); - subpackets.Add(createNamePacket(playerActorId)); - subpackets.Add(createStatePacket(playerActorId)); - subpackets.Add(createIsZoneingPacket(playerActorId)); - subpackets.Add(createScriptBindPacket(playerActorId)); - return BasePacket.createPacket(subpackets, true, false); + subpackets.Add(CreateAddActorPacket(playerActorId, 0)); + subpackets.Add(CreateSpeedPacket(playerActorId)); + subpackets.Add(CreateSpawnPositonPacket(playerActorId, 0x1)); + subpackets.Add(CreateNamePacket(playerActorId)); + subpackets.Add(CreateStatePacket(playerActorId)); + subpackets.Add(CreateIsZoneingPacket(playerActorId)); + subpackets.Add(CreateScriptBindPacket(playerActorId)); + return BasePacket.CreatePacket(subpackets, true, false); } } diff --git a/FFXIVClassic Map Server/actors/director/Director.cs b/FFXIVClassic Map Server/actors/director/Director.cs index 4ae68542..fb50c3c8 100644 --- a/FFXIVClassic Map Server/actors/director/Director.cs +++ b/FFXIVClassic Map Server/actors/director/Director.cs @@ -1,12 +1,8 @@ -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.packets.send.actor; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.actors.director { @@ -19,35 +15,35 @@ namespace FFXIVClassic_Map_Server.actors.director this.owner = owner; } - public virtual BasePacket getSpawnPackets(uint playerActorId, uint spawnType) + public virtual BasePacket GetSpawnPackets(uint playerActorId, uint spawnType) { List subpackets = new List(); - subpackets.Add(createAddActorPacket(playerActorId, 0)); - subpackets.AddRange(getEventConditionPackets(playerActorId)); - subpackets.Add(createSpeedPacket(playerActorId)); - subpackets.Add(createSpawnPositonPacket(playerActorId, 0)); - subpackets.Add(createNamePacket(playerActorId)); - subpackets.Add(createStatePacket(playerActorId)); - subpackets.Add(createIsZoneingPacket(playerActorId)); - subpackets.Add(createScriptBindPacket(playerActorId)); - return BasePacket.createPacket(subpackets, true, false); + subpackets.Add(CreateAddActorPacket(playerActorId, 0)); + subpackets.AddRange(GetEventConditionPackets(playerActorId)); + subpackets.Add(CreateSpeedPacket(playerActorId)); + subpackets.Add(CreateSpawnPositonPacket(playerActorId, 0)); + subpackets.Add(CreateNamePacket(playerActorId)); + subpackets.Add(CreateStatePacket(playerActorId)); + subpackets.Add(CreateIsZoneingPacket(playerActorId)); + subpackets.Add(CreateScriptBindPacket(playerActorId)); + return BasePacket.CreatePacket(subpackets, true, false); } - public override BasePacket getInitPackets(uint playerActorId) + public override BasePacket GetInitPackets(uint playerActorId) { SetActorPropetyPacket initProperties = new SetActorPropetyPacket("/_init"); - initProperties.addTarget(); - return BasePacket.createPacket(initProperties.buildPacket(playerActorId, actorId), true, false); + initProperties.AddTarget(); + return BasePacket.CreatePacket(initProperties.BuildPacket(playerActorId, actorId), true, false); } - public void onTalked(Npc npc) + public void OnTalked(Npc npc) { - LuaEngine.doDirectorOnTalked(this, owner, npc); + LuaEngine.DoDirectorOnTalked(this, owner, npc); } - public void onCommand(Command command) + public void OnCommand(Command command) { - LuaEngine.doDirectorOnCommand(this, owner, command); + LuaEngine.DoDirectorOnCommand(this, owner, command); } } diff --git a/FFXIVClassic Map Server/actors/director/OpeningDirector.cs b/FFXIVClassic Map Server/actors/director/OpeningDirector.cs index 67d35c6c..c47f18b5 100644 --- a/FFXIVClassic Map Server/actors/director/OpeningDirector.cs +++ b/FFXIVClassic Map Server/actors/director/OpeningDirector.cs @@ -1,12 +1,9 @@ -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.packets.send.actor; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.actors.director { @@ -33,11 +30,11 @@ namespace FFXIVClassic_Map_Server.actors.director this.eventConditions.noticeEventConditions = noticeEventList; } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; - lParams = LuaUtils.createLuaParamList("/Director/OpeningDirector", false, false, false, false, 0x13881); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams); + lParams = LuaUtils.CreateLuaParamList("/Director/OpeningDirector", false, false, false, false, 0x13881); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); } } } diff --git a/FFXIVClassic Map Server/actors/director/WeatherDirector.cs b/FFXIVClassic Map Server/actors/director/WeatherDirector.cs index 0aa0917a..2ce196f9 100644 --- a/FFXIVClassic Map Server/actors/director/WeatherDirector.cs +++ b/FFXIVClassic Map Server/actors/director/WeatherDirector.cs @@ -1,13 +1,9 @@ -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.actors.director; -using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.packets.send.actor; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.Actors { @@ -29,24 +25,24 @@ namespace FFXIVClassic_Map_Server.Actors this.className = "Debug"; } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; - lParams = LuaUtils.createLuaParamList("/Director/Weather/WeatherDirector", false, false, false, false, weatherId); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams); + lParams = LuaUtils.CreateLuaParamList("/Director/Weather/WeatherDirector", false, false, false, false, weatherId); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); } - public override BasePacket getSpawnPackets(uint playerActorId) + public override BasePacket GetSpawnPackets(uint playerActorId) { List subpackets = new List(); - subpackets.Add(createAddActorPacket(playerActorId, 0)); - subpackets.Add(createSpeedPacket(playerActorId)); - subpackets.Add(createSpawnPositonPacket(playerActorId, 0x1)); - subpackets.Add(createNamePacket(playerActorId)); - subpackets.Add(createStatePacket(playerActorId)); - subpackets.Add(createIsZoneingPacket(playerActorId)); - subpackets.Add(createScriptBindPacket(playerActorId)); - return BasePacket.createPacket(subpackets, true, false); + subpackets.Add(CreateAddActorPacket(playerActorId, 0)); + subpackets.Add(CreateSpeedPacket(playerActorId)); + subpackets.Add(CreateSpawnPositonPacket(playerActorId, 0x1)); + subpackets.Add(CreateNamePacket(playerActorId)); + subpackets.Add(CreateStatePacket(playerActorId)); + subpackets.Add(CreateIsZoneingPacket(playerActorId)); + subpackets.Add(CreateScriptBindPacket(playerActorId)); + return BasePacket.CreatePacket(subpackets, true, false); } } } diff --git a/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0g001.cs b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0g001.cs index 51908902..a5404dd6 100644 --- a/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0g001.cs +++ b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0g001.cs @@ -1,12 +1,8 @@ -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.packets.send.actor; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.actors.director { @@ -31,11 +27,11 @@ namespace FFXIVClassic_Map_Server.actors.director this.eventConditions.noticeEventConditions = noticeEventList; } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; - lParams = LuaUtils.createLuaParamList("/Director/Quest/QuestDirectorMan0g001", false, false, false, false, false, 0x753A); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams); + lParams = LuaUtils.CreateLuaParamList("/Director/Quest/QuestDirectorMan0g001", false, false, false, false, false, 0x753A); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); } } } diff --git a/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0l001.cs b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0l001.cs index 2d5d1aec..821bcb86 100644 --- a/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0l001.cs +++ b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0l001.cs @@ -1,12 +1,8 @@ -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.packets.send.actor; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.actors.director { @@ -31,11 +27,11 @@ namespace FFXIVClassic_Map_Server.actors.director this.eventConditions.noticeEventConditions = noticeEventList; } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; - lParams = LuaUtils.createLuaParamList("/Director/Quest/QuestDirectorMan0l001", false, false, false, false, false, 0x7532); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams); + lParams = LuaUtils.CreateLuaParamList("/Director/Quest/QuestDirectorMan0l001", false, false, false, false, false, 0x7532); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); } } } diff --git a/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0u001.cs b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0u001.cs index 2a860b05..1c581b3b 100644 --- a/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0u001.cs +++ b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0u001.cs @@ -1,12 +1,8 @@ -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.packets.send.actor; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.actors.director { @@ -31,11 +27,11 @@ namespace FFXIVClassic_Map_Server.actors.director this.eventConditions.noticeEventConditions = noticeEventList; } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; - lParams = LuaUtils.createLuaParamList("/Director/Quest/QuestDirectorMan0u001", false, false, false, false, false, 0x757F); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams); + lParams = LuaUtils.CreateLuaParamList("/Director/Quest/QuestDirectorMan0u001", false, false, false, false, false, 0x757F); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); } } } diff --git a/FFXIVClassic Map Server/actors/judge/Judge.cs b/FFXIVClassic Map Server/actors/judge/Judge.cs index b2ab5531..6e12a12a 100644 --- a/FFXIVClassic Map Server/actors/judge/Judge.cs +++ b/FFXIVClassic Map Server/actors/judge/Judge.cs @@ -1,11 +1,4 @@ -using FFXIVClassic_Map_Server.dataobjects; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.Actors +namespace FFXIVClassic_Map_Server.Actors { class Judge : Actor { diff --git a/FFXIVClassic Map Server/actors/quest/Quest.cs b/FFXIVClassic Map Server/actors/quest/Quest.cs index 8a6469e5..4baa6899 100644 --- a/FFXIVClassic Map Server/actors/quest/Quest.cs +++ b/FFXIVClassic Map Server/actors/quest/Quest.cs @@ -1,5 +1,4 @@ -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using Newtonsoft.Json; using System; using System.Collections.Generic; @@ -69,7 +68,7 @@ namespace FFXIVClassic_Map_Server.Actors { if (bitIndex >= 32) { - Log.error(String.Format("Tried to access bit flag >= 32 for questId: {0}", actorId)); + Program.Log.Error("Tried to access bit flag >= 32 for questId: {0}", actorId); return; } @@ -87,7 +86,7 @@ namespace FFXIVClassic_Map_Server.Actors { if (bitIndex >= 32) { - Log.error(String.Format("Tried to access bit flag >= 32 for questId: {0}", actorId)); + Program.Log.Error("Tried to access bit flag >= 32 for questId: {0}", actorId); return false; } else @@ -116,7 +115,7 @@ namespace FFXIVClassic_Map_Server.Actors public void SaveData() { - Database.saveQuest(owner, this); + Database.SaveQuest(owner, this); } } diff --git a/FFXIVClassic Map Server/actors/world/WorldMaster.cs b/FFXIVClassic Map Server/actors/world/WorldMaster.cs index 8d0b2cc1..fd2a4a6a 100644 --- a/FFXIVClassic Map Server/actors/world/WorldMaster.cs +++ b/FFXIVClassic Map Server/actors/world/WorldMaster.cs @@ -1,12 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.packets.send.actor; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.Actors { @@ -21,24 +16,24 @@ namespace FFXIVClassic_Map_Server.Actors this.className = "WorldMaster"; } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; - lParams = LuaUtils.createLuaParamList("/World/WorldMaster_event", false, false, false, false, false, null); - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams); + lParams = LuaUtils.CreateLuaParamList("/World/WorldMaster_event", false, false, false, false, false, null); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); } - public override BasePacket getSpawnPackets(uint playerActorId) + public override BasePacket GetSpawnPackets(uint playerActorId) { List subpackets = new List(); - subpackets.Add(createAddActorPacket(playerActorId, 0)); - subpackets.Add(createSpeedPacket(playerActorId)); - subpackets.Add(createSpawnPositonPacket(playerActorId, 0x1)); - subpackets.Add(createNamePacket(playerActorId)); - subpackets.Add(createStatePacket(playerActorId)); - subpackets.Add(createIsZoneingPacket(playerActorId)); - subpackets.Add(createScriptBindPacket(playerActorId)); - return BasePacket.createPacket(subpackets, true, false); + subpackets.Add(CreateAddActorPacket(playerActorId, 0)); + subpackets.Add(CreateSpeedPacket(playerActorId)); + subpackets.Add(CreateSpawnPositonPacket(playerActorId, 0x1)); + subpackets.Add(CreateNamePacket(playerActorId)); + subpackets.Add(CreateStatePacket(playerActorId)); + subpackets.Add(CreateIsZoneingPacket(playerActorId)); + subpackets.Add(CreateScriptBindPacket(playerActorId)); + return BasePacket.CreatePacket(subpackets, true, false); } } } diff --git a/FFXIVClassic Map Server/common/Bitfield.cs b/FFXIVClassic Map Server/common/Bitfield.cs deleted file mode 100644 index d4e885a0..00000000 --- a/FFXIVClassic Map Server/common/Bitfield.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Lobby_Server.common -{ - [global::System.AttributeUsage(AttributeTargets.Field, AllowMultiple = false)] - sealed class BitfieldLengthAttribute : Attribute - { - uint length; - - public BitfieldLengthAttribute(uint length) - { - this.length = length; - } - - public uint Length { get { return length; } } - } - - static class PrimitiveConversion - { - public static UInt32 ToUInt32(T t) where T : struct - { - UInt32 r = 0; - int offset = 0; - - // For every field suitably attributed with a BitfieldLength - foreach (System.Reflection.FieldInfo f in t.GetType().GetFields()) - { - object[] attrs = f.GetCustomAttributes(typeof(BitfieldLengthAttribute), false); - if (attrs.Length == 1) - { - uint fieldLength = ((BitfieldLengthAttribute)attrs[0]).Length; - - // Calculate a bitmask of the desired length - uint mask = 0; - for (int i = 0; i < fieldLength; i++) - mask |= (UInt32)1 << i; - - r |= ((UInt32)f.GetValue(t) & mask) << offset; - - offset += (int)fieldLength; - } - } - - return r; - } - - public static long ToLong(T t) where T : struct - { - long r = 0; - int offset = 0; - - // For every field suitably attributed with a BitfieldLength - foreach (System.Reflection.FieldInfo f in t.GetType().GetFields()) - { - object[] attrs = f.GetCustomAttributes(typeof(BitfieldLengthAttribute), false); - if (attrs.Length == 1) - { - uint fieldLength = ((BitfieldLengthAttribute)attrs[0]).Length; - - // Calculate a bitmask of the desired length - long mask = 0; - for (int i = 0; i < fieldLength; i++) - mask |= 1 << i; - - r |= ((UInt32)f.GetValue(t) & mask) << offset; - - offset += (int)fieldLength; - } - } - - return r; - } - } -} \ No newline at end of file diff --git a/FFXIVClassic Map Server/common/Log.cs b/FFXIVClassic Map Server/common/Log.cs deleted file mode 100644 index 5c127a25..00000000 --- a/FFXIVClassic Map Server/common/Log.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Lobby_Server.common -{ - class Log - { - public static void error(String message) - { - Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm")); - Console.ForegroundColor = ConsoleColor.Red; - Console.Write("[ERROR] "); - Console.ForegroundColor = ConsoleColor.Gray ; - Console.WriteLine(message); - } - - public static void debug(String message) - { -#if DEBUG - Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm")); - Console.ForegroundColor = ConsoleColor.Yellow; - Console.Write("[DEBUG] "); - Console.ForegroundColor = ConsoleColor.Gray; - Console.WriteLine(message); -#endif - } - - public static void info(String message) - { - Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm")); - Console.ForegroundColor = ConsoleColor.Cyan; - Console.Write("[INFO] "); - Console.ForegroundColor = ConsoleColor.Gray; - Console.WriteLine(message); - } - - public static void database(String message) - { - Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm")); - Console.ForegroundColor = ConsoleColor.Magenta; - Console.Write("[SQL] "); - Console.ForegroundColor = ConsoleColor.Gray; - Console.WriteLine(message); - } - - public static void conn(String message) - { - Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm")); - Console.ForegroundColor = ConsoleColor.Green; - Console.Write("[CONN] "); - Console.ForegroundColor = ConsoleColor.Gray; - Console.WriteLine(message); - } - } -} diff --git a/FFXIVClassic Map Server/common/Utils.cs b/FFXIVClassic Map Server/common/Utils.cs deleted file mode 100644 index 0fb85fa0..00000000 --- a/FFXIVClassic Map Server/common/Utils.cs +++ /dev/null @@ -1,316 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Lobby_Server.common -{ - static class Utils - { - private static readonly uint[] _lookup32 = CreateLookup32(); - - private static uint[] CreateLookup32() - { - var result = new uint[256]; - for (int i = 0; i < 256; i++) - { - string s = i.ToString("X2"); - result[i] = ((uint)s[0]) + ((uint)s[1] << 16); - } - return result; - } - - public static string ByteArrayToHex(byte[] bytes) - { - var lookup32 = _lookup32; - var result = new char[(bytes.Length * 3) + ((bytes.Length/16) < 1 ? 1 : (bytes.Length/16)*3) + bytes.Length+60]; - int numNewLines = 0; - for (int i = 0; i < bytes.Length; i++) - { - var val = lookup32[bytes[i]]; - result[(3 * i) + (17 * numNewLines) + 0] = (char)val; - result[(3 * i) + (17 * numNewLines) + 1] = (char)(val >> 16); - result[(3 * i) + (17 * numNewLines) + 2] = ' '; - - result[(numNewLines * (3*16+17)) + (3 * 16) + (i % 16)] = (char)bytes[i] >= 32 && (char)bytes[i] <= 126 ? (char)bytes[i] : '.'; - - if (i != bytes.Length - 1 && bytes.Length > 16 && i != 0 && (i+1) % 16 == 0) - { - result[(numNewLines * (3*16+17)) + (3 * 16) + (16)] = '\n'; - numNewLines++; - } - - } - return new string(result); - } - - public static UInt32 UnixTimeStampUTC() - { - UInt32 unixTimeStamp; - DateTime currentTime = DateTime.Now; - DateTime zuluTime = currentTime.ToUniversalTime(); - DateTime unixEpoch = new DateTime(1970, 1, 1); - unixTimeStamp = (UInt32)(zuluTime.Subtract(unixEpoch)).TotalSeconds; - - return unixTimeStamp; - } - - public static UInt64 MilisUnixTimeStampUTC() - { - UInt64 unixTimeStamp; - DateTime currentTime = DateTime.Now; - DateTime zuluTime = currentTime.ToUniversalTime(); - DateTime unixEpoch = new DateTime(1970, 1, 1); - unixTimeStamp = (UInt64)(zuluTime.Subtract(unixEpoch)).TotalMilliseconds; - - return unixTimeStamp; - } - - public static ulong swapEndian(ulong input) - { - return ((0x00000000000000FF) & (input >> 56) | - (0x000000000000FF00) & (input >> 40) | - (0x0000000000FF0000) & (input >> 24) | - (0x00000000FF000000) & (input >> 8) | - (0x000000FF00000000) & (input << 8) | - (0x0000FF0000000000) & (input << 24) | - (0x00FF000000000000) & (input << 40) | - (0xFF00000000000000) & (input << 56)); - } - - public static uint swapEndian(uint input) - { - return ((input >> 24) & 0xff) | - ((input << 8) & 0xff0000) | - ((input >> 8) & 0xff00) | - ((input << 24) & 0xff000000); - } - - public static int swapEndian(int input) - { - uint inputAsUint = (uint)input; - - input = (int) - (((inputAsUint >> 24) & 0xff) | - ((inputAsUint << 8) & 0xff0000) | - ((inputAsUint >> 8) & 0xff00) | - ((inputAsUint << 24) & 0xff000000)); - - return input; - } - - public static uint MurmurHash2(string key, uint seed) - { - // 'm' and 'r' are mixing constants generated offline. - // They're not really 'magic', they just happen to work well. - - byte[] data = Encoding.ASCII.GetBytes(key); - const uint m = 0x5bd1e995; - const int r = 24; - int len = key.Length; - int dataIndex = len - 4; - - // Initialize the hash to a 'random' value - - uint h = seed ^ (uint)len; - - // Mix 4 bytes at a time into the hash - - - while (len >= 4) - { - h *= m; - - uint k = (uint)BitConverter.ToInt32(data, dataIndex); - k = ((k >> 24) & 0xff) | // move byte 3 to byte 0 - ((k << 8) & 0xff0000) | // move byte 1 to byte 2 - ((k >> 8) & 0xff00) | // move byte 2 to byte 1 - ((k << 24) & 0xff000000); // byte 0 to byte 3 - - k *= m; - k ^= k >> r; - k *= m; - - h ^= k; - - dataIndex -= 4; - len -= 4; - } - - // Handle the last few bytes of the input array - switch (len) - { - case 3: - h ^= (uint)data[0] << 16; goto case 2; - case 2: - h ^= (uint)data[len-2] << 8; goto case 1; - case 1: - h ^= data[len-1]; - h *= m; - break; - }; - - // Do a few final mixes of the hash to ensure the last few - // bytes are well-incorporated. - - h ^= h >> 13; - h *= m; - h ^= h >> 15; - - return h; - } - - public static byte[] ConvertBoolArrayToBinaryStream(bool[] array) - { - byte[] data = new byte[(array.Length/8)+(array.Length%8 != 0 ? 1 : 0)]; - - int dataCounter = 0; - for (int i = 0; i < array.Length; i+=8) - { - for (int bitCount = 0; bitCount < 8; bitCount++) - { - if (i + bitCount >= array.Length) - break; - data[dataCounter] = (byte)(((array[i + bitCount] ? 1 : 0) << 7-bitCount) | data[dataCounter]); - } - dataCounter++; - } - - return data; - } - - public static string FFXIVLoginStringDecodeBinary(string path) - { - Console.OutputEncoding = System.Text.Encoding.UTF8; - byte[] data = File.ReadAllBytes(path); - int offset = 0x5405a; - //int offset = 0x5425d; - //int offset = 0x53ea0; - while (true) - { - string result = ""; - uint key = (uint)data[offset + 0] << 8 | data[offset+1]; - uint key2 = data[offset + 2]; - key = RotateRight(key, 1) & 0xFFFF; - key -= 0x22AF; - key &= 0xFFFF; - key2 = key2 ^ key; - key = RotateRight(key, 1) & 0xFFFF; - key -= 0x22AF; - key &= 0xFFFF; - uint finalKey = key; - key = data[offset + 3]; - uint count = (key2 & 0xFF) << 8; - key = key ^ finalKey; - key &= 0xFF; - count |= key; - - int count2 = 0; - while (count != 0) - { - uint encrypted = data[offset + 4 + count2]; - finalKey = RotateRight(finalKey, 1) & 0xFFFF; - finalKey -= 0x22AF; - finalKey &= 0xFFFF; - encrypted = encrypted ^ (finalKey & 0xFF); - - result += (char)encrypted; - count--; - count2++; - } - - offset += 4 + count2; - - Console.WriteLine(result); - } - } - - public static string FFXIVLoginStringDecode(byte[] data) - { - string result = ""; - uint key = (uint)data[0] << 8 | data[1]; - uint key2 = data[2]; - key = RotateRight(key, 1) & 0xFFFF; - key -= 0x22AF; - key2 = key2 ^ key; - key = RotateRight(key, 1) & 0xFFFF; - key -= 0x22AF; - uint finalKey = key; - key = data[3]; - uint count = (key2 & 0xFF) << 8; - key = key ^ finalKey; - key &= 0xFF; - count |= key; - - int count2 = 0; - while (count != 0) - { - uint encrypted = data[4 + count2]; - finalKey = RotateRight(finalKey, 1) & 0xFFFF; - finalKey -= 0x22AF; - encrypted = encrypted ^ (finalKey & 0xFF); - result += (char)encrypted; - count--; - count2++; - } - - return result; - } - - public static byte[] FFXIVLoginStringEncode(uint key, string text) - { - key = key & 0xFFFF; - - uint count = 0; - byte[] asciiBytes = Encoding.ASCII.GetBytes(text); - byte[] result = new byte[4 + text.Length]; - for (count = 0; count < text.Length; count++) - { - result[result.Length - count - 1] = (byte)(asciiBytes[asciiBytes.Length - count - 1] ^ (key & 0xFF)); - key += 0x22AF; - key &= 0xFFFF; - key = RotateLeft(key, 1) & 0xFFFF; - } - - count = count ^ key; - result[3] = (byte) (count & 0xFF); - - key += 0x22AF & 0xFFFF; - key = RotateLeft(key, 1) & 0xFFFF; - - result[2] = (byte)(key & 0xFF); - - key += 0x22AF & 0xFFFF; - key = RotateLeft(key, 1) & 0xFFFF; - - - result[1] = (byte)(key & 0xFF); - result[0] = (byte)((key >> 8) & 0xFF); - - return result; - } - - public static uint RotateLeft(uint value, int bits) - { - return (value << bits) | (value >> (16 - bits)); - } - - public static uint RotateRight(uint value, int bits) - { - return (value >> bits) | (value << (16 - bits)); - } - - - public static string ToStringBase63(int number) - { - string lookup = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - - string secondDigit = lookup.Substring((int)Math.Floor((double)number / (double)lookup.Length), 1); - string firstDigit = lookup.Substring(number % lookup.Length, 1); - - return secondDigit + firstDigit; - } - } -} diff --git a/FFXIVClassic Map Server/dataobjects/ConnectedPlayer.cs b/FFXIVClassic Map Server/dataobjects/ConnectedPlayer.cs index ba16c96d..f5eef9a4 100644 --- a/FFXIVClassic Map Server/dataobjects/ConnectedPlayer.cs +++ b/FFXIVClassic Map Server/dataobjects/ConnectedPlayer.cs @@ -1,6 +1,6 @@ -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic_Map_Server; +using FFXIVClassic.Common; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.packets.send.actor; @@ -34,7 +34,7 @@ namespace FFXIVClassic_Map_Server.dataobjects actorInstanceList.Add(playerActor); } - public void setConnection(int type, ClientConnection conn) + public void SetConnection(int type, ClientConnection conn) { conn.connType = type; switch (type) @@ -48,55 +48,55 @@ namespace FFXIVClassic_Map_Server.dataobjects } } - public bool isClientConnectionsReady() + public bool IsClientConnectionsReady() { return (zoneConnection != null && chatConnection != null); } - public void disconnect() + public void Disconnect() { - zoneConnection.disconnect(); - chatConnection.disconnect(); + zoneConnection.Disconnect(); + chatConnection.Disconnect(); } - public bool isDisconnected() + public bool IsDisconnected() { - return (!zoneConnection.isConnected() && !chatConnection.isConnected()); + return (!zoneConnection.IsConnected() && !chatConnection.IsConnected()); } - public void queuePacket(BasePacket basePacket) + public void QueuePacket(BasePacket basePacket) { - zoneConnection.queuePacket(basePacket); + zoneConnection.QueuePacket(basePacket); } - public void queuePacket(SubPacket subPacket, bool isAuthed, bool isEncrypted) + public void QueuePacket(SubPacket subPacket, bool isAuthed, bool isEncrypted) { - zoneConnection.queuePacket(subPacket, isAuthed, isEncrypted); + zoneConnection.QueuePacket(subPacket, isAuthed, isEncrypted); } - public Player getActor() + public Player GetActor() { return playerActor; } - public void ping() + public void Ping() { lastPingPacket = Utils.UnixTimeStampUTC(); } - public bool checkIfDCing() + public bool CheckIfDCing() { uint currentTime = Utils.UnixTimeStampUTC(); if (currentTime - lastPingPacket >= 5000) //Show D/C flag - playerActor.setDCFlag(true); + playerActor.SetDCFlag(true); else if (currentTime - lastPingPacket >= 30000) //DCed return true; else - playerActor.setDCFlag(false); + playerActor.SetDCFlag(false); return false; } - public void updatePlayerActorPosition(float x, float y, float z, float rot, ushort moveState) + public void UpdatePlayerActorPosition(float x, float y, float z, float rot, ushort moveState) { playerActor.oldPositionX = playerActor.positionX; playerActor.oldPositionY = playerActor.positionY; @@ -109,14 +109,14 @@ namespace FFXIVClassic_Map_Server.dataobjects playerActor.rotation = rot; playerActor.moveState = moveState; - getActor().zone.updateActorPosition(getActor()); + GetActor().zone.UpdateActorPosition(GetActor()); } - public void updateInstance(List list) + public void UpdateInstance(List list) { List basePackets = new List(); - List removeActorSubpackets = new List(); + List RemoveActorSubpackets = new List(); List posUpdateSubpackets = new List(); //Remove missing actors @@ -124,7 +124,7 @@ namespace FFXIVClassic_Map_Server.dataobjects { if (!list.Contains(actorInstanceList[i])) { - getActor().queuePacket(RemoveActorPacket.buildPacket(playerActor.actorId, actorInstanceList[i].actorId)); + GetActor().QueuePacket(RemoveActorPacket.BuildPacket(playerActor.actorId, actorInstanceList[i].actorId)); actorInstanceList.RemoveAt(i); } } @@ -139,13 +139,13 @@ namespace FFXIVClassic_Map_Server.dataobjects if (actorInstanceList.Contains(actor)) { - getActor().queuePacket(actor.createPositionUpdatePacket(playerActor.actorId)); + GetActor().QueuePacket(actor.CreatePositionUpdatePacket(playerActor.actorId)); } else { - getActor().queuePacket(actor.getSpawnPackets(playerActor.actorId, 1)); - getActor().queuePacket(actor.getInitPackets(playerActor.actorId)); - getActor().queuePacket(actor.getSetEventStatusPackets(playerActor.actorId)); + GetActor().QueuePacket(actor.GetSpawnPackets(playerActor.actorId, 1)); + GetActor().QueuePacket(actor.GetInitPackets(playerActor.actorId)); + GetActor().QueuePacket(actor.GetSetEventStatusPackets(playerActor.actorId)); actorInstanceList.Add(actor); if (actor is Npc) @@ -158,7 +158,7 @@ namespace FFXIVClassic_Map_Server.dataobjects } - public void clearInstance() + public void ClearInstance() { actorInstanceList.Clear(); } diff --git a/FFXIVClassic Map Server/dataobjects/DBWorld.cs b/FFXIVClassic Map Server/dataobjects/DBWorld.cs index 6b135ccd..4cad9ca3 100644 --- a/FFXIVClassic Map Server/dataobjects/DBWorld.cs +++ b/FFXIVClassic Map Server/dataobjects/DBWorld.cs @@ -1,15 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Lobby_Server.dataobjects +namespace FFXIVClassic_Map_Server.dataobjects { class DBWorld { public ushort id; - public string address; + public string Address; public ushort port; public ushort listPosition; public ushort population; diff --git a/FFXIVClassic Map Server/dataobjects/InventoryItem.cs b/FFXIVClassic Map Server/dataobjects/InventoryItem.cs index a916018d..aec328be 100644 --- a/FFXIVClassic Map Server/dataobjects/InventoryItem.cs +++ b/FFXIVClassic Map Server/dataobjects/InventoryItem.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.dataobjects { @@ -35,7 +30,7 @@ namespace FFXIVClassic_Map_Server.dataobjects this.quantity = 1; this.slot = slot; - Item gItem = Server.getItemGamedata(itemId); + Item gItem = Server.GetItemGamedata(itemId); itemType = gItem.isExclusive ? (byte)0x3 : (byte)0x0; } @@ -77,7 +72,7 @@ namespace FFXIVClassic_Map_Server.dataobjects this.materia5 = materia5; } - public byte[] toPacketBytes() + public byte[] ToPacketBytes() { byte[] data = new byte[0x70]; diff --git a/FFXIVClassic Map Server/dataobjects/Item.cs b/FFXIVClassic Map Server/dataobjects/Item.cs index e57ab02a..b9240aa7 100644 --- a/FFXIVClassic Map Server/dataobjects/Item.cs +++ b/FFXIVClassic Map Server/dataobjects/Item.cs @@ -1,9 +1,5 @@ using MySql.Data.MySqlClient; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.dataobjects { @@ -382,7 +378,7 @@ namespace FFXIVClassic_Map_Server.dataobjects return -1; } - public double getItemHQValue(float value1, float value2) + public Double GetItemHQValue(float value1, float value2) { return Math.Max(value1 + 1, Math.Ceiling(value1 * value2)); } @@ -424,7 +420,7 @@ namespace FFXIVClassic_Map_Server.dataobjects public readonly int paramBonusType10; public readonly short paramBonusValue10; - public readonly short additionalEffect; + public readonly short AdditionalEffect; public readonly bool materialBindPermission; public readonly short materializeTable; @@ -463,7 +459,7 @@ namespace FFXIVClassic_Map_Server.dataobjects paramBonusType10 = reader.GetInt32("paramBonusType10"); paramBonusValue10 = reader.GetInt16("paramBonusValue10"); - additionalEffect = reader.GetInt16("additionalEffect"); + AdditionalEffect = reader.GetInt16("additionalEffect"); materialBindPermission = reader.GetBoolean("materiaBindPermission"); materializeTable = reader.GetInt16("materializeTable"); } diff --git a/FFXIVClassic Map Server/dataobjects/RecruitmentDetails.cs b/FFXIVClassic Map Server/dataobjects/RecruitmentDetails.cs index 9acc647b..af32614e 100644 --- a/FFXIVClassic Map Server/dataobjects/RecruitmentDetails.cs +++ b/FFXIVClassic Map Server/dataobjects/RecruitmentDetails.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.dataobjects +namespace FFXIVClassic_Map_Server.dataobjects { class RecruitmentDetails { diff --git a/FFXIVClassic Map Server/dataobjects/SearchEntry.cs b/FFXIVClassic Map Server/dataobjects/SearchEntry.cs index ad94a040..d272a1bf 100644 --- a/FFXIVClassic Map Server/dataobjects/SearchEntry.cs +++ b/FFXIVClassic Map Server/dataobjects/SearchEntry.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.dataobjects { @@ -19,7 +16,7 @@ namespace FFXIVClassic_Map_Server.dataobjects public ushort[] classes = new ushort[2 * 20]; public ushort[] jobs = new ushort[8]; - public void writeSearchEntry(BinaryWriter writer) + public void WriteSearchEntry(BinaryWriter writer) { writer.Write((UInt16)preferredClass); writer.Write((UInt16)langauges); diff --git a/FFXIVClassic Map Server/lua/LuaEngine.cs b/FFXIVClassic Map Server/lua/LuaEngine.cs index 43b31670..fef4e299 100644 --- a/FFXIVClassic Map Server/lua/LuaEngine.cs +++ b/FFXIVClassic Map Server/lua/LuaEngine.cs @@ -1,6 +1,5 @@ -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic.Common; +using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.actors.director; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.dataobjects; @@ -13,9 +12,6 @@ using MoonSharp.Interpreter.Loaders; using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.lua { @@ -32,27 +28,27 @@ namespace FFXIVClassic_Map_Server.lua UserData.RegistrationPolicy = InteropRegistrationPolicy.Automatic; } - public static List doActorInstantiate(Player player, Actor target) + public static List DoActorInstantiate(Player player, Actor target) { string luaPath; if (target is Npc) { - luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.getName()); + luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.GetName()); if (File.Exists(luaPath)) { - Script script = loadScript(luaPath); + Script script = LoadScript(luaPath); if (script == null) return null; DynValue result = script.Call(script.Globals["init"], target); - List lparams = LuaUtils.createLuaParamList(result); + List lparams = LuaUtils.CreateLuaParamList(result); return lparams; } else { - SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.getName())); + SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName())); return null; } } @@ -60,7 +56,7 @@ namespace FFXIVClassic_Map_Server.lua return null; } - public static void doActorOnEventStarted(Player player, Actor target, EventStartPacket eventStart) + public static void DoActorOnEventStarted(Player player, Actor target, EventStartPacket eventStart) { if (target is Npc) { @@ -72,30 +68,30 @@ namespace FFXIVClassic_Map_Server.lua if (target is Command) { - luaPath = String.Format(FILEPATH_COMMANDS, target.getName()); + luaPath = String.Format(FILEPATH_COMMANDS, target.GetName()); } else if (target is Director) { - luaPath = String.Format(FILEPATH_DIRECTORS, target.getName()); + luaPath = String.Format(FILEPATH_DIRECTORS, target.GetName()); } else - luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.getName()); + luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.GetName()); if (File.Exists(luaPath)) { - Script script = loadScript(luaPath); + Script script = LoadScript(luaPath); if (script == null) return; - //Have to do this to combine LuaParams + //Have to Do this to combine LuaParams List objects = new List(); objects.Add(player); objects.Add(target); objects.Add(eventStart.triggerName); if (eventStart.luaParams != null) - objects.AddRange(LuaUtils.createLuaParamObjectList(eventStart.luaParams)); + objects.AddRange(LuaUtils.CreateLuaParamObjectList(eventStart.luaParams)); //Run Script if (!script.Globals.Get("onEventStarted").IsNil()) @@ -103,18 +99,18 @@ namespace FFXIVClassic_Map_Server.lua } else { - SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.getName())); + SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName())); } } - public static void doActorOnSpawn(Player player, Npc target) + public static void DoActorOnSpawn(Player player, Npc target) { - string luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.getName()); + string luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.GetName()); if (File.Exists(luaPath)) { - Script script = loadScript(luaPath); + Script script = LoadScript(luaPath); if (script == null) return; @@ -125,12 +121,12 @@ namespace FFXIVClassic_Map_Server.lua } else { - SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.getName())); + SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName())); } } - public static void doActorOnEventUpdated(Player player, Actor target, EventUpdatePacket eventUpdate) + public static void DoActorOnEventUpdated(Player player, Actor target, EventUpdatePacket eventUpdate) { if (target is Npc) { @@ -141,25 +137,25 @@ namespace FFXIVClassic_Map_Server.lua string luaPath; if (target is Command) - luaPath = String.Format(FILEPATH_COMMANDS, target.getName()); + luaPath = String.Format(FILEPATH_COMMANDS, target.GetName()); else if (target is Director) - luaPath = String.Format(FILEPATH_DIRECTORS, target.getName()); + luaPath = String.Format(FILEPATH_DIRECTORS, target.GetName()); else - luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.getName()); + luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.GetName()); if (File.Exists(luaPath)) { - Script script = loadScript(luaPath); + Script script = LoadScript(luaPath); if (script == null) return; - //Have to do this to combine LuaParams + //Have to Do this to combine LuaParams List objects = new List(); objects.Add(player); objects.Add(target); objects.Add(eventUpdate.val2); - objects.AddRange(LuaUtils.createLuaParamObjectList(eventUpdate.luaParams)); + objects.AddRange(LuaUtils.CreateLuaParamObjectList(eventUpdate.luaParams)); //Run Script if (!script.Globals.Get("onEventUpdate").IsNil()) @@ -167,17 +163,17 @@ namespace FFXIVClassic_Map_Server.lua } else { - SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.getName())); + SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName())); } } - public static void onZoneIn(Player player) + public static void OnZoneIn(Player player) { - string luaPath = String.Format(FILEPATH_ZONE, player.getZone().actorId); + string luaPath = String.Format(FILEPATH_ZONE, player.GetZone().actorId); if (File.Exists(luaPath)) { - Script script = loadScript(luaPath); + Script script = LoadScript(luaPath); if (script == null) return; @@ -188,11 +184,11 @@ namespace FFXIVClassic_Map_Server.lua } } - public static void onBeginLogin(Player player) + public static void OnBeginLogin(Player player) { if (File.Exists(FILEPATH_PLAYER)) { - Script script = loadScript(FILEPATH_PLAYER); + Script script = LoadScript(FILEPATH_PLAYER); if (script == null) return; @@ -203,11 +199,11 @@ namespace FFXIVClassic_Map_Server.lua } } - public static void onLogin(Player player) + public static void OnLogin(Player player) { if (File.Exists(FILEPATH_PLAYER)) { - Script script = loadScript(FILEPATH_PLAYER); + Script script = LoadScript(FILEPATH_PLAYER); if (script == null) return; @@ -218,14 +214,14 @@ namespace FFXIVClassic_Map_Server.lua } } - public static Script loadScript(string filename) + public static Script LoadScript(string filename) { Script script = new Script(); ((FileSystemScriptLoader)script.Options.ScriptLoader).ModulePaths = FileSystemScriptLoader.UnpackStringPaths("./scripts/?;./scripts/?.lua"); - script.Globals["getWorldManager"] = (Func)Server.GetWorldManager; - script.Globals["getStaticActor"] = (Func)Server.getStaticActors; - script.Globals["getWorldMaster"] = (Func)Server.GetWorldManager().GetActor; - script.Globals["getItemGamedata"] = (Func)Server.getItemGamedata; + script.Globals["GetWorldManager"] = (Func)Server.GetWorldManager; + script.Globals["GetStaticActor"] = (Func)Server.GetStaticActors; + script.Globals["GetWorldMaster"] = (Func)Server.GetWorldManager().GetActor; + script.Globals["GetItemGamedata"] = (Func)Server.GetItemGamedata; try { @@ -233,7 +229,7 @@ namespace FFXIVClassic_Map_Server.lua } catch(SyntaxErrorException e) { - Log.error(String.Format("LUAERROR: {0}.", e.DecoratedMessage)); + Program.Log.Error("LUAERROR: {0}.", e.DecoratedMessage); return null; } return script; @@ -241,20 +237,20 @@ namespace FFXIVClassic_Map_Server.lua public static void SendError(Player player, string message) { - List sendError = new List(); - sendError.Add(EndEventPacket.buildPacket(player.actorId, player.currentEventOwner, player.currentEventName)); - player.sendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM_ERROR, "", message); - player.playerSession.queuePacket(BasePacket.createPacket(sendError, true, false)); + List SendError = new List(); + SendError.Add(EndEventPacket.BuildPacket(player.actorId, player.currentEventOwner, player.currentEventName)); + player.SendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM_ERROR, "", message); + player.playerSession.QueuePacket(BasePacket.CreatePacket(SendError, true, false)); } - internal static void doDirectorOnTalked(Director director, Player player, Npc npc) + internal static void DoDirectorOnTalked(Director director, Player player, Npc npc) { - string luaPath = String.Format(FILEPATH_DIRECTORS, director.getName()); + string luaPath = String.Format(FILEPATH_DIRECTORS, director.GetName()); if (File.Exists(luaPath)) { - Script script = loadScript(luaPath); + Script script = LoadScript(luaPath); if (script == null) return; @@ -265,17 +261,17 @@ namespace FFXIVClassic_Map_Server.lua } else { - SendError(player, String.Format("ERROR: Could not find script for director {0}.", director.getName())); + SendError(player, String.Format("ERROR: Could not find script for director {0}.", director.GetName())); } } - internal static void doDirectorOnCommand(Director director, Player player, Command command) + internal static void DoDirectorOnCommand(Director director, Player player, Command command) { - string luaPath = String.Format(FILEPATH_DIRECTORS, director.getName()); + string luaPath = String.Format(FILEPATH_DIRECTORS, director.GetName()); if (File.Exists(luaPath)) { - Script script = loadScript(luaPath); + Script script = LoadScript(luaPath); if (script == null) return; @@ -286,7 +282,7 @@ namespace FFXIVClassic_Map_Server.lua } else { - SendError(player, String.Format("ERROR: Could not find script for director {0}.", director.getName())); + SendError(player, String.Format("ERROR: Could not find script for director {0}.", director.GetName())); } } } diff --git a/FFXIVClassic Map Server/lua/LuaEvent.cs b/FFXIVClassic Map Server/lua/LuaEvent.cs index 73a4fb02..a22aae1b 100644 --- a/FFXIVClassic Map Server/lua/LuaEvent.cs +++ b/FFXIVClassic Map Server/lua/LuaEvent.cs @@ -1,19 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.lua +namespace FFXIVClassic_Map_Server.lua { class LuaEvent { - public static void getStep() + public static void GetStep() { } - public static void getParam() + public static void GetParam() { } diff --git a/FFXIVClassic Map Server/lua/LuaNpc.cs b/FFXIVClassic Map Server/lua/LuaNpc.cs index b41edf9d..78d240ea 100644 --- a/FFXIVClassic Map Server/lua/LuaNpc.cs +++ b/FFXIVClassic Map Server/lua/LuaNpc.cs @@ -1,13 +1,5 @@ using FFXIVClassic_Map_Server.Actors; -using FFXIVClassic_Map_Server.dataobjects; -using FFXIVClassic_Map_Server.packets.send; -using FFXIVClassic_Map_Server.packets.send.events; using MoonSharp.Interpreter; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.lua { diff --git a/FFXIVClassic Map Server/lua/LuaParam.cs b/FFXIVClassic Map Server/lua/LuaParam.cs index 20ecea3b..263af598 100644 --- a/FFXIVClassic Map Server/lua/LuaParam.cs +++ b/FFXIVClassic Map Server/lua/LuaParam.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.lua { diff --git a/FFXIVClassic Map Server/lua/LuaPlayer.cs b/FFXIVClassic Map Server/lua/LuaPlayer.cs index 7ff39c81..5ad16978 100644 --- a/FFXIVClassic Map Server/lua/LuaPlayer.cs +++ b/FFXIVClassic Map Server/lua/LuaPlayer.cs @@ -1,13 +1,7 @@ using FFXIVClassic_Map_Server.Actors; -using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.packets.send; -using FFXIVClassic_Map_Server.packets.send.events; using MoonSharp.Interpreter; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.lua { @@ -21,55 +15,55 @@ namespace FFXIVClassic_Map_Server.lua this.player = player; } - public void setMusic(ushort musicID, ushort playMode) + public void SetMusic(ushort musicID, ushort playMode) { - player.playerSession.queuePacket(SetMusicPacket.buildPacket(player.actorId, musicID, playMode), true, false); + player.playerSession.QueuePacket(SetMusicPacket.BuildPacket(player.actorId, musicID, playMode), true, false); } - public void setWeather(ushort weatherID) + public void SetWeather(ushort weatherID) { - player.playerSession.queuePacket(SetWeatherPacket.buildPacket(player.actorId, weatherID, 1), true, false); + player.playerSession.QueuePacket(SetWeatherPacket.BuildPacket(player.actorId, weatherID, 1), true, false); } - public void getParameter(string paramName) + public void GetParameter(string paramName) { } - public void setParameter(string paramName, object value, string uiToRefresh) + public void SetParameter(string paramName, object value, string uiToRefresh) { } - public void getAttributePoints() + public void GetAttributePoints() { } - public void setAttributePoints(int str, int vit, int dex, int inte, int min, int pie) + public void SetAttributePoints(int str, int vit, int dex, int inte, int min, int pie) { } - public void logout() + public void Logout() { - player.playerSession.queuePacket(LogoutPacket.buildPacket(player.actorId), true, false); + player.playerSession.QueuePacket(LogoutPacket.BuildPacket(player.actorId), true, false); } - public void quitGame() + public void QuitGame() { - player.playerSession.queuePacket(QuitPacket.buildPacket(player.actorId), true, false); + player.playerSession.QueuePacket(QuitPacket.BuildPacket(player.actorId), true, false); } - public void runEvent(string functionName, params object[] parameters) + public void RunEvent(string functionName, params object[] parameters) { - List lParams = LuaUtils.createLuaParamList(parameters); - // player.playerSession.queuePacket(RunEventFunctionPacket.buildPacket(player.actorId, player.eventCurrentOwner, player.eventCurrentStarter, functionName, lParams), true, false); + List lParams = LuaUtils.CreateLuaParamList(parameters); + // player.playerSession.QueuePacket(RunEventFunctionPacket.BuildPacket(player.actorId, player.eventCurrentOwner, player.eventCurrentStarter, functionName, lParams), true, false); } - public void endEvent() + public void EndEvent() { - // player.playerSession.queuePacket(EndEventPacket.buildPacket(player.actorId, player.eventCurrentOwner, player.eventCurrentStarter), true, false); + // player.playerSession.QueuePacket(EndEventPacket.BuildPacket(player.actorId, player.eventCurrentOwner, player.eventCurrentStarter), true, false); } } diff --git a/FFXIVClassic Map Server/lua/LuaUtils.cs b/FFXIVClassic Map Server/lua/LuaUtils.cs index 101b9fd3..84a340ab 100644 --- a/FFXIVClassic Map Server/lua/LuaUtils.cs +++ b/FFXIVClassic Map Server/lua/LuaUtils.cs @@ -1,14 +1,11 @@ -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.Actors; -using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.lua; using MoonSharp.Interpreter; using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server { @@ -43,7 +40,7 @@ namespace FFXIVClassic_Map_Server } } - public static List readLuaParams(BinaryReader reader) + public static List ReadLuaParams(BinaryReader reader) { List luaParams = new List(); @@ -57,10 +54,10 @@ namespace FFXIVClassic_Map_Server switch (code) { case 0x0: //Int32 - value = Utils.swapEndian(reader.ReadInt32()); + value = Utils.SwapEndian(reader.ReadInt32()); break; case 0x1: //Int32 - value = Utils.swapEndian(reader.ReadUInt32()); + value = Utils.SwapEndian(reader.ReadUInt32()); break; case 0x2: //Null Termed String List list = new List(); @@ -82,17 +79,17 @@ namespace FFXIVClassic_Map_Server wasNil = true; break; case 0x6: //Actor (By Id) - value = Utils.swapEndian(reader.ReadUInt32()); + value = Utils.SwapEndian(reader.ReadUInt32()); break; case 0x7: //Weird one used for inventory - uint type7ActorId = Utils.swapEndian(reader.ReadUInt32()); + uint type7ActorId = Utils.SwapEndian(reader.ReadUInt32()); byte type7Unknown = reader.ReadByte(); byte type7Slot = reader.ReadByte(); byte type7InventoryType = reader.ReadByte(); value = new Type7Param(type7ActorId, type7Unknown, type7Slot, type7InventoryType); break; case 0x9: //Two Longs (only storing first one) - value = new Type9Param(Utils.swapEndian(reader.ReadUInt64()), Utils.swapEndian(reader.ReadUInt64())); + value = new Type9Param(Utils.SwapEndian(reader.ReadUInt64()), Utils.SwapEndian(reader.ReadUInt64())); break; case 0xC: //Byte value = reader.ReadByte(); @@ -117,7 +114,7 @@ namespace FFXIVClassic_Map_Server return luaParams; } - public static void writeLuaParams(BinaryWriter writer, List luaParams) + public static void WriteLuaParams(BinaryWriter writer, List luaParams) { foreach (LuaParam l in luaParams) { @@ -129,10 +126,10 @@ namespace FFXIVClassic_Map_Server switch (l.typeID) { case 0x0: //Int32 - writer.Write((Int32)Utils.swapEndian((Int32)l.value)); + writer.Write((Int32)Utils.SwapEndian((Int32)l.value)); break; case 0x1: //Int32 - writer.Write((UInt32)Utils.swapEndian((UInt32)l.value)); + writer.Write((UInt32)Utils.SwapEndian((UInt32)l.value)); break; case 0x2: //Null Termed String string sv = (string)l.value; @@ -146,18 +143,18 @@ namespace FFXIVClassic_Map_Server case 0x5: //Nil break; case 0x6: //Actor (By Id) - writer.Write((UInt32)Utils.swapEndian((UInt32)l.value)); + writer.Write((UInt32)Utils.SwapEndian((UInt32)l.value)); break; case 0x7: //Weird one used for inventory Type7Param type7 = (Type7Param)l.value; - writer.Write((UInt32)Utils.swapEndian((UInt32)type7.actorId)); + writer.Write((UInt32)Utils.SwapEndian((UInt32)type7.actorId)); writer.Write((Byte)type7.unknown); writer.Write((Byte)type7.slot); writer.Write((Byte)type7.inventoryType); break; case 0x9: //Two Longs (only storing first one) - writer.Write((UInt64)Utils.swapEndian(((Type9Param)l.value).item1)); - writer.Write((UInt64)Utils.swapEndian(((Type9Param)l.value).item2)); + writer.Write((UInt64)Utils.SwapEndian(((Type9Param)l.value).item1)); + writer.Write((UInt64)Utils.SwapEndian(((Type9Param)l.value).item2)); break; case 0xC: //Byte writer.Write((Byte)l.value); @@ -172,7 +169,7 @@ namespace FFXIVClassic_Map_Server writer.Write((Byte)0xF); } - public static List readLuaParams(byte[] bytesIn) + public static List ReadLuaParams(byte[] bytesIn) { List luaParams = new List(); @@ -190,10 +187,10 @@ namespace FFXIVClassic_Map_Server switch (code) { case 0x0: //Int32 - value = Utils.swapEndian(reader.ReadInt32()); + value = Utils.SwapEndian(reader.ReadInt32()); break; case 0x1: //Int32 - value = Utils.swapEndian(reader.ReadUInt32()); + value = Utils.SwapEndian(reader.ReadUInt32()); break; case 0x2: //Null Termed String List list = new List(); @@ -216,17 +213,17 @@ namespace FFXIVClassic_Map_Server wasNil = true; break; case 0x6: //Actor (By Id) - value = Utils.swapEndian(reader.ReadUInt32()); + value = Utils.SwapEndian(reader.ReadUInt32()); break; case 0x7: //Weird one used for inventory - uint type7ActorId = Utils.swapEndian(reader.ReadUInt32()); + uint type7ActorId = Utils.SwapEndian(reader.ReadUInt32()); byte type7Unknown = reader.ReadByte(); byte type7Slot = reader.ReadByte(); byte type7InventoryType = reader.ReadByte(); value = new Type7Param(type7ActorId, type7Unknown, type7Slot, type7InventoryType); break; case 0x9: //Two Longs (only storing first one) - value = new Type9Param(Utils.swapEndian(reader.ReadUInt64()), Utils.swapEndian(reader.ReadUInt64())); + value = new Type9Param(Utils.SwapEndian(reader.ReadUInt64()), Utils.SwapEndian(reader.ReadUInt64())); break; case 0xC: //Byte value = reader.ReadByte(); @@ -252,7 +249,7 @@ namespace FFXIVClassic_Map_Server return luaParams; } - public static List createLuaParamList(DynValue fromScript) + public static List CreateLuaParamList(DynValue fromScript) { List luaParams = new List(); @@ -260,16 +257,16 @@ namespace FFXIVClassic_Map_Server { foreach (DynValue d in fromScript.Tuple) { - addToList(d, luaParams); + AddToList(d, luaParams); } } else - addToList(fromScript, luaParams); + AddToList(fromScript, luaParams); return luaParams; } - public static List createLuaParamList(params object[] list) + public static List CreateLuaParamList(params object[] list) { List luaParams = new List(); @@ -279,16 +276,16 @@ namespace FFXIVClassic_Map_Server { Array arrayO = (Array)o; foreach (object o2 in arrayO) - addToList(o2, luaParams); + AddToList(o2, luaParams); } else - addToList(o, luaParams); + AddToList(o, luaParams); } return luaParams; } - private static void addToList(DynValue d, List luaParams) + private static void AddToList(DynValue d, List luaParams) { if (d.Type == DataType.Number) { @@ -319,7 +316,7 @@ namespace FFXIVClassic_Map_Server } } - private static void addToList(object o, List luaParams) + private static void AddToList(object o, List luaParams) { if (o is int) { @@ -329,7 +326,7 @@ namespace FFXIVClassic_Map_Server { luaParams.Add(new LuaParam(0x1, (uint)o)); } - else if (o is double) + else if (o is Double) { if (((double)o) % 1 == 0) luaParams.Add(new LuaParam(0x0, (int)(double)o)); @@ -367,7 +364,7 @@ namespace FFXIVClassic_Map_Server } } - public static object[] createLuaParamObjectList(List luaParams) + public static object[] CreateLuaParamObjectList(List luaParams) { object[] list = new object[luaParams.Count]; @@ -378,7 +375,7 @@ namespace FFXIVClassic_Map_Server } - public static string dumpParams(List lParams) + public static string DumpParams(List lParams) { if (lParams == null) return "Param list was null?"; diff --git a/FFXIVClassic Map Server/packages.config b/FFXIVClassic Map Server/packages.config index 382be8e1..6d8ab227 100644 --- a/FFXIVClassic Map Server/packages.config +++ b/FFXIVClassic Map Server/packages.config @@ -1,8 +1,11 @@ - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/FFXIVClassic Map Server/packets/BasePacket.cs b/FFXIVClassic Map Server/packets/BasePacket.cs index 9e9c9c48..2a74d790 100644 --- a/FFXIVClassic Map Server/packets/BasePacket.cs +++ b/FFXIVClassic Map Server/packets/BasePacket.cs @@ -1,16 +1,13 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Runtime.InteropServices; using System.Diagnostics; -using FFXIVClassic_Lobby_Server.common; using System.IO; +using FFXIVClassic.Common; + +namespace FFXIVClassic_Map_Server.packets +{ -namespace FFXIVClassic_Lobby_Server.packets -{ - [StructLayout(LayoutKind.Sequential)] public struct BasePacketHeader { @@ -105,7 +102,7 @@ namespace FFXIVClassic_Lobby_Server.packets this.data = data; } - public List getSubpackets() + public List GetSubpackets() { List subpackets = new List(header.numSubpackets); @@ -117,7 +114,7 @@ namespace FFXIVClassic_Lobby_Server.packets return subpackets; } - public unsafe static BasePacketHeader getHeader(byte[] bytes) + public unsafe static BasePacketHeader GetHeader(byte[] bytes) { BasePacketHeader header; if (bytes.Length < BASEPACKET_SIZE) @@ -131,7 +128,7 @@ namespace FFXIVClassic_Lobby_Server.packets return header; } - public byte[] getHeaderBytes() + public byte[] GetHeaderBytes() { int size = Marshal.SizeOf(header); byte[] arr = new byte[size]; @@ -143,16 +140,16 @@ namespace FFXIVClassic_Lobby_Server.packets return arr; } - public byte[] getPacketBytes() + public byte[] GetPacketBytes() { byte[] outBytes = new byte[header.packetSize]; - Array.Copy(getHeaderBytes(), 0, outBytes, 0, BASEPACKET_SIZE); + Array.Copy(GetHeaderBytes(), 0, outBytes, 0, BASEPACKET_SIZE); Array.Copy(data, 0, outBytes, BASEPACKET_SIZE, data.Length); return outBytes; } //Replaces all instances of the sniffed actorID with the given one - public void replaceActorID(uint actorID) + public void ReplaceActorID(uint actorID) { using (MemoryStream mem = new MemoryStream(data)) { @@ -175,7 +172,7 @@ namespace FFXIVClassic_Lobby_Server.packets } //Replaces all instances of the sniffed actorID with the given one - public void replaceActorID(uint fromActorID, uint actorID) + public void ReplaceActorID(uint fromActorID, uint actorID) { using (MemoryStream mem = new MemoryStream(data)) { @@ -198,7 +195,7 @@ namespace FFXIVClassic_Lobby_Server.packets } #region Utility Functions - public static BasePacket createPacket(List subpackets, bool isAuthed, bool isCompressed) + public static BasePacket CreatePacket(List subpackets, bool isAuthed, bool isCompressed) { //Create Header BasePacketHeader header = new BasePacketHeader(); @@ -220,7 +217,7 @@ namespace FFXIVClassic_Lobby_Server.packets int offset = 0; foreach (SubPacket subpacket in subpackets) { - byte[] subpacketData = subpacket.getBytes(); + byte[] subpacketData = subpacket.GetBytes(); Array.Copy(subpacketData, 0, data, offset, subpacketData.Length); offset += (ushort)subpacketData.Length; } @@ -231,7 +228,7 @@ namespace FFXIVClassic_Lobby_Server.packets return packet; } - public static BasePacket createPacket(SubPacket subpacket, bool isAuthed, bool isCompressed) + public static BasePacket CreatePacket(SubPacket subpacket, bool isAuthed, bool isCompressed) { //Create Header BasePacketHeader header = new BasePacketHeader(); @@ -249,7 +246,7 @@ namespace FFXIVClassic_Lobby_Server.packets data = new byte[header.packetSize - 0x10]; //Add Subpackets - byte[] subpacketData = subpacket.getBytes(); + byte[] subpacketData = subpacket.GetBytes(); Array.Copy(subpacketData, 0, data, 0, subpacketData.Length); Debug.Assert(data != null); @@ -258,7 +255,7 @@ namespace FFXIVClassic_Lobby_Server.packets return packet; } - public static BasePacket createPacket(byte[] data, bool isAuthed, bool isCompressed) + public static BasePacket CreatePacket(byte[] data, bool isAuthed, bool isCompressed) { Debug.Assert(data != null); @@ -279,7 +276,7 @@ namespace FFXIVClassic_Lobby_Server.packets return packet; } - public static unsafe void encryptPacket(Blowfish blowfish, BasePacket packet) + public static unsafe void EncryptPacket(Blowfish blowfish, BasePacket packet) { byte[] data = packet.data; int size = packet.header.packetSize; @@ -305,7 +302,7 @@ namespace FFXIVClassic_Lobby_Server.packets } - public static unsafe void decryptPacket(Blowfish blowfish, ref BasePacket packet) + public static unsafe void DecryptPacket(Blowfish blowfish, ref BasePacket packet) { byte[] data = packet.data; int size = packet.header.packetSize; @@ -332,17 +329,21 @@ namespace FFXIVClassic_Lobby_Server.packets } #endregion - public void debugPrintPacket() + public void DebugPrintPacket() { #if DEBUG Console.BackgroundColor = ConsoleColor.DarkYellow; - Console.WriteLine("IsAuthed: {0}, IsEncrypted: {1}, Size: 0x{2:X}, Num Subpackets: {3}", header.isAuthenticated, header.isCompressed, header.packetSize, header.numSubpackets); - Console.WriteLine("{0}", Utils.ByteArrayToHex(getHeaderBytes())); - foreach (SubPacket sub in getSubpackets()) - sub.debugPrintSubPacket(); + + Program.Log.Debug("IsAuth: {0} IsEncrypted: {1}, Size: 0x{2:X}, NumSubpackets: {3}{4}{5}", header.isAuthenticated, header.isCompressed, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(GetHeaderBytes())); + + foreach (SubPacket sub in GetSubpackets()) + { + sub.DebugPrintSubPacket(); + } + Console.BackgroundColor = ConsoleColor.Black; #endif } - + } } diff --git a/FFXIVClassic Map Server/packets/SubPacket.cs b/FFXIVClassic Map Server/packets/SubPacket.cs index 87231156..5bb0b746 100644 --- a/FFXIVClassic Map Server/packets/SubPacket.cs +++ b/FFXIVClassic Map Server/packets/SubPacket.cs @@ -1,13 +1,8 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Runtime.InteropServices; -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; -namespace FFXIVClassic_Lobby_Server.packets +namespace FFXIVClassic_Map_Server.packets { [StructLayout(LayoutKind.Sequential)] public struct SubPacketHeader @@ -106,7 +101,7 @@ namespace FFXIVClassic_Lobby_Server.packets data = original.data; } - public byte[] getHeaderBytes() + public byte[] GetHeaderBytes() { int size = Marshal.SizeOf(header); byte[] arr = new byte[size]; @@ -118,7 +113,7 @@ namespace FFXIVClassic_Lobby_Server.packets return arr; } - public byte[] getGameMessageBytes() + public byte[] GetGameMessageBytes() { int size = Marshal.SizeOf(gameMessage); byte[] arr = new byte[size]; @@ -130,30 +125,34 @@ namespace FFXIVClassic_Lobby_Server.packets return arr; } - public byte[] getBytes() + public byte[] GetBytes() { byte[] outBytes = new byte[header.subpacketSize]; - Array.Copy(getHeaderBytes(), 0, outBytes, 0, SUBPACKET_SIZE); + Array.Copy(GetHeaderBytes(), 0, outBytes, 0, SUBPACKET_SIZE); if (header.type == 0x3) - Array.Copy(getGameMessageBytes(), 0, outBytes, SUBPACKET_SIZE, GAMEMESSAGE_SIZE); + Array.Copy(GetGameMessageBytes(), 0, outBytes, SUBPACKET_SIZE, GAMEMESSAGE_SIZE); Array.Copy(data, 0, outBytes, SUBPACKET_SIZE + (header.type == 0x3 ? GAMEMESSAGE_SIZE : 0), data.Length); return outBytes; } - public void debugPrintSubPacket() + public void DebugPrintSubPacket() { #if DEBUG Console.BackgroundColor = ConsoleColor.DarkRed; - Console.WriteLine("Size: 0x{0:X}", header.subpacketSize); + + Program.Log.Debug("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(GetHeaderBytes())); + if (header.type == 0x03) - Console.WriteLine("Opcode: 0x{0:X}", gameMessage.opcode); - Console.WriteLine("{0}", Utils.ByteArrayToHex(getHeaderBytes())); - if (header.type == 0x03) - Console.WriteLine("{0}", Utils.ByteArrayToHex(getGameMessageBytes())); - Console.BackgroundColor = ConsoleColor.DarkMagenta; - Console.WriteLine("{0}", Utils.ByteArrayToHex(data)); + { + Program.Log.Debug("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(GetGameMessageBytes(), SUBPACKET_SIZE)); + + Console.BackgroundColor = ConsoleColor.DarkMagenta; + + Program.Log.Debug("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE)); + } + Console.BackgroundColor = ConsoleColor.Black; #endif } diff --git a/FFXIVClassic Map Server/packets/receive/ChatMessagePacket.cs b/FFXIVClassic Map Server/packets/receive/ChatMessagePacket.cs index 2b3e85f5..877df6f3 100644 --- a/FFXIVClassic Map Server/packets/receive/ChatMessagePacket.cs +++ b/FFXIVClassic Map Server/packets/receive/ChatMessagePacket.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive { diff --git a/FFXIVClassic Map Server/packets/receive/HandshakePacket.cs b/FFXIVClassic Map Server/packets/receive/HandshakePacket.cs index 10b146ff..20586f6e 100644 --- a/FFXIVClassic Map Server/packets/receive/HandshakePacket.cs +++ b/FFXIVClassic Map Server/packets/receive/HandshakePacket.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive { diff --git a/FFXIVClassic Map Server/packets/receive/LangaugeCodePacket.cs b/FFXIVClassic Map Server/packets/receive/LangaugeCodePacket.cs index 021c2ca3..c5e68583 100644 --- a/FFXIVClassic Map Server/packets/receive/LangaugeCodePacket.cs +++ b/FFXIVClassic Map Server/packets/receive/LangaugeCodePacket.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive { diff --git a/FFXIVClassic Map Server/packets/receive/LockTargetPacket.cs b/FFXIVClassic Map Server/packets/receive/LockTargetPacket.cs index 9032e6f5..8f542aad 100644 --- a/FFXIVClassic Map Server/packets/receive/LockTargetPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/LockTargetPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive { diff --git a/FFXIVClassic Map Server/packets/receive/ParameterDataRequestPacket.cs b/FFXIVClassic Map Server/packets/receive/ParameterDataRequestPacket.cs index 7413feb8..1658a0a3 100644 --- a/FFXIVClassic Map Server/packets/receive/ParameterDataRequestPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/ParameterDataRequestPacket.cs @@ -1,9 +1,7 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive { diff --git a/FFXIVClassic Map Server/packets/receive/PingPacket.cs b/FFXIVClassic Map Server/packets/receive/PingPacket.cs index 74dca840..68ca8cba 100644 --- a/FFXIVClassic Map Server/packets/receive/PingPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/PingPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive { diff --git a/FFXIVClassic Map Server/packets/receive/SetTargetPacket.cs b/FFXIVClassic Map Server/packets/receive/SetTargetPacket.cs index 05500ba7..b38cd5a7 100644 --- a/FFXIVClassic Map Server/packets/receive/SetTargetPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/SetTargetPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive { diff --git a/FFXIVClassic Map Server/packets/receive/UpdatePlayerPositionPacket.cs b/FFXIVClassic Map Server/packets/receive/UpdatePlayerPositionPacket.cs index dfd7cb9f..a1d88502 100644 --- a/FFXIVClassic Map Server/packets/receive/UpdatePlayerPositionPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/UpdatePlayerPositionPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive { diff --git a/FFXIVClassic Map Server/packets/receive/_0x02ReceivePacket.cs b/FFXIVClassic Map Server/packets/receive/_0x02ReceivePacket.cs index b1c7cdc7..aab20b5c 100644 --- a/FFXIVClassic Map Server/packets/receive/_0x02ReceivePacket.cs +++ b/FFXIVClassic Map Server/packets/receive/_0x02ReceivePacket.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive { diff --git a/FFXIVClassic Map Server/packets/receive/_0x07Packet.cs b/FFXIVClassic Map Server/packets/receive/_0x07Packet.cs index f4091f25..a8a503b6 100644 --- a/FFXIVClassic Map Server/packets/receive/_0x07Packet.cs +++ b/FFXIVClassic Map Server/packets/receive/_0x07Packet.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive { diff --git a/FFXIVClassic Map Server/packets/receive/events/EventStartPacket.cs b/FFXIVClassic Map Server/packets/receive/events/EventStartPacket.cs index 3f5e7993..34daa640 100644 --- a/FFXIVClassic Map Server/packets/receive/events/EventStartPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/events/EventStartPacket.cs @@ -1,11 +1,8 @@ -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Map_Server.lua; +using FFXIVClassic_Map_Server.lua; using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive.events { @@ -51,7 +48,7 @@ namespace FFXIVClassic_Map_Server.packets.receive.events error = ASCIIEncoding.ASCII.GetString(binReader.ReadBytes(0x80)).Replace("\0", ""); if (errorIndex == 0) - Log.error("LUA ERROR:"); + Program.Log.Error("LUA ERROR:"); return; } @@ -66,7 +63,7 @@ namespace FFXIVClassic_Map_Server.packets.receive.events binReader.BaseStream.Seek(0x31, SeekOrigin.Begin); - luaParams = LuaUtils.readLuaParams(binReader); + luaParams = LuaUtils.ReadLuaParams(binReader); } catch (Exception){ invalidPacket = true; diff --git a/FFXIVClassic Map Server/packets/receive/events/EventUpdatePacket.cs b/FFXIVClassic Map Server/packets/receive/events/EventUpdatePacket.cs index 976c6c68..656531de 100644 --- a/FFXIVClassic Map Server/packets/receive/events/EventUpdatePacket.cs +++ b/FFXIVClassic Map Server/packets/receive/events/EventUpdatePacket.cs @@ -2,9 +2,6 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive.events { @@ -34,7 +31,7 @@ namespace FFXIVClassic_Map_Server.packets.receive.events val1 = binReader.ReadUInt32(); val2 = binReader.ReadUInt32(); step = binReader.ReadByte(); - luaParams = LuaUtils.readLuaParams(binReader); + luaParams = LuaUtils.ReadLuaParams(binReader); } catch (Exception){ invalidPacket = true; diff --git a/FFXIVClassic Map Server/packets/receive/recruitment/RecruitmentDetailsRequestPacket.cs b/FFXIVClassic Map Server/packets/receive/recruitment/RecruitmentDetailsRequestPacket.cs index 7f2706af..8e335d32 100644 --- a/FFXIVClassic Map Server/packets/receive/recruitment/RecruitmentDetailsRequestPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/recruitment/RecruitmentDetailsRequestPacket.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive.recruitment { diff --git a/FFXIVClassic Map Server/packets/receive/recruitment/RecruitmentSearchRequestPacket.cs b/FFXIVClassic Map Server/packets/receive/recruitment/RecruitmentSearchRequestPacket.cs index 07f55b10..e8513cfd 100644 --- a/FFXIVClassic Map Server/packets/receive/recruitment/RecruitmentSearchRequestPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/recruitment/RecruitmentSearchRequestPacket.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive.recruitment { diff --git a/FFXIVClassic Map Server/packets/receive/recruitment/StartRecruitingRequestPacket.cs b/FFXIVClassic Map Server/packets/receive/recruitment/StartRecruitingRequestPacket.cs index 154bbb7e..53f7e4f0 100644 --- a/FFXIVClassic Map Server/packets/receive/recruitment/StartRecruitingRequestPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/recruitment/StartRecruitingRequestPacket.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive.recruitment { diff --git a/FFXIVClassic Map Server/packets/receive/social/AddRemoveSocialPacket.cs b/FFXIVClassic Map Server/packets/receive/social/AddRemoveSocialPacket.cs index b4f60d9b..693d752e 100644 --- a/FFXIVClassic Map Server/packets/receive/social/AddRemoveSocialPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/social/AddRemoveSocialPacket.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive.social { diff --git a/FFXIVClassic Map Server/packets/receive/social/FriendlistRequestPacket.cs b/FFXIVClassic Map Server/packets/receive/social/FriendlistRequestPacket.cs index 39fbda78..8353764a 100644 --- a/FFXIVClassic Map Server/packets/receive/social/FriendlistRequestPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/social/FriendlistRequestPacket.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive.social { diff --git a/FFXIVClassic Map Server/packets/receive/supportdesk/FaqBodyRequestPacket.cs b/FFXIVClassic Map Server/packets/receive/supportdesk/FaqBodyRequestPacket.cs index bcf2a398..22a1e18a 100644 --- a/FFXIVClassic Map Server/packets/receive/supportdesk/FaqBodyRequestPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/supportdesk/FaqBodyRequestPacket.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive.supportdesk { diff --git a/FFXIVClassic Map Server/packets/receive/supportdesk/FaqListRequestPacket.cs b/FFXIVClassic Map Server/packets/receive/supportdesk/FaqListRequestPacket.cs index 2bb1376a..6862b8e5 100644 --- a/FFXIVClassic Map Server/packets/receive/supportdesk/FaqListRequestPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/supportdesk/FaqListRequestPacket.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive.supportdesk { diff --git a/FFXIVClassic Map Server/packets/receive/supportdesk/GMSupportTicketPacket.cs b/FFXIVClassic Map Server/packets/receive/supportdesk/GMSupportTicketPacket.cs index cab46175..4e88e164 100644 --- a/FFXIVClassic Map Server/packets/receive/supportdesk/GMSupportTicketPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/supportdesk/GMSupportTicketPacket.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive.supportdesk { diff --git a/FFXIVClassic Map Server/packets/receive/supportdesk/GMTicketIssuesRequestPacket.cs b/FFXIVClassic Map Server/packets/receive/supportdesk/GMTicketIssuesRequestPacket.cs index e3943c90..e1875cb6 100644 --- a/FFXIVClassic Map Server/packets/receive/supportdesk/GMTicketIssuesRequestPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/supportdesk/GMTicketIssuesRequestPacket.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive.supportdesk { diff --git a/FFXIVClassic Map Server/packets/send/Actor/ActorDoEmotePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/ActorDoEmotePacket.cs index 643388f9..ee59c7d3 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/ActorDoEmotePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/ActorDoEmotePacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x00E1; public const uint PACKET_SIZE = 0x30; - public static SubPacket buildPacket(uint sourceActorId, uint targetActorId, uint targettedActorId, uint emoteID) + public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, uint targettedActorId, uint emoteID) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -33,7 +28,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } SubPacket packet = new SubPacket(OPCODE, sourceActorId, targetActorId, data); - packet.debugPrintSubPacket(); + packet.DebugPrintSubPacket(); return packet; } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/ActorInstantiatePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/ActorInstantiatePacket.cs index f79e5f70..14a72cb8 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/ActorInstantiatePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/ActorInstantiatePacket.cs @@ -1,11 +1,8 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.lua; +using FFXIVClassic_Map_Server.lua; using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -14,7 +11,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x00CC; public const uint PACKET_SIZE = 0x128; - public static SubPacket buildPacket(uint sourceActorID, uint targetActorID, string objectName, string className, List initParams) + public static SubPacket BuildPacket(uint sourceActorID, uint targetActorID, string objectName, string className, List initParams) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -30,7 +27,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor binWriter.BaseStream.Seek(0x24, SeekOrigin.Begin); binWriter.Write(Encoding.ASCII.GetBytes(className), 0, Encoding.ASCII.GetByteCount(className) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(className)); binWriter.BaseStream.Seek(0x44, SeekOrigin.Begin); - LuaUtils.writeLuaParams(binWriter, initParams); + LuaUtils.WriteLuaParams(binWriter, initParams); } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/ActorSpecialGraphicPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/ActorSpecialGraphicPacket.cs index 1efd25dd..2ba4f976 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/ActorSpecialGraphicPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/ActorSpecialGraphicPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -18,7 +13,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x00E3; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, int iconCode) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, int iconCode) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/AddActorPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/AddActorPacket.cs index c92e23a2..c561e9d4 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/AddActorPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/AddActorPacket.cs @@ -1,18 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.actor +namespace FFXIVClassic_Map_Server.packets.send.actor { class AddActorPacket { public const ushort OPCODE = 0x00CA; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint actorID, byte val) + public static SubPacket BuildPacket(uint playerActorID, uint actorID, byte val) { byte[] data = new byte[PACKET_SIZE-0x20]; data[0] = val; //Why? diff --git a/FFXIVClassic Map Server/packets/send/Actor/BattleAction1Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/BattleAction1Packet.cs index 24c3fc95..e6d61e39 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/BattleAction1Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/BattleAction1Packet.cs @@ -1,10 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.IO; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -13,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x0139; public const uint PACKET_SIZE = 0x58; - public static SubPacket buildPacket(uint sourceId, uint targetId) + public static SubPacket BuildPacket(uint sourceId, uint targetId) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/DeleteAllActorsPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/DeleteAllActorsPacket.cs index 3544ef84..e4bf1ef1 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/DeleteAllActorsPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/DeleteAllActorsPacket.cs @@ -1,18 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.actor +namespace FFXIVClassic_Map_Server.packets.send.actor { class DeleteAllActorsPacket { public const ushort OPCODE = 0x0007; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID) + public static SubPacket BuildPacket(uint playerActorID) { return new SubPacket(OPCODE, playerActorID, playerActorID, new byte[8]); } diff --git a/FFXIVClassic Map Server/packets/send/Actor/MoveActorToPositionPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/MoveActorToPositionPacket.cs index a869e1ea..60e5596a 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/MoveActorToPositionPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/MoveActorToPositionPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x00CF; public const uint PACKET_SIZE = 0x50; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, float x, float y, float z, float rot, ushort moveState) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, float x, float y, float z, float rot, ushort moveState) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/RemoveActorPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/RemoveActorPacket.cs index 980b6845..6d612713 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/RemoveActorPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/RemoveActorPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x00CB; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint actorId) + public static SubPacket BuildPacket(uint playerActorID, uint actorId) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorAppearancePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorAppearancePacket.cs index cca658af..2769482c 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorAppearancePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorAppearancePacket.cs @@ -1,10 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.IO; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -57,7 +51,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor appearanceIDs = appearanceTable; } - public SubPacket buildPacket(uint playerActorID, uint actorID) + public SubPacket BuildPacket(uint playerActorID, uint actorID) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorIconPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorIconPacket.cs index 03649d46..662e6096 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorIconPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorIconPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -17,7 +12,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x0145; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint iconCode) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, uint iconCode) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorIdleAnimationPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorIdleAnimationPacket.cs index 545c2ba2..12341c95 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorIdleAnimationPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorIdleAnimationPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x144; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint targetID, uint idleAnimationId) + public static SubPacket BuildPacket(uint playerActorID, uint targetID, uint idleAnimationId) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorIsZoningPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorIsZoningPacket.cs index 4ab3d1a2..5b46c55b 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorIsZoningPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorIsZoningPacket.cs @@ -1,18 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.actor +namespace FFXIVClassic_Map_Server.packets.send.actor { class SetActorIsZoningPacket { public const ushort OPCODE = 0x017B; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, bool isDimmed) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, bool isDimmed) { byte[] data = new byte[PACKET_SIZE - 0x20]; data[0] = (byte)(isDimmed ? 1 : 0); diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorNamePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorNamePacket.cs index c41005ef..6036cd4d 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorNamePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorNamePacket.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -13,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x013D; public const uint PACKET_SIZE = 0x48; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint displayNameID, string customName) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, uint displayNameID, string customName) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs index 4d6718d6..7e0012ea 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -27,7 +22,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const float INNPOS_Z = 165.050003f; public const float INNPOS_ROT = -1.530000f; - public static SubPacket buildPacket(uint sourceActorID, uint targetActorID, uint actorId, float x, float y, float z, float rotation, uint spawnType, bool isZoningPlayer) + public static SubPacket BuildPacket(uint sourceActorID, uint targetActorID, uint actorId, float x, float y, float z, float rotation, uint spawnType, bool isZoningPlayer) { byte[] data = new byte[PACKET_SIZE-0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs index fc4c85c4..b059f506 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs @@ -1,12 +1,9 @@ -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic.Common; using System; -using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -37,13 +34,13 @@ namespace FFXIVClassic_Map_Server.packets.send.actor currentTarget = startingTarget; } - public void closeStreams() + public void CloseStreams() { binWriter.Dispose(); mem.Dispose(); } - public bool addByte(uint id, byte value) + public bool AddByte(uint id, byte value) { if (runningByteTotal + 6 + (1 + Encoding.ASCII.GetByteCount(currentTarget)) > MAXBYTES) return false; @@ -56,7 +53,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor return true; } - public bool addShort(uint id, ushort value) + public bool AddShort(uint id, ushort value) { if (runningByteTotal + 7 + (1 + Encoding.ASCII.GetByteCount(currentTarget)) > MAXBYTES) return false; @@ -69,7 +66,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor return true; } - public bool addInt(uint id, uint value) + public bool AddInt(uint id, uint value) { if (runningByteTotal + 9 + (1 + Encoding.ASCII.GetByteCount(currentTarget)) > MAXBYTES) return false; @@ -82,7 +79,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor return true; } - public bool addBuffer(uint id, byte[] buffer) + public bool AddBuffer(uint id, byte[] buffer) { if (runningByteTotal + 5 + buffer.Length + (1 + Encoding.ASCII.GetByteCount(currentTarget)) > MAXBYTES) return false; @@ -95,7 +92,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor return true; } - public bool addBuffer(uint id, byte[] buffer, int index, int length, int page) + public bool AddBuffer(uint id, byte[] buffer, int index, int length, int page) { if (runningByteTotal + 5 + length + (1 + Encoding.ASCII.GetByteCount(currentTarget)) > MAXBYTES) return false; @@ -109,7 +106,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor return true; } - public bool addProperty(FFXIVClassic_Map_Server.Actors.Actor actor, string name) + public bool AddProperty(FFXIVClassic_Map_Server.Actors.Actor actor, string name) { string[] split = name.Split('.'); int arrayIndex = 0; @@ -154,43 +151,43 @@ namespace FFXIVClassic_Map_Server.packets.send.actor if (curObj == null) return false; - //Cast to the proper object and add to packet + //Cast to the proper object and Add to packet uint id = Utils.MurmurHash2(name, 0); if (curObj is bool) - return addByte(id, (byte)(((bool)curObj) ? 1 : 0)); + return AddByte(id, (byte)(((bool)curObj) ? 1 : 0)); else if (curObj is byte) - return addByte(id, (byte)curObj); + return AddByte(id, (byte)curObj); else if (curObj is ushort) - return addShort(id, (ushort)curObj); + return AddShort(id, (ushort)curObj); else if (curObj is short) - return addShort(id, (ushort)(short)curObj); + return AddShort(id, (ushort)(short)curObj); else if (curObj is uint) - return addInt(id, (uint)curObj); + return AddInt(id, (uint)curObj); else if (curObj is int) - return addInt(id, (uint)(int)curObj); + return AddInt(id, (uint)(int)curObj); else if (curObj is float) - return addBuffer(id, BitConverter.GetBytes((float)curObj)); + return AddBuffer(id, BitConverter.GetBytes((float)curObj)); else return false; } } - public void setIsArrayMode(bool flag) + public void SetIsArrayMode(bool flag) { isArrayMode = flag; } - public void setIsMore(bool flag) + public void SetIsMore(bool flag) { isMore = flag; } - public void setTarget(string target) + public void SetTarget(string target) { currentTarget = target; } - public void addTarget() + public void AddTarget() { if (isArrayMode) binWriter.Write((byte)(0xA4 + currentTarget.Length)); @@ -200,7 +197,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor runningByteTotal += (ushort)(1 + Encoding.ASCII.GetByteCount(currentTarget)); } - public void addTarget(string newTarget) + public void AddTarget(string newTarget) { binWriter.Write((byte)(isMore ? 0x60 + currentTarget.Length : 0x82 + currentTarget.Length)); binWriter.Write(Encoding.ASCII.GetBytes(currentTarget)); @@ -208,12 +205,12 @@ namespace FFXIVClassic_Map_Server.packets.send.actor currentTarget = newTarget; } - public SubPacket buildPacket(uint playerActorID, uint actorID) + public SubPacket BuildPacket(uint playerActorID, uint actorID) { binWriter.Seek(0, SeekOrigin.Begin); binWriter.Write((byte)runningByteTotal); - closeStreams(); + CloseStreams(); SubPacket packet = new SubPacket(OPCODE, actorID, playerActorID, data); return packet; diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorSpeedPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorSpeedPacket.cs index 6c846be2..5f22942b 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorSpeedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorSpeedPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -17,7 +12,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const float DEFAULT_WALK = 2.0f; public const float DEFAULT_RUN = 5.0f; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -46,7 +41,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor return new SubPacket(OPCODE, playerActorID, targetActorID, data); } - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, float stopSpeed, float walkSpeed, float runSpeed) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, float stopSpeed, float walkSpeed, float runSpeed) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatePacket.cs index c3d4d385..bb3a0cc6 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatePacket.cs @@ -1,9 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -32,7 +27,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x134; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint targetID, uint mainState, uint subState) + public static SubPacket BuildPacket(uint playerActorID, uint targetID, uint mainState, uint subState) { ulong combined = (mainState & 0xFF) | ((subState & 0xFF) << 8); return new SubPacket(OPCODE, playerActorID, targetID, BitConverter.GetBytes(combined)); diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusAllPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusAllPacket.cs index 27409ea0..277dda2b 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusAllPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusAllPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x0179; public const uint PACKET_SIZE = 0x48; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, ushort[] statusIds) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, ushort[] statusIds) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusPacket.cs index c47f5353..bd148efb 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x0177; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, ushort index, ushort statusCode) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, ushort index, ushort statusCode) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetAnimatedPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetAnimatedPacket.cs index 4ab2227e..ebc77e0d 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetAnimatedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetAnimatedPacket.cs @@ -1,9 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -12,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x00D3; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint targetID) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, uint targetID) { return new SubPacket(OPCODE, playerActorID, targetID, BitConverter.GetBytes((ulong)targetID)); } diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetPacket.cs index 425cdc9f..645209cc 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetPacket.cs @@ -1,9 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -12,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x00DB; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint targetID) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, uint targetID) { return new SubPacket(OPCODE, playerActorID, targetID, BitConverter.GetBytes((ulong)targetID)); } diff --git a/FFXIVClassic Map Server/packets/send/Actor/_0x132Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/_0x132Packet.cs index 202c3c1e..066cb231 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/_0x132Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/_0x132Packet.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -13,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x132; public const uint PACKET_SIZE = 0x48; - public static SubPacket buildPacket(uint playerActorID, ushort number, string function) + public static SubPacket BuildPacket(uint playerActorID, ushort number, string function) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/_0xFPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/_0xFPacket.cs index b3a61ddc..7fe72cae 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/_0xFPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/_0xFPacket.cs @@ -1,10 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.IO; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -13,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x000F; public const uint PACKET_SIZE = 0x38; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleAction.cs b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleAction.cs index 6e5ae733..71bf867b 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleAction.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleAction.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.actor.battle +namespace FFXIVClassic_Map_Server.packets.send.actor.battle { class BattleAction { diff --git a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX00Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX00Packet.cs index a24b0ee6..30995408 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX00Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX00Packet.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.battle { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle public const ushort OPCODE = 0x013C; public const uint PACKET_SIZE = 0x48; - public static SubPacket buildPacket(uint playerActorID, uint sourceActorId, uint targetActorId, uint animationId, ushort commandId) + public static SubPacket BuildPacket(uint playerActorID, uint sourceActorId, uint targetActorId, uint animationId, ushort commandId) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX01Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX01Packet.cs index 5a8d7af4..0a90d960 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX01Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX01Packet.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.battle { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle public const ushort OPCODE = 0x0139; public const uint PACKET_SIZE = 0x58; - public static SubPacket buildPacket(uint playerActorID, uint sourceActorId, uint targetActorId, uint animationId, uint effectId, ushort worldMasterTextId, ushort commandId, ushort amount, byte param) + public static SubPacket BuildPacket(uint playerActorID, uint sourceActorId, uint targetActorId, uint animationId, uint effectId, ushort worldMasterTextId, ushort commandId, ushort amount, byte param) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX10Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX10Packet.cs index 7f22a969..67775962 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX10Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX10Packet.cs @@ -1,11 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.packets.send.actor.battle; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.battle { @@ -14,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle public const ushort OPCODE = 0x013A; public const uint PACKET_SIZE = 0xD8; - public static SubPacket buildPacket(uint playerActorID, uint sourceActorId, uint animationId, ushort commandId, BattleAction[] actionList) + public static SubPacket BuildPacket(uint playerActorID, uint sourceActorId, uint animationId, ushort commandId, BattleAction[] actionList) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX18Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX18Packet.cs index 9cf5469c..38038ab3 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX18Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX18Packet.cs @@ -1,11 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.packets.send.actor.battle; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.battle { @@ -14,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle public const ushort OPCODE = 0x013B; public const uint PACKET_SIZE = 0x148; - public static SubPacket buildPacket(uint playerActorID, uint sourceActorId, uint animationId, ushort commandId, BattleAction[] actionList) + public static SubPacket BuildPacket(uint playerActorID, uint sourceActorId, uint animationId, ushort commandId, BattleAction[] actionList) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/events/SetEmoteEventCondition.cs b/FFXIVClassic Map Server/packets/send/Actor/events/SetEmoteEventCondition.cs index 64a6ba49..dc98bab6 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetEmoteEventCondition.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetEmoteEventCondition.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.actors; +using FFXIVClassic_Map_Server.actors; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.events { @@ -14,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events public const ushort OPCODE = 0x016C; public const uint PACKET_SIZE = 0x48; - public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, EventList.EmoteEventCondition condition) + public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, EventList.EmoteEventCondition condition) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/events/SetEventStatus.cs b/FFXIVClassic Map Server/packets/send/Actor/events/SetEventStatus.cs index 0f854ea8..4867950a 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetEventStatus.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetEventStatus.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.events { @@ -13,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events public const ushort OPCODE = 0x0136; public const uint PACKET_SIZE = 0x48; - public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, bool enabled, byte unknown2, string conditionName) + public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, bool enabled, byte unknown2, string conditionName) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/events/SetNoticeEventCondition.cs b/FFXIVClassic Map Server/packets/send/Actor/events/SetNoticeEventCondition.cs index e1c9204a..04099db3 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetNoticeEventCondition.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetNoticeEventCondition.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.actors; +using FFXIVClassic_Map_Server.actors; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.events { @@ -14,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events public const ushort OPCODE = 0x016B; public const uint PACKET_SIZE = 0x48; - public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, EventList.NoticeEventCondition condition) + public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, EventList.NoticeEventCondition condition) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithCircle.cs b/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithCircle.cs index 5866b3eb..7b55dbd1 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithCircle.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithCircle.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.actors; +using FFXIVClassic_Map_Server.actors; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.events { @@ -14,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events public const ushort OPCODE = 0x016F; public const uint PACKET_SIZE = 0x58; - public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, EventList.PushCircleEventCondition condition) + public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, EventList.PushCircleEventCondition condition) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithFan.cs b/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithFan.cs index 700b0321..3d81c625 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithFan.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithFan.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.actors; +using FFXIVClassic_Map_Server.actors; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.events { @@ -14,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events public const ushort OPCODE = 0x0170; public const uint PACKET_SIZE = 0x60; - public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, EventList.PushFanEventCondition condition) + public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, EventList.PushFanEventCondition condition) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -34,7 +30,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events binWriter.Write(Encoding.ASCII.GetBytes(condition.conditionName), 0, Encoding.ASCII.GetByteCount(condition.conditionName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(condition.conditionName)); } } - new SubPacket(OPCODE, sourceActorID, playerActorID, data).debugPrintSubPacket(); + new SubPacket(OPCODE, sourceActorID, playerActorID, data).DebugPrintSubPacket(); return new SubPacket(OPCODE, sourceActorID, playerActorID, data); } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithTriggerBox.cs b/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithTriggerBox.cs index c338b1b8..97a0ffd2 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithTriggerBox.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithTriggerBox.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.actors; +using FFXIVClassic_Map_Server.actors; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.events { @@ -14,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events public const ushort OPCODE = 0x0175; public const uint PACKET_SIZE = 0x60; - public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, EventList.PushBoxEventCondition condition) + public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, EventList.PushBoxEventCondition condition) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/events/SetTalkEventCondition.cs b/FFXIVClassic Map Server/packets/send/Actor/events/SetTalkEventCondition.cs index 67a4a3dd..4616cbd9 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetTalkEventCondition.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetTalkEventCondition.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.actors; +using FFXIVClassic_Map_Server.actors; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.events { @@ -14,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events public const ushort OPCODE = 0x012E; public const uint PACKET_SIZE = 0x48; - public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, EventList.TalkEventCondition condition) + public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, EventList.TalkEventCondition condition) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX01Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX01Packet.cs index 44422757..364c575c 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX01Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX01Packet.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x014D; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, ushort equipSlot, uint itemSlot) + public static SubPacket BuildPacket(uint playerActorID, ushort equipSlot, uint itemSlot) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX08Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX08Packet.cs index 9cb1086b..ccf67e65 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX08Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX08Packet.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; +using FFXIVClassic_Map_Server.dataobjects; using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -14,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x14E; public const uint PACKET_SIZE = 0x58; - public static SubPacket buildPacket(uint playerActorId, InventoryItem[] equipment, List slotsToUpdate, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] equipment, List slotsToUpdate, ref int listOffset) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX16Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX16Packet.cs index c733edfc..5fc79272 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX16Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX16Packet.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; +using FFXIVClassic_Map_Server.dataobjects; using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -14,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x14F; public const uint PACKET_SIZE = 0x80; - public static SubPacket buildPacket(uint playerActorId, InventoryItem[] equipment, List slotsToUpdate, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] equipment, List slotsToUpdate, ref int listOffset) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX32Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX32Packet.cs index 2081256e..c6dde267 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX32Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX32Packet.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; +using FFXIVClassic_Map_Server.dataobjects; using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -14,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x150; public const uint PACKET_SIZE = 0xE0; - public static SubPacket buildPacket(uint playerActorId, InventoryItem[] equipment, List slotsToUpdate, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] equipment, List slotsToUpdate, ref int listOffset) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX64Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX64Packet.cs index a8109e54..309f2cf5 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX64Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX64Packet.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; +using FFXIVClassic_Map_Server.dataobjects; using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -14,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x151; public const uint PACKET_SIZE = 0x194; - public static SubPacket buildPacket(uint playerActorId, InventoryItem[] equipment, List slotsToUpdate, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] equipment, List slotsToUpdate, ref int listOffset) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryBeginChangePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryBeginChangePacket.cs index 34728dc1..4df15032 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryBeginChangePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryBeginChangePacket.cs @@ -1,25 +1,18 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory +namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { class InventoryBeginChangePacket { public const ushort OPCODE = 0x016D; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint sourceActorId, uint targetActorId) + public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId) { byte[] data = new byte[8]; data[0] = 2; return new SubPacket(OPCODE, sourceActorId, targetActorId, data); } - public static SubPacket buildPacket(uint playerActorID) + public static SubPacket BuildPacket(uint playerActorID) { byte[] data = new byte[8]; return new SubPacket(OPCODE, playerActorID, playerActorID, data); diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryEndChangePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryEndChangePacket.cs index b0266b3c..c6944676 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryEndChangePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryEndChangePacket.cs @@ -1,23 +1,16 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory +namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { class InventoryEndChangePacket { public const ushort OPCODE = 0x016E; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint sourceActorId, uint targetActorId) + public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId) { return new SubPacket(OPCODE, sourceActorId, targetActorId, new byte[8]); } - public static SubPacket buildPacket(uint playerActorID) + public static SubPacket BuildPacket(uint playerActorID) { return new SubPacket(OPCODE, playerActorID, playerActorID, new byte[8]); } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryItemEndPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryItemEndPacket.cs index 414ceecd..d1665120 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryItemEndPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryItemEndPacket.cs @@ -1,11 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; -using System; +using FFXIVClassic_Map_Server.dataobjects; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -15,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x0149; public const uint PACKET_SIZE = 0x90; - public static SubPacket buildPacket(uint playerActorID, List items, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorID, List items, ref int listOffset) { byte[] data; @@ -25,7 +20,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { for (int i = listOffset; i < items.Count; i++) { - binWriter.Write(items[i].toPacketBytes()); + binWriter.Write(items[i].ToPacketBytes()); listOffset++; } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryItemPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryItemPacket.cs index d898bb49..75cdd97d 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryItemPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryItemPacket.cs @@ -1,11 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; -using System; +using FFXIVClassic_Map_Server.dataobjects; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -15,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x014A; public const uint PACKET_SIZE = 0x90; - public static SubPacket buildPacket(uint playerActorID, List items, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorID, List items, ref int listOffset) { byte[] data; @@ -25,7 +20,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { for (int i = listOffset; i < items.Count; i++) { - binWriter.Write(items[i].toPacketBytes()); + binWriter.Write(items[i].ToPacketBytes()); listOffset++; } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX01Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX01Packet.cs index af0e1ce8..5d4db4fe 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX01Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX01Packet.cs @@ -1,11 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; -using System; -using System.Collections.Generic; +using FFXIVClassic_Map_Server.dataobjects; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.inventory { @@ -14,12 +8,12 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory public const ushort OPCODE = 0x0148; public const uint PACKET_SIZE = 0x90; - public static SubPacket buildPacket(uint playerActorId, InventoryItem item) + public static SubPacket BuildPacket(uint playerActorId, InventoryItem item) { - return buildPacket(playerActorId, playerActorId, item); + return BuildPacket(playerActorId, playerActorId, item); } - public static SubPacket buildPacket(uint sourceActorId, uint targetActorId, InventoryItem item) + public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, InventoryItem item) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -27,7 +21,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory { using (BinaryWriter binWriter = new BinaryWriter(mem)) { - binWriter.Write(item.toPacketBytes()); + binWriter.Write(item.ToPacketBytes()); } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX08Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX08Packet.cs index 9be456a7..b136429c 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX08Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX08Packet.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; +using FFXIVClassic_Map_Server.dataobjects; using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.inventory { @@ -14,12 +10,12 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory public const ushort OPCODE = 0x0149; public const uint PACKET_SIZE = 0x3A8; - public static SubPacket buildPacket(uint playerActorId, List items, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorId, List items, ref int listOffset) { - return buildPacket(playerActorId, playerActorId, items, ref listOffset); + return BuildPacket(playerActorId, playerActorId, items, ref listOffset); } - public static SubPacket buildPacket(uint sourceActorId, uint targetActorId, List items, ref int listOffset) + public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, List items, ref int listOffset) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -35,7 +31,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory for (int i = 0; i < max; i++) { - binWriter.Write(items[listOffset].toPacketBytes()); + binWriter.Write(items[listOffset].ToPacketBytes()); listOffset++; } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX16Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX16Packet.cs index cd60c041..31cf4cc4 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX16Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX16Packet.cs @@ -1,11 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; -using System; +using FFXIVClassic_Map_Server.dataobjects; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.inventory { @@ -14,12 +9,12 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory public const ushort OPCODE = 0x014A; public const uint PACKET_SIZE = 0x720; - public static SubPacket buildPacket(uint playerActorId, List items, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorId, List items, ref int listOffset) { - return buildPacket(playerActorId, playerActorId, items, ref listOffset); + return BuildPacket(playerActorId, playerActorId, items, ref listOffset); } - public static SubPacket buildPacket(uint sourceActorId, uint targetActorId, List items, ref int listOffset) + public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, List items, ref int listOffset) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -35,7 +30,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory for (int i = 0; i < max; i++) { - binWriter.Write(items[listOffset].toPacketBytes()); + binWriter.Write(items[listOffset].ToPacketBytes()); listOffset++; } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX32Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX32Packet.cs index f18275f5..58e1c9c8 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX32Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX32Packet.cs @@ -1,11 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; -using System; +using FFXIVClassic_Map_Server.dataobjects; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.inventory { @@ -14,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory public const ushort OPCODE = 0x014B; public const uint PACKET_SIZE = 0xE20; - public static SubPacket buildPacket(uint playerActorID, List items, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorID, List items, ref int listOffset) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -30,7 +25,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory for (int i = 0; i < max; i++) { - binWriter.Write(items[listOffset].toPacketBytes()); + binWriter.Write(items[listOffset].ToPacketBytes()); listOffset++; } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX64Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX64Packet.cs index e8443e9f..7599f309 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX64Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX64Packet.cs @@ -1,11 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; -using System; +using FFXIVClassic_Map_Server.dataobjects; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor.inventory { @@ -14,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory public const ushort OPCODE = 0x014C; public const uint PACKET_SIZE = 0x1C20; - public static SubPacket buildPacket(uint playerActorID, List items, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorID, List items, ref int listOffset) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -30,7 +25,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory for (int i = 0; i < max; i++) { - binWriter.Write(items[listOffset].toPacketBytes()); + binWriter.Write(items[listOffset].ToPacketBytes()); listOffset++; } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX01Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX01Packet.cs index b91c56fb..e210bacb 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX01Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX01Packet.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x0152; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, ushort slot) + public static SubPacket BuildPacket(uint playerActorID, ushort slot) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX08Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX08Packet.cs index 26c4f27c..54f9cfa4 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX08Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX08Packet.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; +using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -13,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x0153; public const uint PACKET_SIZE = 0x38; - public static SubPacket buildPacket(uint playerActorID, List slots, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorID, List slots, ref int listOffset) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX16Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX16Packet.cs index 7d7ad104..e47e0e95 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX16Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX16Packet.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; +using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -13,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x154; public const uint PACKET_SIZE = 0x40; - public static SubPacket buildPacket(uint playerActorID, List slots, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorID, List slots, ref int listOffset) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX32Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX32Packet.cs index 4b05d273..6af8c465 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX32Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX32Packet.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; +using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -13,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x0155; public const uint PACKET_SIZE = 0x60; - public static SubPacket buildPacket(uint playerActorID, List slots, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorID, List slots, ref int listOffset) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX64Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX64Packet.cs index 8359d2b4..b6d7a3b5 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX64Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX64Packet.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; +using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -13,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x156; public const uint PACKET_SIZE = 0xA0; - public static SubPacket buildPacket(uint playerActorID, List slots, ref int listOffset) + public static SubPacket BuildPacket(uint playerActorID, List slots, ref int listOffset) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetBeginPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetBeginPacket.cs index b7828c92..707f9ca1 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetBeginPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetBeginPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { @@ -13,12 +8,12 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x0146; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorId, ushort size, ushort code) + public static SubPacket BuildPacket(uint playerActorId, ushort size, ushort code) { - return buildPacket(playerActorId, playerActorId, size, code); + return BuildPacket(playerActorId, playerActorId, size, code); } - public static SubPacket buildPacket(uint sourceActorId, uint targetActorId, ushort size, ushort code) + public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, ushort size, ushort code) { byte[] data = new byte[8]; diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetEndPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetEndPacket.cs index 16ae71c0..29da7459 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetEndPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetEndPacket.cs @@ -1,11 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory +namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory { class InventorySetEndPacket { @@ -13,12 +6,12 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory public const ushort OPCODE = 0x0147; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorId) + public static SubPacket BuildPacket(uint playerActorId) { return new SubPacket(OPCODE, playerActorId, playerActorId, new byte[8]); } - public static SubPacket buildPacket(uint sourceActorId, uint targetActorID) + public static SubPacket BuildPacket(uint sourceActorId, uint targetActorID) { return new SubPacket(OPCODE, sourceActorId, targetActorID, new byte[8]); } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/SetInitialEquipmentPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/SetInitialEquipmentPacket.cs index f21f3ae1..f6feab76 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/SetInitialEquipmentPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/SetInitialEquipmentPacket.cs @@ -42,7 +42,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory equipment[i] = UNEQUIPPED; //We will use this as "Unequipped" } - public void setItem(int slot, uint itemSlot) + public void SetItem(int slot, uint itemSlot) { if (slot >= equipment.Length) return; @@ -50,7 +50,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory equipment[slot] = itemSlot; } - public List buildPackets(uint playerActorID) + public List BuildPackets(uint playerActorID) { List packets = new List(); int packetCount = 0; diff --git a/FFXIVClassic Map Server/packets/send/GameMessagePacket.cs b/FFXIVClassic Map Server/packets/send/GameMessagePacket.cs index 92c413be..9524bae1 100644 --- a/FFXIVClassic Map Server/packets/send/GameMessagePacket.cs +++ b/FFXIVClassic Map Server/packets/send/GameMessagePacket.cs @@ -1,11 +1,8 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.lua; +using FFXIVClassic_Map_Server.lua; using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send { @@ -59,7 +56,7 @@ namespace FFXIVClassic_Map_Server.packets.send private const ushort SIZE_GAMEMESSAGE_WITHOUT_ACTOR4 = 0x48; private const ushort SIZE_GAMEMESSAGE_WITHOUT_ACTOR5 = 0x68; - public static SubPacket buildPacket(uint sourceId, uint targetId, uint actorId, uint textOwnerActorId, ushort textId, byte log) + public static SubPacket BuildPacket(uint sourceId, uint targetId, uint actorId, uint textOwnerActorId, ushort textId, byte log) { byte[] data = new byte[SIZE_GAMEMESSAGE_WITH_ACTOR1 - 0x20]; @@ -77,7 +74,7 @@ namespace FFXIVClassic_Map_Server.packets.send return new SubPacket(OPCODE_GAMEMESSAGE_WITH_ACTOR1, sourceId, targetId, data); } - public static SubPacket buildPacket(uint sourceId, uint targetId, uint actorId, uint textOwnerActorId, ushort textId, byte log, List lParams) + public static SubPacket BuildPacket(uint sourceId, uint targetId, uint actorId, uint textOwnerActorId, ushort textId, byte log, List lParams) { int lParamsSize = findSizeOfParams(lParams); byte[] data; @@ -112,7 +109,7 @@ namespace FFXIVClassic_Map_Server.packets.send binWriter.Write((UInt32)textOwnerActorId); binWriter.Write((UInt16)textId); binWriter.Write((UInt16)log); - LuaUtils.writeLuaParams(binWriter, lParams); + LuaUtils.WriteLuaParams(binWriter, lParams); if (lParamsSize <= 0x14-12) { @@ -125,7 +122,7 @@ namespace FFXIVClassic_Map_Server.packets.send return new SubPacket(opcode, sourceId, targetId, data); } - public static SubPacket buildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, string sender, byte log) + public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, string sender, byte log) { byte[] data = new byte[SIZE_GAMEMESSAGE_WITH_CUSTOM_SENDER1 - 0x20]; @@ -143,7 +140,7 @@ namespace FFXIVClassic_Map_Server.packets.send return new SubPacket(OPCODE_GAMEMESSAGE_WITH_CUSTOM_SENDER1, sourceId, targetId, data); } - public static SubPacket buildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, string sender, byte log, List lParams) + public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, string sender, byte log, List lParams) { int lParamsSize = findSizeOfParams(lParams); byte[] data; @@ -178,7 +175,7 @@ namespace FFXIVClassic_Map_Server.packets.send binWriter.Write((UInt16)textId); binWriter.Write((UInt16)log); binWriter.Write(Encoding.ASCII.GetBytes(sender), 0, Encoding.ASCII.GetByteCount(sender) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(sender)); - LuaUtils.writeLuaParams(binWriter, lParams); + LuaUtils.WriteLuaParams(binWriter, lParams); if (lParamsSize <= 0x14 - 12) { @@ -191,7 +188,7 @@ namespace FFXIVClassic_Map_Server.packets.send return new SubPacket(opcode, sourceId, targetId, data); } - public static SubPacket buildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, uint senderDisplayNameId, byte log) + public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, uint senderDisplayNameId, byte log) { byte[] data = new byte[SIZE_GAMEMESSAGE_WITH_DISPID_SENDER1 - 0x20]; @@ -209,7 +206,7 @@ namespace FFXIVClassic_Map_Server.packets.send return new SubPacket(OPCODE_GAMEMESSAGE_WITH_DISPID_SENDER1, sourceId, targetId, data); } - public static SubPacket buildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, uint senderDisplayNameId, byte log, List lParams) + public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, uint senderDisplayNameId, byte log, List lParams) { int lParamsSize = findSizeOfParams(lParams); byte[] data; @@ -244,7 +241,7 @@ namespace FFXIVClassic_Map_Server.packets.send binWriter.Write((UInt32)textOwnerActorId); binWriter.Write((UInt16)textId); binWriter.Write((UInt16)log); - LuaUtils.writeLuaParams(binWriter, lParams); + LuaUtils.WriteLuaParams(binWriter, lParams); if (lParamsSize <= 0x14 - 12) { @@ -257,7 +254,7 @@ namespace FFXIVClassic_Map_Server.packets.send return new SubPacket(opcode, sourceId, targetId, data); } - public static SubPacket buildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, byte log) + public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, byte log) { byte[] data = new byte[SIZE_GAMEMESSAGE_WITHOUT_ACTOR1 - 0x20]; @@ -274,7 +271,7 @@ namespace FFXIVClassic_Map_Server.packets.send return new SubPacket(OPCODE_GAMEMESSAGE_WITHOUT_ACTOR1, sourceId, targetId, data); } - public static SubPacket buildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, byte log, List lParams) + public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, byte log, List lParams) { int lParamsSize = findSizeOfParams(lParams); byte[] data; @@ -308,7 +305,7 @@ namespace FFXIVClassic_Map_Server.packets.send binWriter.Write((UInt32)textOwnerActorId); binWriter.Write((UInt16)textId); binWriter.Write((UInt16)log); - LuaUtils.writeLuaParams(binWriter, lParams); + LuaUtils.WriteLuaParams(binWriter, lParams); if (lParamsSize <= 0x8) { diff --git a/FFXIVClassic Map Server/packets/send/LogoutPacket.cs b/FFXIVClassic Map Server/packets/send/LogoutPacket.cs index 553bf127..cd8babaf 100644 --- a/FFXIVClassic Map Server/packets/send/LogoutPacket.cs +++ b/FFXIVClassic Map Server/packets/send/LogoutPacket.cs @@ -1,18 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send +namespace FFXIVClassic_Map_Server.packets.send { class LogoutPacket { public const ushort OPCODE = 0x000E; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID) + public static SubPacket BuildPacket(uint playerActorID) { return new SubPacket(OPCODE, playerActorID, playerActorID, new byte[8]); } diff --git a/FFXIVClassic Map Server/packets/send/PongPacket.cs b/FFXIVClassic Map Server/packets/send/PongPacket.cs index abddf2f7..695116b9 100644 --- a/FFXIVClassic Map Server/packets/send/PongPacket.cs +++ b/FFXIVClassic Map Server/packets/send/PongPacket.cs @@ -1,11 +1,5 @@ -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.receive { @@ -14,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.receive public const ushort OPCODE = 0x0001; public const uint PACKET_SIZE = 0x40; - public static SubPacket buildPacket(uint playerActorID, uint pingTicks) + public static SubPacket BuildPacket(uint playerActorID, uint pingTicks) { byte[] data = new byte[PACKET_SIZE-0x20]; diff --git a/FFXIVClassic Map Server/packets/send/QuitPacket.cs b/FFXIVClassic Map Server/packets/send/QuitPacket.cs index 8099b683..b10c9e24 100644 --- a/FFXIVClassic Map Server/packets/send/QuitPacket.cs +++ b/FFXIVClassic Map Server/packets/send/QuitPacket.cs @@ -1,18 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send +namespace FFXIVClassic_Map_Server.packets.send { class QuitPacket { public const ushort OPCODE = 0x0011; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID) + public static SubPacket BuildPacket(uint playerActorID) { return new SubPacket(OPCODE, playerActorID, playerActorID, new byte[8]); } diff --git a/FFXIVClassic Map Server/packets/send/SendMessagePacket.cs b/FFXIVClassic Map Server/packets/send/SendMessagePacket.cs index f27b48c4..6152f215 100644 --- a/FFXIVClassic Map Server/packets/send/SendMessagePacket.cs +++ b/FFXIVClassic Map Server/packets/send/SendMessagePacket.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send { @@ -38,7 +34,7 @@ namespace FFXIVClassic_Map_Server.packets.send public const ushort OPCODE = 0x0003; public const uint PACKET_SIZE = 0x248; - public static SubPacket buildPacket(uint playerActorID, uint targetID, uint messageType, string sender, string message) + public static SubPacket BuildPacket(uint playerActorID, uint targetID, uint messageType, string sender, string message) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/SetMapPacket.cs b/FFXIVClassic Map Server/packets/send/SetMapPacket.cs index e42b75b7..797b8199 100644 --- a/FFXIVClassic Map Server/packets/send/SetMapPacket.cs +++ b/FFXIVClassic Map Server/packets/send/SetMapPacket.cs @@ -1,10 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.IO; namespace FFXIVClassic_Map_Server.packets.send { @@ -13,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send public const ushort OPCODE = 0x0005; public const uint PACKET_SIZE = 0x30; - public static SubPacket buildPacket(uint playerActorID, uint mapID, uint regionID) + public static SubPacket BuildPacket(uint playerActorID, uint mapID, uint regionID) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/SetMusicPacket.cs b/FFXIVClassic Map Server/packets/send/SetMusicPacket.cs index d4f8320a..08a66521 100644 --- a/FFXIVClassic Map Server/packets/send/SetMusicPacket.cs +++ b/FFXIVClassic Map Server/packets/send/SetMusicPacket.cs @@ -1,9 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System; namespace FFXIVClassic_Map_Server.packets.send { @@ -19,7 +14,7 @@ namespace FFXIVClassic_Map_Server.packets.send public const ushort EFFECT_PLAY_NORMAL_CHANNEL = 0x5; //Only works for multi channeled music public const ushort EFFECT_PLAY_BATTLE_CHANNEL = 0x6; - public static SubPacket buildPacket(uint playerActorID, ushort musicID, ushort musicTrackMode) + public static SubPacket BuildPacket(uint playerActorID, ushort musicID, ushort musicTrackMode) { ulong combined = (ulong)(musicID | (musicTrackMode << 16)); return new SubPacket(OPCODE, 0, playerActorID, BitConverter.GetBytes(combined)); diff --git a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs index 63778379..cce963f3 100644 --- a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs +++ b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs @@ -1,9 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System; namespace FFXIVClassic_Map_Server.packets.send { @@ -40,7 +35,7 @@ namespace FFXIVClassic_Map_Server.packets.send public const ushort OPCODE = 0x000D; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, ushort weatherId, ushort transitionTime) + public static SubPacket BuildPacket(uint playerActorID, ushort weatherId, ushort transitionTime) { ulong combined = (ulong)(weatherId | (transitionTime << 16)); return new SubPacket(OPCODE, 0, playerActorID, BitConverter.GetBytes(combined)); diff --git a/FFXIVClassic Map Server/packets/send/_0x02Packet.cs b/FFXIVClassic Map Server/packets/send/_0x02Packet.cs index 64621176..0f627e35 100644 --- a/FFXIVClassic Map Server/packets/send/_0x02Packet.cs +++ b/FFXIVClassic Map Server/packets/send/_0x02Packet.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send public const ushort OPCODE = 0x0002; public const uint PACKET_SIZE = 0x30; - public static SubPacket buildPacket(uint playerActorId, int val) + public static SubPacket BuildPacket(uint playerActorId, int val) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/_0x10Packet.cs b/FFXIVClassic Map Server/packets/send/_0x10Packet.cs index 5c036792..e0f229c2 100644 --- a/FFXIVClassic Map Server/packets/send/_0x10Packet.cs +++ b/FFXIVClassic Map Server/packets/send/_0x10Packet.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send public const ushort OPCODE = 0x0010; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorId, int val) + public static SubPacket BuildPacket(uint playerActorId, int val) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/_0xE2Packet.cs b/FFXIVClassic Map Server/packets/send/_0xE2Packet.cs index e2149f36..0ad9b340 100644 --- a/FFXIVClassic Map Server/packets/send/_0xE2Packet.cs +++ b/FFXIVClassic Map Server/packets/send/_0xE2Packet.cs @@ -1,9 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System; namespace FFXIVClassic_Map_Server.packets.send { @@ -12,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send public const ushort OPCODE = 0x00E2; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, int val) + public static SubPacket BuildPacket(uint playerActorID, int val) { byte[] data = new byte[PACKET_SIZE - 0x20]; data[0] = (Byte) (val & 0xFF); diff --git a/FFXIVClassic Map Server/packets/send/events/EndEventPacket.cs b/FFXIVClassic Map Server/packets/send/events/EndEventPacket.cs index 72cc0e72..29facf3d 100644 --- a/FFXIVClassic Map Server/packets/send/events/EndEventPacket.cs +++ b/FFXIVClassic Map Server/packets/send/events/EndEventPacket.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.events { @@ -13,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events public const ushort OPCODE = 0x0131; public const uint PACKET_SIZE = 0x50; - public static SubPacket buildPacket(uint playerActorID, uint eventOwnerActorID, string eventStarter) + public static SubPacket BuildPacket(uint playerActorID, uint eventOwnerActorID, string eventStarter) { byte[] data = new byte[PACKET_SIZE - 0x20]; int maxBodySize = data.Length - 0x80; diff --git a/FFXIVClassic Map Server/packets/send/events/KickEventPacket.cs b/FFXIVClassic Map Server/packets/send/events/KickEventPacket.cs index 3fbdc1af..35571c55 100644 --- a/FFXIVClassic Map Server/packets/send/events/KickEventPacket.cs +++ b/FFXIVClassic Map Server/packets/send/events/KickEventPacket.cs @@ -1,11 +1,8 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.lua; +using FFXIVClassic_Map_Server.lua; using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.events { @@ -14,7 +11,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events public const ushort OPCODE = 0x012F; public const uint PACKET_SIZE = 0x90; - public static SubPacket buildPacket(uint playerActorId, uint targetActorId, string conditionName, List luaParams) + public static SubPacket BuildPacket(uint playerActorId, uint targetActorId, string conditionName, List luaParams) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -33,7 +30,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events binWriter.Seek(0x30, SeekOrigin.Begin); - LuaUtils.writeLuaParams(binWriter, luaParams); + LuaUtils.WriteLuaParams(binWriter, luaParams); } } diff --git a/FFXIVClassic Map Server/packets/send/events/RunEventFunctionPacket.cs b/FFXIVClassic Map Server/packets/send/events/RunEventFunctionPacket.cs index 20330d3e..fe2c989e 100644 --- a/FFXIVClassic Map Server/packets/send/events/RunEventFunctionPacket.cs +++ b/FFXIVClassic Map Server/packets/send/events/RunEventFunctionPacket.cs @@ -1,12 +1,8 @@ -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.lua; +using FFXIVClassic_Map_Server.lua; using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.events { @@ -15,7 +11,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events public const ushort OPCODE = 0x0130; public const uint PACKET_SIZE = 0x2B8; - public static SubPacket buildPacket(uint playerActorID, uint eventOwnerActorID, string eventStarter, string callFunction, List luaParams) + public static SubPacket BuildPacket(uint playerActorID, uint eventOwnerActorID, string eventStarter, string callFunction, List luaParams) { byte[] data = new byte[PACKET_SIZE - 0x20]; int maxBodySize = data.Length - 0x80; @@ -32,7 +28,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events binWriter.Write(Encoding.ASCII.GetBytes(callFunction), 0, Encoding.ASCII.GetByteCount(callFunction) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(callFunction)); binWriter.Seek(0x49, SeekOrigin.Begin); - LuaUtils.writeLuaParams(binWriter, luaParams); + LuaUtils.WriteLuaParams(binWriter, luaParams); } } diff --git a/FFXIVClassic Map Server/packets/send/list/ListBeginPacket.cs b/FFXIVClassic Map Server/packets/send/list/ListBeginPacket.cs index 3d24a700..9acebfd7 100644 --- a/FFXIVClassic Map Server/packets/send/list/ListBeginPacket.cs +++ b/FFXIVClassic Map Server/packets/send/list/ListBeginPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.list { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.list public const ushort OPCODE = 0x017D; public const uint PACKET_SIZE = 0x40; - public static SubPacket buildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId, int numEntries) + public static SubPacket BuildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId, int numEntries) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/list/ListEndPacket.cs b/FFXIVClassic Map Server/packets/send/list/ListEndPacket.cs index b85a6d17..e8cc597d 100644 --- a/FFXIVClassic Map Server/packets/send/list/ListEndPacket.cs +++ b/FFXIVClassic Map Server/packets/send/list/ListEndPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.list { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.list public const ushort OPCODE = 0x017E; public const uint PACKET_SIZE = 0x38; - public static SubPacket buildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId) + public static SubPacket BuildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/list/ListEntriesEndPacket.cs b/FFXIVClassic Map Server/packets/send/list/ListEntriesEndPacket.cs index 13ef33c6..eaf661ba 100644 --- a/FFXIVClassic Map Server/packets/send/list/ListEntriesEndPacket.cs +++ b/FFXIVClassic Map Server/packets/send/list/ListEntriesEndPacket.cs @@ -1,10 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; +using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.list { @@ -13,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.list public const ushort OPCODE = 0x017F; public const uint PACKET_SIZE = 0x1B8; - public static SubPacket buildPacket(uint playerActorID, uint locationCode, ulong sequenceId, List entries, int offset) + public static SubPacket BuildPacket(uint playerActorID, uint locationCode, ulong sequenceId, List entries, int offset) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/list/ListEntry.cs b/FFXIVClassic Map Server/packets/send/list/ListEntry.cs index 9a6ac250..97859916 100644 --- a/FFXIVClassic Map Server/packets/send/list/ListEntry.cs +++ b/FFXIVClassic Map Server/packets/send/list/ListEntry.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.list +namespace FFXIVClassic_Map_Server.packets.send.list { class ListEntry { diff --git a/FFXIVClassic Map Server/packets/send/list/ListStartPacket.cs b/FFXIVClassic Map Server/packets/send/list/ListStartPacket.cs index 9535703b..56934bef 100644 --- a/FFXIVClassic Map Server/packets/send/list/ListStartPacket.cs +++ b/FFXIVClassic Map Server/packets/send/list/ListStartPacket.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.list { @@ -17,7 +13,7 @@ namespace FFXIVClassic_Map_Server.packets.send.list public const ushort OPCODE = 0x017C; public const uint PACKET_SIZE = 0x98; - public static SubPacket buildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId, uint listTypeId, int numEntries) + public static SubPacket BuildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId, uint listTypeId, int numEntries) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -38,7 +34,7 @@ namespace FFXIVClassic_Map_Server.packets.send.list binWriter.Write((UInt64)0); binWriter.Write((UInt64)listId); - //This seems to change depending on what the list is for + //This seems to Change depending on what the list is for binWriter.Write((UInt32)listTypeId); binWriter.Seek(0x40, SeekOrigin.Begin); diff --git a/FFXIVClassic Map Server/packets/send/list/ListUtils.cs b/FFXIVClassic Map Server/packets/send/list/ListUtils.cs index 09866ddd..03269fe1 100644 --- a/FFXIVClassic Map Server/packets/send/list/ListUtils.cs +++ b/FFXIVClassic Map Server/packets/send/list/ListUtils.cs @@ -1,42 +1,37 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; namespace FFXIVClassic_Map_Server.packets.send.list { class ListUtils { - public static List createList(uint actorId, uint locationCode, ulong sequenceId, ulong listId, uint listTypeId, List listEntries) + public static List CreateList(uint actorId, uint locationCode, ulong sequenceId, ulong listId, uint listTypeId, List listEntries) { List subpacketList = new List(); - subpacketList.Add(ListStartPacket.buildPacket(actorId, locationCode, sequenceId, listId, listTypeId, listEntries.Count)); - subpacketList.Add(ListBeginPacket.buildPacket(actorId, locationCode, sequenceId, listId, listEntries.Count)); - subpacketList.Add(ListEntriesEndPacket.buildPacket(actorId, locationCode, sequenceId, listEntries, 0)); - subpacketList.Add(ListEndPacket.buildPacket(actorId, locationCode, sequenceId, listId)); + subpacketList.Add(ListStartPacket.BuildPacket(actorId, locationCode, sequenceId, listId, listTypeId, listEntries.Count)); + subpacketList.Add(ListBeginPacket.BuildPacket(actorId, locationCode, sequenceId, listId, listEntries.Count)); + subpacketList.Add(ListEntriesEndPacket.BuildPacket(actorId, locationCode, sequenceId, listEntries, 0)); + subpacketList.Add(ListEndPacket.BuildPacket(actorId, locationCode, sequenceId, listId)); return subpacketList; } - public static List createRetainerList(uint actorId, uint locationCode, ulong sequenceId, ulong listId, List listEntries) + public static List CreateRetainerList(uint actorId, uint locationCode, ulong sequenceId, ulong listId, List listEntries) { List subpacketList = new List(); - subpacketList.Add(ListStartPacket.buildPacket(actorId, locationCode, sequenceId, listId, ListStartPacket.TYPEID_RETAINER, listEntries.Count)); - subpacketList.Add(ListBeginPacket.buildPacket(actorId, locationCode, sequenceId, listId, listEntries.Count)); - subpacketList.Add(ListEntriesEndPacket.buildPacket(actorId, locationCode, sequenceId, listEntries, 0)); - subpacketList.Add(ListEndPacket.buildPacket(actorId, locationCode, sequenceId, listId)); + subpacketList.Add(ListStartPacket.BuildPacket(actorId, locationCode, sequenceId, listId, ListStartPacket.TYPEID_RETAINER, listEntries.Count)); + subpacketList.Add(ListBeginPacket.BuildPacket(actorId, locationCode, sequenceId, listId, listEntries.Count)); + subpacketList.Add(ListEntriesEndPacket.BuildPacket(actorId, locationCode, sequenceId, listEntries, 0)); + subpacketList.Add(ListEndPacket.BuildPacket(actorId, locationCode, sequenceId, listId)); return subpacketList; } - public static List createPartyList(uint actorId, uint locationCode, ulong sequenceId, ulong listId, List listEntries) + public static List CreatePartyList(uint actorId, uint locationCode, ulong sequenceId, ulong listId, List listEntries) { List subpacketList = new List(); - subpacketList.Add(ListStartPacket.buildPacket(actorId, locationCode, sequenceId, listId, ListStartPacket.TYPEID_PARTY, listEntries.Count)); - subpacketList.Add(ListBeginPacket.buildPacket(actorId, locationCode, sequenceId, listId, listEntries.Count)); - subpacketList.Add(ListEntriesEndPacket.buildPacket(actorId, locationCode, sequenceId, listEntries, 0)); - subpacketList.Add(ListEndPacket.buildPacket(actorId, locationCode, sequenceId, listId)); + subpacketList.Add(ListStartPacket.BuildPacket(actorId, locationCode, sequenceId, listId, ListStartPacket.TYPEID_PARTY, listEntries.Count)); + subpacketList.Add(ListBeginPacket.BuildPacket(actorId, locationCode, sequenceId, listId, listEntries.Count)); + subpacketList.Add(ListEntriesEndPacket.BuildPacket(actorId, locationCode, sequenceId, listEntries, 0)); + subpacketList.Add(ListEndPacket.BuildPacket(actorId, locationCode, sequenceId, listId)); return subpacketList; } diff --git a/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs b/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs index ebec18c7..781e137f 100644 --- a/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs +++ b/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs @@ -1,12 +1,9 @@ -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic.Common; using System; -using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -32,13 +29,13 @@ namespace FFXIVClassic_Map_Server.packets.send.actor binWriter.Seek(1, SeekOrigin.Current); } - public void closeStreams() + public void CloseStreams() { binWriter.Dispose(); mem.Dispose(); } - public bool addByte(uint id, byte value) + public bool AcceptCallback(uint id, byte value) { if (runningByteTotal + 6 > MAXBYTES) return false; @@ -51,7 +48,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor return true; } - public bool addShort(uint id, ushort value) + public bool AddShort(uint id, ushort value) { if (runningByteTotal + 7 > MAXBYTES) return false; @@ -64,7 +61,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor return true; } - public bool addInt(uint id, uint value) + public bool AddInt(uint id, uint value) { if (runningByteTotal + 9 > MAXBYTES) return false; @@ -77,7 +74,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor return true; } - public bool addBuffer(uint id, byte[] buffer) + public bool AddBuffer(uint id, byte[] buffer) { if (runningByteTotal + 5 + buffer.Length > MAXBYTES) return false; @@ -90,7 +87,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor return true; } - public void addProperty(FFXIVClassic_Map_Server.Actors.Actor actor, string name) + public void AddProperty(FFXIVClassic_Map_Server.Actors.Actor actor, string name) { string[] split = name.Split('.'); int arrayIndex = 0; @@ -135,33 +132,33 @@ namespace FFXIVClassic_Map_Server.packets.send.actor if (curObj == null) return; - //Cast to the proper object and add to packet + //Cast to the proper object and Add to packet uint id = Utils.MurmurHash2(name, 0); if (curObj is bool) - addByte(id, (byte)(((bool)curObj) ? 1 : 0)); + AcceptCallback(id, (byte)(((bool)curObj) ? 1 : 0)); else if (curObj is byte) - addByte(id, (byte)curObj); + AcceptCallback(id, (byte)curObj); else if (curObj is ushort) - addShort(id, (ushort)curObj); + AddShort(id, (ushort)curObj); else if (curObj is short) - addShort(id, (ushort)(short)curObj); + AddShort(id, (ushort)(short)curObj); else if (curObj is uint) - addInt(id, (uint)curObj); + AddInt(id, (uint)curObj); else if (curObj is int) - addInt(id, (uint)(int)curObj); + AddInt(id, (uint)(int)curObj); else if (curObj is float) - addBuffer(id, BitConverter.GetBytes((float)curObj)); + AddBuffer(id, BitConverter.GetBytes((float)curObj)); else return; } } - public void setIsMore(bool flag) + public void SetIsMore(bool flag) { isMore = flag; } - public void setTarget(string target) + public void SetTarget(string target) { binWriter.Write((byte)(isMore ? 0x62 + target.Length : 0x82 + target.Length)); binWriter.Write(Encoding.ASCII.GetBytes(target)); @@ -169,12 +166,12 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } - public SubPacket buildPacket(uint playerActorID, uint actorID) + public SubPacket BuildPacket(uint playerActorID, uint actorID) { binWriter.Seek(0x8, SeekOrigin.Begin); binWriter.Write((byte)runningByteTotal); - closeStreams(); + CloseStreams(); SubPacket packet = new SubPacket(OPCODE, playerActorID, actorID, data); return packet; diff --git a/FFXIVClassic Map Server/packets/send/login/0x2Packet.cs b/FFXIVClassic Map Server/packets/send/login/0x2Packet.cs index fd7030aa..59a1f583 100644 --- a/FFXIVClassic Map Server/packets/send/login/0x2Packet.cs +++ b/FFXIVClassic Map Server/packets/send/login/0x2Packet.cs @@ -1,10 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.IO; namespace FFXIVClassic_Map_Server.packets.send.login { @@ -13,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.login public const ushort OPCODE = 0x0002; public const uint PACKET_SIZE = 0x30; - public static SubPacket buildPacket(uint playerActorID) + public static SubPacket BuildPacket(uint playerActorID) { byte[] data = new byte[PACKET_SIZE-0x20]; diff --git a/FFXIVClassic Map Server/packets/send/login/0x7ResponsePacket.cs b/FFXIVClassic Map Server/packets/send/login/0x7ResponsePacket.cs index c4cbde84..133fffb5 100644 --- a/FFXIVClassic Map Server/packets/send/login/0x7ResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/login/0x7ResponsePacket.cs @@ -1,16 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.login { class Login0x7ResponsePacket { - public static BasePacket buildPacket(uint actorID, uint time) + public static BasePacket BuildPacket(uint actorID, uint time) { byte[] data = new byte[0x18]; @@ -35,7 +30,7 @@ namespace FFXIVClassic_Map_Server.packets.send.login } } - return BasePacket.createPacket(data, false, false); + return BasePacket.CreatePacket(data, false, false); } } } diff --git a/FFXIVClassic Map Server/packets/send/player/AchievementEarnedPacket.cs b/FFXIVClassic Map Server/packets/send/player/AchievementEarnedPacket.cs index 4b04676e..2151e81c 100644 --- a/FFXIVClassic Map Server/packets/send/player/AchievementEarnedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/AchievementEarnedPacket.cs @@ -1,9 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System; namespace FFXIVClassic_Map_Server.packets.send.player { @@ -12,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public const ushort OPCODE = 0x019E; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint achievementID) + public static SubPacket BuildPacket(uint playerActorID, uint achievementID) { return new SubPacket(OPCODE, playerActorID, playerActorID, BitConverter.GetBytes((UInt64)achievementID)); } diff --git a/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs b/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs index c568d661..73780b4c 100644 --- a/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs @@ -1,12 +1,6 @@ -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.lua; -using System; +using FFXIVClassic_Map_Server.lua; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.player { @@ -15,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public const ushort OPCODE = 0x0133; public const uint PACKET_SIZE = 0xE0; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, List luaParams) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, List luaParams) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -23,7 +17,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player { using (BinaryWriter binWriter = new BinaryWriter(mem)) { - LuaUtils.writeLuaParams(binWriter, luaParams); + LuaUtils.WriteLuaParams(binWriter, luaParams); } } diff --git a/FFXIVClassic Map Server/packets/send/player/SendAchievementRatePacket.cs b/FFXIVClassic Map Server/packets/send/player/SendAchievementRatePacket.cs index dd821f51..60b9b2b9 100644 --- a/FFXIVClassic Map Server/packets/send/player/SendAchievementRatePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SendAchievementRatePacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.player { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public const ushort OPCODE = 0x019F; public const uint PACKET_SIZE = 0x30; - public static SubPacket buildPacket(uint playerActorID, uint achievementId, uint progressCount, uint progressFlags) + public static SubPacket BuildPacket(uint playerActorID, uint achievementId, uint progressCount, uint progressFlags) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/player/SetAchievementPointsPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetAchievementPointsPacket.cs index 59b462b8..6c4248a2 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetAchievementPointsPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetAchievementPointsPacket.cs @@ -1,10 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System; namespace FFXIVClassic_Map_Server.packets.send.player { @@ -13,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public const ushort OPCODE = 0x019C; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint numAchievementPoints) + public static SubPacket BuildPacket(uint playerActorID, uint numAchievementPoints) { return new SubPacket(OPCODE, playerActorID, playerActorID, BitConverter.GetBytes((UInt64) numAchievementPoints)); } diff --git a/FFXIVClassic Map Server/packets/send/player/SetChocoboNamePacket.cs b/FFXIVClassic Map Server/packets/send/player/SetChocoboNamePacket.cs index 9f0dacf4..53bbb748 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetChocoboNamePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetChocoboNamePacket.cs @@ -1,9 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Text; namespace FFXIVClassic_Map_Server.packets.send.player { @@ -12,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public const ushort OPCODE = 0x0198; public const uint PACKET_SIZE = 0x40; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, string name) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, string name) { if (Encoding.Unicode.GetByteCount(name) >= 0x20) name = "ERR: Too Long"; diff --git a/FFXIVClassic Map Server/packets/send/player/SetCompletedAchievementsPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetCompletedAchievementsPacket.cs index 054e3659..4368f77a 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCompletedAchievementsPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCompletedAchievementsPacket.cs @@ -1,11 +1,5 @@ -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using FFXIVClassic.Common; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.player { @@ -30,7 +24,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public bool[] achievementFlags = new bool[1024]; - public SubPacket buildPacket(uint playerActorID) + public SubPacket BuildPacket(uint playerActorID) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -42,7 +36,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player if (binStream.Length <= PACKET_SIZE - 0x20) binWriter.Write(binStream); else - Log.error("Failed making SetCompletedAchievements packet. Bin Stream was too big!"); + Program.Log.Error("Failed making SetCompletedAchievements packet. Bin Stream was too big!"); } } diff --git a/FFXIVClassic Map Server/packets/send/player/SetCurrentJobPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetCurrentJobPacket.cs index 6e4aad85..43a07cd0 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCurrentJobPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCurrentJobPacket.cs @@ -1,9 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System; namespace FFXIVClassic_Map_Server.packets.send.player { @@ -12,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public const ushort OPCODE = 0x01A4; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint sourceActorID, uint targetActorID, uint jobId) + public static SubPacket BuildPacket(uint sourceActorID, uint targetActorID, uint jobId) { return new SubPacket(OPCODE, sourceActorID, targetActorID, BitConverter.GetBytes((uint)jobId)); } diff --git a/FFXIVClassic Map Server/packets/send/player/SetCurrentMountChocoboPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetCurrentMountChocoboPacket.cs index aa59d7ed..b4d7a013 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCurrentMountChocoboPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCurrentMountChocoboPacket.cs @@ -1,11 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.player +namespace FFXIVClassic_Map_Server.packets.send.player { class SetCurrentMountChocoboPacket { @@ -29,7 +22,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public const ushort OPCODE = 0x0197; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, int appearanceId) + public static SubPacket BuildPacket(uint playerActorID, int appearanceId) { byte[] data = new byte[PACKET_SIZE - 0x20]; data[5] = (byte)(appearanceId & 0xFF); diff --git a/FFXIVClassic Map Server/packets/send/player/SetCurrentMountGoobbuePacket.cs b/FFXIVClassic Map Server/packets/send/player/SetCurrentMountGoobbuePacket.cs index 2ba84994..ec65824c 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCurrentMountGoobbuePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCurrentMountGoobbuePacket.cs @@ -1,11 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.player +namespace FFXIVClassic_Map_Server.packets.send.player { class SetCurrentMountGoobbuePacket { @@ -13,7 +6,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public const ushort OPCODE = 0x01a0; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, int appearanceId) + public static SubPacket BuildPacket(uint playerActorID, int appearanceId) { byte[] data = new byte[PACKET_SIZE - 0x20]; data[0] = (byte)(appearanceId & 0xFF); diff --git a/FFXIVClassic Map Server/packets/send/player/SetCutsceneBookPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetCutsceneBookPacket.cs index 177cc2c3..75211b87 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCutsceneBookPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCutsceneBookPacket.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.common; -using FFXIVClassic_Lobby_Server.packets; +using FFXIVClassic.Common; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.player { @@ -64,7 +60,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public bool[] cutsceneFlags = new bool[2048]; - public SubPacket buildPacket(uint playerActorID, string sNpcName, short sNpcActorIdOffset, byte sNpcSkin, byte sNpcPersonality) + public SubPacket BuildPacket(uint playerActorID, string sNpcName, short sNpcActorIdOffset, byte sNpcSkin, byte sNpcPersonality) { byte[] data = new byte[PACKET_SIZE - 0x20]; @@ -85,7 +81,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player if (binStream.Length <= PACKET_SIZE - 0x20) binWriter.Write(binStream); else - Log.error("Failed making SetCutsceneBook packet. Bin Stream was too big!"); + Program.Log.Error("Failed making SetCutsceneBook packet. Bin Stream was too big!"); binWriter.Seek(0x109, SeekOrigin.Begin); binWriter.Write(Encoding.ASCII.GetBytes(sNpcName), 0, Encoding.ASCII.GetByteCount(sNpcName) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(sNpcName)); diff --git a/FFXIVClassic Map Server/packets/send/player/SetGrandCompanyPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetGrandCompanyPacket.cs index 5af08034..4b177966 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetGrandCompanyPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetGrandCompanyPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.actor { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x0194; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint sourceActorID, uint targetActorID, ushort currentAllegiance, ushort rankLimsa, ushort rankGridania, ushort rankUldah) + public static SubPacket BuildPacket(uint sourceActorID, uint targetActorID, ushort currentAllegiance, ushort rankLimsa, ushort rankGridania, ushort rankUldah) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/player/SetHasChocoboPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetHasChocoboPacket.cs index 0c63324f..d2fe62d3 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetHasChocoboPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetHasChocoboPacket.cs @@ -1,18 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.player +namespace FFXIVClassic_Map_Server.packets.send.player { class SetHasChocoboPacket { public const ushort OPCODE = 0x0199; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, bool hasChocobo) + public static SubPacket BuildPacket(uint playerActorID, bool hasChocobo) { byte[] data = new byte[PACKET_SIZE - 0x20]; data[0] = (byte)(hasChocobo ? 1 : 0); diff --git a/FFXIVClassic Map Server/packets/send/player/SetHasGoobbuePacket.cs b/FFXIVClassic Map Server/packets/send/player/SetHasGoobbuePacket.cs index f798fc5f..114bf124 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetHasGoobbuePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetHasGoobbuePacket.cs @@ -1,18 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.player +namespace FFXIVClassic_Map_Server.packets.send.player { class SetHasGoobbuePacket { public const ushort OPCODE = 0x01A1; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, bool hasGoobbue) + public static SubPacket BuildPacket(uint playerActorID, bool hasGoobbue) { byte[] data = new byte[PACKET_SIZE - 0x20]; data[0] = (byte)(hasGoobbue ? 1 : 0); diff --git a/FFXIVClassic Map Server/packets/send/player/SetLatestAchievementsPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetLatestAchievementsPacket.cs index 174580f4..cb50cdb7 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetLatestAchievementsPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetLatestAchievementsPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.player { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public const ushort OPCODE = 0x019B; public const uint PACKET_SIZE = 0x40; - public static SubPacket buildPacket(uint playerActorID, uint[] latestAchievementIDs) + public static SubPacket BuildPacket(uint playerActorID, uint[] latestAchievementIDs) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/player/SetPlayerDreamPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetPlayerDreamPacket.cs index e943807e..5f357dc1 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetPlayerDreamPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetPlayerDreamPacket.cs @@ -1,9 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System; namespace FFXIVClassic_Map_Server.packets.send.player { @@ -12,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public const ushort OPCODE = 0x01A7; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint dreamID) + public static SubPacket BuildPacket(uint playerActorID, uint dreamID) { dreamID += 0x20E; return new SubPacket(OPCODE, playerActorID, playerActorID, BitConverter.GetBytes((uint)dreamID)); diff --git a/FFXIVClassic Map Server/packets/send/player/SetPlayerTitlePacket.cs b/FFXIVClassic Map Server/packets/send/player/SetPlayerTitlePacket.cs index 8a5b10ae..112def38 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetPlayerTitlePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetPlayerTitlePacket.cs @@ -1,9 +1,4 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System; namespace FFXIVClassic_Map_Server.packets.send.player { @@ -12,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public const ushort OPCODE = 0x019D; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint titleID) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, uint titleID) { return new SubPacket(OPCODE, playerActorID, targetActorID, BitConverter.GetBytes((UInt64)titleID)); } diff --git a/FFXIVClassic Map Server/packets/send/player/_0x196Packet.cs b/FFXIVClassic Map Server/packets/send/player/_0x196Packet.cs index 7be6e752..221f4d37 100644 --- a/FFXIVClassic Map Server/packets/send/player/_0x196Packet.cs +++ b/FFXIVClassic Map Server/packets/send/player/_0x196Packet.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.player { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player public const ushort OPCODE = 0x0196; public const uint PACKET_SIZE = 0x38; - public static SubPacket buildPacket(uint playerActorID, uint targetActorID) + public static SubPacket BuildPacket(uint playerActorID, uint targetActorID) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/recruitment/CurrentRecruitmentDetailsPacket.cs b/FFXIVClassic Map Server/packets/send/recruitment/CurrentRecruitmentDetailsPacket.cs index fb2ca6cf..99068bf6 100644 --- a/FFXIVClassic Map Server/packets/send/recruitment/CurrentRecruitmentDetailsPacket.cs +++ b/FFXIVClassic Map Server/packets/send/recruitment/CurrentRecruitmentDetailsPacket.cs @@ -1,11 +1,7 @@ -using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Map_Server.dataobjects; +using FFXIVClassic_Map_Server.dataobjects; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.recruitment { @@ -14,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.recruitment public const ushort OPCODE = 0x01C8; public const uint PACKET_SIZE = 0x218; - public static SubPacket buildPacket(uint playerActorID, RecruitmentDetails details) + public static SubPacket BuildPacket(uint playerActorID, RecruitmentDetails details) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/recruitment/EndRecruitmentPacket.cs b/FFXIVClassic Map Server/packets/send/recruitment/EndRecruitmentPacket.cs index cf67203a..e0ef929d 100644 --- a/FFXIVClassic Map Server/packets/send/recruitment/EndRecruitmentPacket.cs +++ b/FFXIVClassic Map Server/packets/send/recruitment/EndRecruitmentPacket.cs @@ -1,18 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.recruitment +namespace FFXIVClassic_Map_Server.packets.send.recruitment { class EndRecruitmentPacket { public const ushort OPCODE = 0x01C4; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID) + public static SubPacket BuildPacket(uint playerActorID) { byte[] data = new byte[PACKET_SIZE - 0x20]; data[0] = 1; diff --git a/FFXIVClassic Map Server/packets/send/recruitment/RecruiterStatePacket.cs b/FFXIVClassic Map Server/packets/send/recruitment/RecruiterStatePacket.cs index 50d4b82e..3e557b97 100644 --- a/FFXIVClassic Map Server/packets/send/recruitment/RecruiterStatePacket.cs +++ b/FFXIVClassic Map Server/packets/send/recruitment/RecruiterStatePacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.recruitment { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.recruitment public const ushort OPCODE = 0x01C5; public const uint PACKET_SIZE = 0x038; - public static SubPacket buildPacket(uint playerActorID, bool isRecruiting, bool isRecruiter, long recruitmentId) + public static SubPacket BuildPacket(uint playerActorID, bool isRecruiting, bool isRecruiter, long recruitmentId) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/recruitment/StartRecruitingResponse.cs b/FFXIVClassic Map Server/packets/send/recruitment/StartRecruitingResponse.cs index 829b9ce2..5e78f219 100644 --- a/FFXIVClassic Map Server/packets/send/recruitment/StartRecruitingResponse.cs +++ b/FFXIVClassic Map Server/packets/send/recruitment/StartRecruitingResponse.cs @@ -1,18 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.recruitment +namespace FFXIVClassic_Map_Server.packets.send.recruitment { class StartRecruitingResponse { public const ushort OPCODE = 0x01C3; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, bool success) + public static SubPacket BuildPacket(uint playerActorID, bool success) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/social/BlacklistAddedPacket.cs b/FFXIVClassic Map Server/packets/send/social/BlacklistAddedPacket.cs index 67c817c7..eac92f94 100644 --- a/FFXIVClassic Map Server/packets/send/social/BlacklistAddedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/BlacklistAddedPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; +using System.IO; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.social { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.social public const ushort OPCODE = 0x01C9; public const uint PACKET_SIZE = 0x048; - public static SubPacket buildPacket(uint playerActorID, bool isSuccess, string nameToAdd) + public static SubPacket BuildPacket(uint playerActorID, bool isSuccess, string nameToAdd) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/social/BlacklistRemovedPacket.cs b/FFXIVClassic Map Server/packets/send/social/BlacklistRemovedPacket.cs index c1466a72..507d8e58 100644 --- a/FFXIVClassic Map Server/packets/send/social/BlacklistRemovedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/BlacklistRemovedPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; +using System.IO; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.social { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.social public const ushort OPCODE = 0x01CA; public const uint PACKET_SIZE = 0x048; - public static SubPacket buildPacket(uint playerActorID, bool isSuccess, string nameToRemove) + public static SubPacket BuildPacket(uint playerActorID, bool isSuccess, string nameToRemove) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/social/FriendStatusPacket.cs b/FFXIVClassic Map Server/packets/send/social/FriendStatusPacket.cs index 0a7b48f0..5cee912d 100644 --- a/FFXIVClassic Map Server/packets/send/social/FriendStatusPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/FriendStatusPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.social { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.social public const ushort OPCODE = 0x01CF; public const uint PACKET_SIZE = 0x686; - public static SubPacket buildPacket(uint playerActorID, Tuple[] friendStatus) + public static SubPacket BuildPacket(uint playerActorID, Tuple[] friendStatus) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/social/FriendlistAddedPacket.cs b/FFXIVClassic Map Server/packets/send/social/FriendlistAddedPacket.cs index 51036bb8..7f708c29 100644 --- a/FFXIVClassic Map Server/packets/send/social/FriendlistAddedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/FriendlistAddedPacket.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.social { @@ -13,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.social public const ushort OPCODE = 0x01CC; public const uint PACKET_SIZE = 0x067; - public static SubPacket buildPacket(uint playerActorID, bool isSuccess, long id, bool isOnline, string nameToAdd) + public static SubPacket BuildPacket(uint playerActorID, bool isSuccess, long id, bool isOnline, string nameToAdd) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/social/FriendlistRemovedPacket.cs b/FFXIVClassic Map Server/packets/send/social/FriendlistRemovedPacket.cs index 8fa68eb1..f4ccef4d 100644 --- a/FFXIVClassic Map Server/packets/send/social/FriendlistRemovedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/FriendlistRemovedPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; +using System.IO; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.social { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.social public const ushort OPCODE = 0x01CD; public const uint PACKET_SIZE = 0x057; - public static SubPacket buildPacket(uint playerActorID, bool isSuccess, string nameToRemove) + public static SubPacket BuildPacket(uint playerActorID, bool isSuccess, string nameToRemove) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/social/SendBlacklistPacket.cs b/FFXIVClassic Map Server/packets/send/social/SendBlacklistPacket.cs index 893fb2b3..54d3b9b9 100644 --- a/FFXIVClassic Map Server/packets/send/social/SendBlacklistPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/SendBlacklistPacket.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.social { @@ -13,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.social public const ushort OPCODE = 0x01CB; public const uint PACKET_SIZE = 0x686; - public static SubPacket buildPacket(uint playerActorID, string[] blacklistedNames, ref int offset) + public static SubPacket BuildPacket(uint playerActorID, string[] blacklistedNames, ref int offset) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/social/SendFriendlistPacket.cs b/FFXIVClassic Map Server/packets/send/social/SendFriendlistPacket.cs index 35d0fb7e..7074ca3d 100644 --- a/FFXIVClassic Map Server/packets/send/social/SendFriendlistPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/SendFriendlistPacket.cs @@ -1,10 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; +using System; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.social { @@ -13,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.social public const ushort OPCODE = 0x01CE; public const uint PACKET_SIZE = 0x686; - public static SubPacket buildPacket(uint playerActorID, Tuple[] friends, ref int offset) + public static SubPacket BuildPacket(uint playerActorID, Tuple[] friends, ref int offset) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/supportdesk/EndGMTicketPacket.cs b/FFXIVClassic Map Server/packets/send/supportdesk/EndGMTicketPacket.cs index 676f53f9..0a84b09a 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/EndGMTicketPacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/EndGMTicketPacket.cs @@ -1,18 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.supportdesk +namespace FFXIVClassic_Map_Server.packets.send.supportdesk { class EndGMTicketPacket { public const ushort OPCODE = 0x01D6; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID) + public static SubPacket BuildPacket(uint playerActorID) { byte[] data = new byte[PACKET_SIZE - 0x20]; data[0] = 1; diff --git a/FFXIVClassic Map Server/packets/send/supportdesk/FaqBodyResponsePacket.cs b/FFXIVClassic Map Server/packets/send/supportdesk/FaqBodyResponsePacket.cs index caa4cc44..a3ab11c5 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/FaqBodyResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/FaqBodyResponsePacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; +using System.IO; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.supportdesk { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.supportdesk public const ushort OPCODE = 0x01D1; public const uint PACKET_SIZE = 0x587; - public static SubPacket buildPacket(uint playerActorID, string faqsBodyText) + public static SubPacket BuildPacket(uint playerActorID, string faqsBodyText) { byte[] data = new byte[PACKET_SIZE - 0x20]; int maxBodySize = data.Length - 0x04; diff --git a/FFXIVClassic Map Server/packets/send/supportdesk/FaqListResponsePacket.cs b/FFXIVClassic Map Server/packets/send/supportdesk/FaqListResponsePacket.cs index 2acfdd28..cc8193b4 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/FaqListResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/FaqListResponsePacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; +using System.IO; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.supportdesk { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.supportdesk public const ushort OPCODE = 0x01D0; public const uint PACKET_SIZE = 0x2B8; - public static SubPacket buildPacket(uint playerActorID, string[] faqsTitles) + public static SubPacket BuildPacket(uint playerActorID, string[] faqsTitles) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/supportdesk/GMTicketPacket.cs b/FFXIVClassic Map Server/packets/send/supportdesk/GMTicketPacket.cs index eddd09d6..3ec04973 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/GMTicketPacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/GMTicketPacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; +using System.IO; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.supportdesk { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.supportdesk public const ushort OPCODE = 0x01D4; public const uint PACKET_SIZE = 0x2B8; - public static SubPacket buildPacket(uint playerActorID, string titleText, string bodyText) + public static SubPacket BuildPacket(uint playerActorID, string titleText, string bodyText) { byte[] data = new byte[PACKET_SIZE - 0x20]; int maxBodySize = data.Length - 0x80; diff --git a/FFXIVClassic Map Server/packets/send/supportdesk/GMTicketSentResponsePacket.cs b/FFXIVClassic Map Server/packets/send/supportdesk/GMTicketSentResponsePacket.cs index cd40e5c2..502b1f74 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/GMTicketSentResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/GMTicketSentResponsePacket.cs @@ -1,18 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.supportdesk +namespace FFXIVClassic_Map_Server.packets.send.supportdesk { class GMTicketSentResponsePacket { public const ushort OPCODE = 0x01D5; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, bool wasSent) + public static SubPacket BuildPacket(uint playerActorID, bool wasSent) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/supportdesk/IssueListResponsePacket.cs b/FFXIVClassic Map Server/packets/send/supportdesk/IssueListResponsePacket.cs index fad44d70..7f1defa5 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/IssueListResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/IssueListResponsePacket.cs @@ -1,10 +1,5 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; +using System.IO; using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.packets.send.supportdesk { @@ -13,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.supportdesk public const ushort OPCODE = 0x01D2; public const uint PACKET_SIZE = 0x160; - public static SubPacket buildPacket(uint playerActorID, string[] issueStrings) + public static SubPacket BuildPacket(uint playerActorID, string[] issueStrings) { byte[] data = new byte[PACKET_SIZE - 0x20]; diff --git a/FFXIVClassic Map Server/packets/send/supportdesk/StartGMTicketPacket.cs b/FFXIVClassic Map Server/packets/send/supportdesk/StartGMTicketPacket.cs index a15715a5..a06b23bb 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/StartGMTicketPacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/StartGMTicketPacket.cs @@ -1,18 +1,11 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FFXIVClassic_Map_Server.packets.send.supportdesk +namespace FFXIVClassic_Map_Server.packets.send.supportdesk { class StartGMTicketPacket { public const ushort OPCODE = 0x01D3; public const uint PACKET_SIZE = 0x28; - public static SubPacket buildPacket(uint playerActorID, bool startGM) + public static SubPacket BuildPacket(uint playerActorID, bool startGM) { byte[] data = new byte[PACKET_SIZE - 0x20]; data[0] = (byte)(startGM ? 1 : 0); diff --git a/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs b/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs index be3e2f6b..e86996eb 100644 --- a/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs +++ b/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs @@ -1,11 +1,6 @@ -using FFXIVClassic_Lobby_Server.packets; -using System; +using FFXIVClassic_Map_Server.packets; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using FFXIVClassic_Map_Server.packets.send.actor; -using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.Actors; namespace FFXIVClassic_Map_Server.utils @@ -26,29 +21,29 @@ namespace FFXIVClassic_Map_Server.utils this.currentTarget = firstTarget; } - public void addProperty(string property) + public void AddProperty(string property) { - if (!currentActorPropertyPacket.addProperty(forActor, property)) + if (!currentActorPropertyPacket.AddProperty(forActor, property)) { - currentActorPropertyPacket.setIsMore(true); - currentActorPropertyPacket.addTarget(); - subPackets.Add(currentActorPropertyPacket.buildPacket(playerActorId, forActor.actorId)); + currentActorPropertyPacket.SetIsMore(true); + currentActorPropertyPacket.AddTarget(); + subPackets.Add(currentActorPropertyPacket.BuildPacket(playerActorId, forActor.actorId)); currentActorPropertyPacket = new SetActorPropetyPacket(currentTarget); } } - public void newTarget(string target) + public void NewTarget(string target) { - currentActorPropertyPacket.addTarget(); + currentActorPropertyPacket.AddTarget(); currentTarget = target; - currentActorPropertyPacket.setTarget(target); + currentActorPropertyPacket.SetTarget(target); } - public List done() + public List Done() { - currentActorPropertyPacket.addTarget(); - currentActorPropertyPacket.setIsMore(false); - subPackets.Add(currentActorPropertyPacket.buildPacket(playerActorId, forActor.actorId)); + currentActorPropertyPacket.AddTarget(); + currentActorPropertyPacket.SetIsMore(false); + subPackets.Add(currentActorPropertyPacket.BuildPacket(playerActorId, forActor.actorId)); return subPackets; } diff --git a/FFXIVClassic Map Server/utils/CharacterUtils.cs b/FFXIVClassic Map Server/utils/CharacterUtils.cs index a1ff65dd..3df2bc6a 100644 --- a/FFXIVClassic Map Server/utils/CharacterUtils.cs +++ b/FFXIVClassic Map Server/utils/CharacterUtils.cs @@ -1,9 +1,5 @@ -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.utils { @@ -35,7 +31,7 @@ namespace FFXIVClassic_Map_Server.utils public uint unknown; } - public static FaceInfo getFaceInfo(byte characteristics, byte characteristicsColor, byte faceType, byte ears, byte faceMouth, byte faceFeatures, byte faceNose, byte faceEyeShape, byte faceIrisSize, byte faceEyebrows) + public static FaceInfo GetFaceInfo(byte characteristics, byte characteristicsColor, byte faceType, byte ears, byte faceMouth, byte faceFeatures, byte faceNose, byte faceEyeShape, byte faceIrisSize, byte faceEyebrows) { FaceInfo faceInfo = new FaceInfo(); faceInfo.characteristics = characteristics; @@ -51,7 +47,7 @@ namespace FFXIVClassic_Map_Server.utils return faceInfo; } - public static UInt32 getTribeModel(byte tribe) + public static UInt32 GetTribeModel(byte tribe) { switch (tribe) { diff --git a/FFXIVClassic Map Server/utils/SQLGeneration.cs b/FFXIVClassic Map Server/utils/SQLGeneration.cs index 33375438..b48be652 100644 --- a/FFXIVClassic Map Server/utils/SQLGeneration.cs +++ b/FFXIVClassic Map Server/utils/SQLGeneration.cs @@ -1,21 +1,18 @@ -using FFXIVClassic_Lobby_Server; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.packets.send.player; using MySql.Data.MySqlClient; using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; using System.Text.RegularExpressions; -using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.utils { class SQLGeneration { - public static void generateZones() + public static void GenerateZones() { using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -82,13 +79,15 @@ namespace FFXIVClassic_Map_Server.utils cmd.Parameters["@placename"].Value = placenames[pId]; - Console.WriteLine("Wrote: {0}", id); + Program.Log.Debug("Wrote: {0}", id); cmd.ExecuteNonQuery(); } } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -96,7 +95,7 @@ namespace FFXIVClassic_Map_Server.utils } } - public static void generateActors() + public static void GenerateActors() { using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -138,13 +137,15 @@ namespace FFXIVClassic_Map_Server.utils cmd.Parameters["@id"].Value = id; cmd.Parameters["@displayNameId"].Value = nameId; - Console.WriteLine("Wrote: {0} : {1}", id, nameId); + Program.Log.Debug("Wrote: {0} : {1}", id, nameId); cmd.ExecuteNonQuery(); } } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -152,7 +153,7 @@ namespace FFXIVClassic_Map_Server.utils } } - public static void generateActorAppearance() + public static void GenerateActorAppearance() { uint NUMFIELDS = 39; using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -202,13 +203,15 @@ namespace FFXIVClassic_Map_Server.utils cmd.Parameters["@id"].Value = id; - Console.WriteLine("Wrote: {0}", id); + Program.Log.Debug("Wrote: {0}", id); cmd.ExecuteNonQuery(); } } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -218,7 +221,7 @@ namespace FFXIVClassic_Map_Server.utils } - public static void generateAchievementIds() + public static void GenerateAchievementIds() { using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD))) @@ -285,7 +288,7 @@ namespace FFXIVClassic_Map_Server.utils else if (id == 1500) otherId = SetCompletedAchievementsPacket.CATEGORY_GRAND_COMPANY; - Console.WriteLine("Wrote: {0} : {1} : {2} : {3}", id, name, otherId, points); + Program.Log.Debug("Wrote: {0} : {1} : {2} : {3}", id, name, otherId, points); cmd.Parameters["@id"].Value = id; cmd.Parameters["@name"].Value = name; cmd.Parameters["@otherId"].Value = otherId; @@ -296,7 +299,9 @@ namespace FFXIVClassic_Map_Server.utils } } catch (MySqlException e) - { Console.WriteLine(e); } + { + Program.Log.Error(e.ToString()); + } finally { conn.Dispose(); @@ -306,7 +311,7 @@ namespace FFXIVClassic_Map_Server.utils } - public void getStaticActors() + public void GetStaticActors() { using (MemoryStream s = new MemoryStream(File.ReadAllBytes("D:\\luadec\\script\\staticactorr9w.luab"))) { @@ -319,7 +324,7 @@ namespace FFXIVClassic_Map_Server.utils while (binReader.BaseStream.Position != binReader.BaseStream.Length) { - uint id = Utils.swapEndian(binReader.ReadUInt32()) | 0xA0F00000; + uint id = Utils.SwapEndian(binReader.ReadUInt32()) | 0xA0F00000; List list = new List(); byte readByte; @@ -333,7 +338,7 @@ namespace FFXIVClassic_Map_Server.utils string output2 = String.Format("mStaticActors.Add(0x{0:x}, new {2}(0x{0:x}, \"{1}\"));", id, output.Substring(1 + output.LastIndexOf("/")), output.Split('/')[1]); - Console.WriteLine(output2); + Program.Log.Debug(output2); w.WriteLine(output2); } diff --git a/FFXIVClassic Map Server.sln b/FFXIVClassic.sln similarity index 62% rename from FFXIVClassic Map Server.sln rename to FFXIVClassic.sln index 5563e16e..5cb0528a 100644 --- a/FFXIVClassic Map Server.sln +++ b/FFXIVClassic.sln @@ -1,28 +1,40 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FFXIVClassic Map Server", "FFXIVClassic Map Server\FFXIVClassic Map Server.csproj", "{E8FA2784-D4B9-4711-8CC6-712A4B1CD54F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FFXIVClassic Lobby Server", "FFXIVClassic Lobby Server\FFXIVClassic Lobby Server.csproj", "{703091E0-F69C-4177-8FAE-C258AC6A65AA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E8FA2784-D4B9-4711-8CC6-712A4B1CD54F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E8FA2784-D4B9-4711-8CC6-712A4B1CD54F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E8FA2784-D4B9-4711-8CC6-712A4B1CD54F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E8FA2784-D4B9-4711-8CC6-712A4B1CD54F}.Release|Any CPU.Build.0 = Release|Any CPU - {703091E0-F69C-4177-8FAE-C258AC6A65AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {703091E0-F69C-4177-8FAE-C258AC6A65AA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {703091E0-F69C-4177-8FAE-C258AC6A65AA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {703091E0-F69C-4177-8FAE-C258AC6A65AA}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FFXIVClassic Map Server", "FFXIVClassic Map Server\FFXIVClassic Map Server.csproj", "{E8FA2784-D4B9-4711-8CC6-712A4B1CD54F}" + ProjectSection(ProjectDependencies) = postProject + {3A3D6626-C820-4C18-8C81-64811424F20E} = {3A3D6626-C820-4C18-8C81-64811424F20E} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FFXIVClassic Lobby Server", "FFXIVClassic Lobby Server\FFXIVClassic Lobby Server.csproj", "{703091E0-F69C-4177-8FAE-C258AC6A65AA}" + ProjectSection(ProjectDependencies) = postProject + {3A3D6626-C820-4C18-8C81-64811424F20E} = {3A3D6626-C820-4C18-8C81-64811424F20E} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FFXIVClassic Common Class Lib", "FFXIVClassic Common Class Lib\FFXIVClassic Common Class Lib.csproj", "{3A3D6626-C820-4C18-8C81-64811424F20E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E8FA2784-D4B9-4711-8CC6-712A4B1CD54F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E8FA2784-D4B9-4711-8CC6-712A4B1CD54F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E8FA2784-D4B9-4711-8CC6-712A4B1CD54F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E8FA2784-D4B9-4711-8CC6-712A4B1CD54F}.Release|Any CPU.Build.0 = Release|Any CPU + {703091E0-F69C-4177-8FAE-C258AC6A65AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {703091E0-F69C-4177-8FAE-C258AC6A65AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {703091E0-F69C-4177-8FAE-C258AC6A65AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {703091E0-F69C-4177-8FAE-C258AC6A65AA}.Release|Any CPU.Build.0 = Release|Any CPU + {3A3D6626-C820-4C18-8C81-64811424F20E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A3D6626-C820-4C18-8C81-64811424F20E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A3D6626-C820-4C18-8C81-64811424F20E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A3D6626-C820-4C18-8C81-64811424F20E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/data/config.ini b/data/lobby_config.ini similarity index 90% rename from data/config.ini rename to data/lobby_config.ini index 7caf0001..f8aa676b 100644 --- a/data/config.ini +++ b/data/lobby_config.ini @@ -8,4 +8,4 @@ host=127.0.0.1 port=3306 database=ffxiv_server username=root -password= \ No newline at end of file +password=root diff --git a/data/map_config.ini b/data/map_config.ini new file mode 100644 index 00000000..f8aa676b --- /dev/null +++ b/data/map_config.ini @@ -0,0 +1,11 @@ +[General] +server_ip=127.0.0.1 +showtimestamp = true + +[Database] +worldid=1 +host=127.0.0.1 +port=3306 +database=ffxiv_server +username=root +password=root diff --git a/data/scripts/base/chara/npc/object/BookShelf.lua b/data/scripts/base/chara/npc/object/BookShelf.lua index 74a8d266..5d43890a 100644 --- a/data/scripts/base/chara/npc/object/BookShelf.lua +++ b/data/scripts/base/chara/npc/object/BookShelf.lua @@ -3,9 +3,9 @@ function init(npc) end function onEventStarted(player, npc, triggerName) - player:runEventFunction("bookTalk"); + player:RunEventFunction("bookTalk"); end function onEventUpdate(player, npc, step, menuOptionSelected) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/base/chara/npc/object/MateriaBook.lua b/data/scripts/base/chara/npc/object/MateriaBook.lua index 57d66a95..6bf00e7a 100644 --- a/data/scripts/base/chara/npc/object/MateriaBook.lua +++ b/data/scripts/base/chara/npc/object/MateriaBook.lua @@ -3,9 +3,9 @@ function init(npc) end function onEventStarted(player, npc, triggerName) - player:runEventFunction("materiabookTalk"); + player:RunEventFunction("materiabookTalk"); end function onEventUpdate(player, npc, step, menuOptionSelected) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/base/chara/npc/object/ObjectBed.lua b/data/scripts/base/chara/npc/object/ObjectBed.lua index 777f5e88..a0e5976e 100644 --- a/data/scripts/base/chara/npc/object/ObjectBed.lua +++ b/data/scripts/base/chara/npc/object/ObjectBed.lua @@ -4,22 +4,22 @@ function init(npc) end function onEventStarted(player, npc, triggerName) - player:runEventFunction("askLogout", player); + player:RunEventFunction("askLogout", player); end function onEventUpdate(player, npc, eventStep, menuOptionSelected) if (menuOptionSelected == 1) then - player:endEvent(); + player:EndEvent(); return; elseif (menuOptionSelected == 2) then player:quitGame(); elseif (menuOptionSelected == 3) then player:logout(); elseif (menuOptionSelected == 4) then - player:sendMessage(33, "", "Heck the bed"); + player:SendMessage(33, "", "Heck the bed"); end - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/base/chara/npc/object/ObjectInnDoor.lua b/data/scripts/base/chara/npc/object/ObjectInnDoor.lua index 73900777..c0c69269 100644 --- a/data/scripts/base/chara/npc/object/ObjectInnDoor.lua +++ b/data/scripts/base/chara/npc/object/ObjectInnDoor.lua @@ -4,16 +4,16 @@ function init(npc) end function onEventStarted(player, npc, triggerName) - defaultFst = getStaticActor("DftFst"); - player:runEventFunction("delegateEvent", player, defaultFst, "defaultTalkWithInn_ExitDoor", nil, nil, nil); + defaultFst = GetStaticActor("DftFst"); + player:RunEventFunction("delegateEvent", player, defaultFst, "defaultTalkWithInn_ExitDoor", nil, nil, nil); end function onEventUpdate(player, npc, resultId, isExitYes) if (isExitYes ~= nil and isExitYes == 1) then - getWorldManager():DoZoneChange(player, 1); + GetWorldManager():DoZoneChange(player, 1); else - player:endEvent(); + player:EndEvent(); end end \ No newline at end of file diff --git a/data/scripts/base/chara/npc/object/ObjectItemStorage.lua b/data/scripts/base/chara/npc/object/ObjectItemStorage.lua index 61000b8d..27f6fc8e 100644 --- a/data/scripts/base/chara/npc/object/ObjectItemStorage.lua +++ b/data/scripts/base/chara/npc/object/ObjectItemStorage.lua @@ -3,7 +3,7 @@ function init(npc) end function onEventStarted(player, npc, triggerName) - player:endEvent(); + player:EndEvent(); end function onEventUpdate(player, npc) diff --git a/data/scripts/base/chara/npc/object/OpeningStoperF0B1.lua b/data/scripts/base/chara/npc/object/OpeningStoperF0B1.lua index 0100284f..44608df4 100644 --- a/data/scripts/base/chara/npc/object/OpeningStoperF0B1.lua +++ b/data/scripts/base/chara/npc/object/OpeningStoperF0B1.lua @@ -4,10 +4,10 @@ end function onEventStarted(player, npc, triggerName) if (triggerName == "caution") then - worldMaster = getWorldMaster(); - player:sendGameMessage(player, worldMaster, 34109, 0x20); + worldMaster = GetWorldMaster(); + player:SendGameMessage(player, worldMaster, 34109, 0x20); elseif (triggerName == "exit") then - getWorldManager():DoPlayerMoveInZone(player, 5); + GetWorldManager():DoPlayerMoveInZone(player, 5); end - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/base/chara/npc/object/TaskBoard.lua b/data/scripts/base/chara/npc/object/TaskBoard.lua index b1e781d0..c31277ee 100644 --- a/data/scripts/base/chara/npc/object/TaskBoard.lua +++ b/data/scripts/base/chara/npc/object/TaskBoard.lua @@ -3,17 +3,17 @@ function init(npc) end function onEventStarted(player, npc, triggerName) - questNOC = getStaticActor("Noc000"); + questNOC = GetStaticActor("Noc000"); - if (npc:getActorClassId() == 1200193) then - player:runEventFunction("delegateEvent", player, questNOC, "pETaskBoardAskLimsa", nil, nil, nil); - elseif (npc:getActorClassId() == 1200194) then - player:runEventFunction("delegateEvent", player, questNOC, "pETaskBoardAskUldah", nil, nil, nil); + if (npc:GetActorClassId() == 1200193) then + player:RunEventFunction("delegateEvent", player, questNOC, "pETaskBoardAskLimsa", nil, nil, nil); + elseif (npc:GetActorClassId() == 1200194) then + player:RunEventFunction("delegateEvent", player, questNOC, "pETaskBoardAskUldah", nil, nil, nil); else - player:runEventFunction("delegateEvent", player, questNOC, "pETaskBoardAskGridania", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, questNOC, "pETaskBoardAskGridania", nil, nil, nil); end end function onEventUpdate(player, npc, step, menuOptionSelected) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/base/chara/npc/object/aetheryte/AetheryteParent.lua b/data/scripts/base/chara/npc/object/aetheryte/AetheryteParent.lua index 319f38e8..17cf3f5e 100644 --- a/data/scripts/base/chara/npc/object/aetheryte/AetheryteParent.lua +++ b/data/scripts/base/chara/npc/object/aetheryte/AetheryteParent.lua @@ -25,10 +25,10 @@ function init(npc) end function onEventStarted(player, npc, triggerName) - player:runEventFunction("eventAetheryteParentSelect", 0x0, false, 0x61, 0x0,0,0,0,0); + player:RunEventFunction("eventAetheryteParentSelect", 0x0, false, 0x61, 0x0,0,0,0,0); end function onEventUpdate(player, npc, step, menuOptionSelected, lsName, lsCrest) - --player:runEventFunction("askOfferQuest", player, 1000); - player:endEvent(); + --player:RunEventFunction("askOfferQuest", player, 1000); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/base/chara/npc/populace/PopulaceGuildlevePublisher.lua b/data/scripts/base/chara/npc/populace/PopulaceGuildlevePublisher.lua index 30366513..15bc895a 100644 --- a/data/scripts/base/chara/npc/populace/PopulaceGuildlevePublisher.lua +++ b/data/scripts/base/chara/npc/populace/PopulaceGuildlevePublisher.lua @@ -25,14 +25,14 @@ function init(npc) end function onEventStarted(player, npc) - player:runEventFunction("eventTalkType", 0x30, true, 0x02CE, 0x356, 0x367, true, 0, nil, 0x29, 0,0,0); + player:RunEventFunction("eventTalkType", 0x30, true, 0x02CE, 0x356, 0x367, true, 0, nil, 0x29, 0,0,0); end function onEventUpdate(player, npc, step, menuOptionSelected) - --player:runEventFunction("eventTalkType", 0x32, true, 0x02CE, 0x356, 0x367, false, 2, nil, 0x29, 0,0,0); - player:runEventFunction("eventTalkPack", 201, 207); - --player:runEventFunction("eventTalkCard", 0x30C3, 0x30C4, 0x30C1, 0x30C5, 0x30C6, 0x30C7, 0x30C8, 0x30C9); - --player:runEventFunction("eventTalkDetail", 0x30C4, 2, 0xF4242, 0xD, 0xF4242, 0, 0xFF, true, 11); - --player:runEventFunction("eventGLChangeDetail", 0xDEAD, 0x30C4, 0xFF, 0xF4242, 0xD, 0xF4242, 0, 2, true); - player:endEvent(); + --player:RunEventFunction("eventTalkType", 0x32, true, 0x02CE, 0x356, 0x367, false, 2, nil, 0x29, 0,0,0); + player:RunEventFunction("eventTalkPack", 201, 207); + --player:RunEventFunction("eventTalkCard", 0x30C3, 0x30C4, 0x30C1, 0x30C5, 0x30C6, 0x30C7, 0x30C8, 0x30C9); + --player:RunEventFunction("eventTalkDetail", 0x30C4, 2, 0xF4242, 0xD, 0xF4242, 0, 0xFF, true, 11); + --player:RunEventFunction("eventGLChangeDetail", 0xDEAD, 0x30C4, 0xFF, 0xF4242, 0xD, 0xF4242, 0, 2, true); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/base/chara/npc/populace/PopulaceLinkshellManager.lua b/data/scripts/base/chara/npc/populace/PopulaceLinkshellManager.lua index 365c0902..ce2ac829 100644 --- a/data/scripts/base/chara/npc/populace/PopulaceLinkshellManager.lua +++ b/data/scripts/base/chara/npc/populace/PopulaceLinkshellManager.lua @@ -4,25 +4,25 @@ end function onEventStarted(player, npc) isNew = false; - player:runEventFunction("eventTalkStep1", isNew); + player:RunEventFunction("eventTalkStep1", isNew); end function onEventUpdate(player, npc, step, menuOptionSelected, lsName, lsCrest) if (menuOptionSelected == nil) then - player:endEvent(); + player:EndEvent(); return; end isNew = false; if (menuOptionSelected == 1) then - player:runEventFunction("eventTalkStep2", isNew); + player:RunEventFunction("eventTalkStep2", isNew); elseif (menuOptionSelected == 10) then - player:endEvent(); + player:EndEvent(); return; elseif (menuOptionSelected == 3) then --createLinkshell - player:runEventFunction("eventTalkStepMakeupDone", isNew); + player:RunEventFunction("eventTalkStepMakeupDone", isNew); end end \ No newline at end of file diff --git a/data/scripts/base/chara/npc/populace/PopulacePassiveGLPublisher.lua b/data/scripts/base/chara/npc/populace/PopulacePassiveGLPublisher.lua index 32c8149c..32fc60ee 100644 --- a/data/scripts/base/chara/npc/populace/PopulacePassiveGLPublisher.lua +++ b/data/scripts/base/chara/npc/populace/PopulacePassiveGLPublisher.lua @@ -28,10 +28,10 @@ function init(npc) end function onEventStarted(player, npc) - player:runEventFunction("talkOfferWelcome", player, 1); + player:RunEventFunction("talkOfferWelcome", player, 1); end function onEventUpdate(player, npc, step, menuOptionSelected, lsName, lsCrest) - --player:runEventFunction("askOfferQuest", player, 1000); - player:endEvent(); + --player:RunEventFunction("askOfferQuest", player, 1000); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/base/chara/npc/populace/PopulaceStandard.lua b/data/scripts/base/chara/npc/populace/PopulaceStandard.lua index 8ddfb16c..b4185079 100644 --- a/data/scripts/base/chara/npc/populace/PopulaceStandard.lua +++ b/data/scripts/base/chara/npc/populace/PopulaceStandard.lua @@ -4,10 +4,10 @@ function init(npc) end function onEventStarted(player, npc) - player:sendMessage(0x20, "", "This PopulaceStandard actor has no event set. Actor Class Id: " .. tostring(npc:getActorClassId())); - player:endEvent(); + player:SendMessage(0x20, "", "This PopulaceStandard actor has no event set. Actor Class Id: " .. tostring(npc:GetActorClassId())); + player:EndEvent(); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/base/chara/npc/populace/shop/PopulaceShopSalesman.lua b/data/scripts/base/chara/npc/populace/shop/PopulaceShopSalesman.lua index 6c9f53ce..a06d99ce 100644 --- a/data/scripts/base/chara/npc/populace/shop/PopulaceShopSalesman.lua +++ b/data/scripts/base/chara/npc/populace/shop/PopulaceShopSalesman.lua @@ -3,13 +3,13 @@ function init(npc) end function onEventStarted(player, npc) - player:sendMessage(0x20, "", "This PopulaceShopSalesman actor has no event set. Actor Class Id: " .. tostring(npc:getActorClassId())) - player:endEvent(); - --player:runEventFunction("welcomeTalk"); + player:SendMessage(0x20, "", "This PopulaceShopSalesman actor has no event set. Actor Class Id: " .. tostring(npc:GetActorClassId())) + player:EndEvent(); + --player:RunEventFunction("welcomeTalk"); end function onEventUpdate(player, npc, step, menuOptionSelected, lsName, lsCrest) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/commands/ActivateCommand.lua b/data/scripts/commands/ActivateCommand.lua index 6507822f..29b11659 100644 --- a/data/scripts/commands/ActivateCommand.lua +++ b/data/scripts/commands/ActivateCommand.lua @@ -8,17 +8,17 @@ Switches between active and passive mode states function onEventStarted(player, command, triggerName) - if (player:getState() == 0) then + if (player:GetState() == 0) then player:changeState(2); - elseif (player:getState() == 2) then + elseif (player:GetState() == 2) then player:changeState(0); end - player:endCommand(); + player:EndCommand(); --For Opening Tutorial if (player:hasQuest("Man0l0") or player:hasQuest("Man0g0") or player:hasQuest("Man0u0")) then - player:getDirector():onCommand(command); + player:GetDirector():OnCommand(command); end diff --git a/data/scripts/commands/AttackWeaponSkill.lua b/data/scripts/commands/AttackWeaponSkill.lua index a9bf62fc..cafc3921 100644 --- a/data/scripts/commands/AttackWeaponSkill.lua +++ b/data/scripts/commands/AttackWeaponSkill.lua @@ -10,13 +10,13 @@ Finds the correct weaponskill subscript to fire when a weaponskill actor is acti function onEventStarted(player, actor, triggerName) - worldMaster = getWorldMaster(); + worldMaster = GetWorldMaster(); - if (player:getState() != 2) then - player:sendGameMessage(worldMaster, 32503, 0x20); + if (player:GetState() != 2) then + player:SendGameMessage(worldMaster, 32503, 0x20); end - player:endCommand(); + player:EndCommand(); end diff --git a/data/scripts/commands/BonusPointCommand.lua b/data/scripts/commands/BonusPointCommand.lua index 55ee95b6..dfda0c2f 100644 --- a/data/scripts/commands/BonusPointCommand.lua +++ b/data/scripts/commands/BonusPointCommand.lua @@ -9,15 +9,15 @@ operateUI(pointsAvailable, pointsLimit, str, vit, dex, int, min, pie) --]] function onEventStarted(player, actor, triggerName) - --local points = player:getAttributePoints(); - --player:runEventFunction("delegateCommand", actor, "operateUI", points.available, points.limit, points.inSTR, points.inVIT, points.inDEX, points.inINT, points.inMIN, points.inPIT); - player:runEventFunction("delegateCommand", actor, "operateUI", 10, 10, 10, 10, 10, 10, 10, 10); + --local points = player:GetAttributePoints(); + --player:RunEventFunction("delegateCommand", actor, "operateUI", points.available, points.limit, points.inSTR, points.inVIT, points.inDEX, points.inINT, points.inMIN, points.inPIT); + player:RunEventFunction("delegateCommand", actor, "operateUI", 10, 10, 10, 10, 10, 10, 10, 10); end function onEventUpdate(player, actor, step, arg1) --Submit - player:endCommand(); + player:EndCommand(); end \ No newline at end of file diff --git a/data/scripts/commands/CheckCommand.lua b/data/scripts/commands/CheckCommand.lua index 734545fe..9d1bbf52 100644 --- a/data/scripts/commands/CheckCommand.lua +++ b/data/scripts/commands/CheckCommand.lua @@ -8,12 +8,12 @@ Handles player examining someone function onEventStarted(player, commandactor, triggerName, arg1, arg2, arg3, arg4, checkedActorId) - actor = player:getActorInInstance(checkedActorId); + actor = player:GetActorInInstance(checkedActorId); if (actor ~= nil) then player:examinePlayer(actor); end - player:endCommand(); + player:EndCommand(); end diff --git a/data/scripts/commands/ChocoboRideCommand.lua b/data/scripts/commands/ChocoboRideCommand.lua index c3abe58b..3f3784ba 100644 --- a/data/scripts/commands/ChocoboRideCommand.lua +++ b/data/scripts/commands/ChocoboRideCommand.lua @@ -8,40 +8,40 @@ Handles mounting and dismounting the Chocobo and Goobbue function onEventStarted(player, actor, triggerName, isGoobbue) - if (player:getState() == 0) then + if (player:GetState() == 0) then - worldMaster = getWorldMaster(); + worldMaster = GetWorldMaster(); if (isGoobbue ~= true) then player:changeMusic(83); - player:sendChocoboAppearance(); - player:sendGameMessage(player, worldMaster, 26001, 0x20); - player:setMountState(1); + player:SendChocoboAppearance(); + player:SendGameMessage(player, worldMaster, 26001, 0x20); + player:SetMountState(1); else player:changeMusic(98); - player:sendGoobbueAppearance(); - player:sendGameMessage(player, worldMaster, 26019, 0x20); - player:setMountState(2); + player:SendGoobbueAppearance(); + player:SendGameMessage(player, worldMaster, 26019, 0x20); + player:SetMountState(2); end player:changeSpeed(0.0, 5.0, 10.0); player:changeState(15); else - player:changeMusic(player:getZone().bgmDay); + player:changeMusic(player:GetZone().bgmDay); - worldMaster = getWorldMaster(); + worldMaster = GetWorldMaster(); - if (player:getMountState() == 1) then - player:sendGameMessage(player, worldMaster, 26003, 0x20); + if (player:GetMountState() == 1) then + player:SendGameMessage(player, worldMaster, 26003, 0x20); else - player:sendGameMessage(player, worldMaster, 26021, 0x20); + player:SendGameMessage(player, worldMaster, 26021, 0x20); end - player:setMountState(0); + player:SetMountState(0); player:changeSpeed(0.0, 2.0, 5.0) player:changeState(0); end - player:endCommand(); + player:EndCommand(); end \ No newline at end of file diff --git a/data/scripts/commands/DiceCommand.lua b/data/scripts/commands/DiceCommand.lua index 10bfd694..1b0ede05 100644 --- a/data/scripts/commands/DiceCommand.lua +++ b/data/scripts/commands/DiceCommand.lua @@ -12,10 +12,10 @@ function onEventStarted(player, actor, triggerName, maxNumber) result = math.random(0, maxNumber); - worldMaster = getWorldMaster(); - player:sendGameMessage(player, worldMaster, 25342, 0x20, result, maxNumber); + worldMaster = GetWorldMaster(); + player:SendGameMessage(player, worldMaster, 25342, 0x20, result, maxNumber); - player:endCommand(); + player:EndCommand(); end diff --git a/data/scripts/commands/EmoteSitCommand.lua b/data/scripts/commands/EmoteSitCommand.lua index 764033f9..380d1f8c 100644 --- a/data/scripts/commands/EmoteSitCommand.lua +++ b/data/scripts/commands/EmoteSitCommand.lua @@ -6,7 +6,7 @@ EmoteSitCommand Script function onEventStarted(player, actor, triggerName, emoteId) - if (player:getState() == 0) then + if (player:GetState() == 0) then if (emoteId == 0x2712) then player:changeState(11); else @@ -16,7 +16,7 @@ function onEventStarted(player, actor, triggerName, emoteId) player:changeState(0); end - player:endCommand(); + player:EndCommand(); end diff --git a/data/scripts/commands/EmoteStandardCommand.lua b/data/scripts/commands/EmoteStandardCommand.lua index 1a4b7408..47cfe728 100644 --- a/data/scripts/commands/EmoteStandardCommand.lua +++ b/data/scripts/commands/EmoteStandardCommand.lua @@ -11,11 +11,11 @@ emoteTable = { function onEventStarted(player, actor, triggerName, emoteId) - if (player:getState() == 0) then + if (player:GetState() == 0) then player:doEmote(emoteId); end - player:endCommand(); + player:EndCommand(); end diff --git a/data/scripts/commands/EquipCommand.lua b/data/scripts/commands/EquipCommand.lua index 00b337db..d5f79f92 100644 --- a/data/scripts/commands/EquipCommand.lua +++ b/data/scripts/commands/EquipCommand.lua @@ -58,23 +58,23 @@ function onEventStarted(player, actor, triggerName, invActionInfo, param1, param --Equip Item if (invActionInfo ~= nil) then - item = player:getInventory(0):getItemBySlot(invActionInfo.slot); + item = player:GetInventory(0):GetItemBySlot(invActionInfo.slot); equipItem(player, equipSlot, item); - player:sendAppearance(); + player:SendAppearance(); --Unequip Item else - item = player:getEquipment():GetItemAtSlot(equipSlot); + item = player:GetEquipment():GetItemAtSlot(equipSlot); if (unequipItem(player, equipSlot, item) == true) then --Returns true only if something changed (didn't error out) - player:sendAppearance(); + player:SendAppearance(); end end - player:endCommand(); + player:EndCommand(); end function loadGearset(player, classId) - player:getEquipment():ToggleDBWrite(false); - local gearset = player:getGearset(classId); + player:GetEquipment():ToggleDBWrite(false); + local gearset = player:GetGearset(classId); if gearset == nil then return; @@ -83,7 +83,7 @@ function loadGearset(player, classId) for slot = 0, 34 do if (slot ~= EQUIPSLOT_MAINHAND and slot ~= EQUIPSLOT_UNDERSHIRT and slot ~= EQUIPSLOT_UNDERGARMENT) then - itemAtSlot = player:getEquipment():GetItemAtSlot(slot); + itemAtSlot = player:GetEquipment():GetItemAtSlot(slot); itemAtGearsetSlot = gearset[slot]; if (itemAtSlot ~= nil or itemAtGearsetSlot ~= nil) then @@ -100,15 +100,15 @@ function loadGearset(player, classId) end - player:getEquipment():ToggleDBWrite(true); + player:GetEquipment():ToggleDBWrite(true); end function equipItem(player, equipSlot, item) if (item ~= nil) then local classId = nil; - local worldMaster = getWorldMaster(); - local gItem = getItemGamedata(item.itemId); + local worldMaster = GetWorldMaster(); + local gItem = GetItemGamedata(item.itemId); --If it's the mainhand, begin class change based on weapon if (equipSlot == EQUIPSLOT_MAINHAND) then @@ -136,16 +136,16 @@ function equipItem(player, equipSlot, item) end if (classId ~= nil) then - player:sendGameMessage(player, worldMaster, 30103, 0x20, 0, 0, player, classId); + player:SendGameMessage(player, worldMaster, 30103, 0x20, 0, 0, player, classId); player:prepareClassChange(classId); end end --Item Equipped message - player:sendGameMessage(player, worldMaster, 30601, 0x20, equipSlot+1, item.itemId, item.quality, 0, 0, 1); + player:SendGameMessage(player, worldMaster, 30601, 0x20, equipSlot+1, item.itemId, item.quality, 0, 0, 1); - player:getEquipment():Equip(equipSlot, item); + player:GetEquipment():Equip(equipSlot, item); if (equipSlot == EQUIPSLOT_MAINHAND and gItem:IsNailWeapon() == false and gItem:IsBowWeapon() == false) then graphicSlot = GRAPHICSLOT_MAINHAND; elseif (equipSlot == EQUIPSLOT_OFFHAND) then graphicSlot = GRAPHICSLOT_OFFHAND; @@ -184,19 +184,19 @@ function equipItem(player, equipSlot, item) end function unequipItem(player, equipSlot, item) - worldMaster = getWorldMaster(); + worldMaster = GetWorldMaster(); if (item ~= nil and (equipSlot == EQUIPSLOT_MAINHAND or equipSlot == EQUIPSLOT_UNDERSHIRT or equipSlot == EQUIPSLOT_UNDERGARMENT)) then - player:sendGameMessage(player, worldMaster, 30730, 0x20, equipSlot+1, item.itemId, item.quality, 0, 0, 1); --Unable to unequip + player:SendGameMessage(player, worldMaster, 30730, 0x20, equipSlot+1, item.itemId, item.quality, 0, 0, 1); --Unable to unequip elseif (item ~= nil) then - player:sendGameMessage(player, worldMaster, 30602, 0x20, equipSlot+1, item.itemId, item.quality, 0, 0, 1); --Item Removed - player:getEquipment():Unequip(equipSlot); + player:SendGameMessage(player, worldMaster, 30602, 0x20, equipSlot+1, item.itemId, item.quality, 0, 0, 1); --Item Removed + player:GetEquipment():Unequip(equipSlot); if (equipSlot == EQUIPSLOT_BODY) then --Show Undershirt - item = player:getEquipment():GetItemAtSlot(EQUIPSLOT_UNDERSHIRT); + item = player:GetEquipment():GetItemAtSlot(EQUIPSLOT_UNDERSHIRT); player:graphicChange(GRAPHICSLOT_BODY, item); elseif (equipSlot == EQUIPSLOT_LEGS) then --Show Undergarment - item = player:getEquipment():GetItemAtSlot(EQUIPSLOT_UNDERGARMENT); + item = player:GetEquipment():GetItemAtSlot(EQUIPSLOT_UNDERGARMENT); player:graphicChange(GRAPHICSLOT_LEGS, item); elseif (equipSlot == EQUIPSLOT_HANDS) then player:graphicChange(15, 0, 1, 0, 0); elseif (equipSlot == EQUIPSLOT_FEET) then player:graphicChange(16, 0, 1, 0, 0); diff --git a/data/scripts/commands/ItemWasteCommand.lua b/data/scripts/commands/ItemWasteCommand.lua index 92441bd1..b0c42ae6 100644 --- a/data/scripts/commands/ItemWasteCommand.lua +++ b/data/scripts/commands/ItemWasteCommand.lua @@ -10,6 +10,6 @@ The param "itemDBIds" has the vars: item1 and item2. --]] function onEventStarted(player, actor, triggerName, invActionInfo, param1, param2, param3, param4, param5, param6, param7, param8, itemDBIds) - player:getInventory(0x00):removeItem(invActionInfo.slot); - player:endCommand(); + player:GetInventory(0x00):removeItem(invActionInfo.slot); + player:EndCommand(); end diff --git a/data/scripts/commands/LogoutCommand.lua b/data/scripts/commands/LogoutCommand.lua index 3dc52b1d..65124597 100644 --- a/data/scripts/commands/LogoutCommand.lua +++ b/data/scripts/commands/LogoutCommand.lua @@ -16,36 +16,36 @@ Countdown: 1 --]] function onEventStarted(player, command) - --player:setCurrentMenuId(0); - --player:runEventFunction("delegateCommand", command, "eventConfirm"); + --player:SetCurrentMenuId(0); + --player:RunEventFunction("delegateCommand", command, "eventConfirm"); player:logout(); end function onEventUpdate(player, command, triggerName, step, arg1, arg2) - currentMenuId = player:getCurrentMenuId(); + currentMenuId = player:GetCurrentMenuId(); --Menu Dialog if (currentMenuId == 0) then if (arg1 == 1) then --Exit player:quitGame(); - player:endCommand(); + player:EndCommand(); elseif (arg1 == 2) then --Character Screen player:logout(); - player:endCommand(); - --player:setCurrentMenuId(1); - --player:runEventFunction("delegateCommand", command, "eventCountDown"); + player:EndCommand(); + --player:SetCurrentMenuId(1); + --player:RunEventFunction("delegateCommand", command, "eventCountDown"); elseif (arg1 == 3) then --Cancel - player:endCommand(); + player:EndCommand(); end --Countdown Dialog elseif (currentMenuId == 1) then if (arg2 == 1) then --Logout Complete player:logout(); - player:endCommand(); + player:EndCommand(); elseif (arg2 == 2) then --Cancel Pressed - player:endCommand(); + player:EndCommand(); end end diff --git a/data/scripts/commands/PartyInviteCommand.lua b/data/scripts/commands/PartyInviteCommand.lua index d56640f6..74a74db9 100644 --- a/data/scripts/commands/PartyInviteCommand.lua +++ b/data/scripts/commands/PartyInviteCommand.lua @@ -9,11 +9,11 @@ Handles what happens when you invite function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, actorId) if (name ~= nil) then - getWorldManager():CreateInvitePartyGroup(player, name); + GetWorldManager():CreateInvitePartyGroup(player, name); elseif (actorId ~= nil) then - getWorldManager():CreateInvitePartyGroup(player, actorId); + GetWorldManager():CreateInvitePartyGroup(player, actorId); end - player:endCommand(); + player:EndCommand(); end \ No newline at end of file diff --git a/data/scripts/commands/RequestInformationCommand.lua b/data/scripts/commands/RequestInformationCommand.lua index 7cc47797..d46527c6 100644 --- a/data/scripts/commands/RequestInformationCommand.lua +++ b/data/scripts/commands/RequestInformationCommand.lua @@ -4,6 +4,6 @@ --]] function onEventStarted(player, actor, questId) - player:sendRequestedInfo("requestedData", "activegl", 7, nil, nil, nil, nil, nil, nil, nil); --- player:sendRequestedInfo("requestedData", "glHist", 10, 0x1D4F2, 1009, 12464, 11727, 12485, 12526); + player:SendRequestedInfo("requestedData", "activegl", 7, nil, nil, nil, nil, nil, nil, nil); +-- player:SendRequestedInfo("requestedData", "glHist", 10, 0x1D4F2, 1009, 12464, 11727, 12485, 12526); end diff --git a/data/scripts/commands/RequestQuestJournalCommand.lua b/data/scripts/commands/RequestQuestJournalCommand.lua index b67e2667..7e95025b 100644 --- a/data/scripts/commands/RequestQuestJournalCommand.lua +++ b/data/scripts/commands/RequestQuestJournalCommand.lua @@ -4,5 +4,5 @@ --]] function onEventStarted(player, actor, questId) - player:sendRequestedInfo("requestedData", "qtdata", 0x1D4F2); + player:SendRequestedInfo("requestedData", "qtdata", 0x1D4F2); end diff --git a/data/scripts/commands/TeleportCommand.lua b/data/scripts/commands/TeleportCommand.lua index 17f593fe..0a558cfb 100644 --- a/data/scripts/commands/TeleportCommand.lua +++ b/data/scripts/commands/TeleportCommand.lua @@ -18,34 +18,34 @@ Confirm Menu: 2 function onEventStarted(player, actor, triggerName, isTeleport) if (isTeleport == 0) then - player:setCurrentMenuId(0); - player:runEventFunction("delegateCommand", actor, "eventRegion", 100); + player:SetCurrentMenuId(0); + player:RunEventFunction("delegateCommand", actor, "eventRegion", 100); else - player:setCurrentMenuId(2); - player:runEventFunction("delegateCommand", actor, "eventConfirm", true, false, 1, 0x138824, false); + player:SetCurrentMenuId(2); + player:RunEventFunction("delegateCommand", actor, "eventConfirm", true, false, 1, 0x138824, false); end end function onEventUpdate(player, actor, step, arg1) - menuId = player:getCurrentMenuId(); + menuId = player:GetCurrentMenuId(); if (menuId == 0) then --Region if (arg1 ~= nil and arg1 >= 1) then - player:setCurrentMenuId(1); - player:runEventFunction("delegateCommand", actor, "eventAetheryte", arg1, 2, 2, 2, 4, 4, 4); + player:SetCurrentMenuId(1); + player:RunEventFunction("delegateCommand", actor, "eventAetheryte", arg1, 2, 2, 2, 4, 4, 4); else - player:endCommand(); + player:EndCommand(); end elseif (menuId == 1) then --Aetheryte if (arg1 == nil) then - player:endCommand(); + player:EndCommand(); return; end - player:setCurrentMenuId(2); - player:runEventFunction("delegateCommand", actor, "eventConfirm", false, false, 1, 138824, false); + player:SetCurrentMenuId(2); + player:RunEventFunction("delegateCommand", actor, "eventConfirm", false, false, 1, 138824, false); elseif (menuId == 2) then --Confirm - player:endCommand(); + player:EndCommand(); end end \ No newline at end of file diff --git a/data/scripts/directors1/openingDire_fst0Btl03_04@0A600.lua b/data/scripts/directors1/openingDire_fst0Btl03_04@0A600.lua index c573ad61..c4675f66 100644 --- a/data/scripts/directors1/openingDire_fst0Btl03_04@0A600.lua +++ b/data/scripts/directors1/openingDire_fst0Btl03_04@0A600.lua @@ -2,33 +2,33 @@ require("/quests/man/man0g0") function onEventStarted(player, actor, triggerName) - man0g0Quest = getStaticActor("Man0g0"); - player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil); + man0g0Quest = GetStaticActor("Man0g0"); + player:RunEventFunction("delegateEvent", player, man0g0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil); end function onEventUpdate(player, npc, resultId) - player:endEvent(); + player:EndEvent(); end function onTalked(player, npc) - man0g0Quest = player:getQuest("Man0g0"); + man0g0Quest = player:GetQuest("Man0g0"); if (man0g0Quest ~= nil) then - yda = getWorldManager():GetActorInWorld(1000009); - papalymo = getWorldManager():GetActorInWorld(1000010); + yda = GetWorldManager():GetActorInWorld(1000009); + papalymo = GetWorldManager():GetActorInWorld(1000010); if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_TUTORIAL1_DONE) == false) then - yda:setQuestGraphic(player, 0x0); - papalymo:setQuestGraphic(player, 0x2); + yda:SetQuestGraphic(player, 0x0); + papalymo:SetQuestGraphic(player, 0x2); else if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == true) then - yda:setQuestGraphic(player, 0x2); - papalymo:setQuestGraphic(player, 0x0); + yda:SetQuestGraphic(player, 0x2); + papalymo:SetQuestGraphic(player, 0x0); end end diff --git a/data/scripts/directors1/openingDire_ocn0Btl02_04@0C100.lua b/data/scripts/directors1/openingDire_ocn0Btl02_04@0C100.lua index 2558d8b3..031383f0 100644 --- a/data/scripts/directors1/openingDire_ocn0Btl02_04@0C100.lua +++ b/data/scripts/directors1/openingDire_ocn0Btl02_04@0C100.lua @@ -2,28 +2,28 @@ require("/quests/man/man0l0") function onEventStarted(player, actor, triggerName) - man0l0Quest = getStaticActor("Man0l0"); - player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil); - --player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_1", nil, nil, nil, nil); + man0l0Quest = GetStaticActor("Man0l0"); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_1", nil, nil, nil, nil); end function onEventUpdate(player, npc, resultId) - player:endEvent(); + player:EndEvent(); end function onTalked(player, npc) - man0l0Quest = player:getQuest("Man0l0"); + man0l0Quest = player:GetQuest("Man0l0"); if (man0l0Quest ~= nil) then if (man0l0Quest ~= nil and man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE1) == true and man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE2) == true and man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3) == true) then - doorNpc = getWorldManager():GetActorInWorld(1090025); - player:setEventStatus(doorNpc, "pushDefault", true, 0x2); - doorNpc:setQuestGraphic(player, 0x3); + doorNpc = GetWorldManager():GetActorInWorld(1090025); + player:SetEventStatus(doorNpc, "pushDefault", true, 0x2); + doorNpc:SetQuestGraphic(player, 0x3); end end diff --git a/data/scripts/directors1/openingDire_wil0Btl01_04@0B800.lua b/data/scripts/directors1/openingDire_wil0Btl01_04@0B800.lua index 8c218fef..adbc6747 100644 --- a/data/scripts/directors1/openingDire_wil0Btl01_04@0B800.lua +++ b/data/scripts/directors1/openingDire_wil0Btl01_04@0B800.lua @@ -2,20 +2,20 @@ require("/quests/man/man0u0") function onEventStarted(player, actor, triggerName) - man0u0Quest = getStaticActor("Man0u0"); - player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil); + man0u0Quest = GetStaticActor("Man0u0"); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processTtrNomal001withHQ", nil, nil, nil, nil); end function onEventUpdate(player, npc, resultId) - player:endEvent(); + player:EndEvent(); end function onTalked(player, npc) - man0u0Quest = player:getQuest("Man0u0"); + man0u0Quest = player:GetQuest("Man0u0"); if (man0u0Quest ~= nil) then diff --git a/data/scripts/directors1/questDirect_fst0Btl03_01@0A615.lua b/data/scripts/directors1/questDirect_fst0Btl03_01@0A615.lua index 7f4360a5..d0e05e82 100644 --- a/data/scripts/directors1/questDirect_fst0Btl03_01@0A615.lua +++ b/data/scripts/directors1/questDirect_fst0Btl03_01@0A615.lua @@ -1,21 +1,21 @@ function onEventStarted(player, actor, triggerName) - man0g0Quest = getStaticActor("Man0g0"); - --player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrBtl001"); - player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrBtl002"); + man0g0Quest = GetStaticActor("Man0g0"); + --player:RunEventFunction("delegateEvent", player, man0g0Quest, "processTtrBtl001"); + player:RunEventFunction("delegateEvent", player, man0g0Quest, "processTtrBtl002"); end function onEventUpdate(player, npc, resultId) - --man0g0Quest = getStaticActor("Man0g0"); - --player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrBtl002"); - player:endEvent(); + --man0g0Quest = GetStaticActor("Man0g0"); + --player:RunEventFunction("delegateEvent", player, man0g0Quest, "processTtrBtl002"); + player:EndEvent(); end function onCommand(player, command) --Check command if ActivateCommand - player:endCommand(); - player:endEvent(); - player:kickEvent(player:getDirector(), "noticeEvent", true); + player:EndCommand(); + player:EndEvent(); + player:KickEvent(player:GetDirector(), "noticeEvent", true); end \ No newline at end of file diff --git a/data/scripts/directors1/questDirect_ocn0Btl02_01@0C196.lua b/data/scripts/directors1/questDirect_ocn0Btl02_01@0C196.lua index d0f1901c..16c94682 100644 --- a/data/scripts/directors1/questDirect_ocn0Btl02_01@0C196.lua +++ b/data/scripts/directors1/questDirect_ocn0Btl02_01@0C196.lua @@ -1,25 +1,25 @@ function onEventStarted(player, actor, triggerName) - man0u0Quest = getStaticActor("Man0u0"); - man0l0Quest = getStaticActor("Man0l0"); - player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl001"); - --player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtlMagic001"); - --player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl002"); - --player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl003"); + man0u0Quest = GetStaticActor("Man0u0"); + man0l0Quest = GetStaticActor("Man0l0"); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl001"); + --player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtlMagic001"); + --player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl002"); + --player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl003"); - --player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrBtl004"); + --player:RunEventFunction("delegateEvent", player, man0u0Quest, "processTtrBtl004"); end function onEventUpdate(player, npc, resultId) - --man0l0Quest = getStaticActor("Man0l0"); - --player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl002"); - player:endEvent(); + --man0l0Quest = GetStaticActor("Man0l0"); + --player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrBtl002"); + player:EndEvent(); end function onCommand(player, command) --Check command if ActivateCommand - --player:kickEvent(player:getDirector(), "noticeEvent"); - --player:endCommand(); + --player:KickEvent(player:GetDirector(), "noticeEvent"); + --player:EndCommand(); end \ No newline at end of file diff --git a/data/scripts/player.lua b/data/scripts/player.lua index 0b80bbeb..b5d6167d 100644 --- a/data/scripts/player.lua +++ b/data/scripts/player.lua @@ -3,55 +3,55 @@ local initClassItems, initRaceItems; function onBeginLogin(player) --New character, set the initial quest - if (player:getPlayTime(false) == 0) then - initialTown = player:getInitialTown(); + if (player:GetPlayTime(false) == 0) then + initialTown = player:GetInitialTown(); if (initialTown == 1 and player:hasQuest(110001) == false) then - player:addQuest(110001); + player:AddQuest(110001); elseif (initialTown == 2 and player:hasQuest(110005) == false) then - player:addQuest(110005); + player:AddQuest(110005); elseif (initialTown == 3 and player:hasQuest(110009) == false) then - player:addQuest(110009); + player:AddQuest(110009); end end --For Opening. Set Director and reset position incase d/c if (player:hasQuest(110001) == true) then - --player:setDirector("openingDirector", false); + --player:SetDirector("openingDirector", false); player.positionX = 0.016; player.positionY = 10.35; --player.positionZ = -36.91; player.positionZ = -20.91; player.rotation = 0.025; - player:getQuest(110001):ClearQuestData(); - player:getQuest(110001):ClearQuestFlags(); + player:GetQuest(110001):ClearQuestData(); + player:GetQuest(110001):ClearQuestFlags(); elseif (player:hasQuest(110005) == true) then - player:setDirector("openingDirector", false); + player:SetDirector("openingDirector", false); player.positionX = 369.5434; player.positionY = 4.21; player.positionZ = -706.1074; player.rotation = -1.26721; - player:getQuest(110005):ClearQuestData(); - player:getQuest(110005):ClearQuestFlags(); + player:GetQuest(110005):ClearQuestData(); + player:GetQuest(110005):ClearQuestFlags(); elseif (player:hasQuest(110009) == true) then - player:setDirector("openingDirector", false); + player:SetDirector("openingDirector", false); player.positionX = 5.364327; player.positionY = 196.0; player.positionZ = 133.6561; player.rotation = -2.849384; - player:getQuest(110009):ClearQuestData(); - player:getQuest(110009):ClearQuestFlags(); + player:GetQuest(110009):ClearQuestData(); + player:GetQuest(110009):ClearQuestFlags(); end end function onLogin(player) - player:sendMessage(0x1D,"",">Callback \"onLogin\" for player script running."); + player:SendMessage(0x1D,"",">Callback \"onLogin\" for player script:Running."); - if (player:getPlayTime(false) == 0) then - player:sendMessage(0x1D,"",">PlayTime == 0, new player!"); + if (player:GetPlayTime(false) == 0) then + player:SendMessage(0x1D,"",">PlayTime == 0, new player!"); initClassItems(player); initRaceItems(player); @@ -66,27 +66,27 @@ function initClassItems(player) --DoW if (player.charaWork.parameterSave.state_mainSkill[0] == 2) then --PUG - player:getInventory(0):addItem({4020001, 8030701, 8050728, 8080601, 8090307}); - player:getEquipment():SetEquipment({0, 10, 12, 14, 15},{0, 1, 2, 3, 4}); + player:GetInventory(0):AddItem({4020001, 8030701, 8050728, 8080601, 8090307}); + player:GetEquipment():SetEquipment({0, 10, 12, 14, 15},{0, 1, 2, 3, 4}); elseif (player.charaWork.parameterSave.state_mainSkill[0] == 3) then --GLA - player:getInventory(0):addItem({4030010, 8031120, 8050245, 8080601, 8090307}); - player:getEquipment():SetEquipment({0, 10, 12, 14, 15},{0, 1, 2, 3, 4}); + player:GetInventory(0):AddItem({4030010, 8031120, 8050245, 8080601, 8090307}); + player:GetEquipment():SetEquipment({0, 10, 12, 14, 15},{0, 1, 2, 3, 4}); elseif (player.charaWork.parameterSave.state_mainSkill[0] == 4) then --MRD - player:getInventory(0):addItem({4040001, 8011001, 8050621, 8070346, 8090307}); - player:getEquipment():SetEquipment({0, 8, 12, 13, 15},{0, 1, 2, 3, 4}); + player:GetInventory(0):AddItem({4040001, 8011001, 8050621, 8070346, 8090307}); + player:GetEquipment():SetEquipment({0, 8, 12, 13, 15},{0, 1, 2, 3, 4}); elseif (player.charaWork.parameterSave.state_mainSkill[0] == 7) then --ARC - player:getInventory(0):addItem({4070001, 8030601, 8050622, 8080601, 8090307}); - player:getEquipment():SetEquipment({0, 10, 12, 14, 15},{0, 1, 2, 3, 4}); + player:GetInventory(0):AddItem({4070001, 8030601, 8050622, 8080601, 8090307}); + player:GetEquipment():SetEquipment({0, 10, 12, 14, 15},{0, 1, 2, 3, 4}); elseif (player.charaWork.parameterSave.state_mainSkill[0] == 8) then --LNC - player:getInventory(0):addItem({4080201, 8030801, 8051015, 8080501, 8090307}); - player:getEquipment():SetEquipment({0, 10, 12, 14, 15},{0, 1, 2, 3, 4}); + player:GetInventory(0):AddItem({4080201, 8030801, 8051015, 8080501, 8090307}); + player:GetEquipment():SetEquipment({0, 10, 12, 14, 15},{0, 1, 2, 3, 4}); --DoM elseif (player.charaWork.parameterSave.state_mainSkill[0] == 22) then --THM - player:getInventory(0):addItem({5020001, 8030245, 8050346, 8080346, 8090208}); - player:getEquipment():SetEquipment({0, 10, 12, 14, 15},{0, 1, 2, 3, 4}); + player:GetInventory(0):AddItem({5020001, 8030245, 8050346, 8080346, 8090208}); + player:GetEquipment():SetEquipment({0, 10, 12, 14, 15},{0, 1, 2, 3, 4}); elseif (player.charaWork.parameterSave.state_mainSkill[0] == 23) then --CNJ - player:getInventory(0):addItem({5030101, 8030445, 8050031, 8080246, 8090208}); - player:getEquipment():SetEquipment({0, 10, 12, 14, 15},{0, 1, 2, 3, 4}); + player:GetInventory(0):AddItem({5030101, 8030445, 8050031, 8080246, 8090208}); + player:GetEquipment():SetEquipment({0, 10, 12, 14, 15},{0, 1, 2, 3, 4}); --DoH elseif (player.charaWork.parameterSave.state_mainSkill[0] == 29) then -- @@ -109,52 +109,52 @@ end function initRaceItems(player) if (player.playerWork.tribe == 1) then --Hyur Midlander Male - player:getInventory(0):addItem(8040001); - player:getInventory(0):addItem(8060001); + player:GetInventory(0):AddItem(8040001); + player:GetInventory(0):AddItem(8060001); elseif (player.playerWork.tribe == 2) then --Hyur Midlander Female - player:getInventory(0):addItem(8040002); - player:getInventory(0):addItem(8060002); + player:GetInventory(0):AddItem(8040002); + player:GetInventory(0):AddItem(8060002); elseif (player.playerWork.tribe == 3) then --Hyur Highlander Male - player:getInventory(0):addItem(8040003); - player:getInventory(0):addItem(8060003); + player:GetInventory(0):AddItem(8040003); + player:GetInventory(0):AddItem(8060003); elseif (player.playerWork.tribe == 4) then --Elezen Wildwood Male - player:getInventory(0):addItem(8040004); - player:getInventory(0):addItem(8060004); + player:GetInventory(0):AddItem(8040004); + player:GetInventory(0):AddItem(8060004); elseif (player.playerWork.tribe == 5) then --Elezen Wildwood Female - player:getInventory(0):addItem(8040006); - player:getInventory(0):addItem(8060006); + player:GetInventory(0):AddItem(8040006); + player:GetInventory(0):AddItem(8060006); elseif (player.playerWork.tribe == 6) then --Elezen Duskwight Male - player:getInventory(0):addItem(8040005); - player:getInventory(0):addItem(8060005); + player:GetInventory(0):AddItem(8040005); + player:GetInventory(0):AddItem(8060005); elseif (player.playerWork.tribe == 7) then --Elezen Duskwight Female - player:getInventory(0):addItem(8040007); - player:getInventory(0):addItem(8060007); + player:GetInventory(0):AddItem(8040007); + player:GetInventory(0):AddItem(8060007); elseif (player.playerWork.tribe == 8) then --Lalafell Plainsfolk Male - player:getInventory(0):addItem(8040008); - player:getInventory(0):addItem(8060008); + player:GetInventory(0):AddItem(8040008); + player:GetInventory(0):AddItem(8060008); elseif (player.playerWork.tribe == 9) then --Lalafell Plainsfolk Female - player:getInventory(0):addItem(8040010); - player:getInventory(0):addItem(8060010); + player:GetInventory(0):AddItem(8040010); + player:GetInventory(0):AddItem(8060010); elseif (player.playerWork.tribe == 10) then --Lalafell Dunesfolk Male - player:getInventory(0):addItem(8040009); - player:getInventory(0):addItem(8060009); + player:GetInventory(0):AddItem(8040009); + player:GetInventory(0):AddItem(8060009); elseif (player.playerWork.tribe == 11) then --Lalafell Dunesfolk Female - player:getInventory(0):addItem(8040011); - player:getInventory(0):addItem(8060011); + player:GetInventory(0):AddItem(8040011); + player:GetInventory(0):AddItem(8060011); elseif (player.playerWork.tribe == 12) then --Miqo'te Seekers of the Sun - player:getInventory(0):addItem(8040012); - player:getInventory(0):addItem(8060012); + player:GetInventory(0):AddItem(8040012); + player:GetInventory(0):AddItem(8060012); elseif (player.playerWork.tribe == 13) then --Miqo'te Seekers of the Moon - player:getInventory(0):addItem(8040013); - player:getInventory(0):addItem(8060013); + player:GetInventory(0):AddItem(8040013); + player:GetInventory(0):AddItem(8060013); elseif (player.playerWork.tribe == 14) then --Roegadyn Sea Wolf - player:getInventory(0):addItem(8040014); - player:getInventory(0):addItem(8060014); + player:GetInventory(0):AddItem(8040014); + player:GetInventory(0):AddItem(8060014); elseif (player.playerWork.tribe == 15) then --Roegadyn Hellsguard - player:getInventory(0):addItem(8040015); - player:getInventory(0):addItem(8060015); + player:GetInventory(0):AddItem(8040015); + player:GetInventory(0):AddItem(8060015); end - player:getEquipment():SetEquipment({9, 11},{5,6}); + player:GetEquipment():SetEquipment({9, 11},{5,6}); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Battle03/openingStop_fstBtl03_03@0A600.lua b/data/scripts/unique/fst0Battle03/openingStop_fstBtl03_03@0A600.lua index 6038d14c..754cfaa6 100644 --- a/data/scripts/unique/fst0Battle03/openingStop_fstBtl03_03@0A600.lua +++ b/data/scripts/unique/fst0Battle03/openingStop_fstBtl03_03@0A600.lua @@ -1,13 +1,13 @@ function init(npc) - return "/Chara/Npc/Object/OpeningStoperF0B1", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Object/OpeningStoperF0B1", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) if (triggerName == "caution") then - worldMaster = getWorldMaster(); - player:sendGameMessage(player, worldMaster, 34109, 0x20); + worldMaster = GetWorldMaster(); + player:SendGameMessage(player, worldMaster, 34109, 0x20); elseif (triggerName == "exit") then - getWorldManager():DoPlayerMoveInZone(player, 5); + GetWorldManager():DoPlayerMoveInZone(player, 5); end - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Battle03/pplStd_fst0Btl03_01@0A600.lua b/data/scripts/unique/fst0Battle03/pplStd_fst0Btl03_01@0A600.lua index 2f0cc3f4..b1d2fe67 100644 --- a/data/scripts/unique/fst0Battle03/pplStd_fst0Btl03_01@0A600.lua +++ b/data/scripts/unique/fst0Battle03/pplStd_fst0Btl03_01@0A600.lua @@ -1,61 +1,61 @@ require("/quests/man/man0g0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onSpawn(player, npc) - npc:setQuestGraphic(player, 0x2); + npc:SetQuestGraphic(player, 0x2); end function onEventStarted(player, npc, triggerName) - man0g0Quest = player:getQuest("Man0g0"); + man0g0Quest = player:GetQuest("Man0g0"); if (man0g0Quest ~= nil) then if (triggerName == "pushDefault") then - player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrNomal002", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0g0Quest, "processTtrNomal002", nil, nil, nil); elseif (triggerName == "talkDefault") then if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_TUTORIAL1_DONE) == false) then - player:runEventFunction("delegateEvent", player, man0g0Quest, "processTtrNomal003", nil, nil, nil); - player:setEventStatus(npc, "pushDefault", false, 0x2); - player:getDirector():onTalked(npc); + player:RunEventFunction("delegateEvent", player, man0g0Quest, "processTtrNomal003", nil, nil, nil); + player:SetEventStatus(npc, "pushDefault", false, 0x2); + player:GetDirector():OnTalked(npc); man0g0Quest:SetQuestFlag(MAN0G0_FLAG_TUTORIAL1_DONE, true); man0g0Quest:SaveData(); else if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == true) then man0g0Quest:SetQuestFlag(MAN0G0_FLAG_TUTORIAL2_DONE, true); - player:runEventFunction("delegateEvent", player, man0g0Quest, "processEvent010_1", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0g0Quest, "processEvent010_1", nil, nil, nil); else - player:runEventFunction("delegateEvent", player, man0g0Quest, "processEvent000_1", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0g0Quest, "processEvent000_1", nil, nil, nil); end end else - player:endEvent(); + player:EndEvent(); end else - player:endEvent(); --Should not be here w.o this quest + player:EndEvent(); --Should not be here w.o this quest end end function onEventUpdate(player, npc) - man0g0Quest = player:getQuest("Man0g0"); + man0g0Quest = player:GetQuest("Man0g0"); if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_TUTORIAL2_DONE) == true) then - player:endEvent(); - player:setDirector("QuestDirectorMan0g001", true); + player:EndEvent(); + player:SetDirector("QuestDirectorMan0g001", true); - worldMaster = getWorldMaster(); - player:sendGameMessage(player, worldMaster, 34108, 0x20); - player:sendGameMessage(player, worldMaster, 50011, 0x20); + worldMaster = GetWorldMaster(); + player:SendGameMessage(player, worldMaster, 34108, 0x20); + player:SendGameMessage(player, worldMaster, 50011, 0x20); - getWorldManager():DoPlayerMoveInZone(player, 10); - player:kickEvent(player:getDirector(), "noticeEvent", true); + GetWorldManager():DoPlayerMoveInZone(player, 10); + player:KickEvent(player:GetDirector(), "noticeEvent", true); else - player:endEvent(); + player:EndEvent(); end end \ No newline at end of file diff --git a/data/scripts/unique/fst0Battle03/pplStd_fst0Btl03_02@0A600.lua b/data/scripts/unique/fst0Battle03/pplStd_fst0Btl03_02@0A600.lua index e5366219..2a811636 100644 --- a/data/scripts/unique/fst0Battle03/pplStd_fst0Btl03_02@0A600.lua +++ b/data/scripts/unique/fst0Battle03/pplStd_fst0Btl03_02@0A600.lua @@ -1,28 +1,28 @@ require("/quests/man/man0g0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0g0Quest = player:getQuest("Man0g0"); + man0g0Quest = player:GetQuest("Man0g0"); if (triggerName == "talkDefault") then if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == false) then - player:runEventFunction("delegateEvent", player, man0g0Quest, "processEvent000_2", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0g0Quest, "processEvent000_2", nil, nil, nil); man0g0Quest:SetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1, true); man0g0Quest:SaveData(); - player:getDirector():onTalked(npc); + player:GetDirector():OnTalked(npc); else - player:runEventFunction("delegateEvent", player, man0g0Quest, "processEvent000_2", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0g0Quest, "processEvent000_2", nil, nil, nil); end else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/fst0Town01/PopulaceStandard/vkorolon.lua b/data/scripts/unique/fst0Town01/PopulaceStandard/vkorolon.lua index b41d4991..22cc60c7 100644 --- a/data/scripts/unique/fst0Town01/PopulaceStandard/vkorolon.lua +++ b/data/scripts/unique/fst0Town01/PopulaceStandard/vkorolon.lua @@ -1,15 +1,15 @@ function onEventStarted(player, npc) - defaultFst = getStaticActor("DftFst"); - player:runEventFunction("delegateEvent", player, defaultFst, "defaultTalkWithInn_Desk", nil, nil, nil); + defaultFst = GetStaticActor("DftFst"); + player:RunEventFunction("delegateEvent", player, defaultFst, "defaultTalkWithInn_Desk", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) if (menuSelect == 1) then - getWorldManager():DoZoneChange(player, 13); + GetWorldManager():DoZoneChange(player, 13); end - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/fighterAlly_ocn0Btl02_02@0C196.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/fighterAlly_ocn0Btl02_02@0C196.lua index 046a9adf..c1e8d1d6 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/fighterAlly_ocn0Btl02_02@0C196.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/fighterAlly_ocn0Btl02_02@0C196.lua @@ -1,3 +1,3 @@ function init(npc) - return "/Chara/Npc/Monster/Fighter/FighterAllyOpeningHealer", false, false, false, false, false, npc.getActorClassId(), false, false, 10, 1, 4, false, false, false, false, false, false, false, false, 2; + return "/Chara/Npc/Monster/Fighter/FighterAllyOpeningHealer", false, false, false, false, false, npc:GetActorClassId(), false, false, 10, 1, 4, false, false, false, false, false, false, false, false, 2; end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/fighterAlly_ocn0Btl02_03@0C196.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/fighterAlly_ocn0Btl02_03@0C196.lua index bb3e993c..886bdaca 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/fighterAlly_ocn0Btl02_03@0C196.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/fighterAlly_ocn0Btl02_03@0C196.lua @@ -1,3 +1,3 @@ function init(npc) - return "/Chara/Npc/Monster/Fighter/FighterAllyOpeningAttacker", false, false, false, false, false, npc.getActorClassId(), false, false, 10, 1, 4, false, false, false, false, false, false, false, false, 2; + return "/Chara/Npc/Monster/Fighter/FighterAllyOpeningAttacker", false, false, false, false, false, npc:GetActorClassId(), false, false, 10, 1, 4, false, false, false, false, false, false, false, false, 2; end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/jellyfishSc_ocn0Btl02_04@0C196.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/jellyfishSc_ocn0Btl02_04@0C196.lua index 47696331..2bcc1e57 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/jellyfishSc_ocn0Btl02_04@0C196.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/jellyfishSc_ocn0Btl02_04@0C196.lua @@ -1,3 +1,3 @@ function init(npc) - return "/Chara/Npc/Monster/Jellyfish/JellyfishScenarioLimsaLv00", false, false, false, false, false, npc.getActorClassId(), true, true, 10, 0, 4, false, false, false, false, false, false, false, false, 2; + return "/Chara/Npc/Monster/Jellyfish/JellyfishScenarioLimsaLv00", false, false, false, false, false, npc:GetActorClassId(), true, true, 10, 0, 4, false, false, false, false, false, false, false, false, 2; end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_01@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_01@0C100.lua index cbdfb0e9..75ddffb1 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_01@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_01@0C100.lua @@ -1,19 +1,19 @@ function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0l0Quest = getStaticActor("Man0l0"); + man0l0Quest = GetStaticActor("Man0l0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_4", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_4", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_02@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_02@0C100.lua index 8c4fdb87..1c23175a 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_02@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_02@0C100.lua @@ -1,19 +1,19 @@ function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0l0Quest = getStaticActor("Man0l0"); + man0l0Quest = GetStaticActor("Man0l0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_5", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_5", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_03@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_03@0C100.lua index 19d3251a..e99678f8 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_03@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_03@0C100.lua @@ -1,19 +1,19 @@ function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0l0Quest = getStaticActor("Man0l0"); + man0l0Quest = GetStaticActor("Man0l0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_6", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_6", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_04@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_04@0C100.lua index 7872c17e..8637a198 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_04@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_04@0C100.lua @@ -1,19 +1,19 @@ function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0l0Quest = getStaticActor("Man0l0"); + man0l0Quest = GetStaticActor("Man0l0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_7", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_7", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_05@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_05@0C100.lua index 4271a73c..c6ab9164 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_05@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_05@0C100.lua @@ -1,17 +1,17 @@ require("/quests/man/man0l0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onSpawn(player, npc) - man0l0Quest = player:getQuest("man0l0"); + man0l0Quest = player:GetQuest("man0l0"); if (man0l0Quest ~= nil) then if (man0l0Quest ~= nil) then if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3) == false) then - npc:setQuestGraphic(player, 0x2); + npc:SetQuestGraphic(player, 0x2); end end end @@ -19,24 +19,24 @@ end function onEventStarted(player, npc, triggerName) - man0l0Quest = player:getQuest("man0l0"); + man0l0Quest = player:GetQuest("man0l0"); if (triggerName == "talkDefault") then if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3) == false) then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrMini003", nil, nil, nil); - npc:setQuestGraphic(player, 0x0); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrMini003", nil, nil, nil); + npc:SetQuestGraphic(player, 0x0); man0l0Quest:SetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3, true); man0l0Quest:SaveData(); - player:getDirector():onTalked(npc); + player:GetDirector():OnTalked(npc); else - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_8", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_8", nil, nil, nil); end else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_06@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_06@0C100.lua index 54895bc4..abc727a9 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_06@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_06@0C100.lua @@ -1,19 +1,19 @@ function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0l0Quest = getStaticActor("Man0l0"); + man0l0Quest = GetStaticActor("Man0l0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_9", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_9", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_07@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_07@0C100.lua index 79b276f8..89c3769d 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_07@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_07@0C100.lua @@ -1,19 +1,19 @@ function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0l0Quest = getStaticActor("Man0l0"); + man0l0Quest = GetStaticActor("Man0l0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_10", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_10", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_08@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_08@0C100.lua index 2144a8ed..c327ba9c 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_08@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_08@0C100.lua @@ -1,19 +1,19 @@ function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0l0Quest = getStaticActor("Man0l0"); + man0l0Quest = GetStaticActor("Man0l0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_11", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_11", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_09@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_09@0C100.lua index 87d02d5e..6d8e0afb 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_09@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_09@0C100.lua @@ -1,19 +1,19 @@ function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0l0Quest = getStaticActor("Man0l0"); + man0l0Quest = GetStaticActor("Man0l0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_12", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_12", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0a@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0a@0C100.lua index 073378ef..566fad0b 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0a@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0a@0C100.lua @@ -1,16 +1,16 @@ require("/quests/man/man0l0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onSpawn(player, npc) - man0l0Quest = player:getQuest("man0l0"); + man0l0Quest = player:GetQuest("man0l0"); if (man0l0Quest ~= nil) then if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE2) == false) then - npc:setQuestGraphic(player, 0x2); + npc:SetQuestGraphic(player, 0x2); end end @@ -18,29 +18,29 @@ end function onEventStarted(player, npc, triggerName) - man0l0Quest = player:getQuest("man0l0"); + man0l0Quest = player:GetQuest("man0l0"); if (man0l0Quest ~= nil) then if (triggerName == "talkDefault") then if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE2) == false) then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrMini002", nil, nil, nil); - npc:setQuestGraphic(player, 0x0); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrMini002", nil, nil, nil); + npc:SetQuestGraphic(player, 0x0); man0l0Quest:SetQuestFlag(MAN0L0_FLAG_MINITUT_DONE2, true); man0l0Quest:SaveData(); - player:getDirector():onTalked(npc); + player:GetDirector():OnTalked(npc); else - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_13", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_13", nil, nil, nil); end else - player:endEvent(); + player:EndEvent(); end else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0b@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0b@0C100.lua index 908b457d..fee18e25 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0b@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0b@0C100.lua @@ -1,20 +1,20 @@ function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0l0Quest = getStaticActor("Man0l0"); + man0l0Quest = GetStaticActor("Man0l0"); if (triggerName == "talkDefault") then - --player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_9", nil, nil, nil); - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_14", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_9", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_14", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0c@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0c@0C100.lua index dac715e7..335702e5 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0c@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0c@0C100.lua @@ -1,19 +1,19 @@ function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0l0Quest = getStaticActor("Man0l0"); + man0l0Quest = GetStaticActor("Man0l0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_15", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_15", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0d@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0d@0C100.lua index facd1c34..006c9d4b 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0d@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0d@0C100.lua @@ -1,19 +1,19 @@ function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0l0Quest = getStaticActor("Man0l0"); + man0l0Quest = GetStaticActor("Man0l0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_16", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_16", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0e@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0e@0C100.lua index a53f24e9..e02c767c 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0e@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0e@0C100.lua @@ -1,19 +1,19 @@ function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0l0Quest = getStaticActor("Man0l0"); + man0l0Quest = GetStaticActor("Man0l0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_17", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_17", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0f@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0f@0C100.lua index 54921d45..7f4ac125 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0f@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_0f@0C100.lua @@ -1,20 +1,20 @@ require("/quests/man/man0l0") function init(npc) - return "/Chara/Npc/Populace/PopulaceTutorial", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceTutorial", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onSpawn(player, npc) - man0l0Quest = player:getQuest("Man0l0"); + man0l0Quest = player:GetQuest("Man0l0"); if (man0l0Quest ~= nil) then if (man0l0Quest ~= nil and man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE1) == true and man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE2) == true and man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE3) == true) then - player:setEventStatus(npc, "pushDefault", true, 0x2); - npc:setQuestGraphic(player, 0x3); + player:SetEventStatus(npc, "pushDefault", true, 0x2); + npc:SetQuestGraphic(player, 0x3); else - player:setEventStatus(npc, "pushDefault", true, 0x2); - npc:setQuestGraphic(player, 0x3); + player:SetEventStatus(npc, "pushDefault", true, 0x2); + npc:SetQuestGraphic(player, 0x3); end end @@ -23,10 +23,10 @@ end function onEventStarted(player, npc, triggerName) if (triggerName == "pushDefault") then - man0l0Quest = getStaticActor("Man0l0"); - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEventNewRectAsk", nil); + man0l0Quest = GetStaticActor("Man0l0"); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEventNewRectAsk", nil); else - player:endEvent(); + player:EndEvent(); end end @@ -34,21 +34,21 @@ end function onEventUpdate(player, npc, resultId, choice) if (resultId == 0x2B9EBC42) then - player:endEvent(); - player:setDirector("QuestDirectorMan0l001", true); + player:EndEvent(); + player:SetDirector("QuestDirectorMan0l001", true); - worldMaster = getWorldMaster(); - player:sendGameMessage(player, worldMaster, 34108, 0x20); - player:sendGameMessage(player, worldMaster, 50011, 0x20); + worldMaster = GetWorldMaster(); + player:SendGameMessage(player, worldMaster, 34108, 0x20); + player:SendGameMessage(player, worldMaster, 50011, 0x20); - getWorldManager():DoPlayerMoveInZone(player, 9); - player:kickEvent(player:getDirector(), "noticeEvent", true); + GetWorldManager():DoPlayerMoveInZone(player, 9); + player:KickEvent(player:GetDirector(), "noticeEvent", true); else if (choice == 1) then - man0l0Quest = player:getQuest("Man0l0"); - player:runEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_2", nil, nil, nil, nil); + man0l0Quest = player:GetQuest("Man0l0"); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processEvent000_2", nil, nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_11@0C100.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_11@0C100.lua index 799d5275..74d2ff08 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_11@0C100.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/pplStd_11@0C100.lua @@ -1,20 +1,20 @@ require("/quests/man/man0l0") function init(npc) - return "/Chara/Npc/Populace/PopulaceTutorial", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceTutorial", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onSpawn(player, npc) - man0l0Quest = player:getQuest("Man0l0"); + man0l0Quest = player:GetQuest("Man0l0"); if (man0l0Quest ~= nil) then if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE1) == false) then - npc:setQuestGraphic(player, 0x2); + npc:SetQuestGraphic(player, 0x2); end if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_TUTORIAL3_DONE) == true) then - player:setEventStatus(npc, "pushDefault", false, 0x2); + player:SetEventStatus(npc, "pushDefault", false, 0x2); end end @@ -22,44 +22,44 @@ end function onEventStarted(player, npc, triggerName) - man0l0Quest = player:getQuest("Man0l0"); + man0l0Quest = player:GetQuest("Man0l0"); if (man0l0Quest ~= nil) then if (triggerName == "pushDefault") then - player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal002", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal002", nil, nil, nil); elseif (triggerName == "talkDefault") then --Is doing talk tutorial? if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_TUTORIAL3_DONE) == false) then - player:setEventStatus(npc, "pushDefault", false, 0x2); - player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal003", nil, nil, nil); + player:SetEventStatus(npc, "pushDefault", false, 0x2); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal003", nil, nil, nil); man0l0Quest:SetQuestFlag(MAN0L0_FLAG_TUTORIAL3_DONE, true); - npc:setQuestGraphic(player, 0x2); + npc:SetQuestGraphic(player, 0x2); man0l0Quest:SaveData(); - player:getDirector():onTalked(npc); + player:GetDirector():OnTalked(npc); --Was he talked to for the mini tutorial? else - player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrMini001", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0l0Quest, "processTtrMini001", nil, nil, nil); if (man0l0Quest:GetQuestFlag(MAN0L0_FLAG_MINITUT_DONE1) == false) then - npc:setQuestGraphic(player, 0x0); + npc:SetQuestGraphic(player, 0x0); man0l0Quest:SetQuestFlag(MAN0L0_FLAG_MINITUT_DONE1, true); man0l0Quest:SaveData(); - player:getDirector():onTalked(npc); + player:GetDirector():OnTalked(npc); end end else - player:endEvent(); + player:EndEvent(); end else - player:endEvent(); --Should not be here w.o this quest + player:EndEvent(); --Should not be here w.o this quest end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/ocn0Battle02/PopulaceStandard/zone.lua b/data/scripts/unique/ocn0Battle02/PopulaceStandard/zone.lua index 75137ee9..5b6065b6 100644 --- a/data/scripts/unique/ocn0Battle02/PopulaceStandard/zone.lua +++ b/data/scripts/unique/ocn0Battle02/PopulaceStandard/zone.lua @@ -5,12 +5,12 @@ end function onZoneIn(player) - openingQuest = player:getQuest(110001); + openingQuest = player:GetQuest(110001); --Opening Quest if (openingQuest ~= nil) then if (openingQuest:GetQuestFlag(0) == false) then - player:kickEvent(player:getDirector(), "noticeEvent"); + player:KickEvent(player:GetDirector(), "noticeEvent"); end end diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/aergwynt.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/aergwynt.lua index 9a3c9d72..c2508de5 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/aergwynt.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/aergwynt.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAergwynt_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAergwynt_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/baderon.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/baderon.lua index 4a0828a9..35ee92da 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/baderon.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/baderon.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBaderon_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBaderon_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/chantine.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/chantine.lua index c9e2b749..5f131b84 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/chantine.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/chantine.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithChantine_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithChantine_002", nil, nil, nil); --LNC - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithChantine_003", nil, nil, nil); --LNC NO GUILD + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithChantine_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithChantine_002", nil, nil, nil); --LNC + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithChantine_003", nil, nil, nil); --LNC NO GUILD end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/estrilda.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/estrilda.lua index 901e0167..11bdd3ea 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/estrilda.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/estrilda.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithEstrilda_001", nil, nil, nil); --DEFAULT - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithEstrilda_002", nil, nil, nil); --IF ARCHER - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithEstrilda_003", nil, nil, nil); --IF ARCHER + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithEstrilda_001", nil, nil, nil); --DEFAULT + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithEstrilda_002", nil, nil, nil); --IF ARCHER + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithEstrilda_003", nil, nil, nil); --IF ARCHER end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/frithuric.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/frithuric.lua index 282202b0..9e944e41 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/frithuric.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/frithuric.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrithuric_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrithuric_002", nil, nil, nil); --LTW - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrithuric_003", nil, nil, nil); --LTW NO GUILD + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrithuric_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrithuric_002", nil, nil, nil); --LTW + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrithuric_003", nil, nil, nil); --LTW NO GUILD end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/fzhumii.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/fzhumii.lua index a0ef7609..11489191 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/fzhumii.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/fzhumii.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFzhumii_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFzhumii_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/gigirya.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/gigirya.lua index adeb0095..de379a19 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/gigirya.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/gigirya.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGigirya_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGigirya_002", nil, nil, nil); --THM - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGigirya_003", nil, nil, nil); --THM NO GUILD + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGigirya_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGigirya_002", nil, nil, nil); --THM + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGigirya_003", nil, nil, nil); --THM NO GUILD end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/gnibnpha.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/gnibnpha.lua index 2753feb9..f2b2daca 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/gnibnpha.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/gnibnpha.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGnibnpha_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGnibnpha_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/gregory.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/gregory.lua index bcff8b2e..d55899a8 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/gregory.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/gregory.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGregory_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGregory_002", nil, nil, nil); --CNJ - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGregory_003", nil, nil, nil); --CNJ NO GUILD + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGregory_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGregory_002", nil, nil, nil); --CNJ + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGregory_003", nil, nil, nil); --CNJ NO GUILD end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/isleen.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/isleen.lua index 07b960c8..ef7f008e 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/isleen.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/isleen.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIsleen_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIsleen_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/istrilda.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/istrilda.lua index 07b960c8..ef7f008e 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/istrilda.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/istrilda.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIsleen_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIsleen_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/josias.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/josias.lua index 0255f127..eefad61f 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/josias.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/josias.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJosias_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJosias_002", nil, nil, nil); --CRP - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJosias_003", nil, nil, nil); --CRP NO GUILD + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJosias_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJosias_002", nil, nil, nil); --CRP + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJosias_003", nil, nil, nil); --CRP NO GUILD end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/kakamehi.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/kakamehi.lua index 210c636f..3a5d8daf 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/kakamehi.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/kakamehi.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKakamehi_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKakamehi_002", nil, nil, nil); --IF ALC - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKakamehi_003", nil, nil, nil); --IF ALC + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKakamehi_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKakamehi_002", nil, nil, nil); --IF ALC + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKakamehi_003", nil, nil, nil); --IF ALC end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/kokoto.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/kokoto.lua index 9109881d..ed92c7e5 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/kokoto.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/kokoto.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKokoto_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKokoto_002", nil, nil, nil); --LNC - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKokoto_003", nil, nil, nil); --LNC NO GUILD + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKokoto_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKokoto_002", nil, nil, nil); --LNC + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKokoto_003", nil, nil, nil); --LNC NO GUILD end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/laniaitte.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/laniaitte.lua index 00697c1a..d02c6e66 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/laniaitte.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/laniaitte.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLaniaitte_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLaniaitte_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/lauda.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/lauda.lua index 1af326d7..37081f9b 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/lauda.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/lauda.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLauda_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLauda_002", nil, nil, nil); --BTN - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLauda_003", nil, nil, nil); --BTN NO GUILD + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLauda_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLauda_002", nil, nil, nil); --BTN + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLauda_003", nil, nil, nil); --BTN NO GUILD end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/maunie.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/maunie.lua index cf4f156e..3b47381c 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/maunie.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/maunie.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMaunie_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMaunie_002", nil, nil, nil); --PUG - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMaunie_003", nil, nil, nil); --PUG NO GUILD + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMaunie_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMaunie_002", nil, nil, nil); --PUG + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMaunie_003", nil, nil, nil); --PUG NO GUILD end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/mytesyn.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/mytesyn.lua index 32a1d5b0..2d15ca2b 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/mytesyn.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/mytesyn.lua @@ -1,15 +1,15 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithInn_Desk", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithInn_Desk", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) if (menuSelect == 1) then - getWorldManager():DoZoneChange(player, 12); + GetWorldManager():DoZoneChange(player, 12); end - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/nanaka.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/nanaka.lua index 5fa715f9..10a297e3 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/nanaka.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/nanaka.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNanaka_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNanaka_002", nil, nil, nil); --GSM - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNanaka_003", nil, nil, nil); --GSM NO GUILD + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNanaka_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNanaka_002", nil, nil, nil); --GSM + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNanaka_003", nil, nil, nil); --GSM NO GUILD end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/stephannot.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/stephannot.lua index d87748c5..5562c51e 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/stephannot.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/stephannot.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithStephannot_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithStephannot_002", nil, nil, nil); --MIN - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithStephannot_003", nil, nil, nil); --MIN NO GUILD + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithStephannot_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithStephannot_002", nil, nil, nil); --MIN + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithStephannot_003", nil, nil, nil); --MIN NO GUILD end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/tirauland.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/tirauland.lua index 99da464f..a6a29c2c 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/tirauland.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/tirauland.lua @@ -1,8 +1,8 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTirauland_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTirauland_002", nil, nil, nil); --LNC - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTirauland_003", nil, nil, nil); --LNC NO GUILD - --player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTirauland_010", nil, nil, nil); --NOT DOW/DOM + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTirauland_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTirauland_002", nil, nil, nil); --LNC + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTirauland_003", nil, nil, nil); --LNC NO GUILD + --player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTirauland_010", nil, nil, nil); --NOT DOW/DOM end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/zanthael.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/zanthael.lua index cba68034..bdf0e75d 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/zanthael.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/zanthael.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithZanthael_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithZanthael_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01/PopulaceStandard/zehrymm.lua b/data/scripts/unique/sea0Town01/PopulaceStandard/zehrymm.lua index 5d4e81a0..31002d51 100644 --- a/data/scripts/unique/sea0Town01/PopulaceStandard/zehrymm.lua +++ b/data/scripts/unique/sea0Town01/PopulaceStandard/zehrymm.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithZehrymm_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithZehrymm_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/aentfoet.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/aentfoet.lua index 033b3eb7..49283a74 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/aentfoet.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/aentfoet.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAentfoet_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAentfoet_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/aergwynt.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/aergwynt.lua index 9a3c9d72..c2508de5 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/aergwynt.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/aergwynt.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAergwynt_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAergwynt_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ahldskyf.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ahldskyf.lua index 7a5ed1fd..585c00d8 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ahldskyf.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ahldskyf.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAhldskyff_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAhldskyff_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/angry_river.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/angry_river.lua index 84b4db93..e34418a0 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/angry_river.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/angry_river.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAngryriver_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAngryriver_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ansgor.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ansgor.lua index 989adcc0..f71e01a3 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ansgor.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ansgor.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAnsgor_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAnsgor_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/arnegis.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/arnegis.lua index 25213c09..12d0f7a5 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/arnegis.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/arnegis.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithArnegis_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithArnegis_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/arthurioux.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/arthurioux.lua index 1f00dbf9..dd5b728d 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/arthurioux.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/arthurioux.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithArthurioux_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithArthurioux_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/astrid.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/astrid.lua index 4fd7cffd..a365e908 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/astrid.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/astrid.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAstrid_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAstrid_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/audaine.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/audaine.lua index 3b95431f..0780e64d 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/audaine.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/audaine.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAudaine_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAudaine_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/bango_zango.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/bango_zango.lua index f41b8699..7fb43429 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/bango_zango.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/bango_zango.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKakalan_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKakalan_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/bayard.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/bayard.lua index 599de297..cebda24e 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/bayard.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/bayard.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBayard_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBayard_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/bloemerl.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/bloemerl.lua index 0af86c39..7d790468 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/bloemerl.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/bloemerl.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBloemerl_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBloemerl_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/bmallpa.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/bmallpa.lua index c4f4aba2..705ae4d8 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/bmallpa.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/bmallpa.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBmallpa_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBmallpa_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/bnhapla.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/bnhapla.lua index 34d27dd4..8e47a9da 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/bnhapla.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/bnhapla.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBnhapla_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBnhapla_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/bodenolf.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/bodenolf.lua index 2022ce95..af823e81 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/bodenolf.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/bodenolf.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBodenolf_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBodenolf_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/brictt.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/brictt.lua index cdffbdec..781a34b2 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/brictt.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/brictt.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBrictt_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBrictt_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/buburoon.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/buburoon.lua index 70722752..66f317d4 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/buburoon.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/buburoon.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBuburoon_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithBuburoon_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/carrilaut.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/carrilaut.lua index e88f9e6c..20e18cc5 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/carrilaut.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/carrilaut.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithCarrilaut_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithCarrilaut_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ceadda.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ceadda.lua index e5241f75..a687aaa8 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ceadda.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ceadda.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithCeadda_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithCeadda_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/charlys.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/charlys.lua index dc09cd68..385111e0 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/charlys.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/charlys.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithCharlys_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithCharlys_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/chaunollet.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/chaunollet.lua index 9b2d6c04..df808b1d 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/chaunollet.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/chaunollet.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithChaunollet_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithChaunollet_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/chichiroon.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/chichiroon.lua index 88250f47..94c053bd 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/chichiroon.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/chichiroon.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithChichiroon_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithChichiroon_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/clifton.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/clifton.lua index 4cb317d6..54182d1a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/clifton.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/clifton.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithClifton_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithClifton_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/colson.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/colson.lua index 2ec910c9..b875181d 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/colson.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/colson.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithColson_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithColson_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/daca_jinjahl.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/daca_jinjahl.lua index 798dcb89..360e89a4 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/daca_jinjahl.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/daca_jinjahl.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDacajinjahl_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDacajinjahl_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/delado_madalado.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/delado_madalado.lua index d4d311da..e4821167 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/delado_madalado.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/delado_madalado.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDeladomadalado_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDeladomadalado_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/dhemsunn.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/dhemsunn.lua index 3d991e60..2bbb7c5e 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/dhemsunn.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/dhemsunn.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDhemsunn_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDhemsunn_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/dodoroba.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/dodoroba.lua index 694081d4..25e6ccb4 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/dodoroba.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/dodoroba.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDodoroba_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDodoroba_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/drowsy-eyed_adventurer.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/drowsy-eyed_adventurer.lua index 0047f97d..7d958fbd 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/drowsy-eyed_adventurer.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/drowsy-eyed_adventurer.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAdventurer031_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAdventurer031_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/dympna.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/dympna.lua index 3d4bf61c..f6276ecc 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/dympna.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/dympna.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDympna_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDympna_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/elilwaen.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/elilwaen.lua index baf33e30..90f63c99 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/elilwaen.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/elilwaen.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithElilwaen_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithElilwaen_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/enraptured_traveler.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/enraptured_traveler.lua index a0383f6a..54ad6374 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/enraptured_traveler.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/enraptured_traveler.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTraveler032_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTraveler032_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/eugennoix.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/eugennoix.lua index e6c38e9b..887b6fae 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/eugennoix.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/eugennoix.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithEugennoix_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithEugennoix_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/fabodji.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/fabodji.lua index d04da928..810fbc2e 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/fabodji.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/fabodji.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFabodji_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFabodji_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ferdillaix.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ferdillaix.lua index 8bb955c8..fd3d86bd 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ferdillaix.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ferdillaix.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFerdillaix_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFerdillaix_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/fickle_beggar.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/fickle_beggar.lua index 238e1fda..df3ba084 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/fickle_beggar.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/fickle_beggar.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithYouty001_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithYouty001_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/frailoise.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/frailoise.lua index 7d6b586a..f2fbda0a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/frailoise.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/frailoise.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrailoise_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrailoise_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/fufuna.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/fufuna.lua index b4387eb1..e4280f1a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/fufuna.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/fufuna.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFufuna_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFufuna_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/fuzak_anzak.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/fuzak_anzak.lua index 96fe1a0c..08fe6b96 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/fuzak_anzak.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/fuzak_anzak.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFuzakanzak_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFuzakanzak_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/gautzelin.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/gautzelin.lua index c0e16d28..620aeca8 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/gautzelin.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/gautzelin.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGautzelin_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGautzelin_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/gert.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/gert.lua index 38cec65a..d99c5d9e 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/gert.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/gert.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGert_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGert_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/gerulf.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/gerulf.lua index 22385f12..c1623196 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/gerulf.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/gerulf.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGerulf_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGerulf_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ginnade.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ginnade.lua index 872e56e7..000bc1f7 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ginnade.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ginnade.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGinnade_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGinnade_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/glowing_goodwife.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/glowing_goodwife.lua index 098c250d..9453a4d5 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/glowing_goodwife.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/glowing_goodwife.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLady001_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLady001_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/gnanghal.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/gnanghal.lua index a40ef28b..91b5f963 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/gnanghal.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/gnanghal.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGnanghal_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGnanghal_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/gnibnpha.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/gnibnpha.lua index c95d7a7a..181d5d5c 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/gnibnpha.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/gnibnpha.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGnibnpha_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithGnibnpha_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/haldberk.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/haldberk.lua index 1bd9ba8b..3975f1b2 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/haldberk.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/haldberk.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHaldberk_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHaldberk_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/hasthwab.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/hasthwab.lua index 3d531195..bc32b0f6 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/hasthwab.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/hasthwab.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHasthwab_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHasthwab_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/hihine.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/hihine.lua index b46ecc81..b22747b8 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/hihine.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/hihine.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHihine_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHihine_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/hlahono.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/hlahono.lua index 77cd5c21..f56afe3a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/hlahono.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/hlahono.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithH_lahono_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithH_lahono_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/hob.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/hob.lua index 3b377b30..a5169df4 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/hob.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/hob.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHob_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHob_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/hobriaut.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/hobriaut.lua index 9337df2c..cd60138b 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/hobriaut.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/hobriaut.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHobriaut_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithHobriaut_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/hrhanbolo.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/hrhanbolo.lua index 875b4727..e7adff8e 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/hrhanbolo.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/hrhanbolo.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNnagali_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNnagali_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ighii_moui.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ighii_moui.lua index 01c2fbbf..52aa6625 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ighii_moui.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ighii_moui.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIghiimoui_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIghiimoui_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/imania.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/imania.lua index 06210f23..b8283091 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/imania.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/imania.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithImania_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithImania_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/iofa.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/iofa.lua index 182dc7d5..cfbd2d31 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/iofa.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/iofa.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIofa_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIofa_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/isaudorel.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/isaudorel.lua index 233db3ee..19f9db32 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/isaudorel.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/isaudorel.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIsaudorel_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIsaudorel_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ivan.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ivan.lua index a65ba2f1..1a915171 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ivan.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ivan.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIvan_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithIvan_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/jainelette.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/jainelette.lua index cd62457a..dedd9446 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/jainelette.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/jainelette.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJainelette_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJainelette_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/jghonako.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/jghonako.lua index 281cd4c1..6dd95623 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/jghonako.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/jghonako.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJghonako_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJghonako_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/jojoroon.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/jojoroon.lua index 5841030f..58cc13cd 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/jojoroon.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/jojoroon.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJojoroon_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithJojoroon_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/kehda_mujuuk.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/kehda_mujuuk.lua index 62f7e385..590aeeb3 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/kehda_mujuuk.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/kehda_mujuuk.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKehdamujuuk_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKehdamujuuk_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/kikichua.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/kikichua.lua index eddb3dfc..bc74b2bd 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/kikichua.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/kikichua.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKikichua_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKikichua_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/laniaitte.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/laniaitte.lua index 00697c1a..d02c6e66 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/laniaitte.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/laniaitte.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLaniaitte_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLaniaitte_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/leveridge.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/leveridge.lua index 9075a088..45480ae6 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/leveridge.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/leveridge.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDavyd_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithDavyd_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/liautroix.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/liautroix.lua index a06cb6f5..419171ba 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/liautroix.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/liautroix.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLiautroix_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLiautroix_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/lilina.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/lilina.lua index 6d46da8a..b88a041c 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/lilina.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/lilina.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLilina_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLilina_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/lorhzant.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/lorhzant.lua index fa2ad6ea..42bcfecc 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/lorhzant.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/lorhzant.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLorhzant_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLorhzant_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/maetistym.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/maetistym.lua index 8bc22c03..3b03eb5a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/maetistym.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/maetistym.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMaetistym_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMaetistym_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/maisie.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/maisie.lua index 1db1afb6..be574c9c 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/maisie.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/maisie.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMaisie_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMaisie_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/mareillie.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/mareillie.lua index b31fe357..cc83e1e6 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/mareillie.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/mareillie.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMareillie_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMareillie_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/martiallais.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/martiallais.lua index aabf4009..0f85eaca 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/martiallais.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/martiallais.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMartiallais_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMartiallais_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/merlzirn.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/merlzirn.lua index 09677f02..c060f0ea 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/merlzirn.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/merlzirn.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMerlzirn_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMerlzirn_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/mharelak.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/mharelak.lua index 8534dc99..9bd90307 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/mharelak.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/mharelak.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMharelak_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMharelak_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/mimiroon.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/mimiroon.lua index bdce42df..9228ab8a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/mimiroon.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/mimiroon.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMimiroon_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMimiroon_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/muscle-bound_deckhand.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/muscle-bound_deckhand.lua index 3cf0eb8b..da65a99b 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/muscle-bound_deckhand.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/muscle-bound_deckhand.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMuscle-bounddeckhand_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMuscle-bounddeckhand_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/mynadaeg.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/mynadaeg.lua index 9a7b03f1..5f47c3c0 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/mynadaeg.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/mynadaeg.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMynadaeg_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMynadaeg_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/mzimzizi.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/mzimzizi.lua index c6da3b77..d9f32121 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/mzimzizi.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/mzimzizi.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMzimzizi_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMzimzizi_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/nanapiri.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/nanapiri.lua index 99f3f602..31400d53 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/nanapiri.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/nanapiri.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNanapiri_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNanapiri_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/neale.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/neale.lua index a5a4030a..e23c2681 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/neale.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/neale.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNeale_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNeale_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/nheu_jawantal.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/nheu_jawantal.lua index 22e5fdf3..d7cfcfb4 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/nheu_jawantal.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/nheu_jawantal.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNheujawantal_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNheujawantal_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ninianne.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ninianne.lua index 4c3a3be0..9b17f584 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ninianne.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ninianne.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNinianne_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNinianne_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/nnmulika.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/nnmulika.lua index ce8c95d1..d60eedad 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/nnmulika.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/nnmulika.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNnmulika_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNnmulika_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/nunuba.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/nunuba.lua index 8b10e1f0..d71a61ba 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/nunuba.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/nunuba.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNunuba_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithNunuba_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ortolf.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ortolf.lua index 65a400ef..5753171c 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ortolf.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ortolf.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithOrtolf_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithOrtolf_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ositha.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ositha.lua index 7a4c7e1f..a273b98b 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ositha.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ositha.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithOsitha_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithOsitha_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/overweening_woman.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/overweening_woman.lua index f3e0ba5b..f6b407ad 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/overweening_woman.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/overweening_woman.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLady002_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithLady002_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/pasty-faced_adventurer.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/pasty-faced_adventurer.lua index eed531cc..74c48db8 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/pasty-faced_adventurer.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/pasty-faced_adventurer.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPasty-facedadventurer_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPasty-facedadventurer_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/pearly-toothed_porter.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/pearly-toothed_porter.lua index 67ee4d91..910b8d66 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/pearly-toothed_porter.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/pearly-toothed_porter.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPearly-toothedporter_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPearly-toothedporter_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/pfynhaemr.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/pfynhaemr.lua index 859477f3..34fc20cd 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/pfynhaemr.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/pfynhaemr.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPfynhaemr_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPfynhaemr_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/pissed_pirate.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/pissed_pirate.lua index 75c46e20..9c2c838d 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/pissed_pirate.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/pissed_pirate.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPirate030_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPirate030_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/positively_pungent_pirate.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/positively_pungent_pirate.lua index cbf46d83..beaad4da 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/positively_pungent_pirate.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/positively_pungent_pirate.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPirate031_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPirate031_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/prudentia.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/prudentia.lua index 1fdbc84a..6c1b8018 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/prudentia.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/prudentia.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPrudentia_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPrudentia_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/ptahjha.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/ptahjha.lua index 5e0d8e93..8b6697fa 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/ptahjha.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/ptahjha.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSkarnwaen_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSkarnwaen_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/pulmia.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/pulmia.lua index 08b53d25..4bcb59f0 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/pulmia.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/pulmia.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPulmia_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithPulmia_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/raragun.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/raragun.lua index 417ac9a6..d8b10e1a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/raragun.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/raragun.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRaragun_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRaragun_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/rbaharra.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/rbaharra.lua index 89d39df3..54aa9edd 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/rbaharra.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/rbaharra.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRbaharra_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRbaharra_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/rerenasu.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/rerenasu.lua index e20510cf..9aa4ea27 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/rerenasu.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/rerenasu.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRerenasu_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRerenasu_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/robairlain.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/robairlain.lua index c68c5649..3cd19703 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/robairlain.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/robairlain.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRobairlain_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRobairlain_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/roosting_crow.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/roosting_crow.lua index d7bfc100..cc04c069 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/roosting_crow.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/roosting_crow.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRoostingcrow_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRoostingcrow_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/rsushmo.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/rsushmo.lua index 3329dfc4..8629072d 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/rsushmo.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/rsushmo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRsushmo_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRsushmo_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_epocan.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_epocan.lua index a6ecc74d..1da0f05c 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_epocan.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_epocan.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRubh_epocan_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRubh_epocan_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_hob.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_hob.lua index 03fc9991..b2baad64 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_hob.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/rubh_hob.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRubh_hob_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithRubh_hob_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/sathzant.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/sathzant.lua index 2f7d9618..eebd5d6a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/sathzant.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/sathzant.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSathzant_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSathzant_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/satiated_shopkeep.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/satiated_shopkeep.lua index 9293c33d..bab76e66 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/satiated_shopkeep.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/satiated_shopkeep.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMerchant002_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithMerchant002_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/shoshoma.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/shoshoma.lua index 6fedc5ad..df21045b 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/shoshoma.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/shoshoma.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithShoshoma_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithShoshoma_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/skarnwaen.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/skarnwaen.lua index 5e0d8e93..8b6697fa 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/skarnwaen.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/skarnwaen.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSkarnwaen_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSkarnwaen_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/skoefmynd.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/skoefmynd.lua index 5d2a7471..d0448474 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/skoefmynd.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/skoefmynd.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSkoefmynd_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSkoefmynd_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/slaiboli.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/slaiboli.lua index 19b9ff25..24ecaa58 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/slaiboli.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/slaiboli.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSlaiboli_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSlaiboli_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/sosoze.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/sosoze.lua index 2dc6d518..266e7900 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/sosoze.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/sosoze.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSosoze_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSosoze_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/sundhimal.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/sundhimal.lua index 6f19e379..6f86ae9a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/sundhimal.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/sundhimal.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSundhimal_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSundhimal_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/sure-voiced_barracuda_knight.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/sure-voiced_barracuda_knight.lua index c9ab2c3b..0909e21a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/sure-voiced_barracuda_knight.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/sure-voiced_barracuda_knight.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKob031_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithKob031_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/suspicious-looking_traveler.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/suspicious-looking_traveler.lua index 34f5881f..232de96b 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/suspicious-looking_traveler.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/suspicious-looking_traveler.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTraveler031_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTraveler031_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/syhrdaeg.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/syhrdaeg.lua index a36599d8..570160a3 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/syhrdaeg.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/syhrdaeg.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSyhrdaeg_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSyhrdaeg_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/syngsmyd.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/syngsmyd.lua index d18526bb..c2d1c29a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/syngsmyd.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/syngsmyd.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSyngsmyd_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSyngsmyd_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/tatasako.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/tatasako.lua index 9296ca3c..bd6d4ed5 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/tatasako.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/tatasako.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTatasako_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTatasako_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/tefh_moshroca.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/tefh_moshroca.lua index c32d1a09..2f722cd8 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/tefh_moshroca.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/tefh_moshroca.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTefhmoshroca_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTefhmoshroca_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/thata_khamazom.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/thata_khamazom.lua index 663dc75e..6633f670 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/thata_khamazom.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/thata_khamazom.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithThatakhamazom_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithThatakhamazom_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/thosinbaen.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/thosinbaen.lua index 5e0d8e93..8b6697fa 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/thosinbaen.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/thosinbaen.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSkarnwaen_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithSkarnwaen_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/tittering_traveler.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/tittering_traveler.lua index 249a49e7..87a7f811 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/tittering_traveler.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/tittering_traveler.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTraveler030_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTraveler030_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/totoruto.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/totoruto.lua index e1c11707..74e19644 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/totoruto.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/totoruto.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTotoruto_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTotoruto_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/triaine.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/triaine.lua index eed6efde..7f1e9257 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/triaine.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/triaine.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTriaine_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTriaine_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/trinne.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/trinne.lua index 7c2bd602..07fde9c0 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/trinne.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/trinne.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTrinne_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithTrinne_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/unconscious_adventurer.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/unconscious_adventurer.lua index 61c585cc..ea45cbd8 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/unconscious_adventurer.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/unconscious_adventurer.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAdventurer032_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithAdventurer032_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/undsatz.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/undsatz.lua index de401b63..6ee9eba2 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/undsatz.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/undsatz.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithUndsatz_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithUndsatz_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/vhynho.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/vhynho.lua index d30d382a..cca97f06 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/vhynho.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/vhynho.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithVhynho_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithVhynho_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/waekbyrt.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/waekbyrt.lua index d1fd0d6d..96ae1526 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/waekbyrt.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/waekbyrt.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithWaekbyrt_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithWaekbyrt_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/whahtoa.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/whahtoa.lua index 4cfe5be6..fa2e9898 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/whahtoa.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/whahtoa.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithWhahtoa_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithWhahtoa_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/wyra_khamazom.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/wyra_khamazom.lua index c6f688ec..82320927 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/wyra_khamazom.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/wyra_khamazom.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithWyrakhamazom_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithWyrakhamazom_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/wyrstmann.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/wyrstmann.lua index 35a68b87..84845794 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/wyrstmann.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/wyrstmann.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithWyrstmann_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithWyrstmann_001", nil, nil, nil); end diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/xavalien.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/xavalien.lua index 906ead71..f179b709 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/xavalien.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/xavalien.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithXavalien_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithXavalien_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/zonggo.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/zonggo.lua index 8eee7a3e..ef89064a 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/zonggo.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/zonggo.lua @@ -1,5 +1,5 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithZonggo_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithZonggo_001", nil, nil, nil); end \ No newline at end of file diff --git a/data/scripts/unique/sea0Town01a/PopulaceStandard/zuzule.lua b/data/scripts/unique/sea0Town01a/PopulaceStandard/zuzule.lua index b2ee4475..46c0c9f3 100644 --- a/data/scripts/unique/sea0Town01a/PopulaceStandard/zuzule.lua +++ b/data/scripts/unique/sea0Town01a/PopulaceStandard/zuzule.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultSea = getStaticActor("DftSea"); - player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithZuzule_001", nil, nil, nil); + defaultSea = GetStaticActor("DftSea"); + player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithZuzule_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_01@0B800.lua b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_01@0B800.lua index 24f151d2..0d7ab846 100644 --- a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_01@0B800.lua +++ b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_01@0B800.lua @@ -1,21 +1,21 @@ require("/quests/man/man0u0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0u0Quest = getStaticActor("Man0u0"); + man0u0Quest = GetStaticActor("Man0u0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_6", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_6", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_02@0B800.lua b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_02@0B800.lua index 8a9333c0..555a86f7 100644 --- a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_02@0B800.lua +++ b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_02@0B800.lua @@ -1,33 +1,33 @@ require("/quests/man/man0u0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onSpawn(player, npc) - npc:setQuestGraphic(player, 0x2); + npc:SetQuestGraphic(player, 0x2); end function onEventStarted(player, npc, triggerName) - man0u0Quest = player:getQuest("man0u0"); + man0u0Quest = player:GetQuest("man0u0"); if (triggerName == "talkDefault") then if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2) == false) then - player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini002_first", nil, nil, nil); - npc:setQuestGraphic(player, 0x0); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini002_first", nil, nil, nil); + npc:SetQuestGraphic(player, 0x0); man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2, true); man0u0Quest:SaveData(); - player:getDirector():onTalked(npc); + player:GetDirector():OnTalked(npc); else - player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini002", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini002", nil, nil, nil); end else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_03@0B800.lua b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_03@0B800.lua index 74931883..3898a86e 100644 --- a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_03@0B800.lua +++ b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_03@0B800.lua @@ -1,21 +1,21 @@ require("/quests/man/man0u0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0u0Quest = getStaticActor("Man0u0"); + man0u0Quest = GetStaticActor("Man0u0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_8", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_8", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_04@0B800.lua b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_04@0B800.lua index 4deadf4e..4103e50b 100644 --- a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_04@0B800.lua +++ b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_04@0B800.lua @@ -1,21 +1,21 @@ require("/quests/man/man0u0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0u0Quest = getStaticActor("Man0u0"); + man0u0Quest = GetStaticActor("Man0u0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_9", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_9", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_05@0B800.lua b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_05@0B800.lua index fdb2eb67..35f98503 100644 --- a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_05@0B800.lua +++ b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_05@0B800.lua @@ -1,21 +1,21 @@ require("/quests/man/man0u0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0u0Quest = getStaticActor("Man0u0"); + man0u0Quest = GetStaticActor("Man0u0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_10", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_10", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_06@0B800.lua b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_06@0B800.lua index acf3d645..6e1c6a3b 100644 --- a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_06@0B800.lua +++ b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_06@0B800.lua @@ -1,33 +1,33 @@ require("/quests/man/man0u0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onSpawn(player, npc) - npc:setQuestGraphic(player, 0x2); + npc:SetQuestGraphic(player, 0x2); end function onEventStarted(player, npc, triggerName) - man0u0Quest = player:getQuest("man0u0"); + man0u0Quest = player:GetQuest("man0u0"); if (triggerName == "talkDefault") then if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == false) then - player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini003_first", nil, nil, nil); - npc:setQuestGraphic(player, 0x0); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini003_first", nil, nil, nil); + npc:SetQuestGraphic(player, 0x0); man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3, true); man0u0Quest:SaveData(); - player:getDirector():onTalked(npc); + player:GetDirector():OnTalked(npc); else - player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini003", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini003", nil, nil, nil); end else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_07@0B800.lua b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_07@0B800.lua index c61fa7c4..3c737266 100644 --- a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_07@0B800.lua +++ b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_07@0B800.lua @@ -1,21 +1,21 @@ require("/quests/man/man0u0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0u0Quest = getStaticActor("Man0u0"); + man0u0Quest = GetStaticActor("Man0u0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_12", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_12", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_08@0B800.lua b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_08@0B800.lua index c112e552..a6d41ada 100644 --- a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_08@0B800.lua +++ b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_08@0B800.lua @@ -1,21 +1,21 @@ require("/quests/man/man0u0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) - man0u0Quest = getStaticActor("Man0u0"); + man0u0Quest = GetStaticActor("Man0u0"); if (triggerName == "talkDefault") then - player:runEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_13", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processEvent000_13", nil, nil, nil); else - player:endEvent(); + player:EndEvent(); end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_09@0B800.lua b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_09@0B800.lua index 85958ea5..0a668de3 100644 --- a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_09@0B800.lua +++ b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_09@0B800.lua @@ -1,7 +1,7 @@ require("/quests/man/man0u0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) @@ -11,6 +11,6 @@ end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_0a@0B800.lua b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_0a@0B800.lua index 4522c5f6..417fac0a 100644 --- a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_0a@0B800.lua +++ b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_0a@0B800.lua @@ -1,48 +1,48 @@ require("/quests/man/man0u0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onSpawn(player, npc) - npc:setQuestGraphic(player, 0x2); + npc:SetQuestGraphic(player, 0x2); end function onEventStarted(player, npc, triggerName) - man0u0Quest = player:getQuest("Man0u0"); + man0u0Quest = player:GetQuest("Man0u0"); if (man0u0Quest ~= nil) then if (triggerName == "pushDefault") then - player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrNomal002", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processTtrNomal002", nil, nil, nil); elseif (triggerName == "talkDefault") then if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_TUTORIAL1_DONE) == false) then - player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrNomal003", nil, nil, nil); - player:setEventStatus(npc, "pushDefault", false, 0x2); - player:getDirector():onTalked(npc); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processTtrNomal003", nil, nil, nil); + player:SetEventStatus(npc, "pushDefault", false, 0x2); + player:GetDirector():OnTalked(npc); man0u0Quest:SetQuestFlag(MAN0U0_FLAG_TUTORIAL1_DONE, true); man0u0Quest:SaveData(); else - player:runEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini001", nil, nil, nil); + player:RunEventFunction("delegateEvent", player, man0u0Quest, "processTtrMini001", nil, nil, nil); if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == false) then - npc:setQuestGraphic(player, 0x0); + npc:SetQuestGraphic(player, 0x0); man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1, true); man0u0Quest:SaveData(); end end else - player:endEvent(); + player:EndEvent(); end else - player:endEvent(); --Should not be here w.o this quest + player:EndEvent(); --Should not be here w.o this quest end end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_0b@0B800.lua b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_0b@0B800.lua index 85958ea5..0a668de3 100644 --- a/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_0b@0B800.lua +++ b/data/scripts/unique/wil0Battle01/pplStd_wil0Btl01_0b@0B800.lua @@ -1,7 +1,7 @@ require("/quests/man/man0u0") function init(npc) - return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST"; + return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc:GetActorClassId(), false, false, 0, 1, "TEST"; end function onEventStarted(player, npc, triggerName) @@ -11,6 +11,6 @@ end function onEventUpdate(player, npc) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/aistan.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/aistan.lua index 59470814..7e54547a 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/aistan.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/aistan.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithAistan_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithAistan_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/baterich.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/baterich.lua index 989d6d34..d8b32575 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/baterich.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/baterich.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBATERICH_100", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBATERICH_100", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/berndan.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/berndan.lua index 51ab0128..4aad6c06 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/berndan.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/berndan.lua @@ -1,10 +1,10 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBerndan_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBerndan_001", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/bertram.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/bertram.lua index 6503875f..5c77c9f5 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/bertram.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/bertram.lua @@ -1,12 +1,12 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBertram_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBertram_002", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBertram_003", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBertram_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBertram_002", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBertram_003", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/claroise.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/claroise.lua index b43279ad..3d79e22b 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/claroise.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/claroise.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGuildleveClientU_002", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGuildleveClientU_002", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/drew.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/drew.lua index 55b172b8..1e693a18 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/drew.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/drew.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDrew_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDrew_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/dural_tharal.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/dural_tharal.lua index 78f7df80..2de09225 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/dural_tharal.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/dural_tharal.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDuraltharal_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDuraltharal_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/flame_lieutenant_somber_meadow.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/flame_lieutenant_somber_meadow.lua index cd05e722..64fb739b 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/flame_lieutenant_somber_meadow.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/flame_lieutenant_somber_meadow.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSomber_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSomber_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/flame_private_sisimuza_tetemuza.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/flame_private_sisimuza_tetemuza.lua index 10accfe6..198d3841 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/flame_private_sisimuza_tetemuza.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/flame_private_sisimuza_tetemuza.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFlameprivatesisimuzatetemuza_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFlameprivatesisimuzatetemuza_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/flame_sergeant_mimio_mio.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/flame_sergeant_mimio_mio.lua index cc5428dd..1c544b2e 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/flame_sergeant_mimio_mio.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/flame_sergeant_mimio_mio.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFlamesergeantmimiomio_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFlamesergeantmimiomio_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/gagaruna.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/gagaruna.lua index 49279062..16366901 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/gagaruna.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/gagaruna.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGagaruna_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGag:Runa_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/gairbert.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/gairbert.lua index 58e5273e..1003fd90 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/gairbert.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/gairbert.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGairbert_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGairbert_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/gegeissa.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/gegeissa.lua index ed5c3db5..25dae494 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/gegeissa.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/gegeissa.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGegeissa_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGegeissa_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/guillaunaux.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/guillaunaux.lua index ebba393e..2047bfda 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/guillaunaux.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/guillaunaux.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGuillaunaux_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGuillaunaux_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/gunnulf.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/gunnulf.lua index cdfd87db..945fdb9b 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/gunnulf.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/gunnulf.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMaginfred_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMaginfred_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/halstein.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/halstein.lua index 448f856b..e3c8ce3f 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/halstein.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/halstein.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHalstein_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHalstein_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/hehena.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/hehena.lua index 6a7d31ea..70e49fa4 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/hehena.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/hehena.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHehena_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHehena_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/heibert.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/heibert.lua index 3611b4e9..43101095 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/heibert.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/heibert.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithOrisic_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithOrisic_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/hildie.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/hildie.lua index 29103e3e..ee0c7811 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/hildie.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/hildie.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHildie_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHildie_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/ipaghlo.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/ipaghlo.lua index c4dd6305..cc8995dd 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/ipaghlo.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/ipaghlo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKlamahni_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKlamahni_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/judithe.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/judithe.lua index be14d7ac..e54134fc 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/judithe.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/judithe.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithJudithe_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithJudithe_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/kiora.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/kiora.lua index 631d269c..5c6fef9a 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/kiora.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/kiora.lua @@ -1,12 +1,12 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKiora_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKiora_002", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKiora_003", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKiora_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKiora_002", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKiora_003", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/kokobi.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/kokobi.lua index 23d0249d..94a0ff1e 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/kokobi.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/kokobi.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "downTownTalk", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "downTownTalk", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/kukumuko.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/kukumuko.lua index b8c0726b..dc7b7c2e 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/kukumuko.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/kukumuko.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKukumuko_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKukumuko_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/lettice.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/lettice.lua index 219148c0..41040f19 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/lettice.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/lettice.lua @@ -1,12 +1,12 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLettice_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLettice_002", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLettice_003", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLettice_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLettice_002", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLettice_003", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/lulumo.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/lulumo.lua index 85248378..3eea2f1f 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/lulumo.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/lulumo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLulumo_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLulumo_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/mammet.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/mammet.lua index f0e6d8ef..8bb041ee 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/mammet.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/mammet.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDoll005_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDoll005_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/melisie.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/melisie.lua index f2ed528f..c8f25e89 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/melisie.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/melisie.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMelisie_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMelisie_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/mimishu.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/mimishu.lua index dff37ef4..2795c00a 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/mimishu.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/mimishu.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMimishu_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMimishu_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/minerva.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/minerva.lua index 9b9feb4f..c1b8bf46 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/minerva.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/minerva.lua @@ -1,12 +1,12 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMinerva_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMinerva_002", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMinerva_003", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMinerva_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMinerva_002", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMinerva_003", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/momodi.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/momodi.lua index a645ef48..5033af94 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/momodi.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/momodi.lua @@ -1,10 +1,10 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMomodi_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMomodi_001", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/naida_zamaida.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/naida_zamaida.lua index cadc97a6..86629e64 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/naida_zamaida.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/naida_zamaida.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithNaidazamaida_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithNaidazamaida_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/nokksu_shanksu.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/nokksu_shanksu.lua index 7a3d93cb..3dc0138f 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/nokksu_shanksu.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/nokksu_shanksu.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithNokksushanksu_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithNokksushanksu_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/ococo.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/ococo.lua index 393ee647..c528d8d7 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/ococo.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/ococo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithOcoco_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithOcoco_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/opondhao.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/opondhao.lua index b42381c0..31af6599 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/opondhao.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/opondhao.lua @@ -1,12 +1,12 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithOpondhao_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithOpondhao_002", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithOpondhao_003", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithOpondhao_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithOpondhao_002", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithOpondhao_003", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/otopa_pottopa.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/otopa_pottopa.lua index 80b847d9..e82811df 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/otopa_pottopa.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/otopa_pottopa.lua @@ -1,11 +1,11 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithInn_Desk", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithInn_Desk", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/popori.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/popori.lua index e5a50444..c42d3f64 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/popori.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/popori.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithPopori_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithPopori_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/qaruru.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/qaruru.lua index cb7b2ac1..af03496b 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/qaruru.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/qaruru.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithQaruru_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithQaruru_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/qata_nelhah.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/qata_nelhah.lua index 3323cf0f..42cb39d2 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/qata_nelhah.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/qata_nelhah.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithQatanelhah_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithQatanelhah_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/roarich.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/roarich.lua index c306cff3..e6ab0dd8 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/roarich.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/roarich.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGuildleveClientU_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGuildleveClientU_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/robyn.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/robyn.lua index d626ffc9..9318249d 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/robyn.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/robyn.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithRobyn_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithRobyn_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/rorojaru.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/rorojaru.lua index 8376408b..07734407 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/rorojaru.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/rorojaru.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithRorojaru_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithRorojaru_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/rururaji.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/rururaji.lua index 26267a7b..f8e6ed8c 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/rururaji.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/rururaji.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithRururaji_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithRururaji_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/shamani_lohmani.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/shamani_lohmani.lua index 620e47c4..378c09fb 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/shamani_lohmani.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/shamani_lohmani.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithShamanilohmani_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithShamanilohmani_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/sibold.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/sibold.lua index f84b0d3f..ae7f7dc6 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/sibold.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/sibold.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSIBOLD_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSIBOLD_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/styrmoeya.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/styrmoeya.lua index b412d10d..a670d79a 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/styrmoeya.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/styrmoeya.lua @@ -1,12 +1,12 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithStyrmoeya_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithStyrmoeya_002", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithStyrmoeya_003", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithStyrmoeya_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithStyrmoeya_002", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithStyrmoeya_003", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/thimm.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/thimm.lua index 022e0b21..796cea6b 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/thimm.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/thimm.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithThimm_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithThimm_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/titinin.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/titinin.lua index 63934bdc..d9c3b8bd 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/titinin.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/titinin.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTitinin_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTitinin_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/tyon.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/tyon.lua index f3459cc4..005e2f16 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/tyon.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/tyon.lua @@ -1,12 +1,12 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTyon_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTyon_002", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTyon_003", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTyon_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTyon_002", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTyon_003", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/wenefreda.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/wenefreda.lua index 50bdc598..822de440 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/wenefreda.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/wenefreda.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithWenefreda_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithWenefreda_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/wracwulf.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/wracwulf.lua index b6cb3733..19bf6780 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/wracwulf.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/wracwulf.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithWracwulf_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithWracwulf_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/yayatoki.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/yayatoki.lua index aa99df6d..33dfad23 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/yayatoki.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/yayatoki.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYayatoki_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYayatoki_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/yhah_amariyo.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/yhah_amariyo.lua index c709cc26..57c28be4 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/yhah_amariyo.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/yhah_amariyo.lua @@ -1,13 +1,13 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYhahamariyo_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYhahamariyo_002", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYhahamariyo_003", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYhahamariyo_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYhahamariyo_002", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYhahamariyo_003", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/yuyuhase.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/yuyuhase.lua index f30a802f..188f31a4 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/yuyuhase.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/yuyuhase.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYuyuhase_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYuyuhase_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01/PopulaceStandard/zoengterbin.lua b/data/scripts/unique/wil0Town01/PopulaceStandard/zoengterbin.lua index c6ca34c8..b5f37613 100644 --- a/data/scripts/unique/wil0Town01/PopulaceStandard/zoengterbin.lua +++ b/data/scripts/unique/wil0Town01/PopulaceStandard/zoengterbin.lua @@ -1,12 +1,12 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithZoengterbin_001", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithZoengterbin_002", nil, nil, nil); - --player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithZoengterbin_003", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithZoengterbin_001", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithZoengterbin_002", nil, nil, nil); + --player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithZoengterbin_003", nil, nil, nil); end function onEventUpdate(player, npc, blah, menuSelect) - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/abylgo_hamylgo.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/abylgo_hamylgo.lua index 5a0fa794..82a9e7d6 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/abylgo_hamylgo.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/abylgo_hamylgo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithAbylgohamylgo_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithAbylgohamylgo_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/anthoinette.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/anthoinette.lua index c08ff4c8..f97513f5 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/anthoinette.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/anthoinette.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithAnthoinette_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithAnthoinette_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/apacho_naccho.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/apacho_naccho.lua index 74d8db75..2afa3318 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/apacho_naccho.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/apacho_naccho.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithApachonaccho_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithApachonaccho_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/aspipi.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/aspipi.lua index 4f43fb56..6f26f1ec 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/aspipi.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/aspipi.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithAspipi_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithAspipi_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/babaki.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/babaki.lua index f39135b7..e1a86836 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/babaki.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/babaki.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBabaki_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBabaki_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/barnabaix.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/barnabaix.lua index 0d36c252..13c3412f 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/barnabaix.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/barnabaix.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBarnabaix_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBarnabaix_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/berthar.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/berthar.lua index e37560f5..7694fe11 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/berthar.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/berthar.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBerthar_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBerthar_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/bouchard.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/bouchard.lua index 596849dd..d8dfee61 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/bouchard.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/bouchard.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBouchard_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBouchard_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/cahernaut.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/cahernaut.lua index 9f4616dc..fe229b64 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/cahernaut.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/cahernaut.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithCahernaut_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithCahernaut_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/chachai.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/chachai.lua index 4f4a927d..efc65917 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/chachai.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/chachai.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithChachai_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithChachai_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/ciceroix.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/ciceroix.lua index 84d179c0..d4997751 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/ciceroix.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/ciceroix.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithCiceroix_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithCiceroix_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/crhabye.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/crhabye.lua index 198b03fe..aa6c8646 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/crhabye.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/crhabye.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithCrhabye_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithCrhabye_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/dariustel.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/dariustel.lua index de332bb4..348f39ce 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/dariustel.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/dariustel.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:sendMessage(0x20, "", "This Actorhas no dialog. Actor Class Id: " .. tostring(npc:getActorClassId())); - player:endEvent(); + defaultWil = GetStaticActor("DftWil"); + player:SendMessage(0x20, "", "This Actorhas no dialog. Actor Class Id: " .. tostring(npc:GetActorClassId())); + player:EndEvent(); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/deaustie.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/deaustie.lua index 8bf60ba8..ed501088 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/deaustie.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/deaustie.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDeaustie_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDeaustie_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/diriaine.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/diriaine.lua index 8988cf7e..acae751a 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/diriaine.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/diriaine.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDiriaine_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDiriaine_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/dylise.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/dylise.lua index ca4684b2..cdb962ba 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/dylise.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/dylise.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDylise_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDylise_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/eara.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/eara.lua index 6e27ec30..f08afed0 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/eara.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/eara.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithEara_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithEara_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/eleanor.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/eleanor.lua index 627c8622..e77681d3 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/eleanor.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/eleanor.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithEleanor_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithEleanor_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/elecotte.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/elecotte.lua index 25d67b13..f18b9c7f 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/elecotte.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/elecotte.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithElecotte_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithElecotte_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/fifilo.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/fifilo.lua index 20550639..eaf560e6 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/fifilo.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/fifilo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFifilo_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFifilo_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/fineco_romanecco.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/fineco_romanecco.lua index ae11599b..cfdf260c 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/fineco_romanecco.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/fineco_romanecco.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFinecoromanecco_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFinecoromanecco_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/fruhybolg.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/fruhybolg.lua index a74f963a..7d359f07 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/fruhybolg.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/fruhybolg.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFhruybolg_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFhruybolg_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/fyrilsunn.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/fyrilsunn.lua index 9844c807..f14b1f66 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/fyrilsunn.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/fyrilsunn.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFyrilsunn_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFyrilsunn_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/galeren.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/galeren.lua index 5a990c4b..7a14b858 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/galeren.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/galeren.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGaleren_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGaleren_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/gloiucen.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/gloiucen.lua index b2714266..7d8a33ac 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/gloiucen.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/gloiucen.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGloiucen_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGloiucen_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/gogofu.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/gogofu.lua index db4dd38c..325280da 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/gogofu.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/gogofu.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGogofu_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGogofu_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/goodife.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/goodife.lua index 9a0f1a5b..510cdc02 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/goodife.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/goodife.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGoodife_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGoodife_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/guencen.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/guencen.lua index 5d7402ec..8c816886 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/guencen.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/guencen.lua @@ -1,7 +1,7 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:sendMessage(0x20, "", "This Actorhas no dialog. Actor Class Id: " .. tostring(npc:getActorClassId())); - player:endEvent(); + defaultWil = GetStaticActor("DftWil"); + player:SendMessage(0x20, "", "This Actorhas no dialog. Actor Class Id: " .. tostring(npc:GetActorClassId())); + player:EndEvent(); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/guillestet.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/guillestet.lua index 42b44aa8..16e4fc4f 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/guillestet.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/guillestet.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGuillestet_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGuillestet_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/hahayo.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/hahayo.lua index 053b9227..c3b42919 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/hahayo.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/hahayo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHahayo_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHahayo_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/hawazi_zowazi.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/hawazi_zowazi.lua index a31d5239..9cf3d47c 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/hawazi_zowazi.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/hawazi_zowazi.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHawazizowazi_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHawazizowazi_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/hcidjaa.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/hcidjaa.lua index 311d1589..618837c1 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/hcidjaa.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/hcidjaa.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHCidjaa_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHCidjaa_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/holbubu.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/holbubu.lua index 3757bf7b..4a03af5e 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/holbubu.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/holbubu.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHolbubu_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHolbubu_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/illofii.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/illofii.lua index 7a938b72..364e283d 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/illofii.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/illofii.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithIllofii_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithIllofii_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/isabella.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/isabella.lua index 7bf891ee..1c010f12 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/isabella.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/isabella.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithIsabella_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithIsabella_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/jajanzo.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/jajanzo.lua index 290cf4ab..827ad81b 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/jajanzo.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/jajanzo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithJajanzo_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithJajanzo_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/jannie.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/jannie.lua index 6c51b195..605e3234 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/jannie.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/jannie.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithJannie_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithJannie_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/jeger.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/jeger.lua index 34026b75..00bed1ca 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/jeger.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/jeger.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithJeger_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithJeger_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/jenlyns.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/jenlyns.lua index dfbd1d33..5d75e729 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/jenlyns.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/jenlyns.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithJenlyns_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithJenlyns_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/kamlito_halito.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/kamlito_halito.lua index dadad7b1..a13f6881 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/kamlito_halito.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/kamlito_halito.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKamlitohalito_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKamlitohalito_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/kopuru_fupuru.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/kopuru_fupuru.lua index 88d6fec8..655b6e96 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/kopuru_fupuru.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/kopuru_fupuru.lua @@ -1,15 +1,15 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithInn_Desk_2", nil, nil, nil); --BTN + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithInn_Desk_2", nil, nil, nil); --BTN end function onEventUpdate(player, npc, blah, menuSelect) if (menuSelect == 1) then - getWorldManager():DoZoneChange(player, 11); + GetWorldManager():DoZoneChange(player, 11); end - player:endEvent(); + player:EndEvent(); end \ No newline at end of file diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/kukusi.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/kukusi.lua index 9d0ce8ff..0d7a8f17 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/kukusi.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/kukusi.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKukusi_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKukusi_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/lefchild.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/lefchild.lua index 57795271..cb28da43 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/lefchild.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/lefchild.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLefchild_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLefchild_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/liaime.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/liaime.lua index d9658c16..22783f02 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/liaime.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/liaime.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLiaime_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLiaime_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/linette.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/linette.lua index caf9f30e..2c0f693c 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/linette.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/linette.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLinette_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLinette_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/lohwaeb.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/lohwaeb.lua index 2eaad23f..129ea090 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/lohwaeb.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/lohwaeb.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLohwaeb_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLohwaeb_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/lulutsu.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/lulutsu.lua index 57102346..9b017f9d 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/lulutsu.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/lulutsu.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLulutsu_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLulutsu_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/lyngwaek.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/lyngwaek.lua index 99cff445..9001b5b3 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/lyngwaek.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/lyngwaek.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLyngwaek_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithLyngwaek_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/mamaza.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/mamaza.lua index c99a6956..74b00974 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/mamaza.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/mamaza.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMamaza_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMamaza_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet.lua index 456d873c..5dd2e432 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMammet_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMammet_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_alc.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_alc.lua index 6aa3a74e..c158c310 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_alc.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_alc.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDoll004_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDoll004_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_gsm.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_gsm.lua index eb325712..db173809 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_gsm.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_gsm.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDoll001_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDoll001_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_gsm2.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_gsm2.lua index 344b97b8..d34d0c5f 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_gsm2.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_gsm2.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDoll002_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDoll002_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_wvr.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_wvr.lua index 516d455e..bad853bb 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_wvr.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/mammet_wvr.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDoll003_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDoll003_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/margarete.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/margarete.lua index a307b6fb..713daa4c 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/margarete.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/margarete.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMargarete_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMargarete_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/martine.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/martine.lua index dad9267b..4592c406 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/martine.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/martine.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMartine_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMartine_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/milgogo.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/milgogo.lua index e34b7db7..39446ce4 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/milgogo.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/milgogo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMilgogo_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMilgogo_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/miyaya.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/miyaya.lua index 73d0e19e..888a26b6 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/miyaya.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/miyaya.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMiyaya_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMiyaya_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/mohtfryd.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/mohtfryd.lua index 61b2ef4b..21def169 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/mohtfryd.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/mohtfryd.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMohtfryd_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMohtfryd_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/mumukiya.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/mumukiya.lua index 5f998bff..bef9a0dc 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/mumukiya.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/mumukiya.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMumukiya_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMumukiya_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/mumutano.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/mumutano.lua index 9311dd54..8cf1988e 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/mumutano.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/mumutano.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMumutano_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMumutano_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/neymumu.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/neymumu.lua index 35be6064..bcab1922 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/neymumu.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/neymumu.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithNeymumu_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithNeymumu_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/nhagi_amariyo.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/nhagi_amariyo.lua index b69199f2..dd6838c0 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/nhagi_amariyo.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/nhagi_amariyo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithNhagiamariyo_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithNhagiamariyo_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/nogeloix.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/nogeloix.lua index a64ab152..72e2353b 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/nogeloix.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/nogeloix.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithNogeloix_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithNogeloix_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/obili_tambili.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/obili_tambili.lua index a614346d..11741a81 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/obili_tambili.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/obili_tambili.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithObilitambili_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithObilitambili_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/oefyrblaet.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/oefyrblaet.lua index 0da709b7..e30cf2f1 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/oefyrblaet.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/oefyrblaet.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithOefyrblaet_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithOefyrblaet_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/papawa.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/papawa.lua index cfcdb718..7cb7512e 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/papawa.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/papawa.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithPapawa_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithPapawa_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/peneli_zuneli.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/peneli_zuneli.lua index 2dd43902..9aed4413 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/peneli_zuneli.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/peneli_zuneli.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithPenelizuneli_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithPenelizuneli_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/pierriquet.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/pierriquet.lua index 3f2c5ffd..ff58ac8b 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/pierriquet.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/pierriquet.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithPierriquet_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithPierriquet_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/qhota_nbolo.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/qhota_nbolo.lua index 89031a28..fdebdec7 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/qhota_nbolo.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/qhota_nbolo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithQhotanbolo_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithQhotanbolo_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/qmhalawi.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/qmhalawi.lua index cfa67d18..c3a12828 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/qmhalawi.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/qmhalawi.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithQmhalawi_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithQmhalawi_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/rinh_maimhov.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/rinh_maimhov.lua index 0fb9fa19..8d44da86 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/rinh_maimhov.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/rinh_maimhov.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithRinhmaimhov_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithRinhmaimhov_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/rosalind.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/rosalind.lua index 370fb893..cc3338d2 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/rosalind.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/rosalind.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithRosalind_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithRosalind_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/safufu.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/safufu.lua index 1a570901..4c1bab10 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/safufu.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/safufu.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSafufu_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSafufu_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/sinette.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/sinette.lua index 4ce67d45..20349633 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/sinette.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/sinette.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSinette_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSinette_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/singleton.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/singleton.lua index 6db5cb2e..52714c7c 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/singleton.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/singleton.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSingleton_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSingleton_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/sungi_kelungi.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/sungi_kelungi.lua index ab9bce16..2ffbb76c 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/sungi_kelungi.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/sungi_kelungi.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSungikelungi_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSungikelungi_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/swerdahrm.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/swerdahrm.lua index c3b512d9..c6b3f47b 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/swerdahrm.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/swerdahrm.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSwerdahrm_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithSwerdahrm_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/tatasha.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/tatasha.lua index 05fecad3..0dbc2cce 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/tatasha.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/tatasha.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTatasha_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTatasha_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/totono.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/totono.lua index 011d26f2..4eebc4ff 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/totono.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/totono.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTotono_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTotono_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/tutubuki.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/tutubuki.lua index cf940185..2437ed2a 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/tutubuki.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/tutubuki.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTutubuki_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTutubuki_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/tyago_moui.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/tyago_moui.lua index 1a2e1247..6ccdde4a 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/tyago_moui.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/tyago_moui.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTyagomoui_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithTyagomoui_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/ubokhn.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/ubokhn.lua index 5caf5f70..3aeb4268 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/ubokhn.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/ubokhn.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithUbokhn_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithUbokhn_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/uwilsyng.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/uwilsyng.lua index 34ea35b5..77688433 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/uwilsyng.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/uwilsyng.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGuildleveClientU_003", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGuildleveClientU_003", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/vannes.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/vannes.lua index 2c7e83ec..ed530632 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/vannes.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/vannes.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithVannes_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithVannes_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/vavaki.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/vavaki.lua index afeade85..1dd62ed7 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/vavaki.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/vavaki.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "tribeTalk", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "tribeTalk", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/wannore.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/wannore.lua index f8d4211d..571cc814 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/wannore.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/wannore.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithWannore_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithWannore_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/wawaton.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/wawaton.lua index dab520da..1895ef48 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/wawaton.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/wawaton.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithWawaton_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithWawaton_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/wise_moon.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/wise_moon.lua index 38aee18c..9e833126 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/wise_moon.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/wise_moon.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithWisemoon_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithWisemoon_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/wyznguld.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/wyznguld.lua index 50ccbd20..1abb3989 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/wyznguld.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/wyznguld.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithWyznguld_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithWyznguld_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/xau_nbolo.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/xau_nbolo.lua index 57af266e..66371d99 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/xau_nbolo.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/xau_nbolo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithXaunbolo_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithXaunbolo_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/xdhilogo.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/xdhilogo.lua index 93fe683f..092e0e27 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/xdhilogo.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/xdhilogo.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithXdhilogo_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithXdhilogo_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/yayake.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/yayake.lua index f5a7d397..96122fdf 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/yayake.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/yayake.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYayake_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYayake_001", nil, nil, nil); end diff --git a/data/scripts/unique/wil0Town01a/PopulaceStandard/yuyubesu.lua b/data/scripts/unique/wil0Town01a/PopulaceStandard/yuyubesu.lua index 0da1899e..d5f68e31 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/yuyubesu.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/yuyubesu.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYuyubesu_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithYuyubesu_001", nil, nil, nil); end diff --git a/sql/export.sh b/sql/export.sh new file mode 100644 index 00000000..9070a4e9 --- /dev/null +++ b/sql/export.sh @@ -0,0 +1,10 @@ +#!/bin/bash +EXPORT_PATH=C:/repositories/ffxiv-classic-server/sql/ +USER=root +PASS=root +DBNAME=ffxiv_server +for T in `mysqlshow -u $USER -p$PASS $DBNAME %`; +do + echo "Backing up $T" + mysqldump -u $USER -p$PASS $DBNAME $T --extended-insert=FALSE --no-tablespaces > $EXPORT_PATH/$T.sql +done; \ No newline at end of file diff --git a/sql/import.sh b/sql/import.sh new file mode 100644 index 00000000..4022144c --- /dev/null +++ b/sql/import.sh @@ -0,0 +1,21 @@ +#!/bin/bash +IMPORT_PATH=C:/repositories/ffxiv-classic-server/sql/ +USER=root +PASS=root +DBNAME=ffxiv_server + +ECHO Creating Database $DBNAME +mysqladmin -h localhost -u $USER -p$PASS DROP $DBNAME + +ECHO Creating Database $DBNAME +mysqladmin -h localhost -u $USER -p$PASS CREATE $DBNAME + +ECHO Loading $DBNAME tables into the database +cd $IMPORT_PATH +for X in *.sql; +do + echo Importing $X; + "C:\program files\mysql\mysql server 5.7\bin\mysql" $DBNAME -h localhost -u $USER -p$PASS < $X +done + +ECHO Finished! \ No newline at end of file