From 8b93abe86eeb0667fb3e382aa6f4e700852d5fb1 Mon Sep 17 00:00:00 2001 From: Tahir Akhlaq Date: Wed, 8 Jun 2016 22:29:04 +0100 Subject: [PATCH 01/13] servers now log (almost) everything to file - regex'd in mysqlexception logging - servers can now specify server_port, log_path, log_file - added scripts to import/export all tables (exporting will export a handful of garbage table names, open and check for structure before deleting) - fixed packet logging (thanks deviltti) --- FFXIVClassic Lobby Server/ClientConnection.cs | 6 -- FFXIVClassic Lobby Server/ConfigConstants.cs | 27 +++--- FFXIVClassic Lobby Server/Database.cs | 42 +++++++-- .../FFXIVClassic Lobby Server.csproj | 29 +++++- FFXIVClassic Lobby Server/PacketProcessor.cs | 5 - FFXIVClassic Lobby Server/Program.cs | 38 ++++---- .../Properties/AssemblyInfo.cs | 1 - FFXIVClassic Lobby Server/Server.cs | 12 +-- FFXIVClassic Lobby Server/common/Bitfield.cs | 4 - FFXIVClassic Lobby Server/common/Blowfish.cs | 4 - FFXIVClassic Lobby Server/common/Log.cs | 71 +++++++++------ FFXIVClassic Lobby Server/common/Utils.cs | 81 ++++++++++++----- .../dataobjects/Account.cs | 4 - .../dataobjects/Appearance.cs | 8 +- .../dataobjects/CharaInfo.cs | 6 +- .../dataobjects/Character.cs | 10 +- .../dataobjects/Retainer.cs | 9 +- .../dataobjects/World.cs | 8 +- .../packets/BasePacket.cs | 7 +- .../packets/HardCoded_Packets.cs | 8 +- .../packets/SubPacket.cs | 15 +-- .../packets/receive/CharacterModifyPacket.cs | 3 - .../receive/SecurityHandshakePacket.cs | 3 - .../packets/receive/SelectCharacterPacket.cs | 4 - .../packets/receive/SessionPacket.cs | 3 - .../packets/send/AccountListPacket.cs | 2 - .../packets/send/CharaCreatorPacket.cs | 3 - .../packets/send/CharacterListPacket.cs | 3 - .../packets/send/ErrorPacket.cs | 3 - .../packets/send/ImportListPacket.cs | 5 +- .../packets/send/RetainerListPacket.cs | 5 +- .../send/SelectCharacterConfirmPacket.cs | 2 - .../packets/send/WorldListPacket.cs | 2 - .../utils/CharacterCreatorUtils.cs | 6 +- FFXIVClassic Map Server/ClientConnection.cs | 13 +-- FFXIVClassic Map Server/CommandProcessor.cs | 15 +-- FFXIVClassic Map Server/ConfigConstants.cs | 25 ++--- FFXIVClassic Map Server/Database.cs | 91 +++++++++++++------ .../FFXIVClassic Map Server.csproj | 3 +- FFXIVClassic Map Server/PacketProcessor.cs | 21 +---- FFXIVClassic Map Server/Program.cs | 46 ++++------ .../Properties/AssemblyInfo.cs | 1 - FFXIVClassic Map Server/Server.cs | 20 +--- FFXIVClassic Map Server/WorldManager.cs | 31 ++++--- FFXIVClassic Map Server/actors/Actor.cs | 11 +-- FFXIVClassic Map Server/actors/EventList.cs | 6 +- .../actors/StaticActors.cs | 4 +- FFXIVClassic Map Server/actors/area/Area.cs | 8 +- .../actors/area/PrivateArea.cs | 6 +- FFXIVClassic Map Server/actors/area/Zone.cs | 6 +- .../actors/chara/AetheryteWork.cs | 8 +- .../actors/chara/BattleSave.cs | 8 +- .../actors/chara/BattleTemp.cs | 8 +- .../actors/chara/CharaWork.cs | 8 +- .../actors/chara/Character.cs | 7 +- .../actors/chara/EventSave.cs | 8 +- .../actors/chara/EventTemp.cs | 8 +- .../actors/chara/ParameterSave.cs | 8 +- .../actors/chara/ParameterTemp.cs | 8 +- FFXIVClassic Map Server/actors/chara/Work.cs | 8 +- .../actors/chara/npc/Npc.cs | 13 +-- .../actors/chara/npc/NpcWork.cs | 8 +- .../actors/chara/player/Equipment.cs | 7 +- .../actors/chara/player/Inventory.cs | 5 +- .../actors/chara/player/Player.cs | 12 +-- .../actors/chara/player/PlayerWork.cs | 8 +- .../actors/command/Command.cs | 8 +- FFXIVClassic Map Server/actors/debug/Debug.cs | 7 +- .../actors/director/Director.cs | 6 +- .../actors/director/OpeningDirector.cs | 5 +- .../actors/director/WeatherDirector.cs | 6 +- .../director/quest/QuestDirectorMan0g001.cs | 6 +- .../director/quest/QuestDirectorMan0l001.cs | 6 +- .../director/quest/QuestDirectorMan0u001.cs | 6 +- FFXIVClassic Map Server/actors/judge/Judge.cs | 9 +- FFXIVClassic Map Server/actors/quest/Quest.cs | 3 +- .../actors/world/WorldMaster.cs | 7 +- FFXIVClassic Map Server/common/Bitfield.cs | 6 +- FFXIVClassic Map Server/common/Blowfish.cs | 6 +- .../common/EfficientHashTables.cs | 4 - FFXIVClassic Map Server/common/Log.cs | 77 +++++++++------- FFXIVClassic Map Server/common/Utils.cs | 85 ++++++++++++----- .../dataobjects/ConnectedPlayer.cs | 9 +- .../dataobjects/DBWorld.cs | 8 +- .../dataobjects/InventoryItem.cs | 7 +- FFXIVClassic Map Server/dataobjects/Item.cs | 4 - .../dataobjects/RecruitmentDetails.cs | 8 +- .../dataobjects/SearchEntry.cs | 3 - FFXIVClassic Map Server/lua/LuaEngine.cs | 8 +- FFXIVClassic Map Server/lua/LuaEvent.cs | 8 +- FFXIVClassic Map Server/lua/LuaNpc.cs | 8 -- FFXIVClassic Map Server/lua/LuaParam.cs | 4 - FFXIVClassic Map Server/lua/LuaPlayer.cs | 6 -- FFXIVClassic Map Server/lua/LuaUtils.cs | 5 +- FFXIVClassic Map Server/packets/BasePacket.cs | 15 ++- FFXIVClassic Map Server/packets/SubPacket.cs | 19 ++-- .../packets/receive/ChatMessagePacket.cs | 3 - .../packets/receive/HandshakePacket.cs | 3 - .../packets/receive/LangaugeCodePacket.cs | 4 - .../packets/receive/LockTargetPacket.cs | 7 +- .../receive/ParameterDataRequestPacket.cs | 2 - .../packets/receive/PingPacket.cs | 7 +- .../packets/receive/SetTargetPacket.cs | 7 +- .../receive/UpdatePlayerPositionPacket.cs | 7 +- .../packets/receive/_0x02ReceivePacket.cs | 4 - .../packets/receive/_0x07Packet.cs | 4 - .../receive/events/EventStartPacket.cs | 5 +- .../receive/events/EventUpdatePacket.cs | 3 - .../RecruitmentDetailsRequestPacket.cs | 4 - .../RecruitmentSearchRequestPacket.cs | 3 - .../StartRecruitingRequestPacket.cs | 3 - .../receive/social/AddRemoveSocialPacket.cs | 3 - .../receive/social/FriendlistRequestPacket.cs | 4 - .../supportdesk/FaqBodyRequestPacket.cs | 4 - .../supportdesk/FaqListRequestPacket.cs | 4 - .../supportdesk/GMSupportTicketPacket.cs | 3 - .../GMTicketIssuesRequestPacket.cs | 4 - .../packets/send/Actor/ActorDoEmotePacket.cs | 7 +- .../send/Actor/ActorInstantiatePacket.cs | 5 +- .../send/Actor/ActorSpecialGraphicPacket.cs | 7 +- .../packets/send/Actor/AddActorPacket.cs | 9 +- .../packets/send/Actor/BattleAction1Packet.cs | 8 +- .../send/Actor/DeleteAllActorsPacket.cs | 9 +- .../send/Actor/MoveActorToPositionPacket.cs | 7 +- .../packets/send/Actor/RemoveActorPacket.cs | 7 +- .../send/Actor/SetActorAppearancePacket.cs | 8 +- .../packets/send/Actor/SetActorIconPacket.cs | 7 +- .../send/Actor/SetActorIdleAnimationPacket.cs | 7 +- .../send/Actor/SetActorIsZoningPacket.cs | 9 +- .../packets/send/Actor/SetActorNamePacket.cs | 6 +- .../send/Actor/SetActorPositionPacket.cs | 7 +- .../send/Actor/SetActorPropetyPacket.cs | 5 +- .../packets/send/Actor/SetActorSpeedPacket.cs | 7 +- .../packets/send/Actor/SetActorStatePacket.cs | 7 +- .../send/Actor/SetActorStatusAllPacket.cs | 7 +- .../send/Actor/SetActorStatusPacket.cs | 7 +- .../Actor/SetActorTargetAnimatedPacket.cs | 7 +- .../send/Actor/SetActorTargetPacket.cs | 7 +- .../packets/send/Actor/_0x132Packet.cs | 6 +- .../packets/send/Actor/_0xFPacket.cs | 8 +- .../packets/send/Actor/battle/BattleAction.cs | 8 +- .../Actor/battle/BattleActionX00Packet.cs | 7 +- .../Actor/battle/BattleActionX01Packet.cs | 7 +- .../Actor/battle/BattleActionX10Packet.cs | 8 +- .../Actor/battle/BattleActionX18Packet.cs | 8 +- .../Actor/events/SetEmoteEventCondition.cs | 6 +- .../send/Actor/events/SetEventStatus.cs | 6 +- .../Actor/events/SetNoticeEventCondition.cs | 6 +- .../events/SetPushEventConditionWithCircle.cs | 6 +- .../events/SetPushEventConditionWithFan.cs | 6 +- .../SetPushEventConditionWithTriggerBox.cs | 6 +- .../Actor/events/SetTalkEventCondition.cs | 6 +- .../Actor/inventory/EquipmentListX01Packet.cs | 7 +- .../Actor/inventory/EquipmentListX08Packet.cs | 6 +- .../Actor/inventory/EquipmentListX16Packet.cs | 6 +- .../Actor/inventory/EquipmentListX32Packet.cs | 6 +- .../Actor/inventory/EquipmentListX64Packet.cs | 6 +- .../inventory/InventoryBeginChangePacket.cs | 9 +- .../inventory/InventoryEndChangePacket.cs | 9 +- .../Actor/inventory/InventoryItemEndPacket.cs | 7 +- .../Actor/inventory/InventoryItemPacket.cs | 7 +- .../Actor/inventory/InventoryListX01Packet.cs | 8 +- .../Actor/inventory/InventoryListX08Packet.cs | 6 +- .../Actor/inventory/InventoryListX16Packet.cs | 7 +- .../Actor/inventory/InventoryListX32Packet.cs | 7 +- .../Actor/inventory/InventoryListX64Packet.cs | 7 +- .../inventory/InventoryRemoveX01Packet.cs | 7 +- .../inventory/InventoryRemoveX08Packet.cs | 6 +- .../inventory/InventoryRemoveX16Packet.cs | 6 +- .../inventory/InventoryRemoveX32Packet.cs | 6 +- .../inventory/InventoryRemoveX64Packet.cs | 6 +- .../inventory/InventorySetBeginPacket.cs | 7 +- .../Actor/inventory/InventorySetEndPacket.cs | 9 +- .../packets/send/GameMessagePacket.cs | 5 +- .../packets/send/LogoutPacket.cs | 9 +- .../packets/send/PongPacket.cs | 8 +- .../packets/send/QuitPacket.cs | 9 +- .../packets/send/SendMessagePacket.cs | 6 +- .../packets/send/SetMapPacket.cs | 8 +- .../packets/send/SetMusicPacket.cs | 7 +- .../packets/send/SetWeatherPacket.cs | 7 +- .../packets/send/_0x02Packet.cs | 7 +- .../packets/send/_0x10Packet.cs | 7 +- .../packets/send/_0xE2Packet.cs | 7 +- .../packets/send/events/EndEventPacket.cs | 6 +- .../packets/send/events/KickEventPacket.cs | 5 +- .../send/events/RunEventFunctionPacket.cs | 6 +- .../packets/send/list/ListBeginPacket.cs | 7 +- .../packets/send/list/ListEndPacket.cs | 7 +- .../packets/send/list/ListEntriesEndPacket.cs | 5 +- .../packets/send/list/ListEntry.cs | 8 +- .../packets/send/list/ListStartPacket.cs | 6 +- .../packets/send/list/ListUtils.cs | 7 +- .../send/list/SetListPropertyPacket.cs | 5 +- .../packets/send/login/0x2Packet.cs | 8 +- .../packets/send/login/0x7ResponsePacket.cs | 7 +- .../send/player/AchievementEarnedPacket.cs | 7 +- .../send/player/InfoRequestResponsePacket.cs | 8 +- .../send/player/SendAchievementRatePacket.cs | 7 +- .../send/player/SetAchievementPointsPacket.cs | 8 +- .../send/player/SetChocoboNamePacket.cs | 7 +- .../player/SetCompletedAchievementsPacket.cs | 8 +- .../send/player/SetCurrentJobPacket.cs | 7 +- .../player/SetCurrentMountChocoboPacket.cs | 9 +- .../player/SetCurrentMountGoobbuePacket.cs | 9 +- .../send/player/SetCutsceneBookPacket.cs | 6 +- .../send/player/SetGrandCompanyPacket.cs | 7 +- .../send/player/SetHasChocoboPacket.cs | 9 +- .../send/player/SetHasGoobbuePacket.cs | 9 +- .../player/SetLatestAchievementsPacket.cs | 7 +- .../send/player/SetPlayerDreamPacket.cs | 7 +- .../send/player/SetPlayerTitlePacket.cs | 7 +- .../packets/send/player/_0x196Packet.cs | 7 +- .../CurrentRecruitmentDetailsPacket.cs | 6 +- .../send/recruitment/EndRecruitmentPacket.cs | 9 +- .../send/recruitment/RecruiterStatePacket.cs | 7 +- .../recruitment/StartRecruitingResponse.cs | 9 +- .../send/social/BlacklistAddedPacket.cs | 7 +- .../send/social/BlacklistRemovedPacket.cs | 7 +- .../packets/send/social/FriendStatusPacket.cs | 7 +- .../send/social/FriendlistAddedPacket.cs | 6 +- .../send/social/FriendlistRemovedPacket.cs | 7 +- .../send/social/SendBlacklistPacket.cs | 6 +- .../send/social/SendFriendlistPacket.cs | 6 +- .../send/supportdesk/EndGMTicketPacket.cs | 9 +- .../send/supportdesk/FaqBodyResponsePacket.cs | 7 +- .../send/supportdesk/FaqListResponsePacket.cs | 7 +- .../send/supportdesk/GMTicketPacket.cs | 7 +- .../supportdesk/GMTicketSentResponsePacket.cs | 9 +- .../supportdesk/IssueListResponsePacket.cs | 7 +- .../send/supportdesk/StartGMTicketPacket.cs | 9 +- .../utils/ActorPropertyPacketUtil.cs | 7 +- .../utils/CharacterUtils.cs | 6 +- .../utils/SQLGeneration.cs | 31 ++++--- data/{config.ini => lobby_config.ini} | 2 +- data/map_config.ini | 11 +++ sql/export.sh | 10 ++ sql/import.sh | 17 ++++ 238 files changed, 684 insertions(+), 1532 deletions(-) rename data/{config.ini => lobby_config.ini} (91%) create mode 100644 data/map_config.ini create mode 100644 sql/export.sh create mode 100644 sql/import.sh diff --git a/FFXIVClassic Lobby Server/ClientConnection.cs b/FFXIVClassic Lobby Server/ClientConnection.cs index 76e77fd9..fb103a5b 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 System.Collections.Concurrent; -using System.IO; using Cyotek.Collections.Generic; using System.Net; diff --git a/FFXIVClassic Lobby Server/ConfigConstants.cs b/FFXIVClassic Lobby Server/ConfigConstants.cs index 7968aa5e..75d96000 100644 --- a/FFXIVClassic Lobby Server/ConfigConstants.cs +++ b/FFXIVClassic Lobby Server/ConfigConstants.cs @@ -1,18 +1,16 @@ -using FFXIVClassic_Lobby_Server.common; -using STA.Settings; +using STA.Settings; 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 OPTIONS_LOGPATH; + public static String OPTIONS_LOGFILE; public static String DATABASE_HOST; public static String DATABASE_PORT; @@ -22,20 +20,23 @@ namespace FFXIVClassic_Lobby_Server 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.OPTIONS_LOGPATH = configIni.GetValue("General", "log_path", "./logs/"); + ConfigConstants.OPTIONS_LOGFILE = configIni.GetValue("General", "log_file_name", String.Format("lobby_{0}_{1}.log", OPTIONS_BINDIP, OPTIONS_PORT)); ConfigConstants.DATABASE_HOST = configIni.GetValue("Database", "host", ""); ConfigConstants.DATABASE_PORT = configIni.GetValue("Database", "port", ""); @@ -44,7 +45,7 @@ namespace FFXIVClassic_Lobby_Server ConfigConstants.DATABASE_PASSWORD = configIni.GetValue("Database", "password", ""); Console.ForegroundColor = ConsoleColor.Green; - Console.WriteLine("[OK]"); + Console.WriteLine(String.Format("[OK]")); Console.ForegroundColor = ConsoleColor.Gray; return true; diff --git a/FFXIVClassic Lobby Server/Database.cs b/FFXIVClassic Lobby Server/Database.cs index 1f7ec710..fcf706d9 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_Lobby_Server.common; namespace FFXIVClassic_Lobby_Server { @@ -35,7 +32,10 @@ namespace FFXIVClassic_Lobby_Server } } catch (MySqlException e) - { Console.WriteLine(e); } + { + Log.error(e.ToString()); + + } finally { conn.Dispose(); @@ -88,6 +88,10 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Log.error(e.ToString()); + + Log.error(e.ToString()); + pid = 0; cid = 0; } @@ -179,6 +183,8 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Log.error(e.ToString()); + conn.Dispose(); return; } @@ -202,6 +208,8 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Log.error(e.ToString()); + conn.Dispose(); return; } @@ -222,6 +230,8 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Log.error(e.ToString()); + } finally @@ -267,6 +277,8 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Log.error(e.ToString()); + } finally @@ -298,6 +310,8 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Log.error(e.ToString()); + } finally @@ -320,7 +334,9 @@ namespace FFXIVClassic_Lobby_Server worldList = conn.Query("SELECT * FROM servers WHERE isActive=true").ToList(); } catch (MySqlException e) - { worldList = new List(); } + { + Log.error(e.ToString()); + worldList = new List(); } finally { conn.Dispose(); @@ -340,7 +356,9 @@ namespace FFXIVClassic_Lobby_Server world = conn.Query("SELECT * FROM servers WHERE id=@ServerId", new {ServerId = serverId}).SingleOrDefault(); } catch (MySqlException e) - { + { + Log.error(e.ToString()); + } finally { @@ -476,6 +494,8 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { + Log.error(e.ToString()); + } finally { @@ -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(); } + { + Log.error(e.ToString()); + nameList = new List(); } finally { conn.Dispose(); @@ -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(); } + { + 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..00c7db3a 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 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true AnyCPU @@ -94,9 +109,21 @@ + + + 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 Common Class Lib/Log.cs b/FFXIVClassic Common Class Lib/Log.cs new file mode 100644 index 00000000..54ce9084 --- /dev/null +++ b/FFXIVClassic Common Class Lib/Log.cs @@ -0,0 +1,137 @@ +using System; +using System.IO; +using System.Text; +using System.Collections.Generic; +using System.Threading; + +namespace FFXIVClassic.Common +{ + public class Log + { + public string LogDirectory; + public string LogFileName; + public int EnabledLogTypes; + public Queue> LogQueue; + + public Log(string path, string file, int enabledtypes) + { + LogQueue = new Queue>(); + EnabledLogTypes = enabledtypes; + LogDirectory = path; + LogFileName = file; + } + + public enum LogType + { + None = 0x000, + Console = 0x001, + File = 0x002, + Status = 0x004, + Sql = 0x008, + Info = 0x010, + Debug = 0x020, + Error = 0x040, + } + + public enum LogColour + { + Status = ConsoleColor.Green, + Sql = ConsoleColor.Magenta, + Info = ConsoleColor.White, + Debug = ConsoleColor.Cyan, + Error = ConsoleColor.Red + } + + public void Status(String message, params object[] formatargs) + { + if (formatargs.Length > 0) + message = String.Format(message, formatargs); + + QueueMessage(message, LogColour.Status); + } + + public void Sql(String message, params object[] formatargs) + { + if (formatargs.Length > 0) + message = String.Format(message, formatargs); + + QueueMessage(message, LogColour.Sql); + } + + public void Info(String message, params object[] formatargs) + { + if (formatargs.Length > 0) + message = String.Format(message, formatargs); + + QueueMessage(message, LogColour.Info); + } + + public void Debug(String message, params object[] formatargs) + { + if (formatargs.Length > 0) + message = String.Format(message, formatargs); + + QueueMessage(message, LogColour.Debug); + } + + public void Error(String message, params object[] formatargs) + { + if (formatargs.Length > 0) + message = String.Format(message, formatargs); + + QueueMessage(message, LogColour.Error); + } + + public void Packet(String message, params object[] formatargs) + { + + } + + private void QueueMessage(String message, LogColour type) + { + LogQueue.Enqueue(Tuple.Create(message, type)); + } + + public void WriteMessage(String message, LogColour type) + { + var canLog = false; + + try + { + canLog = ((EnabledLogTypes & (int)(Enum.Parse(typeof(LogType), type.ToString()))) != 0); + } + catch (Exception e) { } + + string timestamp = String.Format("[{0}]", DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")); + string messageType = String.Format("[{0}] ", type.ToString().ToUpper()); + + if ((EnabledLogTypes & (int)LogType.Console) != 0) + { + Console.Write(timestamp); + Console.ForegroundColor = (ConsoleColor)type; + Console.Write(messageType); + Console.ForegroundColor = ConsoleColor.Gray; + Console.WriteLine(message); + } + + StringBuilder sb = new StringBuilder(); + + sb.AppendLine(String.Format("{0}{1}{2}", timestamp, messageType, message)); + + if ((EnabledLogTypes & (int)LogType.File) != 0) + { + // todo: add param to see if path has been changed during runtime and then check directory/file + if (!Directory.Exists(LogDirectory)) + { + Directory.CreateDirectory(LogDirectory); + } + + using (FileStream fs = new FileStream(Path.Combine(LogDirectory, LogFileName), FileMode.Append, FileAccess.Write)) + using (StreamWriter sw = new StreamWriter(fs)) + { + sw.WriteLine(sb.ToString()); + } + } + } + } +} \ 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 99% rename from FFXIVClassic Map Server/common/STA_INIFile.cs rename to FFXIVClassic Common Class Lib/STA_INIFile.cs index fa7107ad..e8669eca 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" @@ -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) diff --git a/FFXIVClassic Lobby Server/common/Utils.cs b/FFXIVClassic Common Class Lib/Utils.cs similarity index 98% rename from FFXIVClassic Lobby Server/common/Utils.cs rename to FFXIVClassic Common Class Lib/Utils.cs index 8329864c..728d5d96 100644 --- a/FFXIVClassic Lobby Server/common/Utils.cs +++ b/FFXIVClassic Common Class Lib/Utils.cs @@ -1,9 +1,9 @@ using System; using System.Text; -namespace FFXIVClassic_Lobby_Server.common +namespace FFXIVClassic.Common { - static class Utils + public static class Utils { private static readonly uint[] _lookup32 = CreateLookup32(); @@ -20,28 +20,28 @@ namespace FFXIVClassic_Lobby_Server.common public static string ByteArrayToHex(byte[] bytes, int offset = 0, int bytesPerLine = 16) { - if (bytes == null) - { - return String.Empty; + if (bytes == null) + { + return String.Empty; } - char[] hexChars = "0123456789ABCDEF".ToCharArray(); - - // 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; + char[] hexChars = "0123456789ABCDEF".ToCharArray(); + + // 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; - + 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; - + { + int h = i + offset; + line[0] = hexChars[(h >> 28) & 0xF]; line[1] = hexChars[(h >> 24) & 0xF]; line[2] = hexChars[(h >> 20) & 0xF]; @@ -56,11 +56,11 @@ namespace FFXIVClassic_Lobby_Server.common for (int j = 0; j < bytesPerLine; j++) { - if (j > 0 && (j & 7) == 0) - { - hexColumn++; - } - + if (j > 0 && (j & 7) == 0) + { + hexColumn++; + } + if (i + j >= bytes.Length) { line[hexColumn] = ' '; @@ -73,8 +73,8 @@ namespace FFXIVClassic_Lobby_Server.common line[hexColumn] = hexChars[(by >> 4) & 0xF]; line[hexColumn + 1] = hexChars[by & 0xF]; line[charColumn] = (by < 32 ? '.' : (char)by); - } - + } + hexColumn += 3; charColumn++; } diff --git a/FFXIVClassic Lobby Server/ClientConnection.cs b/FFXIVClassic Lobby Server/ClientConnection.cs index 68da5ee3..ead6b483 100644 --- a/FFXIVClassic Lobby Server/ClientConnection.cs +++ b/FFXIVClassic Lobby Server/ClientConnection.cs @@ -1,7 +1,7 @@ using System; using System.Net.Sockets; using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using System.Collections.Concurrent; using Cyotek.Collections.Generic; using System.Net; @@ -59,7 +59,7 @@ namespace FFXIVClassic_Lobby_Server socket.Send(packetBytes); } catch(Exception e) - { Log.Error(String.Format("Weird case, socket was d/ced: {0}", e)); } + { Program.Log.Error(String.Format("Weird case, socket was d/ced: {0}", e)); } } } diff --git a/FFXIVClassic Lobby Server/ConfigConstants.cs b/FFXIVClassic Lobby Server/ConfigConstants.cs index 75d96000..4ebae680 100644 --- a/FFXIVClassic Lobby Server/ConfigConstants.cs +++ b/FFXIVClassic Lobby Server/ConfigConstants.cs @@ -1,4 +1,4 @@ -using STA.Settings; +using FFXIVClassic.Common; using System; using System.IO; @@ -11,6 +11,7 @@ namespace FFXIVClassic_Lobby_Server public static bool OPTIONS_TIMESTAMP = false; public static String OPTIONS_LOGPATH; public static String OPTIONS_LOGFILE; + public static String OPTIONS_LOGLEVEL; public static String DATABASE_HOST; public static String DATABASE_PORT; @@ -37,6 +38,7 @@ namespace FFXIVClassic_Lobby_Server ConfigConstants.OPTIONS_TIMESTAMP = configIni.GetValue("General", "showtimestamp", "true").ToLower().Equals("true"); ConfigConstants.OPTIONS_LOGPATH = configIni.GetValue("General", "log_path", "./logs/"); ConfigConstants.OPTIONS_LOGFILE = configIni.GetValue("General", "log_file_name", String.Format("lobby_{0}_{1}.log", OPTIONS_BINDIP, OPTIONS_PORT)); + ConfigConstants.OPTIONS_LOGLEVEL = configIni.GetValue("General", "log_level", "127"); 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 ca8361db..38a23169 100644 --- a/FFXIVClassic Lobby Server/Database.cs +++ b/FFXIVClassic Lobby Server/Database.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; using FFXIVClassic_Lobby_Server.utils; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; namespace FFXIVClassic_Lobby_Server { @@ -33,7 +33,7 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally @@ -88,9 +88,9 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); pid = 0; cid = 0; @@ -100,7 +100,7 @@ namespace FFXIVClassic_Lobby_Server conn.Dispose(); } - Log.Sql(String.Format("CID={0} created on 'characters' table.", cid)); + Program.Log.Sql(String.Format("CID={0} created on 'characters' table.", cid)); } return alreadyExists; @@ -183,7 +183,7 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); conn.Dispose(); return; @@ -208,7 +208,7 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); conn.Dispose(); return; @@ -230,7 +230,7 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } @@ -242,7 +242,7 @@ namespace FFXIVClassic_Lobby_Server } - Log.Sql(String.Format("CID={0} state updated to active(2).", cid)); + Program.Log.Sql(String.Format("CID={0} state updated to active(2).", cid)); } public static bool renameCharacter(uint userId, uint characterId, uint serverId, String newName) @@ -277,7 +277,7 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } @@ -286,7 +286,7 @@ namespace FFXIVClassic_Lobby_Server conn.Dispose(); } - Log.Sql(String.Format("CID={0} name updated to \"{1}\".", characterId, newName)); + Program.Log.Sql(String.Format("CID={0} name updated to \"{1}\".", characterId, newName)); return false; } @@ -310,7 +310,7 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } @@ -320,7 +320,7 @@ namespace FFXIVClassic_Lobby_Server } } - Log.Sql(String.Format("CID={0} deleted.", characterId)); + Program.Log.Sql(String.Format("CID={0} deleted.", characterId)); } public static List getServers() @@ -335,7 +335,7 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); worldList = new List(); } finally { @@ -357,7 +357,7 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally @@ -494,7 +494,7 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally @@ -518,7 +518,7 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); nameList = new List(); } finally { @@ -540,7 +540,7 @@ namespace FFXIVClassic_Lobby_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); retainerList = new List(); } finally { diff --git a/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj b/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj index 00c7db3a..07c71cfc 100644 --- a/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj +++ b/FFXIVClassic Lobby Server/FFXIVClassic Lobby Server.csproj @@ -11,6 +11,7 @@ FFXIVClassic_Lobby_Server v4.5 512 + false publish\ true Disk @@ -23,7 +24,6 @@ true 0 1.0.0.%2a - false false true @@ -55,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 @@ -71,17 +74,12 @@ - - - - - diff --git a/FFXIVClassic Lobby Server/PacketProcessor.cs b/FFXIVClassic Lobby Server/PacketProcessor.cs index 8601dd3b..4adc7d10 100644 --- a/FFXIVClassic Lobby Server/PacketProcessor.cs +++ b/FFXIVClassic Lobby Server/PacketProcessor.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Lobby_Server.dataobjects; using FFXIVClassic_Lobby_Server.packets; using FFXIVClassic_Lobby_Server.packets.receive; @@ -53,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(String.Format("Unknown command 0x{0:X} received.", subpacket.gameMessage.opcode)); break; } } @@ -67,7 +67,7 @@ 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(String.Format("SecCNum: 0x{0:X}", securityHandshake.clientNumber)); //Respond with acknowledgment BasePacket outgoingPacket = new BasePacket(HardCoded_Packets.g_secureConnectionAcknowledgment); @@ -81,8 +81,8 @@ namespace FFXIVClassic_Lobby_Server 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(String.Format("Got acknowledgment for secure session.")); + Program.Log.Info(String.Format("CLIENT VERSION: {0}", clientVersion)); uint userId = Database.getUserIdFromSession(sessionPacket.session); client.currentUserId = userId; @@ -96,11 +96,11 @@ namespace FFXIVClassic_Lobby_Server BasePacket.encryptPacket(client.blowfish, errorBasePacket); client.queuePacket(errorBasePacket); - Log.Info(String.Format("Invalid session, kicking...")); + Program.Log.Info(String.Format("Invalid session, kicking...")); return; } - Log.Info(String.Format("USER ID: {0}", userId)); + Program.Log.Info(String.Format("USER ID: {0}", userId)); List accountList = new List(); Account defaultAccount = new Account(); @@ -115,7 +115,7 @@ namespace FFXIVClassic_Lobby_Server 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(String.Format("{0} => Get characters", client.currentUserId == 0 ? client.getAddress() : "User " + client.currentUserId)); sendWorldList(client, packet); sendImportList(client, packet); @@ -128,7 +128,7 @@ 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(String.Format("{0} => Select character id {1}", client.currentUserId == 0 ? client.getAddress() : "User " + client.currentUserId, selectCharRequest.characterId)); Character chara = Database.getCharacter(client.currentUserId, selectCharRequest.characterId); World world = null; @@ -187,7 +187,7 @@ namespace FFXIVClassic_Lobby_Server 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(String.Format("User {0} => Error; invalid server id: \"{1}\"", client.currentUserId, worldId)); return; } @@ -207,7 +207,7 @@ namespace FFXIVClassic_Lobby_Server 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(String.Format("User {0} => Error; name taken: \"{1}\"", client.currentUserId, charaReq.characterName)); return; } else @@ -219,7 +219,7 @@ namespace FFXIVClassic_Lobby_Server client.newCharaName = name; } - Log.Info(String.Format("User {0} => Character reserved \"{1}\"", client.currentUserId, name)); + Program.Log.Info(String.Format("User {0} => Character reserved \"{1}\"", client.currentUserId, name)); break; case 0x02://Make CharaInfo info = CharaInfo.getFromNewCharRequest(charaReq.characterInfoEncoded); @@ -272,7 +272,7 @@ namespace FFXIVClassic_Lobby_Server cid = client.newCharaCid; name = client.newCharaName; - Log.Info(String.Format("User {0} => Character created \"{1}\"", client.currentUserId, name)); + Program.Log.Info(String.Format("User {0} => Character created \"{1}\"", client.currentUserId, name)); break; case 0x03://Rename @@ -286,20 +286,20 @@ namespace FFXIVClassic_Lobby_Server 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(String.Format("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(String.Format("User {0} => Character renamed \"{1}\"", client.currentUserId, name)); break; case 0x04://Delete Database.deleteCharacter(charaReq.characterId, charaReq.characterName); - Log.Info(String.Format("User {0} => Character deleted \"{1}\"", client.currentUserId, name)); + Program.Log.Info(String.Format("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(String.Format("User {0} => Retainer renamed \"{1}\"", client.currentUserId, name)); break; } @@ -349,7 +349,7 @@ namespace FFXIVClassic_Lobby_Server 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(); diff --git a/FFXIVClassic Lobby Server/Program.cs b/FFXIVClassic Lobby Server/Program.cs index f99bd6e8..37019433 100644 --- a/FFXIVClassic Lobby Server/Program.cs +++ b/FFXIVClassic Lobby Server/Program.cs @@ -3,12 +3,14 @@ using System.Diagnostics; using System.Threading; using MySql.Data.MySqlClient; using System.Reflection; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; namespace FFXIVClassic_Lobby_Server { class Program { + public static Log Log; + static void Main(string[] args) { #if DEBUG @@ -22,15 +24,30 @@ namespace FFXIVClassic_Lobby_Server if (!ConfigConstants.load()) startServer = false; - Log.Info("--------FFXIV 1.0 Lobby Server--------"); + Log = new Log(ConfigConstants.OPTIONS_LOGPATH, ConfigConstants.OPTIONS_LOGFILE, Int32.Parse(ConfigConstants.OPTIONS_LOGLEVEL)); + + Thread thread = new Thread(() => + { + while (true) + { + if (Log.LogQueue.Count > 0) + { + var message = Program.Log.LogQueue.Dequeue(); + Program.Log.WriteMessage(message.Item1, message.Item2); + } + } + }); + thread.Start(); + + Program.Log.Info("--------FFXIV 1.0 Lobby Server--------"); Assembly assem = Assembly.GetExecutingAssembly(); Version vers = assem.GetName().Version; - Log.Info("Version: " + vers.ToString()); + Program.Log.Info("Version: " + vers.ToString()); //Test DB Connection - Log.Info(String.Format("Testing DB connection to \"{0}\"... ", ConfigConstants.DATABASE_HOST)); + Program.Log.Info(String.Format("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 @@ -38,12 +55,12 @@ namespace FFXIVClassic_Lobby_Server conn.Open(); conn.Close(); - Log.Status("[OK]"); + Program.Log.Status("[OK]"); } catch (MySqlException e) { - Log.Error(e.ToString()); - Log.Error("[FAILED]"); + Program.Log.Error(e.ToString()); + Program.Log.Error("[FAILED]"); startServer = false; } @@ -58,7 +75,7 @@ namespace FFXIVClassic_Lobby_Server while (true) Thread.Sleep(10000); } - Log.Info("Press any key to continue..."); + Program.Log.Info("Press any key to continue..."); Console.ReadKey(); } diff --git a/FFXIVClassic Lobby Server/Server.cs b/FFXIVClassic Lobby Server/Server.cs index 929e2d8a..6bcc66a5 100644 --- a/FFXIVClassic Lobby Server/Server.cs +++ b/FFXIVClassic Lobby Server/Server.cs @@ -4,7 +4,7 @@ using System.Net; using System.Net.Sockets; using System.Threading; using FFXIVClassic_Lobby_Server.packets; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; namespace FFXIVClassic_Lobby_Server { @@ -25,7 +25,7 @@ namespace FFXIVClassic_Lobby_Server private void socketCleanup() { - Log.Debug(String.Format("Cleanup thread started; it will run every {0} seconds.", CLEANUP_THREAD_SLEEP_TIME)); + Program.Log.Debug(String.Format("Cleanup thread started; it will run every {0} seconds.", CLEANUP_THREAD_SLEEP_TIME)); while (!killCleanupThread) { int count = 0; @@ -40,7 +40,7 @@ namespace FFXIVClassic_Lobby_Server } } if (count != 0) - Log.Status(String.Format("{0} connections were cleaned up.", count)); + Program.Log.Status(String.Format("{0} connections were cleaned up.", count)); Thread.Sleep(CLEANUP_THREAD_SLEEP_TIME*1000); } } @@ -80,7 +80,7 @@ namespace FFXIVClassic_Lobby_Server } Console.ForegroundColor = ConsoleColor.White; - Log.Debug(String.Format("Lobby Server has started @ {0}:{1}", (mServerSocket.LocalEndPoint as IPEndPoint).Address, (mServerSocket.LocalEndPoint as IPEndPoint).Port)); + Program.Log.Debug(String.Format("Lobby Server has started @ {0}:{1}", (mServerSocket.LocalEndPoint as IPEndPoint).Address, (mServerSocket.LocalEndPoint as IPEndPoint).Port)); Console.ForegroundColor = ConsoleColor.Gray; mProcessor = new PacketProcessor(); @@ -105,7 +105,7 @@ namespace FFXIVClassic_Lobby_Server 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.Status(String.Format("Connection {0}:{1} has connected.", (conn.socket.RemoteEndPoint as IPEndPoint).Address, (conn.socket.RemoteEndPoint as IPEndPoint).Port)); + Program.Log.Status(String.Format("Connection {0}:{1} has connected.", (conn.socket.RemoteEndPoint as IPEndPoint).Address, (conn.socket.RemoteEndPoint as IPEndPoint).Port)); } catch (SocketException) { @@ -179,7 +179,7 @@ namespace FFXIVClassic_Lobby_Server } else { - Log.Status(String.Format("{0} has disconnected.", conn.currentUserId == 0 ? conn.getAddress() : "User " + conn.currentUserId)); + Program.Log.Status(String.Format("{0} has disconnected.", conn.currentUserId == 0 ? conn.getAddress() : "User " + conn.currentUserId)); lock (mConnectionList) { @@ -192,7 +192,7 @@ namespace FFXIVClassic_Lobby_Server { if (conn.socket != null) { - Log.Status(String.Format("{0} has disconnected.", conn.currentUserId == 0 ? conn.getAddress() : "User " + conn.currentUserId)); + Program.Log.Status(String.Format("{0} has disconnected.", conn.currentUserId == 0 ? conn.getAddress() : "User " + conn.currentUserId)); lock (mConnectionList) { diff --git a/FFXIVClassic Lobby Server/common/Blowfish.cs b/FFXIVClassic Lobby Server/common/Blowfish.cs deleted file mode 100644 index 16590402..00000000 --- a/FFXIVClassic Lobby Server/common/Blowfish.cs +++ /dev/null @@ -1,456 +0,0 @@ -using System; - -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 a5b6164a..00000000 --- a/FFXIVClassic Lobby Server/common/Log.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace FFXIVClassic_Lobby_Server.common -{ - class Log - { - public enum LogType - { - Status = ConsoleColor.Green, - Sql = ConsoleColor.Magenta, - Info = ConsoleColor.White, - Debug = ConsoleColor.Cyan, - Error = ConsoleColor.Red - } - - public static void Status(String message) - { - LogFile(message, LogType.Status); - } - - public static void Sql(String message) - { - LogFile(message, LogType.Sql); - } - - public static void Info(String message) - { - LogFile(message, LogType.Info); - } - - public static void Debug(String message) - { -#if DEBUG - LogFile(message, LogType.Debug); -#endif - } - - public static void Error(String message) - { - LogFile(message, LogType.Error); - } - - private static void LogFile(String message, LogType type) - { - string timestamp = String.Format("[{0}]", DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")); - string messageType = String.Format("[{0}] ", type.ToString().ToUpper()); - - Console.Write(timestamp); - Console.ForegroundColor = (ConsoleColor)type; - Console.Write(messageType); - Console.ForegroundColor = ConsoleColor.Gray; - Console.WriteLine(message); - - StringBuilder sb = new StringBuilder(); - - sb.AppendLine(String.Format("{0}{1}{2}", timestamp, messageType, message)); - - if (!Directory.Exists(ConfigConstants.OPTIONS_LOGPATH)) - { - Directory.CreateDirectory(ConfigConstants.OPTIONS_LOGPATH); - } - - using (FileStream fs = new FileStream(Path.Combine(ConfigConstants.OPTIONS_LOGPATH, ConfigConstants.OPTIONS_LOGFILE), FileMode.Append, FileAccess.Write)) - using (StreamWriter sw = new StreamWriter(fs)) - { - sw.WriteLine(sb.ToString()); - } - } - } -} \ No newline at end of file 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/CharaInfo.cs b/FFXIVClassic Lobby Server/dataobjects/CharaInfo.cs index 746c7568..835436ee 100644 --- a/FFXIVClassic Lobby Server/dataobjects/CharaInfo.cs +++ b/FFXIVClassic Lobby Server/dataobjects/CharaInfo.cs @@ -1,5 +1,5 @@ using System; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using System.IO; namespace FFXIVClassic_Lobby_Server.dataobjects @@ -227,7 +227,7 @@ namespace FFXIVClassic_Lobby_Server.dataobjects { byte[] bytes = File.ReadAllBytes("./packets/charaappearance.bin"); - Log.Debug(Utils.ByteArrayToHex(bytes)); + Program.Log.Debug(Utils.ByteArrayToHex(bytes)); return Convert.ToBase64String(bytes).Replace('+', '-').Replace('/', '_'); } diff --git a/FFXIVClassic Lobby Server/dataobjects/Character.cs b/FFXIVClassic Lobby Server/dataobjects/Character.cs index 5789009f..e120d431 100644 --- a/FFXIVClassic Lobby Server/dataobjects/Character.cs +++ b/FFXIVClassic Lobby Server/dataobjects/Character.cs @@ -1,5 +1,5 @@ using System; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Lobby_Server.dataobjects; namespace FFXIVClassic_Lobby_Server @@ -33,9 +33,9 @@ namespace FFXIVClassic_Lobby_Server charaInfo.Replace("/", "_"); byte[] data = System.Convert.FromBase64String(charaInfo); - Log.Debug("------------Base64 printout------------------"); - Log.Debug(Utils.ByteArrayToHex(data)); - Log.Debug("------------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/packets/BasePacket.cs b/FFXIVClassic Lobby Server/packets/BasePacket.cs index d0d3df2e..956af8ee 100644 --- a/FFXIVClassic Lobby Server/packets/BasePacket.cs +++ b/FFXIVClassic Lobby Server/packets/BasePacket.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Runtime.InteropServices; using System.Diagnostics; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; using System.IO; namespace FFXIVClassic_Lobby_Server.packets @@ -336,7 +336,7 @@ namespace FFXIVClassic_Lobby_Server.packets #if DEBUG Console.BackgroundColor = ConsoleColor.DarkYellow; - Log.Debug(String.Format("IsAuth: {0} Size: 0x{1:X}, NumSubpackets: {2}{3}{4}", header.isAuthenticated, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()))); + Program.Log.Debug(String.Format("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()) { diff --git a/FFXIVClassic Lobby Server/packets/SubPacket.cs b/FFXIVClassic Lobby Server/packets/SubPacket.cs index 18bdb652..c9263b19 100644 --- a/FFXIVClassic Lobby Server/packets/SubPacket.cs +++ b/FFXIVClassic Lobby Server/packets/SubPacket.cs @@ -1,6 +1,6 @@ using System; using System.Runtime.InteropServices; -using FFXIVClassic_Lobby_Server.common; +using FFXIVClassic.Common; namespace FFXIVClassic_Lobby_Server.packets { @@ -142,16 +142,16 @@ namespace FFXIVClassic_Lobby_Server.packets #if DEBUG Console.BackgroundColor = ConsoleColor.DarkRed; - Log.Debug(String.Format("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()))); + Program.Log.Debug(String.Format("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()))); if (header.type == 0x03) { - Log.Debug(String.Format("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE))); + Program.Log.Debug(String.Format("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE))); } Console.BackgroundColor = ConsoleColor.DarkMagenta; - Log.Debug(String.Format("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE))); + Program.Log.Debug(String.Format("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE))); Console.BackgroundColor = ConsoleColor.Black; #endif diff --git a/FFXIVClassic Map Server/ClientConnection.cs b/FFXIVClassic Map Server/ClientConnection.cs index 9acf0918..67b2a04c 100644 --- a/FFXIVClassic Map Server/ClientConnection.cs +++ b/FFXIVClassic Map Server/ClientConnection.cs @@ -1,7 +1,7 @@ using System; using System.Net.Sockets; using FFXIVClassic_Map_Server.packets; -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using System.Collections.Concurrent; using System.Net; @@ -46,7 +46,7 @@ namespace FFXIVClassic_Map_Server socket.Send(packetBytes); } catch (Exception e) - { Log.Error(String.Format("Weird case, socket was d/ced: {0}", e)); } + { Program.Log.Error(String.Format("Weird case, socket was d/ced: {0}", e)); } } } diff --git a/FFXIVClassic Map Server/CommandProcessor.cs b/FFXIVClassic Map Server/CommandProcessor.cs index d2ca6d24..79db6b74 100644 --- a/FFXIVClassic Map Server/CommandProcessor.cs +++ b/FFXIVClassic Map Server/CommandProcessor.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.packets.send.actor; @@ -116,7 +116,7 @@ namespace FFXIVClassic_Map_Server { 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."); + Program.Log.Error("Zone does not exist or setting isn't valid."); } if (client != null) @@ -142,7 +142,7 @@ namespace FFXIVClassic_Map_Server 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)); + 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)); } } } @@ -578,7 +578,7 @@ namespace FFXIVClassic_Map_Server } catch (Exception e) { - Log.Error("Could not change weather: " + e); + Program.Log.Error("Could not change weather: " + e); } } #endregion @@ -597,7 +597,7 @@ namespace FFXIVClassic_Map_Server } catch (Exception e) { - Log.Error("Could not load packet: " + e); + Program.Log.Error("Could not load packet: " + e); } } #endregion @@ -607,7 +607,7 @@ namespace FFXIVClassic_Map_Server { if (client != null) { - Log.Info(String.Format("Got request to reset zone: {0}", client.getActor().zoneId)); + 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(); @@ -621,11 +621,11 @@ namespace FFXIVClassic_Map_Server #region !reloaditems else if (split[0].Equals("reloaditems")) { - Log.Info(String.Format("Got request to reload 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)); + Program.Log.Info(String.Format("Loaded {0} items.", gamedataItems.Count)); sendMessage(client, String.Format("Loaded {0} items.", gamedataItems.Count)); return true; } @@ -644,7 +644,7 @@ namespace FFXIVClassic_Map_Server } catch (Exception e) { - Log.Error("Could not load packet: " + e); + Program.Log.Error("Could not load packet: " + e); } } #endregion @@ -660,7 +660,7 @@ namespace FFXIVClassic_Map_Server } catch (Exception e) { - Log.Error("Could not give item."); + Program.Log.Error("Could not give item."); } } #endregion @@ -680,7 +680,7 @@ namespace FFXIVClassic_Map_Server } catch (Exception e) { - Log.Error("Could not give item."); + Program.Log.Error("Could not give item."); } } #endregion @@ -703,7 +703,7 @@ namespace FFXIVClassic_Map_Server } catch (Exception e) { - Log.Error("Could not remove item."); + Program.Log.Error("Could not remove item."); } } #endregion @@ -718,7 +718,7 @@ namespace FFXIVClassic_Map_Server } catch (Exception e) { - Log.Error("Could not give keyitem."); + Program.Log.Error("Could not give keyitem."); } } #endregion @@ -737,7 +737,7 @@ namespace FFXIVClassic_Map_Server } catch (Exception e) { - Log.Error("Could not remove keyitem."); + Program.Log.Error("Could not remove keyitem."); } } #endregion @@ -754,7 +754,7 @@ namespace FFXIVClassic_Map_Server } catch (Exception e) { - Log.Error("Could not give currency."); + Program.Log.Error("Could not give currency."); } } #endregion @@ -775,7 +775,7 @@ namespace FFXIVClassic_Map_Server } catch (Exception e) { - Log.Error("Could not remove currency."); + Program.Log.Error("Could not remove currency."); } } #endregion @@ -793,7 +793,7 @@ namespace FFXIVClassic_Map_Server } catch (Exception e) { - Log.Error("Could not change music: " + e); + Program.Log.Error("Could not change music: " + e); } } #endregion diff --git a/FFXIVClassic Map Server/ConfigConstants.cs b/FFXIVClassic Map Server/ConfigConstants.cs index 39583def..1143c1f6 100644 --- a/FFXIVClassic Map Server/ConfigConstants.cs +++ b/FFXIVClassic Map Server/ConfigConstants.cs @@ -1,4 +1,4 @@ -using STA.Settings; +using FFXIVClassic.Common; using System; using System.IO; @@ -9,8 +9,9 @@ namespace FFXIVClassic_Map_Server public static String OPTIONS_BINDIP; public static String OPTIONS_PORT; public static bool OPTIONS_TIMESTAMP = false; - public static String OPTIONS_LOGPATH; + public static String OPTIONS_LOGPATH; public static String OPTIONS_LOGFILE; + public static String OPTIONS_LOGLEVEL; public static uint DATABASE_WORLDID; public static String DATABASE_HOST; @@ -36,10 +37,11 @@ namespace FFXIVClassic_Map_Server 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.OPTIONS_LOGPATH = configIni.GetValue("General", "log_path", "./logs/"); + ConfigConstants.OPTIONS_LOGPATH = configIni.GetValue("General", "log_path", "./logs/"); ConfigConstants.OPTIONS_LOGFILE = configIni.GetValue("General", "log_file_name", String.Format("map_{0}_{1}.log", OPTIONS_BINDIP, OPTIONS_PORT)); + ConfigConstants.OPTIONS_LOGLEVEL = configIni.GetValue("General", "log_level", "127"); - 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 b8a01d61..d022516c 100644 --- a/FFXIVClassic Map Server/Database.cs +++ b/FFXIVClassic Map Server/Database.cs @@ -3,7 +3,7 @@ using Dapper; using System; using System.Collections.Generic; using System.Linq; -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.utils; using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.packets.send.player; @@ -37,7 +37,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -59,7 +59,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -82,7 +82,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -138,7 +138,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -196,7 +196,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -232,7 +232,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -274,7 +274,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -308,7 +308,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -322,7 +322,7 @@ namespace FFXIVClassic_Map_Server 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(String.Format("Tried saving quest player didn't have: Player: {0:x}, QuestId: {0:x}", player.actorId, quest.actorId)); return; } else @@ -360,7 +360,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -790,7 +790,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -834,7 +834,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -872,7 +872,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -905,7 +905,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -976,7 +976,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -1032,7 +1032,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -1067,7 +1067,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -1107,7 +1107,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -1148,7 +1148,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -1188,7 +1188,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -1225,7 +1225,7 @@ namespace FFXIVClassic_Map_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; @@ -1234,7 +1234,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { diff --git a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj index fb1f492e..7fa0490e 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 @@ -83,12 +87,6 @@ - - - - - - diff --git a/FFXIVClassic Map Server/PacketProcessor.cs b/FFXIVClassic Map Server/PacketProcessor.cs index c3a74735..289bf720 100644 --- a/FFXIVClassic Map Server/PacketProcessor.cs +++ b/FFXIVClassic Map Server/PacketProcessor.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.packets; using System; using System.Collections.Generic; @@ -127,9 +127,9 @@ namespace FFXIVClassic_Map_Server 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(String.Format("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(String.Format("Got {0} connection for ActorID {1} @ {2}.", "chat", actorID, client.getAddress())); //Create player actor reply1.debugPrintPacket(); @@ -180,7 +180,7 @@ namespace FFXIVClassic_Map_Server //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)); + Program.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(); if (chatMessage.message.StartsWith("!")) @@ -238,7 +238,7 @@ namespace FFXIVClassic_Map_Server player.errorMessage += eventStart.error; if (eventStart.errorIndex == eventStart.errorNum - 1) - Log.Error("\n"+player.errorMessage); + Program.Log.Error("\n"+player.errorMessage); break; @@ -268,7 +268,7 @@ namespace FFXIVClassic_Map_Server 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(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))); break; } } @@ -276,7 +276,7 @@ namespace FFXIVClassic_Map_Server 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(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))); break; //Unknown, happens at npc spawn and cutscene play???? case 0x00CE: @@ -285,7 +285,7 @@ namespace FFXIVClassic_Map_Server case 0x012E: 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(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))); //Is it a static actor? If not look in the player's instance Actor updateOwnerActor = Server.getStaticActors(player.getActor().currentEventOwner); @@ -398,7 +398,7 @@ namespace FFXIVClassic_Map_Server //GM Ticket Sent case 0x01D5: GMSupportTicketPacket gmTicket = new GMSupportTicketPacket(subpacket.data); - Log.Info("Got GM Ticket: \n" + gmTicket.ticketTitle + "\n" + gmTicket.ticketBody); + 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 @@ -406,7 +406,7 @@ namespace FFXIVClassic_Map_Server 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)); + Program.Log.Debug(String.Format("Unknown command 0x{0:X} received.", subpacket.gameMessage.opcode)); subpacket.debugPrintSubPacket(); break; } diff --git a/FFXIVClassic Map Server/Program.cs b/FFXIVClassic Map Server/Program.cs index 4198a0d5..230ab811 100644 --- a/FFXIVClassic Map Server/Program.cs +++ b/FFXIVClassic Map Server/Program.cs @@ -1,14 +1,17 @@ using System; using System.Diagnostics; +using System.Threading; using MySql.Data.MySqlClient; using System.Reflection; using FFXIVClassic_Map_Server.dataobjects; -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; namespace FFXIVClassic_Map_Server { class Program { + public static Log Log; + static void Main(string[] args) { #if DEBUG @@ -21,14 +24,29 @@ namespace FFXIVClassic_Map_Server if (!ConfigConstants.load()) startServer = false; - Log.Info("---------FFXIV 1.0 Map Server---------"); + Log = new Log(ConfigConstants.OPTIONS_LOGPATH, ConfigConstants.OPTIONS_LOGFILE, Int32.Parse(ConfigConstants.OPTIONS_LOGLEVEL)); + + Thread thread = new Thread(() => + { + while (true) + { + if (Log.LogQueue.Count > 0) + { + var message = Program.Log.LogQueue.Dequeue(); + Program.Log.WriteMessage(message.Item1, message.Item2); + } + } + }); + thread.Start(); + + Program.Log.Info("---------FFXIV 1.0 Map Server---------"); Assembly assem = Assembly.GetExecutingAssembly(); Version vers = assem.GetName().Version; - Log.Info("Version: " + vers.ToString()); + Program.Log.Info("Version: " + vers.ToString()); //Test DB Connection - Log.Info("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 @@ -36,11 +54,11 @@ namespace FFXIVClassic_Map_Server conn.Open(); conn.Close(); - Log.Status("[OK]"); + Program.Log.Status("[OK]"); } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); startServer = false; } } @@ -48,9 +66,9 @@ namespace FFXIVClassic_Map_Server //Check World ID DBWorld thisWorld = Database.getServer(ConfigConstants.DATABASE_WORLDID); if (thisWorld != null) - Log.Info(String.Format("Successfully pulled world info from DB. Server name is {0}.", thisWorld.name)); + Program.Log.Info(String.Format("Successfully pulled world info from DB. Server name is {0}.", thisWorld.name)); else - Log.Info("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) @@ -66,7 +84,7 @@ namespace FFXIVClassic_Map_Server } } - Log.Info("Press any key to continue..."); + Program.Log.Info("Press any key to continue..."); Console.ReadKey(); } diff --git a/FFXIVClassic Map Server/Server.cs b/FFXIVClassic Map Server/Server.cs index 15d64ec4..597de32b 100644 --- a/FFXIVClassic Map Server/Server.cs +++ b/FFXIVClassic Map Server/Server.cs @@ -5,7 +5,7 @@ using System.Net.Sockets; using System.Threading; using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.packets; -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; @@ -39,7 +39,7 @@ namespace FFXIVClassic_Map_Server private void connectionHealth() { - Log.Info(String.Format("Connection Health thread started; it will run every {0} seconds.", HEALTH_THREAD_SLEEP_TIME)); + Program.Log.Info(String.Format("Connection Health thread started; it will run every {0} seconds.", HEALTH_THREAD_SLEEP_TIME)); while (!killHealthThread) { lock (mConnectedPlayerList) @@ -77,7 +77,7 @@ namespace FFXIVClassic_Map_Server mStaticActors = new StaticActors(STATIC_ACTORS_PATH); gamedataItems = Database.getItemGamedata(); - Log.Info(String.Format("Loaded {0} items.", gamedataItems.Count)); + Program.Log.Info(String.Format("Loaded {0} items.", gamedataItems.Count)); mWorldManager = new WorldManager(this); mWorldManager.LoadZoneList(); @@ -113,7 +113,7 @@ namespace FFXIVClassic_Map_Server } Console.ForegroundColor = ConsoleColor.White; - Log.Debug(String.Format("Map Server has started @ {0}:{1}", (mServerSocket.LocalEndPoint as IPEndPoint).Address, (mServerSocket.LocalEndPoint as IPEndPoint).Port)); + Program.Log.Debug(String.Format("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); @@ -150,7 +150,7 @@ namespace FFXIVClassic_Map_Server mConnectionList.Add(conn); } - Log.Status(String.Format("Connection {0}:{1} has connected.", (conn.socket.RemoteEndPoint as IPEndPoint).Address, (conn.socket.RemoteEndPoint as IPEndPoint).Port)); + Program.Log.Status(String.Format("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); //Queue the accept of the next incomming connection @@ -217,7 +217,7 @@ namespace FFXIVClassic_Map_Server mConnectionList.Remove(conn); } if (conn.connType == BasePacket.TYPE_ZONE) - Log.Status(String.Format("{0} has disconnected.", conn.owner == 0 ? conn.getAddress() : "User " + conn.owner)); + Program.Log.Status(String.Format("{0} has disconnected.", conn.owner == 0 ? conn.getAddress() : "User " + conn.owner)); return; } @@ -261,7 +261,7 @@ namespace FFXIVClassic_Map_Server } else { - Log.Status(String.Format("{0} has disconnected.", conn.owner == 0 ? conn.getAddress() : "User " + conn.owner)); + Program.Log.Status(String.Format("{0} has disconnected.", conn.owner == 0 ? conn.getAddress() : "User " + conn.owner)); lock (mConnectionList) { @@ -273,7 +273,7 @@ namespace FFXIVClassic_Map_Server { if (conn.socket != null) { - Log.Status(String.Format("{0} has disconnected.", conn.owner == 0 ? conn.getAddress() : "User " + conn.owner)); + Program.Log.Status(String.Format("{0} has disconnected.", conn.owner == 0 ? conn.getAddress() : "User " + conn.owner)); lock (mConnectionList) { diff --git a/FFXIVClassic Map Server/WorldManager.cs b/FFXIVClassic Map Server/WorldManager.cs index b6923ffc..14a72928 100644 --- a/FFXIVClassic Map Server/WorldManager.cs +++ b/FFXIVClassic Map Server/WorldManager.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.actors.area; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; @@ -67,7 +67,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally @@ -117,7 +117,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -125,7 +125,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() @@ -170,7 +170,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -178,7 +178,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 LoadNPCs() @@ -242,7 +242,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -250,7 +250,7 @@ namespace FFXIVClassic_Map_Server } } - Log.Info(String.Format("Loaded {0} npc(s).", count)); + Program.Log.Info(String.Format("Loaded {0} npc(s).", count)); } public void LoadNPCs(uint zoneId) @@ -315,7 +315,7 @@ namespace FFXIVClassic_Map_Server } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -323,7 +323,7 @@ namespace FFXIVClassic_Map_Server } } - Log.Info(String.Format("Loaded {0} npc(s).", count)); + Program.Log.Info(String.Format("Loaded {0} npc(s).", count)); } //Moves the actor to the new zone if exists. No packets are sent nor position changed. @@ -354,7 +354,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; } @@ -410,7 +410,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; } diff --git a/FFXIVClassic Map Server/actors/StaticActors.cs b/FFXIVClassic Map Server/actors/StaticActors.cs index c2393c3f..4a6e989c 100644 --- a/FFXIVClassic Map Server/actors/StaticActors.cs +++ b/FFXIVClassic Map Server/actors/StaticActors.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using System; using System.Collections.Generic; using System.IO; @@ -89,9 +89,9 @@ 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(String.Format("Loaded {0} static actors.", mStaticActors.Count())); return true; } diff --git a/FFXIVClassic Map Server/actors/chara/npc/Npc.cs b/FFXIVClassic Map Server/actors/chara/npc/Npc.cs index 5c417c46..c8297e2f 100644 --- a/FFXIVClassic Map Server/actors/chara/npc/Npc.cs +++ b/FFXIVClassic Map Server/actors/chara/npc/Npc.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.actors; using FFXIVClassic_Map_Server.Actors.Chara; @@ -238,7 +238,7 @@ namespace FFXIVClassic_Map_Server.Actors } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index 472745bf..ed8052d3 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.actors.chara.player; using FFXIVClassic_Map_Server.actors.director; @@ -642,7 +642,7 @@ namespace FFXIVClassic_Map_Server.Actors Database.savePlayerPlayTime(this); Database.savePlayerPosition(this); - Log.Info(String.Format("{0} has been logged out and saved.", this.customDisplayName)); + Program.Log.Info(String.Format("{0} has been logged out and saved.", this.customDisplayName)); } public Area getZone() diff --git a/FFXIVClassic Map Server/actors/quest/Quest.cs b/FFXIVClassic Map Server/actors/quest/Quest.cs index cd889312..26db6638 100644 --- a/FFXIVClassic Map Server/actors/quest/Quest.cs +++ b/FFXIVClassic Map Server/actors/quest/Quest.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using Newtonsoft.Json; using System; using System.Collections.Generic; @@ -68,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(String.Format("Tried to access bit flag >= 32 for questId: {0}", actorId)); return; } @@ -86,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(String.Format("Tried to access bit flag >= 32 for questId: {0}", actorId)); return false; } else diff --git a/FFXIVClassic Map Server/common/Bitfield.cs b/FFXIVClassic Map Server/common/Bitfield.cs deleted file mode 100644 index 61e56c5c..00000000 --- a/FFXIVClassic Map Server/common/Bitfield.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; - -namespace FFXIVClassic_Map_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 dffaf372..00000000 --- a/FFXIVClassic Map Server/common/Log.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace FFXIVClassic_Map_Server.common -{ - class Log - { - public enum LogType - { - Status = ConsoleColor.Green, - Sql = ConsoleColor.Magenta, - Info = ConsoleColor.White, - Debug = ConsoleColor.Cyan, - Error = ConsoleColor.Red - } - - public static void Status(String message) - { - LogFile(message, LogType.Status); - } - - public static void Sql(String message) - { - LogFile(message, LogType.Sql); - } - - public static void Info(String message) - { - LogFile(message, LogType.Info); - } - - public static void Debug(String message) - { -#if DEBUG - LogFile(message, LogType.Debug); -#endif - } - - public static void Error(String message) - { - LogFile(message, LogType.Error); - } - - private static void LogFile(String message, LogType type) - { - string timestamp = String.Format("[{0}]", DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")); - string messageType = String.Format("[{0}] ", type.ToString().ToUpper()); - - Console.Write(timestamp); - Console.ForegroundColor = (ConsoleColor)type; - Console.Write(messageType); - Console.ForegroundColor = ConsoleColor.Gray; - Console.WriteLine(message); - - StringBuilder sb = new StringBuilder(); - - sb.AppendLine(String.Format("{0}{1}{2}", timestamp, messageType, message)); - - if (!Directory.Exists(ConfigConstants.OPTIONS_LOGPATH)) - { - Directory.CreateDirectory(ConfigConstants.OPTIONS_LOGPATH); - } - - using (FileStream fs = new FileStream(Path.Combine(ConfigConstants.OPTIONS_LOGPATH, ConfigConstants.OPTIONS_LOGFILE), FileMode.Append, FileAccess.Write)) - using (StreamWriter sw = new StreamWriter(fs)) - { - sw.WriteLine(sb.ToString()); - } - } - } -} \ No newline at end of file diff --git a/FFXIVClassic Map Server/common/Utils.cs b/FFXIVClassic Map Server/common/Utils.cs deleted file mode 100644 index 8fc58dbb..00000000 --- a/FFXIVClassic Map Server/common/Utils.cs +++ /dev/null @@ -1,346 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace FFXIVClassic_Map_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, int offset = 0, int bytesPerLine = 16) - { - if (bytes == null) - { - return String.Empty; - } - - char[] hexChars = "0123456789ABCDEF".ToCharArray(); - - // 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++) - { - 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 sb.ToString(); - } - - 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; - - Log.Debug(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)); - } - - } -} diff --git a/FFXIVClassic Map Server/dataobjects/ConnectedPlayer.cs b/FFXIVClassic Map Server/dataobjects/ConnectedPlayer.cs index 70d14b39..a3438b22 100644 --- a/FFXIVClassic Map Server/dataobjects/ConnectedPlayer.cs +++ b/FFXIVClassic Map Server/dataobjects/ConnectedPlayer.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; diff --git a/FFXIVClassic Map Server/lua/LuaEngine.cs b/FFXIVClassic Map Server/lua/LuaEngine.cs index 1092abac..81a26540 100644 --- a/FFXIVClassic Map Server/lua/LuaEngine.cs +++ b/FFXIVClassic Map Server/lua/LuaEngine.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.packets; using FFXIVClassic_Map_Server.actors.director; using FFXIVClassic_Map_Server.Actors; @@ -217,7 +217,7 @@ namespace FFXIVClassic_Map_Server.lua } catch(SyntaxErrorException e) { - Log.Error(String.Format("LUAERROR: {0}.", e.DecoratedMessage)); + Program.Log.Error(String.Format("LUAERROR: {0}.", e.DecoratedMessage)); return null; } return script; diff --git a/FFXIVClassic Map Server/lua/LuaUtils.cs b/FFXIVClassic Map Server/lua/LuaUtils.cs index ec253535..341f69be 100644 --- a/FFXIVClassic Map Server/lua/LuaUtils.cs +++ b/FFXIVClassic Map Server/lua/LuaUtils.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; using MoonSharp.Interpreter; diff --git a/FFXIVClassic Map Server/packets/BasePacket.cs b/FFXIVClassic Map Server/packets/BasePacket.cs index 9897d2a7..4c25c9f2 100644 --- a/FFXIVClassic Map Server/packets/BasePacket.cs +++ b/FFXIVClassic Map Server/packets/BasePacket.cs @@ -2,8 +2,8 @@ using System.Collections.Generic; using System.Runtime.InteropServices; using System.Diagnostics; -using FFXIVClassic_Map_Server.common; using System.IO; +using FFXIVClassic.Common; namespace FFXIVClassic_Map_Server.packets { @@ -334,7 +334,7 @@ namespace FFXIVClassic_Map_Server.packets #if DEBUG Console.BackgroundColor = ConsoleColor.DarkYellow; - Log.Debug(String.Format("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()))); + Program.Log.Debug(String.Format("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()) { diff --git a/FFXIVClassic Map Server/packets/SubPacket.cs b/FFXIVClassic Map Server/packets/SubPacket.cs index 0fba8242..2e4530e1 100644 --- a/FFXIVClassic Map Server/packets/SubPacket.cs +++ b/FFXIVClassic Map Server/packets/SubPacket.cs @@ -1,6 +1,6 @@ using System; using System.Runtime.InteropServices; -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; namespace FFXIVClassic_Map_Server.packets { @@ -142,15 +142,15 @@ namespace FFXIVClassic_Map_Server.packets #if DEBUG Console.BackgroundColor = ConsoleColor.DarkRed; - Log.Debug(String.Format("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()))); + Program.Log.Debug(String.Format("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()))); if (header.type == 0x03) { - Log.Debug(String.Format("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE))); + Program.Log.Debug(String.Format("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE))); Console.BackgroundColor = ConsoleColor.DarkMagenta; - Log.Debug(String.Format("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE))); + Program.Log.Debug(String.Format("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE))); } Console.BackgroundColor = ConsoleColor.Black; diff --git a/FFXIVClassic Map Server/packets/receive/events/EventStartPacket.cs b/FFXIVClassic Map Server/packets/receive/events/EventStartPacket.cs index a9c8c042..a7e14a2a 100644 --- a/FFXIVClassic Map Server/packets/receive/events/EventStartPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/events/EventStartPacket.cs @@ -48,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; } diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs index bfa3d3f6..62d53728 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using System; using System.IO; using System.Linq; diff --git a/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs b/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs index fcfadc63..896225fc 100644 --- a/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs +++ b/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using System; using System.IO; using System.Linq; diff --git a/FFXIVClassic Map Server/packets/send/player/SetCompletedAchievementsPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetCompletedAchievementsPacket.cs index 824a067d..7a97fd27 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCompletedAchievementsPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCompletedAchievementsPacket.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using System.IO; namespace FFXIVClassic_Map_Server.packets.send.player @@ -36,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/SetCutsceneBookPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetCutsceneBookPacket.cs index f7afa871..fe45db0f 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCutsceneBookPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCutsceneBookPacket.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using System; using System.IO; using System.Text; @@ -81,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/utils/CharacterUtils.cs b/FFXIVClassic Map Server/utils/CharacterUtils.cs index 54c8551d..64b2306d 100644 --- a/FFXIVClassic Map Server/utils/CharacterUtils.cs +++ b/FFXIVClassic Map Server/utils/CharacterUtils.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using System; namespace FFXIVClassic_Map_Server.utils diff --git a/FFXIVClassic Map Server/utils/SQLGeneration.cs b/FFXIVClassic Map Server/utils/SQLGeneration.cs index 8acb47a9..d216d858 100644 --- a/FFXIVClassic Map Server/utils/SQLGeneration.cs +++ b/FFXIVClassic Map Server/utils/SQLGeneration.cs @@ -1,4 +1,4 @@ -using FFXIVClassic_Map_Server.common; +using FFXIVClassic.Common; using FFXIVClassic_Map_Server.packets.send.player; using MySql.Data.MySqlClient; using System; @@ -79,14 +79,14 @@ namespace FFXIVClassic_Map_Server.utils cmd.Parameters["@placename"].Value = placenames[pId]; - Log.Debug(String.Format("Wrote: {0}", id)); + Program.Log.Debug(String.Format("Wrote: {0}", id)); cmd.ExecuteNonQuery(); } } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -137,14 +137,14 @@ namespace FFXIVClassic_Map_Server.utils cmd.Parameters["@id"].Value = id; cmd.Parameters["@displayNameId"].Value = nameId; - Log.Debug(String.Format("Wrote: {0} : {1}", id, nameId)); + Program.Log.Debug(String.Format("Wrote: {0} : {1}", id, nameId)); cmd.ExecuteNonQuery(); } } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -203,14 +203,14 @@ namespace FFXIVClassic_Map_Server.utils cmd.Parameters["@id"].Value = id; - Log.Debug(String.Format("Wrote: {0}", id)); + Program.Log.Debug(String.Format("Wrote: {0}", id)); cmd.ExecuteNonQuery(); } } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -288,7 +288,7 @@ namespace FFXIVClassic_Map_Server.utils else if (id == 1500) otherId = SetCompletedAchievementsPacket.CATEGORY_GRAND_COMPANY; - Log.Debug(String.Format("Wrote: {0} : {1} : {2} : {3}", id, name, otherId, points)); + Program.Log.Debug(String.Format("Wrote: {0} : {1} : {2} : {3}", id, name, otherId, points)); cmd.Parameters["@id"].Value = id; cmd.Parameters["@name"].Value = name; cmd.Parameters["@otherId"].Value = otherId; @@ -300,7 +300,7 @@ namespace FFXIVClassic_Map_Server.utils } catch (MySqlException e) { - Log.Error(e.ToString()); + Program.Log.Error(e.ToString()); } finally { @@ -338,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]); - Log.Debug(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/lobby_config.ini b/data/lobby_config.ini index 4a9db1a8..fb02ff5b 100644 --- a/data/lobby_config.ini +++ b/data/lobby_config.ini @@ -1,7 +1,7 @@ [General] server_ip=127.0.0.1 showtimestamp = true - +log_level = 127 [Database] worldid=1 host=127.0.0.1 diff --git a/data/map_config.ini b/data/map_config.ini index 4a9db1a8..fb02ff5b 100644 --- a/data/map_config.ini +++ b/data/map_config.ini @@ -1,7 +1,7 @@ [General] server_ip=127.0.0.1 showtimestamp = true - +log_level = 127 [Database] worldid=1 host=127.0.0.1 From c5516511b0e52c9513215e6a5897370a7e617212 Mon Sep 17 00:00:00 2001 From: Tahir Akhlaq Date: Tue, 14 Jun 2016 03:00:57 +0100 Subject: [PATCH 07/13] cleaned up logging, added log_level param to enable/disable types of logging --- FFXIVClassic Common Class Lib/Log.cs | 49 ++++++++++++++-------------- FFXIVClassic Lobby Server/Program.cs | 2 -- data/lobby_config.ini | 19 ++++++++++- data/map_config.ini | 19 ++++++++++- 4 files changed, 60 insertions(+), 29 deletions(-) diff --git a/FFXIVClassic Common Class Lib/Log.cs b/FFXIVClassic Common Class Lib/Log.cs index 54ce9084..6c2f88e3 100644 --- a/FFXIVClassic Common Class Lib/Log.cs +++ b/FFXIVClassic Common Class Lib/Log.cs @@ -2,7 +2,7 @@ using System.IO; using System.Text; using System.Collections.Generic; -using System.Threading; +using System.Linq; namespace FFXIVClassic.Common { @@ -11,16 +11,17 @@ namespace FFXIVClassic.Common public string LogDirectory; public string LogFileName; public int EnabledLogTypes; - public Queue> LogQueue; + public Queue> LogQueue; public Log(string path, string file, int enabledtypes) { - LogQueue = new Queue>(); + LogQueue = new Queue>(); EnabledLogTypes = enabledtypes; LogDirectory = path; LogFileName = file; } + [Flags] public enum LogType { None = 0x000, @@ -33,6 +34,7 @@ namespace FFXIVClassic.Common Error = 0x040, } + [Flags] public enum LogColour { Status = ConsoleColor.Green, @@ -44,42 +46,42 @@ namespace FFXIVClassic.Common public void Status(String message, params object[] formatargs) { - if (formatargs.Length > 0) + if (formatargs.Any()) message = String.Format(message, formatargs); - QueueMessage(message, LogColour.Status); + QueueMessage(message, LogType.Status); } public void Sql(String message, params object[] formatargs) { - if (formatargs.Length > 0) + if (formatargs.Any()) message = String.Format(message, formatargs); - QueueMessage(message, LogColour.Sql); + QueueMessage(message, LogType.Sql); } public void Info(String message, params object[] formatargs) { - if (formatargs.Length > 0) + if (formatargs.Any()) message = String.Format(message, formatargs); - QueueMessage(message, LogColour.Info); + QueueMessage(message, LogType.Info); } public void Debug(String message, params object[] formatargs) { - if (formatargs.Length > 0) + if (formatargs.Any()) message = String.Format(message, formatargs); - QueueMessage(message, LogColour.Debug); + QueueMessage(message, LogType.Debug); } public void Error(String message, params object[] formatargs) { - if (formatargs.Length > 0) + if (formatargs.Any()) message = String.Format(message, formatargs); - QueueMessage(message, LogColour.Error); + QueueMessage(message, LogType.Error); } public void Packet(String message, params object[] formatargs) @@ -87,20 +89,17 @@ namespace FFXIVClassic.Common } - private void QueueMessage(String message, LogColour type) + private void QueueMessage(String message, LogType colour) { - LogQueue.Enqueue(Tuple.Create(message, type)); + LogQueue.Enqueue(Tuple.Create(message, colour)); } - public void WriteMessage(String message, LogColour type) - { - var canLog = false; - - try - { - canLog = ((EnabledLogTypes & (int)(Enum.Parse(typeof(LogType), type.ToString()))) != 0); - } - catch (Exception e) { } + public void WriteMessage(String message, LogType type) + { + if (((LogType)EnabledLogTypes & (LogType)type) == 0) + { + return; + } string timestamp = String.Format("[{0}]", DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")); string messageType = String.Format("[{0}] ", type.ToString().ToUpper()); @@ -108,7 +107,7 @@ namespace FFXIVClassic.Common if ((EnabledLogTypes & (int)LogType.Console) != 0) { Console.Write(timestamp); - Console.ForegroundColor = (ConsoleColor)type; + Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(LogColour),type.ToString()); Console.Write(messageType); Console.ForegroundColor = ConsoleColor.Gray; Console.WriteLine(message); diff --git a/FFXIVClassic Lobby Server/Program.cs b/FFXIVClassic Lobby Server/Program.cs index 37019433..9303f30f 100644 --- a/FFXIVClassic Lobby Server/Program.cs +++ b/FFXIVClassic Lobby Server/Program.cs @@ -71,8 +71,6 @@ namespace FFXIVClassic_Lobby_Server { Server server = new Server(); server.startServer(); - - while (true) Thread.Sleep(10000); } Program.Log.Info("Press any key to continue..."); diff --git a/data/lobby_config.ini b/data/lobby_config.ini index fb02ff5b..50a3f8bd 100644 --- a/data/lobby_config.ini +++ b/data/lobby_config.ini @@ -1,11 +1,28 @@ [General] server_ip=127.0.0.1 showtimestamp = true + +# log_level: add up values for types you want to enable +# then convert hex -> dec and set log_level = value +# 0x000 None, +# 0x001 Console, +# 0x002 File, +# 0x004 Status, +# 0x008 Sql, +# 0x010 Info, +# 0x020 Debug, +# 0x040 Error, + log_level = 127 + +#log_path = ./logs/ +#log_file = lobby.log + + [Database] worldid=1 host=127.0.0.1 port=3306 database=ffxiv_server username=root -password=root \ No newline at end of file +password=root diff --git a/data/map_config.ini b/data/map_config.ini index fb02ff5b..b5b8c243 100644 --- a/data/map_config.ini +++ b/data/map_config.ini @@ -1,11 +1,28 @@ [General] server_ip=127.0.0.1 showtimestamp = true + +# log_level: add up values for types you want to enable +# then convert hex -> dec and set log_level = value +# 0x000 None, +# 0x001 Console, +# 0x002 File, +# 0x004 Status, +# 0x008 Sql, +# 0x010 Info, +# 0x020 Debug, +# 0x040 Error, + log_level = 127 + +#log_path = ./logs/ +#log_file = map.log + + [Database] worldid=1 host=127.0.0.1 port=3306 database=ffxiv_server username=root -password=root \ No newline at end of file +password=root From ed0a0a58f7346b830bae36b263ef8d77cef1e905 Mon Sep 17 00:00:00 2001 From: Tahir Akhlaq Date: Tue, 14 Jun 2016 05:09:30 +0100 Subject: [PATCH 08/13] added nlog logging (todo: custom logger for packets) --- .../FFXIVClassic Common Class Lib.csproj | 4 +- FFXIVClassic Common Class Lib/Log.cs | 136 - FFXIVClassic Common Class Lib/packages.config | 4 + FFXIVClassic Lobby Server/ClientConnection.cs | 2 +- FFXIVClassic Lobby Server/ConfigConstants.cs | 8 +- FFXIVClassic Lobby Server/Database.cs | 8 +- .../FFXIVClassic Lobby Server.csproj | 10 + FFXIVClassic Lobby Server/NLog.config | 45 + FFXIVClassic Lobby Server/NLog.xsd | 2601 +++++++++++++++++ FFXIVClassic Lobby Server/PacketProcessor.cs | 32 +- FFXIVClassic Lobby Server/Program.cs | 23 +- FFXIVClassic Lobby Server/Server.cs | 13 +- FFXIVClassic Lobby Server/packages.config | 15 +- .../packets/BasePacket.cs | 2 +- .../packets/SubPacket.cs | 12 +- FFXIVClassic Map Server/ClientConnection.cs | 2 +- FFXIVClassic Map Server/CommandProcessor.cs | 8 +- FFXIVClassic Map Server/ConfigConstants.cs | 8 +- FFXIVClassic Map Server/Database.cs | 2 +- .../FFXIVClassic Map Server.csproj | 10 + FFXIVClassic Map Server/NLog.config | 45 + FFXIVClassic Map Server/NLog.xsd | 2601 +++++++++++++++++ FFXIVClassic Map Server/PacketProcessor.cs | 14 +- FFXIVClassic Map Server/Program.cs | 35 +- FFXIVClassic Map Server/Server.cs | 15 +- FFXIVClassic Map Server/WorldManager.cs | 8 +- .../actors/StaticActors.cs | 2 +- .../actors/chara/player/Player.cs | 2 +- FFXIVClassic Map Server/actors/quest/Quest.cs | 4 +- FFXIVClassic Map Server/lua/LuaEngine.cs | 2 +- FFXIVClassic Map Server/packages.config | 17 +- FFXIVClassic Map Server/packets/BasePacket.cs | 2 +- FFXIVClassic Map Server/packets/SubPacket.cs | 6 +- .../utils/SQLGeneration.cs | 8 +- data/lobby_config.ini | 17 - data/map_config.ini | 17 - 36 files changed, 5430 insertions(+), 310 deletions(-) delete mode 100644 FFXIVClassic Common Class Lib/Log.cs create mode 100644 FFXIVClassic Common Class Lib/packages.config create mode 100644 FFXIVClassic Lobby Server/NLog.config create mode 100644 FFXIVClassic Lobby Server/NLog.xsd create mode 100644 FFXIVClassic Map Server/NLog.config create mode 100644 FFXIVClassic Map Server/NLog.xsd diff --git a/FFXIVClassic Common Class Lib/FFXIVClassic Common Class Lib.csproj b/FFXIVClassic Common Class Lib/FFXIVClassic Common Class Lib.csproj index e096cebc..1adbda3e 100644 --- a/FFXIVClassic Common Class Lib/FFXIVClassic Common Class Lib.csproj +++ b/FFXIVClassic Common Class Lib/FFXIVClassic Common Class Lib.csproj @@ -48,11 +48,13 @@ - + + + + + + + + + + + + + + + + + + + + + + \ 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..175dd774 --- /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 4adc7d10..c7c723f9 100644 --- a/FFXIVClassic Lobby Server/PacketProcessor.cs +++ b/FFXIVClassic Lobby Server/PacketProcessor.cs @@ -53,7 +53,7 @@ namespace FFXIVClassic_Lobby_Server case 0x0F: //Mod Retainers default: - Program.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; } } @@ -67,7 +67,7 @@ namespace FFXIVClassic_Lobby_Server byte[] blowfishKey = GenerateKey(securityHandshake.ticketPhrase, securityHandshake.clientNumber); client.blowfish = new Blowfish(blowfishKey); - Program.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); @@ -81,8 +81,8 @@ namespace FFXIVClassic_Lobby_Server SessionPacket sessionPacket = new SessionPacket(packet.data); String clientVersion = sessionPacket.version; - Program.Log.Info(String.Format("Got acknowledgment for secure session.")); - Program.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); client.currentUserId = userId; @@ -96,11 +96,11 @@ namespace FFXIVClassic_Lobby_Server BasePacket.encryptPacket(client.blowfish, errorBasePacket); client.queuePacket(errorBasePacket); - Program.Log.Info(String.Format("Invalid session, kicking...")); + Program.Log.Info("Invalid session, kicking..."); return; } - Program.Log.Info(String.Format("USER ID: {0}", userId)); + Program.Log.Info("USER ID: {0}", userId); List accountList = new List(); Account defaultAccount = new Account(); @@ -115,7 +115,7 @@ namespace FFXIVClassic_Lobby_Server private void ProcessGetCharacters(ClientConnection client, SubPacket packet) { - Program.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); @@ -128,7 +128,7 @@ namespace FFXIVClassic_Lobby_Server { SelectCharacterPacket selectCharRequest = new SelectCharacterPacket(packet.data); - Program.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); World world = null; @@ -187,7 +187,7 @@ namespace FFXIVClassic_Lobby_Server BasePacket.encryptPacket(client.blowfish, basePacket); client.queuePacket(basePacket); - Program.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; } @@ -207,7 +207,7 @@ namespace FFXIVClassic_Lobby_Server BasePacket.encryptPacket(client.blowfish, basePacket); client.queuePacket(basePacket); - Program.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 @@ -219,7 +219,7 @@ namespace FFXIVClassic_Lobby_Server client.newCharaName = name; } - Program.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); @@ -272,7 +272,7 @@ namespace FFXIVClassic_Lobby_Server cid = client.newCharaCid; name = client.newCharaName; - Program.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 @@ -286,20 +286,20 @@ namespace FFXIVClassic_Lobby_Server BasePacket.encryptPacket(client.blowfish, basePacket); client.queuePacket(basePacket); - Program.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; } - Program.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); - Program.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 - Program.Log.Info(String.Format("User {0} => Retainer renamed \"{1}\"", client.currentUserId, name)); + Program.Log.Info("User {0} => Retainer renamed \"{1}\"", client.currentUserId, name); break; } diff --git a/FFXIVClassic Lobby Server/Program.cs b/FFXIVClassic Lobby Server/Program.cs index 9303f30f..72ac95fc 100644 --- a/FFXIVClassic Lobby Server/Program.cs +++ b/FFXIVClassic Lobby Server/Program.cs @@ -4,12 +4,12 @@ using System.Threading; using MySql.Data.MySqlClient; using System.Reflection; using FFXIVClassic.Common; - +using NLog; namespace FFXIVClassic_Lobby_Server { class Program { - public static Log Log; + public static Logger Log; static void Main(string[] args) { @@ -24,20 +24,7 @@ namespace FFXIVClassic_Lobby_Server if (!ConfigConstants.load()) startServer = false; - Log = new Log(ConfigConstants.OPTIONS_LOGPATH, ConfigConstants.OPTIONS_LOGFILE, Int32.Parse(ConfigConstants.OPTIONS_LOGLEVEL)); - - Thread thread = new Thread(() => - { - while (true) - { - if (Log.LogQueue.Count > 0) - { - var message = Program.Log.LogQueue.Dequeue(); - Program.Log.WriteMessage(message.Item1, message.Item2); - } - } - }); - thread.Start(); + Log = LogManager.GetCurrentClassLogger(); Program.Log.Info("--------FFXIV 1.0 Lobby Server--------"); @@ -47,7 +34,7 @@ namespace FFXIVClassic_Lobby_Server Program.Log.Info("Version: " + vers.ToString()); //Test DB Connection - Program.Log.Info(String.Format("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 @@ -55,7 +42,7 @@ namespace FFXIVClassic_Lobby_Server conn.Open(); conn.Close(); - Program.Log.Status("[OK]"); + Program.Log.Info("[OK]"); } catch (MySqlException e) { diff --git a/FFXIVClassic Lobby Server/Server.cs b/FFXIVClassic Lobby Server/Server.cs index 6bcc66a5..b6eeb7a7 100644 --- a/FFXIVClassic Lobby Server/Server.cs +++ b/FFXIVClassic Lobby Server/Server.cs @@ -5,6 +5,7 @@ using System.Net.Sockets; using System.Threading; using FFXIVClassic_Lobby_Server.packets; using FFXIVClassic.Common; +using NLog; namespace FFXIVClassic_Lobby_Server { @@ -25,7 +26,7 @@ namespace FFXIVClassic_Lobby_Server private void socketCleanup() { - Program.Log.Debug(String.Format("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; @@ -40,7 +41,7 @@ namespace FFXIVClassic_Lobby_Server } } if (count != 0) - Program.Log.Status(String.Format("{0} connections were cleaned up.", count)); + Program.Log.Info("{0} connections were cleaned up.", count); Thread.Sleep(CLEANUP_THREAD_SLEEP_TIME*1000); } } @@ -80,7 +81,7 @@ namespace FFXIVClassic_Lobby_Server } Console.ForegroundColor = ConsoleColor.White; - Program.Log.Debug(String.Format("Lobby Server has started @ {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(); @@ -105,7 +106,7 @@ namespace FFXIVClassic_Lobby_Server 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); - Program.Log.Status(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); } catch (SocketException) { @@ -179,7 +180,7 @@ namespace FFXIVClassic_Lobby_Server } else { - Program.Log.Status(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) { @@ -192,7 +193,7 @@ namespace FFXIVClassic_Lobby_Server { if (conn.socket != null) { - Program.Log.Status(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) { 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 956af8ee..587acd36 100644 --- a/FFXIVClassic Lobby Server/packets/BasePacket.cs +++ b/FFXIVClassic Lobby Server/packets/BasePacket.cs @@ -336,7 +336,7 @@ namespace FFXIVClassic_Lobby_Server.packets #if DEBUG Console.BackgroundColor = ConsoleColor.DarkYellow; - Program.Log.Debug(String.Format("IsAuth: {0} Size: 0x{1:X}, NumSubpackets: {2}{3}{4}", header.isAuthenticated, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()))); + 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()) { diff --git a/FFXIVClassic Lobby Server/packets/SubPacket.cs b/FFXIVClassic Lobby Server/packets/SubPacket.cs index c9263b19..bdf8e9e9 100644 --- a/FFXIVClassic Lobby Server/packets/SubPacket.cs +++ b/FFXIVClassic Lobby Server/packets/SubPacket.cs @@ -140,20 +140,14 @@ namespace FFXIVClassic_Lobby_Server.packets public void debugPrintSubPacket() { #if DEBUG - Console.BackgroundColor = ConsoleColor.DarkRed; - - Program.Log.Debug(String.Format("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()))); + Program.Log.Debug("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes())); if (header.type == 0x03) { - Program.Log.Debug(String.Format("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE))); + 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(String.Format("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE))); - - Console.BackgroundColor = ConsoleColor.Black; + Program.Log.Debug("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE)); #endif } diff --git a/FFXIVClassic Map Server/ClientConnection.cs b/FFXIVClassic Map Server/ClientConnection.cs index 67b2a04c..a06b5961 100644 --- a/FFXIVClassic Map Server/ClientConnection.cs +++ b/FFXIVClassic Map Server/ClientConnection.cs @@ -46,7 +46,7 @@ namespace FFXIVClassic_Map_Server socket.Send(packetBytes); } catch (Exception e) - { Program.Log.Error(String.Format("Weird case, socket was d/ced: {0}", e)); } + { Program.Log.Error("Weird case, socket was d/ced: {0}", e); } } } diff --git a/FFXIVClassic Map Server/CommandProcessor.cs b/FFXIVClassic Map Server/CommandProcessor.cs index 79db6b74..73bd6c5c 100644 --- a/FFXIVClassic Map Server/CommandProcessor.cs +++ b/FFXIVClassic Map Server/CommandProcessor.cs @@ -142,7 +142,7 @@ namespace FFXIVClassic_Map_Server foreach (KeyValuePair entry in mConnectedPlayerList) { 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)); + Program.Log.Info("{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); } } } @@ -607,7 +607,7 @@ namespace FFXIVClassic_Map_Server { if (client != null) { - Program.Log.Info(String.Format("Got request to reset zone: {0}", client.getActor().zoneId)); + Program.Log.Info("Got request to reset zone: {0}", client.getActor().zoneId); client.getActor().zone.clear(); client.getActor().zone.addActorToZone(client.getActor()); client.getActor().sendInstanceUpdate(); @@ -621,11 +621,11 @@ namespace FFXIVClassic_Map_Server #region !reloaditems else if (split[0].Equals("reloaditems")) { - Program.Log.Info(String.Format("Got request to reload item gamedata")); + Program.Log.Info("Got request to reload item gamedata"); sendMessage(client, "Reloading Item Gamedata..."); gamedataItems.Clear(); gamedataItems = Database.getItemGamedata(); - Program.Log.Info(String.Format("Loaded {0} items.", gamedataItems.Count)); + Program.Log.Info("Loaded {0} items.", gamedataItems.Count); sendMessage(client, String.Format("Loaded {0} items.", gamedataItems.Count)); return true; } diff --git a/FFXIVClassic Map Server/ConfigConstants.cs b/FFXIVClassic Map Server/ConfigConstants.cs index 1143c1f6..18248d2d 100644 --- a/FFXIVClassic Map Server/ConfigConstants.cs +++ b/FFXIVClassic Map Server/ConfigConstants.cs @@ -9,9 +9,6 @@ namespace FFXIVClassic_Map_Server public static String OPTIONS_BINDIP; public static String OPTIONS_PORT; public static bool OPTIONS_TIMESTAMP = false; - public static String OPTIONS_LOGPATH; - public static String OPTIONS_LOGFILE; - public static String OPTIONS_LOGLEVEL; public static uint DATABASE_WORLDID; public static String DATABASE_HOST; @@ -37,9 +34,6 @@ namespace FFXIVClassic_Map_Server 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.OPTIONS_LOGPATH = configIni.GetValue("General", "log_path", "./logs/"); - ConfigConstants.OPTIONS_LOGFILE = configIni.GetValue("General", "log_file_name", String.Format("map_{0}_{1}.log", OPTIONS_BINDIP, OPTIONS_PORT)); - ConfigConstants.OPTIONS_LOGLEVEL = configIni.GetValue("General", "log_level", "127"); ConfigConstants.DATABASE_WORLDID = UInt32.Parse(configIni.GetValue("Database", "worldid", "0")); ConfigConstants.DATABASE_HOST = configIni.GetValue("Database", "host", ""); @@ -49,7 +43,7 @@ namespace FFXIVClassic_Map_Server ConfigConstants.DATABASE_PASSWORD = configIni.GetValue("Database", "password", ""); Console.ForegroundColor = ConsoleColor.Green; - Console.WriteLine(String.Format("[OK]")); + Console.WriteLine("[OK]"); Console.ForegroundColor = ConsoleColor.Gray; return true; diff --git a/FFXIVClassic Map Server/Database.cs b/FFXIVClassic Map Server/Database.cs index d022516c..426beb47 100644 --- a/FFXIVClassic Map Server/Database.cs +++ b/FFXIVClassic Map Server/Database.cs @@ -322,7 +322,7 @@ namespace FFXIVClassic_Map_Server int slot = player.getQuestSlot(quest.actorId); if (slot == -1) { - Program.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 diff --git a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj index 7fa0490e..d6c8b577 100644 --- a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj +++ b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj @@ -57,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 + @@ -268,6 +272,12 @@ + + Always + + + Designer + diff --git a/FFXIVClassic Map Server/NLog.config b/FFXIVClassic Map Server/NLog.config new file mode 100644 index 00000000..1d8fb2f4 --- /dev/null +++ b/FFXIVClassic Map Server/NLog.config @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ 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..175dd774 --- /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 289bf720..734df6cd 100644 --- a/FFXIVClassic Map Server/PacketProcessor.cs +++ b/FFXIVClassic Map Server/PacketProcessor.cs @@ -127,9 +127,9 @@ namespace FFXIVClassic_Map_Server player.setConnection(packet.header.connectionType, client); if (packet.header.connectionType == BasePacket.TYPE_ZONE) - Program.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) - Program.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(); @@ -180,7 +180,7 @@ namespace FFXIVClassic_Map_Server //Chat Received case 0x0003: ChatMessagePacket chatMessage = new ChatMessagePacket(subpacket.data); - Program.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)); + 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("!")) @@ -268,7 +268,7 @@ namespace FFXIVClassic_Map_Server ownerActor = player.getActor().currentDirector; else { - Program.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; } } @@ -276,7 +276,7 @@ namespace FFXIVClassic_Map_Server LuaEngine.doActorOnEventStarted(player.getActor(), ownerActor, eventStart); - Program.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: @@ -285,7 +285,7 @@ namespace FFXIVClassic_Map_Server case 0x012E: subpacket.debugPrintSubPacket(); EventUpdatePacket eventUpdate = new EventUpdatePacket(subpacket.data); - Program.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); @@ -406,7 +406,7 @@ namespace FFXIVClassic_Map_Server client.queuePacket(BasePacket.createPacket(EndGMTicketPacket.buildPacket(player.actorID), true, false)); break; default: - Program.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); subpacket.debugPrintSubPacket(); break; } diff --git a/FFXIVClassic Map Server/Program.cs b/FFXIVClassic Map Server/Program.cs index 230ab811..80a3a6e4 100644 --- a/FFXIVClassic Map Server/Program.cs +++ b/FFXIVClassic Map Server/Program.cs @@ -1,16 +1,21 @@ using System; using System.Diagnostics; using System.Threading; +using System.Text; using MySql.Data.MySqlClient; using System.Reflection; using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic.Common; +using NLog; +using NLog.Targets; +using NLog.Targets.Wrappers; +using NLog.Config; namespace FFXIVClassic_Map_Server { class Program { - public static Log Log; + public static Logger Log; static void Main(string[] args) { @@ -22,22 +27,11 @@ namespace FFXIVClassic_Map_Server //Load Config if (!ConfigConstants.load()) - startServer = false; - - Log = new Log(ConfigConstants.OPTIONS_LOGPATH, ConfigConstants.OPTIONS_LOGFILE, Int32.Parse(ConfigConstants.OPTIONS_LOGLEVEL)); - - Thread thread = new Thread(() => - { - while (true) - { - if (Log.LogQueue.Count > 0) - { - var message = Program.Log.LogQueue.Dequeue(); - Program.Log.WriteMessage(message.Item1, message.Item2); - } - } - }); - thread.Start(); + startServer = false; + + // set up logging + + Log = LogManager.GetCurrentClassLogger(); Program.Log.Info("---------FFXIV 1.0 Map Server---------"); @@ -54,7 +48,7 @@ namespace FFXIVClassic_Map_Server conn.Open(); conn.Close(); - Program.Log.Status("[OK]"); + Program.Log.Info("[OK]"); } catch (MySqlException e) { @@ -66,7 +60,7 @@ namespace FFXIVClassic_Map_Server //Check World ID DBWorld thisWorld = Database.getServer(ConfigConstants.DATABASE_WORLDID); if (thisWorld != null) - Program.Log.Info(String.Format("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 Program.Log.Info("World info could not be retrieved from the DB. Welcome and MOTD will not be displayed."); @@ -77,9 +71,10 @@ namespace FFXIVClassic_Map_Server CommandProcessor cp = new CommandProcessor(server.getConnectedPlayerList()); server.startServer(); - while (true) + while (startServer) { String input = Console.ReadLine(); + Log.Info("[Console Input] " + input); cp.doCommand(input, null); } } diff --git a/FFXIVClassic Map Server/Server.cs b/FFXIVClassic Map Server/Server.cs index 597de32b..5bcac0de 100644 --- a/FFXIVClassic Map Server/Server.cs +++ b/FFXIVClassic Map Server/Server.cs @@ -6,6 +6,7 @@ using System.Threading; using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.packets; using FFXIVClassic.Common; +using NLog; using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.lua; @@ -39,7 +40,7 @@ namespace FFXIVClassic_Map_Server private void connectionHealth() { - Program.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) @@ -77,7 +78,7 @@ namespace FFXIVClassic_Map_Server mStaticActors = new StaticActors(STATIC_ACTORS_PATH); gamedataItems = Database.getItemGamedata(); - Program.Log.Info(String.Format("Loaded {0} items.", gamedataItems.Count)); + Program.Log.Info("Loaded {0} items.", gamedataItems.Count); mWorldManager = new WorldManager(this); mWorldManager.LoadZoneList(); @@ -113,7 +114,7 @@ namespace FFXIVClassic_Map_Server } Console.ForegroundColor = ConsoleColor.White; - Program.Log.Debug(String.Format("Map Server has started @ {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); @@ -150,7 +151,7 @@ namespace FFXIVClassic_Map_Server mConnectionList.Add(conn); } - Program.Log.Status(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); //Queue the accept of the next incomming connection @@ -217,7 +218,7 @@ namespace FFXIVClassic_Map_Server mConnectionList.Remove(conn); } if (conn.connType == BasePacket.TYPE_ZONE) - Program.Log.Status(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; } @@ -261,7 +262,7 @@ namespace FFXIVClassic_Map_Server } else { - Program.Log.Status(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) { @@ -273,7 +274,7 @@ namespace FFXIVClassic_Map_Server { if (conn.socket != null) { - Program.Log.Status(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) { diff --git a/FFXIVClassic Map Server/WorldManager.cs b/FFXIVClassic Map Server/WorldManager.cs index 14a72928..1353c440 100644 --- a/FFXIVClassic Map Server/WorldManager.cs +++ b/FFXIVClassic Map Server/WorldManager.cs @@ -125,7 +125,7 @@ namespace FFXIVClassic_Map_Server } } - Program.Log.Info(String.Format("Loaded {0} zones and {1} private areas.", count1, count2)); + Program.Log.Info("Loaded {0} zones and {1} private areas.", count1, count2); } public void LoadZoneEntranceList() @@ -178,7 +178,7 @@ namespace FFXIVClassic_Map_Server } } - Program.Log.Info(String.Format("Loaded {0} zone spawn locations.", count)); + Program.Log.Info("Loaded {0} zone spawn locations.", count); } public void LoadNPCs() @@ -250,7 +250,7 @@ namespace FFXIVClassic_Map_Server } } - Program.Log.Info(String.Format("Loaded {0} npc(s).", count)); + Program.Log.Info("Loaded {0} npc(s).", count); } public void LoadNPCs(uint zoneId) @@ -323,7 +323,7 @@ namespace FFXIVClassic_Map_Server } } - Program.Log.Info(String.Format("Loaded {0} npc(s).", count)); + Program.Log.Info("Loaded {0} npc(s).", count); } //Moves the actor to the new zone if exists. No packets are sent nor position changed. diff --git a/FFXIVClassic Map Server/actors/StaticActors.cs b/FFXIVClassic Map Server/actors/StaticActors.cs index 4a6e989c..8cee5340 100644 --- a/FFXIVClassic Map Server/actors/StaticActors.cs +++ b/FFXIVClassic Map Server/actors/StaticActors.cs @@ -91,7 +91,7 @@ namespace FFXIVClassic_Map_Server.Actors catch(FileNotFoundException e) { Program.Log.Error("Could not find staticactors file."); return false; } - Program.Log.Info(String.Format("Loaded {0} static actors.", mStaticActors.Count())); + Program.Log.Info("Loaded {0} static actors.", mStaticActors.Count()); return true; } diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index ed8052d3..340a4fb0 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -642,7 +642,7 @@ namespace FFXIVClassic_Map_Server.Actors Database.savePlayerPlayTime(this); Database.savePlayerPosition(this); - Program.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() diff --git a/FFXIVClassic Map Server/actors/quest/Quest.cs b/FFXIVClassic Map Server/actors/quest/Quest.cs index 26db6638..1a56a6ba 100644 --- a/FFXIVClassic Map Server/actors/quest/Quest.cs +++ b/FFXIVClassic Map Server/actors/quest/Quest.cs @@ -68,7 +68,7 @@ namespace FFXIVClassic_Map_Server.Actors { if (bitIndex >= 32) { - Program.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; } @@ -86,7 +86,7 @@ namespace FFXIVClassic_Map_Server.Actors { if (bitIndex >= 32) { - Program.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 diff --git a/FFXIVClassic Map Server/lua/LuaEngine.cs b/FFXIVClassic Map Server/lua/LuaEngine.cs index 81a26540..4e3e61d5 100644 --- a/FFXIVClassic Map Server/lua/LuaEngine.cs +++ b/FFXIVClassic Map Server/lua/LuaEngine.cs @@ -217,7 +217,7 @@ namespace FFXIVClassic_Map_Server.lua } catch(SyntaxErrorException e) { - Program.Log.Error(String.Format("LUAERROR: {0}.", e.DecoratedMessage)); + Program.Log.Error("LUAERROR: {0}.", e.DecoratedMessage); return null; } return script; 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 4c25c9f2..1def763e 100644 --- a/FFXIVClassic Map Server/packets/BasePacket.cs +++ b/FFXIVClassic Map Server/packets/BasePacket.cs @@ -334,7 +334,7 @@ namespace FFXIVClassic_Map_Server.packets #if DEBUG Console.BackgroundColor = ConsoleColor.DarkYellow; - Program.Log.Debug(String.Format("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()))); + 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()) { diff --git a/FFXIVClassic Map Server/packets/SubPacket.cs b/FFXIVClassic Map Server/packets/SubPacket.cs index 2e4530e1..da285388 100644 --- a/FFXIVClassic Map Server/packets/SubPacket.cs +++ b/FFXIVClassic Map Server/packets/SubPacket.cs @@ -142,15 +142,15 @@ namespace FFXIVClassic_Map_Server.packets #if DEBUG Console.BackgroundColor = ConsoleColor.DarkRed; - Program.Log.Debug(String.Format("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()))); + Program.Log.Debug("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes())); if (header.type == 0x03) { - Program.Log.Debug(String.Format("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE))); + 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(String.Format("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE))); + Program.Log.Debug("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE)); } Console.BackgroundColor = ConsoleColor.Black; diff --git a/FFXIVClassic Map Server/utils/SQLGeneration.cs b/FFXIVClassic Map Server/utils/SQLGeneration.cs index d216d858..c50f3650 100644 --- a/FFXIVClassic Map Server/utils/SQLGeneration.cs +++ b/FFXIVClassic Map Server/utils/SQLGeneration.cs @@ -79,7 +79,7 @@ namespace FFXIVClassic_Map_Server.utils cmd.Parameters["@placename"].Value = placenames[pId]; - Program.Log.Debug(String.Format("Wrote: {0}", id)); + Program.Log.Debug("Wrote: {0}", id); cmd.ExecuteNonQuery(); } @@ -137,7 +137,7 @@ namespace FFXIVClassic_Map_Server.utils cmd.Parameters["@id"].Value = id; cmd.Parameters["@displayNameId"].Value = nameId; - Program.Log.Debug(String.Format("Wrote: {0} : {1}", id, nameId)); + Program.Log.Debug("Wrote: {0} : {1}", id, nameId); cmd.ExecuteNonQuery(); } @@ -203,7 +203,7 @@ namespace FFXIVClassic_Map_Server.utils cmd.Parameters["@id"].Value = id; - Program.Log.Debug(String.Format("Wrote: {0}", id)); + Program.Log.Debug("Wrote: {0}", id); cmd.ExecuteNonQuery(); } @@ -288,7 +288,7 @@ namespace FFXIVClassic_Map_Server.utils else if (id == 1500) otherId = SetCompletedAchievementsPacket.CATEGORY_GRAND_COMPANY; - Program.Log.Debug(String.Format("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; diff --git a/data/lobby_config.ini b/data/lobby_config.ini index 50a3f8bd..f8aa676b 100644 --- a/data/lobby_config.ini +++ b/data/lobby_config.ini @@ -2,23 +2,6 @@ server_ip=127.0.0.1 showtimestamp = true -# log_level: add up values for types you want to enable -# then convert hex -> dec and set log_level = value -# 0x000 None, -# 0x001 Console, -# 0x002 File, -# 0x004 Status, -# 0x008 Sql, -# 0x010 Info, -# 0x020 Debug, -# 0x040 Error, - -log_level = 127 - -#log_path = ./logs/ -#log_file = lobby.log - - [Database] worldid=1 host=127.0.0.1 diff --git a/data/map_config.ini b/data/map_config.ini index b5b8c243..f8aa676b 100644 --- a/data/map_config.ini +++ b/data/map_config.ini @@ -2,23 +2,6 @@ server_ip=127.0.0.1 showtimestamp = true -# log_level: add up values for types you want to enable -# then convert hex -> dec and set log_level = value -# 0x000 None, -# 0x001 Console, -# 0x002 File, -# 0x004 Status, -# 0x008 Sql, -# 0x010 Info, -# 0x020 Debug, -# 0x040 Error, - -log_level = 127 - -#log_path = ./logs/ -#log_file = map.log - - [Database] worldid=1 host=127.0.0.1 From 24f55139dd00162acae01a656034424ec823e5d1 Mon Sep 17 00:00:00 2001 From: Tahir Akhlaq Date: Tue, 14 Jun 2016 21:29:10 +0100 Subject: [PATCH 09/13] mass replaced all methods to pascal case --- FFXIVClassic Common Class Lib/Blowfish.cs | 20 +- .../EfficientHashTables.cs | 14 +- FFXIVClassic Common Class Lib/STA_INIFile.cs | 8 +- FFXIVClassic Common Class Lib/Utils.cs | 6 +- FFXIVClassic Lobby Server/ClientConnection.cs | 20 +- FFXIVClassic Lobby Server/ConfigConstants.cs | 2 +- FFXIVClassic Lobby Server/Database.cs | 32 +- FFXIVClassic Lobby Server/PacketProcessor.cs | 162 ++--- FFXIVClassic Lobby Server/Program.cs | 4 +- FFXIVClassic Lobby Server/Server.cs | 38 +- .../dataobjects/CharaInfo.cs | 10 +- .../packets/BasePacket.cs | 36 +- .../packets/SubPacket.cs | 16 +- .../packets/send/AccountListPacket.cs | 2 +- .../packets/send/CharaCreatorPacket.cs | 2 +- .../packets/send/CharacterListPacket.cs | 10 +- .../packets/send/ErrorPacket.cs | 2 +- .../packets/send/ImportListPacket.cs | 2 +- .../packets/send/RetainerListPacket.cs | 2 +- .../send/SelectCharacterConfirmPacket.cs | 2 +- .../packets/send/WorldListPacket.cs | 2 +- FFXIVClassic Map Server/ClientConnection.cs | 24 +- FFXIVClassic Map Server/CommandProcessor.cs | 310 +++++----- FFXIVClassic Map Server/ConfigConstants.cs | 2 +- FFXIVClassic Map Server/Database.cs | 78 +-- FFXIVClassic Map Server/PacketProcessor.cs | 152 ++--- FFXIVClassic Map Server/Program.cs | 18 +- .../Properties/Resources.Designer.cs | 4 +- .../Properties/Resources.resx | 8 +- FFXIVClassic Map Server/Server.cs | 62 +- FFXIVClassic Map Server/WorldManager.cs | 70 +-- FFXIVClassic Map Server/actors/Actor.cs | 146 ++--- .../actors/StaticActors.cs | 12 +- FFXIVClassic Map Server/actors/area/Area.cs | 42 +- .../actors/area/PrivateArea.cs | 12 +- FFXIVClassic Map Server/actors/area/Zone.cs | 18 +- .../actors/chara/Character.cs | 20 +- .../actors/chara/npc/Npc.cs | 82 +-- .../actors/chara/player/Equipment.cs | 64 +- .../actors/chara/player/Inventory.cs | 214 +++---- .../actors/chara/player/Player.cs | 566 +++++++++--------- FFXIVClassic Map Server/actors/debug/Debug.cs | 24 +- .../actors/director/Director.cs | 34 +- .../actors/director/OpeningDirector.cs | 6 +- .../actors/director/WeatherDirector.cs | 24 +- .../director/quest/QuestDirectorMan0g001.cs | 6 +- .../director/quest/QuestDirectorMan0l001.cs | 6 +- .../director/quest/QuestDirectorMan0u001.cs | 6 +- FFXIVClassic Map Server/actors/quest/Quest.cs | 2 +- .../actors/world/WorldMaster.cs | 24 +- .../dataobjects/ConnectedPlayer.cs | 52 +- .../dataobjects/DBWorld.cs | 2 +- .../dataobjects/InventoryItem.cs | 4 +- FFXIVClassic Map Server/dataobjects/Item.cs | 6 +- .../dataobjects/SearchEntry.cs | 2 +- FFXIVClassic Map Server/lua/LuaEngine.cs | 74 +-- FFXIVClassic Map Server/lua/LuaEvent.cs | 4 +- FFXIVClassic Map Server/lua/LuaPlayer.cs | 34 +- FFXIVClassic Map Server/lua/LuaUtils.cs | 60 +- FFXIVClassic Map Server/packets/BasePacket.cs | 36 +- FFXIVClassic Map Server/packets/SubPacket.cs | 16 +- .../receive/events/EventStartPacket.cs | 2 +- .../receive/events/EventUpdatePacket.cs | 2 +- .../packets/send/Actor/ActorDoEmotePacket.cs | 4 +- .../send/Actor/ActorInstantiatePacket.cs | 4 +- .../send/Actor/ActorSpecialGraphicPacket.cs | 2 +- .../packets/send/Actor/AddActorPacket.cs | 2 +- .../packets/send/Actor/BattleAction1Packet.cs | 2 +- .../send/Actor/DeleteAllActorsPacket.cs | 2 +- .../send/Actor/MoveActorToPositionPacket.cs | 2 +- .../packets/send/Actor/RemoveActorPacket.cs | 2 +- .../send/Actor/SetActorAppearancePacket.cs | 2 +- .../packets/send/Actor/SetActorIconPacket.cs | 2 +- .../send/Actor/SetActorIdleAnimationPacket.cs | 2 +- .../send/Actor/SetActorIsZoningPacket.cs | 2 +- .../packets/send/Actor/SetActorNamePacket.cs | 2 +- .../send/Actor/SetActorPositionPacket.cs | 2 +- .../send/Actor/SetActorPropetyPacket.cs | 44 +- .../packets/send/Actor/SetActorSpeedPacket.cs | 4 +- .../packets/send/Actor/SetActorStatePacket.cs | 2 +- .../send/Actor/SetActorStatusAllPacket.cs | 2 +- .../send/Actor/SetActorStatusPacket.cs | 2 +- .../Actor/SetActorTargetAnimatedPacket.cs | 2 +- .../send/Actor/SetActorTargetPacket.cs | 2 +- .../packets/send/Actor/_0x132Packet.cs | 2 +- .../packets/send/Actor/_0xFPacket.cs | 2 +- .../Actor/battle/BattleActionX00Packet.cs | 2 +- .../Actor/battle/BattleActionX01Packet.cs | 2 +- .../Actor/battle/BattleActionX10Packet.cs | 2 +- .../Actor/battle/BattleActionX18Packet.cs | 2 +- .../Actor/events/SetEmoteEventCondition.cs | 2 +- .../send/Actor/events/SetEventStatus.cs | 2 +- .../Actor/events/SetNoticeEventCondition.cs | 2 +- .../events/SetPushEventConditionWithCircle.cs | 2 +- .../events/SetPushEventConditionWithFan.cs | 4 +- .../SetPushEventConditionWithTriggerBox.cs | 2 +- .../Actor/events/SetTalkEventCondition.cs | 2 +- .../Actor/inventory/EquipmentListX01Packet.cs | 2 +- .../Actor/inventory/EquipmentListX08Packet.cs | 2 +- .../Actor/inventory/EquipmentListX16Packet.cs | 2 +- .../Actor/inventory/EquipmentListX32Packet.cs | 2 +- .../Actor/inventory/EquipmentListX64Packet.cs | 2 +- .../inventory/InventoryBeginChangePacket.cs | 4 +- .../inventory/InventoryEndChangePacket.cs | 4 +- .../Actor/inventory/InventoryItemEndPacket.cs | 4 +- .../Actor/inventory/InventoryItemPacket.cs | 4 +- .../Actor/inventory/InventoryListX01Packet.cs | 8 +- .../Actor/inventory/InventoryListX08Packet.cs | 8 +- .../Actor/inventory/InventoryListX16Packet.cs | 8 +- .../Actor/inventory/InventoryListX32Packet.cs | 4 +- .../Actor/inventory/InventoryListX64Packet.cs | 4 +- .../inventory/InventoryRemoveX01Packet.cs | 2 +- .../inventory/InventoryRemoveX08Packet.cs | 2 +- .../inventory/InventoryRemoveX16Packet.cs | 2 +- .../inventory/InventoryRemoveX32Packet.cs | 2 +- .../inventory/InventoryRemoveX64Packet.cs | 2 +- .../inventory/InventorySetBeginPacket.cs | 6 +- .../Actor/inventory/InventorySetEndPacket.cs | 4 +- .../inventory/SetInitialEquipmentPacket.cs | 4 +- .../packets/send/GameMessagePacket.cs | 24 +- .../packets/send/LogoutPacket.cs | 2 +- .../packets/send/PongPacket.cs | 2 +- .../packets/send/QuitPacket.cs | 2 +- .../packets/send/SendMessagePacket.cs | 2 +- .../packets/send/SetMapPacket.cs | 2 +- .../packets/send/SetMusicPacket.cs | 2 +- .../packets/send/SetWeatherPacket.cs | 2 +- .../packets/send/_0x02Packet.cs | 2 +- .../packets/send/_0x10Packet.cs | 2 +- .../packets/send/_0xE2Packet.cs | 2 +- .../packets/send/events/EndEventPacket.cs | 2 +- .../packets/send/events/KickEventPacket.cs | 4 +- .../send/events/RunEventFunctionPacket.cs | 4 +- .../packets/send/list/ListBeginPacket.cs | 2 +- .../packets/send/list/ListEndPacket.cs | 2 +- .../packets/send/list/ListEntriesEndPacket.cs | 2 +- .../packets/send/list/ListStartPacket.cs | 4 +- .../packets/send/list/ListUtils.cs | 30 +- .../send/list/SetListPropertyPacket.cs | 36 +- .../packets/send/login/0x2Packet.cs | 2 +- .../packets/send/login/0x7ResponsePacket.cs | 4 +- .../send/player/AchievementEarnedPacket.cs | 2 +- .../send/player/InfoRequestResponsePacket.cs | 4 +- .../send/player/SendAchievementRatePacket.cs | 2 +- .../send/player/SetAchievementPointsPacket.cs | 2 +- .../send/player/SetChocoboNamePacket.cs | 2 +- .../player/SetCompletedAchievementsPacket.cs | 2 +- .../send/player/SetCurrentJobPacket.cs | 2 +- .../player/SetCurrentMountChocoboPacket.cs | 2 +- .../player/SetCurrentMountGoobbuePacket.cs | 2 +- .../send/player/SetCutsceneBookPacket.cs | 2 +- .../send/player/SetGrandCompanyPacket.cs | 2 +- .../send/player/SetHasChocoboPacket.cs | 2 +- .../send/player/SetHasGoobbuePacket.cs | 2 +- .../player/SetLatestAchievementsPacket.cs | 2 +- .../send/player/SetPlayerDreamPacket.cs | 2 +- .../send/player/SetPlayerTitlePacket.cs | 2 +- .../packets/send/player/_0x196Packet.cs | 2 +- .../CurrentRecruitmentDetailsPacket.cs | 2 +- .../send/recruitment/EndRecruitmentPacket.cs | 2 +- .../send/recruitment/RecruiterStatePacket.cs | 2 +- .../recruitment/StartRecruitingResponse.cs | 2 +- .../send/social/BlacklistAddedPacket.cs | 2 +- .../send/social/BlacklistRemovedPacket.cs | 2 +- .../packets/send/social/FriendStatusPacket.cs | 2 +- .../send/social/FriendlistAddedPacket.cs | 2 +- .../send/social/FriendlistRemovedPacket.cs | 2 +- .../send/social/SendBlacklistPacket.cs | 2 +- .../send/social/SendFriendlistPacket.cs | 2 +- .../send/supportdesk/EndGMTicketPacket.cs | 2 +- .../send/supportdesk/FaqBodyResponsePacket.cs | 2 +- .../send/supportdesk/FaqListResponsePacket.cs | 2 +- .../send/supportdesk/GMTicketPacket.cs | 2 +- .../supportdesk/GMTicketSentResponsePacket.cs | 2 +- .../supportdesk/IssueListResponsePacket.cs | 2 +- .../send/supportdesk/StartGMTicketPacket.cs | 2 +- .../utils/ActorPropertyPacketUtil.cs | 24 +- .../utils/CharacterUtils.cs | 4 +- .../utils/SQLGeneration.cs | 12 +- 179 files changed, 1585 insertions(+), 1585 deletions(-) diff --git a/FFXIVClassic Common Class Lib/Blowfish.cs b/FFXIVClassic Common Class Lib/Blowfish.cs index f05afbea..e42fd062 100644 --- a/FFXIVClassic Common Class Lib/Blowfish.cs +++ b/FFXIVClassic Common Class Lib/Blowfish.cs @@ -283,7 +283,7 @@ namespace FFXIVClassic.Common public Blowfish(byte[] key) { - initializeBlowfish(key); + InitializeBlowfish(key); } public void Encipher(byte[] data, int offset, int length) @@ -295,7 +295,7 @@ namespace FFXIVClassic.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); @@ -316,7 +316,7 @@ namespace FFXIVClassic.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); @@ -351,7 +351,7 @@ namespace FFXIVClassic.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; @@ -374,7 +374,7 @@ namespace FFXIVClassic.Common } - private void blowfish_decipher(ref UInt32 xl, ref UInt32 xr) + private void BlowfishDecipher(ref UInt32 xl, ref UInt32 xr) { UInt32 temp; Int32 i; @@ -383,13 +383,13 @@ namespace FFXIVClassic.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; @@ -399,7 +399,7 @@ namespace FFXIVClassic.Common } - private int initializeBlowfish(byte [] key) + private int InitializeBlowfish(byte [] key) { Int16 i; Int16 j; @@ -433,7 +433,7 @@ namespace FFXIVClassic.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; @@ -443,7 +443,7 @@ namespace FFXIVClassic.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 Common Class Lib/EfficientHashTables.cs b/FFXIVClassic Common Class Lib/EfficientHashTables.cs index 92744b96..d96f2303 100644 --- a/FFXIVClassic Common Class Lib/EfficientHashTables.cs +++ b/FFXIVClassic Common Class Lib/EfficientHashTables.cs @@ -25,14 +25,14 @@ namespace FFXIVClassic.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]; @@ -53,7 +53,7 @@ namespace FFXIVClassic.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) @@ -64,7 +64,7 @@ namespace FFXIVClassic.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) @@ -104,14 +104,14 @@ namespace FFXIVClassic.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]; @@ -132,7 +132,7 @@ namespace FFXIVClassic.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/STA_INIFile.cs b/FFXIVClassic Common Class Lib/STA_INIFile.cs index e8669eca..08fe7e2d 100644 --- a/FFXIVClassic Common Class Lib/STA_INIFile.cs +++ b/FFXIVClassic Common Class Lib/STA_INIFile.cs @@ -198,7 +198,7 @@ namespace FFXIVClassic.Common // *** 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; @@ -379,7 +379,7 @@ namespace FFXIVClassic.Common 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); } @@ -473,7 +473,7 @@ namespace FFXIVClassic.Common 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; @@ -518,7 +518,7 @@ namespace FFXIVClassic.Common 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 Common Class Lib/Utils.cs b/FFXIVClassic Common Class Lib/Utils.cs index 728d5d96..f1de60b3 100644 --- a/FFXIVClassic Common Class Lib/Utils.cs +++ b/FFXIVClassic Common Class Lib/Utils.cs @@ -107,7 +107,7 @@ namespace FFXIVClassic.Common return unixTimeStamp; } - public static ulong swapEndian(ulong input) + public static ulong SwapEndian(ulong input) { return ((0x00000000000000FF) & (input >> 56) | (0x000000000000FF00) & (input >> 40) | @@ -119,7 +119,7 @@ namespace FFXIVClassic.Common (0xFF00000000000000) & (input << 56)); } - public static uint swapEndian(uint input) + public static uint SwapEndian(uint input) { return ((input >> 24) & 0xff) | ((input << 8) & 0xff0000) | @@ -127,7 +127,7 @@ namespace FFXIVClassic.Common ((input << 24) & 0xff000000); } - public static int swapEndian(int input) + public static int SwapEndian(int input) { uint inputAsUint = (uint)input; diff --git a/FFXIVClassic Lobby Server/ClientConnection.cs b/FFXIVClassic Lobby Server/ClientConnection.cs index 01a91863..02747492 100644 --- a/FFXIVClassic Lobby Server/ClientConnection.cs +++ b/FFXIVClassic Lobby Server/ClientConnection.cs @@ -15,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 @@ -31,7 +31,7 @@ namespace FFXIVClassic_Lobby_Server public ushort newCharaWorldId; - public void processIncoming(int bytesIn) + public void ProcessIncoming(int bytesIn) { if (bytesIn == 0) return; @@ -39,20 +39,20 @@ 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 { @@ -63,12 +63,12 @@ namespace FFXIVClassic_Lobby_Server } } - 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 7a4c2d48..5f625a60 100644 --- a/FFXIVClassic Lobby Server/ConfigConstants.cs +++ b/FFXIVClassic Lobby Server/ConfigConstants.cs @@ -16,7 +16,7 @@ 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 lobby_config.ini file... "); diff --git a/FFXIVClassic Lobby Server/Database.cs b/FFXIVClassic Lobby Server/Database.cs index 7dce90c7..de0ff845 100644 --- a/FFXIVClassic Lobby Server/Database.cs +++ b/FFXIVClassic Lobby Server/Database.cs @@ -13,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))) @@ -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))) @@ -100,13 +100,13 @@ namespace FFXIVClassic_Lobby_Server conn.Dispose(); } - Program.Log.Debug("[SQL] 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))) @@ -245,7 +245,7 @@ namespace FFXIVClassic_Lobby_Server 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))) { @@ -267,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); @@ -292,7 +292,7 @@ namespace FFXIVClassic_Lobby_Server } } - 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))) { @@ -323,7 +323,7 @@ namespace FFXIVClassic_Lobby_Server 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))) { @@ -345,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))) { @@ -369,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))) @@ -384,7 +384,7 @@ namespace FFXIVClassic_Lobby_Server serverId, name, isLegacy, - doRename, + DoRename, currentZoneId, guardian, birthMonth, @@ -427,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))) @@ -441,7 +441,7 @@ namespace FFXIVClassic_Lobby_Server serverId, name, isLegacy, - doRename, + DoRename, currentZoneId, guardian, birthMonth, @@ -482,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))) { @@ -506,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))) { @@ -528,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))) { diff --git a/FFXIVClassic Lobby Server/PacketProcessor.cs b/FFXIVClassic Lobby Server/PacketProcessor.cs index c7c723f9..e0255986 100644 --- a/FFXIVClassic Lobby Server/PacketProcessor.cs +++ b/FFXIVClassic Lobby Server/PacketProcessor.cs @@ -14,25 +14,25 @@ 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) { @@ -71,30 +71,30 @@ namespace FFXIVClassic_Lobby_Server //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; 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); Program.Log.Info("Invalid session, kicking..."); return; @@ -108,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) { - Program.Log.Info("{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); } @@ -128,29 +128,29 @@ namespace FFXIVClassic_Lobby_Server { SelectCharacterPacket selectCharRequest = new SelectCharacterPacket(packet.data); - Program.Log.Info("{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) @@ -169,23 +169,23 @@ namespace FFXIVClassic_Lobby_Server //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); Program.Log.Info("User {0} => Error; invalid server id: \"{1}\"", client.currentUserId, worldId); return; @@ -197,15 +197,15 @@ 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); Program.Log.Info("User {0} => Error; name taken: \"{1}\"", client.currentUserId, charaReq.characterName); return; @@ -222,7 +222,7 @@ namespace FFXIVClassic_Lobby_Server 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); @@ -266,25 +266,25 @@ 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; - Program.Log.Info("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); Program.Log.Info("User {0} => Error; name taken: \"{1}\"", client.currentUserId, charaReq.characterName); return; @@ -293,7 +293,7 @@ namespace FFXIVClassic_Lobby_Server 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); Program.Log.Info("User {0} => Character deleted \"{1}\"", client.currentUserId, name); break; @@ -304,58 +304,58 @@ namespace FFXIVClassic_Lobby_Server } 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) 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 72ac95fc..df2c4771 100644 --- a/FFXIVClassic Lobby Server/Program.cs +++ b/FFXIVClassic Lobby Server/Program.cs @@ -21,7 +21,7 @@ namespace FFXIVClassic_Lobby_Server bool startServer = true; //Load Config - if (!ConfigConstants.load()) + if (!ConfigConstants.Load()) startServer = false; Log = LogManager.GetCurrentClassLogger(); @@ -57,7 +57,7 @@ namespace FFXIVClassic_Lobby_Server if (startServer) { Server server = new Server(); - server.startServer(); + server.StartServer(); } Program.Log.Info("Press any key to continue..."); diff --git a/FFXIVClassic Lobby Server/Server.cs b/FFXIVClassic Lobby Server/Server.cs index b6eeb7a7..20b08be8 100644 --- a/FFXIVClassic Lobby Server/Server.cs +++ b/FFXIVClassic Lobby Server/Server.cs @@ -24,7 +24,7 @@ namespace FFXIVClassic_Lobby_Server private Thread cleanupThread; private bool killCleanupThread = false; - private void socketCleanup() + private void SocketCleanup() { Program.Log.Info("Cleanup thread started; it will run every {0} seconds.", CLEANUP_THREAD_SLEEP_TIME); while (!killCleanupThread) @@ -47,7 +47,7 @@ namespace FFXIVClassic_Lobby_Server } #region Socket Handling - public bool startServer() + public bool StartServer() { //cleanupThread = new Thread(new ThreadStart(socketCleanup)); //cleanupThread.Name = "LobbyThread:Cleanup"; @@ -60,7 +60,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 { @@ -73,7 +73,7 @@ namespace FFXIVClassic_Lobby_Server } try { - mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket); + mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket); } catch (Exception e) { @@ -89,7 +89,7 @@ namespace FFXIVClassic_Lobby_Server return true; } - private void acceptCallback(IAsyncResult result) + private void AcceptCallback(IAsyncResult result) { ClientConnection conn = null; try @@ -103,9 +103,9 @@ 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); + 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) @@ -118,7 +118,7 @@ namespace FFXIVClassic_Lobby_Server mConnectionList.Remove(conn); } } - mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket); + mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket); } catch (Exception) { @@ -130,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; @@ -151,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 @@ -169,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 { - Program.Log.Info("{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); } } @@ -193,7 +193,7 @@ namespace FFXIVClassic_Lobby_Server { if (conn.socket != null) { - Program.Log.Info("{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) { @@ -209,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/dataobjects/CharaInfo.cs b/FFXIVClassic Lobby Server/dataobjects/CharaInfo.cs index 835436ee..857131b5 100644 --- a/FFXIVClassic Lobby Server/dataobjects/CharaInfo.cs +++ b/FFXIVClassic Lobby Server/dataobjects/CharaInfo.cs @@ -56,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('_', '/')); @@ -116,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; @@ -146,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); @@ -223,7 +223,7 @@ 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"); @@ -232,7 +232,7 @@ namespace FFXIVClassic_Lobby_Server.dataobjects 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/packets/BasePacket.cs b/FFXIVClassic Lobby Server/packets/BasePacket.cs index 587acd36..2ac99336 100644 --- a/FFXIVClassic Lobby Server/packets/BasePacket.cs +++ b/FFXIVClassic Lobby Server/packets/BasePacket.cs @@ -103,7 +103,7 @@ namespace FFXIVClassic_Lobby_Server.packets this.data = data; } - public List getSubpackets() + public List GetSubpackets() { List subpackets = new List(header.numSubpackets); @@ -115,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) @@ -129,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]; @@ -141,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)) { @@ -173,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)) { @@ -196,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(); @@ -218,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; } @@ -229,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(); @@ -247,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); @@ -256,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); @@ -277,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; @@ -304,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; @@ -331,16 +331,16 @@ namespace FFXIVClassic_Lobby_Server.packets } #endregion - public void debugPrintPacket() + public void DebugPrintPacket() { #if DEBUG Console.BackgroundColor = ConsoleColor.DarkYellow; - Program.Log.Debug("IsAuth: {0} Size: 0x{1:X}, NumSubpackets: {2}{3}{4}", header.isAuthenticated, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes())); + 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()) + foreach (SubPacket sub in GetSubpackets()) { - sub.debugPrintSubPacket(); + sub.DebugPrintSubPacket(); } Console.BackgroundColor = ConsoleColor.Black; diff --git a/FFXIVClassic Lobby Server/packets/SubPacket.cs b/FFXIVClassic Lobby Server/packets/SubPacket.cs index bdf8e9e9..f30393b8 100644 --- a/FFXIVClassic Lobby Server/packets/SubPacket.cs +++ b/FFXIVClassic Lobby Server/packets/SubPacket.cs @@ -101,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]; @@ -113,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]; @@ -125,26 +125,26 @@ 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 - Program.Log.Debug("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes())); + Program.Log.Debug("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(GetHeaderBytes())); if (header.type == 0x03) { - Program.Log.Debug("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE)); + 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)); diff --git a/FFXIVClassic Lobby Server/packets/send/AccountListPacket.cs b/FFXIVClassic Lobby Server/packets/send/AccountListPacket.cs index ab68dc7e..9bedc3d3 100644 --- a/FFXIVClassic Lobby Server/packets/send/AccountListPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/AccountListPacket.cs @@ -20,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 b3f1385e..d5b9289b 100644 --- a/FFXIVClassic Lobby Server/packets/send/CharaCreatorPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/CharaCreatorPacket.cs @@ -36,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 c8e77f39..2ad1b0b9 100644 --- a/FFXIVClassic Lobby Server/packets/send/CharacterListPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/CharacterListPacket.cs @@ -20,7 +20,7 @@ namespace FFXIVClassic_Lobby_Server.packets this.characterList = characterList; } - public List buildPackets() + public List BuildPackets() { List subPackets = new List(); @@ -34,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) { @@ -53,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); //??? @@ -74,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 25c24049..0e707e62 100644 --- a/FFXIVClassic Lobby Server/packets/send/ErrorPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/ErrorPacket.cs @@ -23,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 af029d75..80bce85c 100644 --- a/FFXIVClassic Lobby Server/packets/send/ImportListPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/ImportListPacket.cs @@ -19,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 f296c072..c12c245b 100644 --- a/FFXIVClassic Lobby Server/packets/send/RetainerListPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/RetainerListPacket.cs @@ -19,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 cc660d2f..352c11e3 100644 --- a/FFXIVClassic Lobby Server/packets/send/SelectCharacterConfirmPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/SelectCharacterConfirmPacket.cs @@ -26,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 c352fa12..06866bfc 100644 --- a/FFXIVClassic Lobby Server/packets/send/WorldListPacket.cs +++ b/FFXIVClassic Lobby Server/packets/send/WorldListPacket.cs @@ -20,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 Map Server/ClientConnection.cs b/FFXIVClassic Map Server/ClientConnection.cs index a06b5961..8592d78c 100644 --- a/FFXIVClassic Map Server/ClientConnection.cs +++ b/FFXIVClassic Map Server/ClientConnection.cs @@ -13,33 +13,33 @@ namespace FFXIVClassic_Map_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 { @@ -50,17 +50,17 @@ namespace FFXIVClassic_Map_Server } } - 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 73bd6c5c..50b1b945 100644 --- a/FFXIVClassic Map Server/CommandProcessor.cs +++ b/FFXIVClassic Map Server/CommandProcessor.cs @@ -26,45 +26,45 @@ namespace FFXIVClassic_Map_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; @@ -74,13 +74,13 @@ namespace FFXIVClassic_Map_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); } } } @@ -90,228 +90,228 @@ namespace FFXIVClassic_Map_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)); - Program.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(); + Player p = entry.Value.GetActor(); Program.Log.Info("{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; @@ -331,7 +331,7 @@ namespace FFXIVClassic_Map_Server catch{return;} #endregion - doWarp(client, zoneId); + DoWarp(client, zoneId); } else if (split.Length == 4) { @@ -343,7 +343,7 @@ namespace FFXIVClassic_Map_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(); @@ -355,7 +355,7 @@ namespace FFXIVClassic_Map_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(); @@ -367,7 +367,7 @@ namespace FFXIVClassic_Map_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(); @@ -381,12 +381,12 @@ namespace FFXIVClassic_Map_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) { @@ -411,8 +411,8 @@ namespace FFXIVClassic_Map_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) { @@ -439,20 +439,20 @@ namespace FFXIVClassic_Map_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 } - private void doWeather(ConnectedPlayer client, string weatherID, string value) + private void DoWeather(ConnectedPlayer client, string weatherID, string value) { ushort weather = Convert.ToUInt16(weatherID); 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)); } /* @@ -461,15 +461,15 @@ namespace FFXIVClassic_Map_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); } } } @@ -482,13 +482,13 @@ namespace FFXIVClassic_Map_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("!")) @@ -499,7 +499,7 @@ namespace FFXIVClassic_Map_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) { @@ -508,41 +508,41 @@ namespace FFXIVClassic_Map_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); + SendMessage(client, Resources.CPgivekeyitem); else if (split[1].Equals("removecurrency")) - sendMessage(client, Resources.CPremovecurrency); + SendMessage(client, Resources.CPremovecurrency); else if (split[1].Equals("removeitem")) - sendMessage(client, Resources.CPremoveitem); + SendMessage(client, Resources.CPremoveitem); else if (split[1].Equals("removekeyitem")) - sendMessage(client, Resources.CPremovekeyitem); + 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) @@ -550,7 +550,7 @@ namespace FFXIVClassic_Map_Server if(split[1].Equals("test")) { if (split[2].Equals("weather")) - sendMessage(client, Resources.CPtestweather); + SendMessage(client, Resources.CPtestweather); } } @@ -564,7 +564,7 @@ namespace FFXIVClassic_Map_Server if (split.Length == 1) { // catch invalid commands - sendMessage(client, Resources.CPhelp); + SendMessage(client, Resources.CPhelp); } else if (split.Length >= 2) { @@ -573,12 +573,12 @@ namespace FFXIVClassic_Map_Server { try { - doWeather(client, split[2], split[3]); + DoWeather(client, split[2], split[3]); return true; } catch (Exception e) { - Program.Log.Error("Could not change weather: " + e); + Program.Log.Error("Could not Change weather: " + e); } } #endregion @@ -592,7 +592,7 @@ namespace FFXIVClassic_Map_Server { try { - printPos(client); + PrintPos(client); return true; } catch (Exception e) @@ -607,13 +607,13 @@ namespace FFXIVClassic_Map_Server { if (client != null) { - Program.Log.Info("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("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 @@ -622,11 +622,11 @@ namespace FFXIVClassic_Map_Server else if (split[0].Equals("reloaditems")) { Program.Log.Info("Got request to reload item gamedata"); - sendMessage(client, "Reloading Item Gamedata..."); + SendMessage(client, "Reloading Item Gamedata..."); gamedataItems.Clear(); - gamedataItems = Database.getItemGamedata(); + gamedataItems = Database.GetItemGamedata(); Program.Log.Info("Loaded {0} items.", gamedataItems.Count); - sendMessage(client, String.Format("Loaded {0} items.", gamedataItems.Count)); + SendMessage(client, String.Format("Loaded {0} items.", gamedataItems.Count)); return true; } #endregion @@ -639,7 +639,7 @@ namespace FFXIVClassic_Map_Server try { - sendPacket(client, "./packets/" + split[1]); + SendPacket(client, "./packets/" + split[1]); return true; } catch (Exception e) @@ -655,7 +655,7 @@ namespace FFXIVClassic_Map_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) @@ -671,11 +671,11 @@ namespace FFXIVClassic_Map_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) @@ -694,11 +694,11 @@ namespace FFXIVClassic_Map_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) @@ -714,7 +714,7 @@ namespace FFXIVClassic_Map_Server try { if (split.Length == 2) - giveKeyItem(client, UInt32.Parse(split[1])); + GiveKeyItem(client, UInt32.Parse(split[1])); } catch (Exception e) { @@ -732,7 +732,7 @@ namespace FFXIVClassic_Map_Server try { if (split.Length == 2) - removeKeyItem(client, UInt32.Parse(split[1])); + RemoveKeyItem(client, UInt32.Parse(split[1])); return true; } catch (Exception e) @@ -748,9 +748,9 @@ namespace FFXIVClassic_Map_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) { @@ -768,9 +768,9 @@ namespace FFXIVClassic_Map_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) @@ -788,12 +788,12 @@ namespace FFXIVClassic_Map_Server try { - doMusic(client, split[1]); + DoMusic(client, split[1]); return true; } catch (Exception e) { - Program.Log.Error("Could not change music: " + e); + Program.Log.Error("Could not Change music: " + e); } } #endregion @@ -801,7 +801,7 @@ namespace FFXIVClassic_Map_Server #region !warp else if (split[0].Equals("warp")) { - parseWarp(client, split); + ParseWarp(client, split); return true; } #endregion @@ -811,7 +811,7 @@ namespace FFXIVClassic_Map_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; } @@ -822,7 +822,7 @@ namespace FFXIVClassic_Map_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 18248d2d..1509ee58 100644 --- a/FFXIVClassic Map Server/ConfigConstants.cs +++ b/FFXIVClassic Map Server/ConfigConstants.cs @@ -17,7 +17,7 @@ namespace FFXIVClassic_Map_Server public static String DATABASE_USERNAME; public static String DATABASE_PASSWORD; - public static bool load() + public static bool Load() { Console.Write("Loading map_config.ini file... "); diff --git a/FFXIVClassic Map Server/Database.cs b/FFXIVClassic Map Server/Database.cs index 426beb47..920be9cb 100644 --- a/FFXIVClassic Map Server/Database.cs +++ b/FFXIVClassic Map Server/Database.cs @@ -17,7 +17,7 @@ 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))) @@ -47,7 +47,7 @@ namespace FFXIVClassic_Map_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))) { @@ -70,7 +70,7 @@ namespace FFXIVClassic_Map_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))) { @@ -93,7 +93,7 @@ namespace FFXIVClassic_Map_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))) { @@ -149,7 +149,7 @@ namespace FFXIVClassic_Map_Server } } - public static void savePlayerAppearance(Player player) + public static void SavePlayerAppearance(Player player) { string query; MySqlCommand cmd; @@ -205,7 +205,7 @@ namespace FFXIVClassic_Map_Server } } - public static void savePlayerCurrentClass(Player player) + public static void SavePlayerCurrentClass(Player player) { string query; MySqlCommand cmd; @@ -241,7 +241,7 @@ namespace FFXIVClassic_Map_Server } } - public static void savePlayerPosition(Player player) + public static void SavePlayerPosition(Player player) { string query; MySqlCommand cmd; @@ -283,7 +283,7 @@ namespace FFXIVClassic_Map_Server } } - public static void savePlayerPlayTime(Player player) + public static void SavePlayerPlayTime(Player player) { string query; MySqlCommand cmd; @@ -302,7 +302,7 @@ namespace FFXIVClassic_Map_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(); } @@ -317,19 +317,19 @@ namespace FFXIVClassic_Map_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) { 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; @@ -369,7 +369,7 @@ namespace FFXIVClassic_Map_Server } } - public static void loadPlayerCharacter(Player player) + public static void LoadPlayerCharacter(Player player) { string query; MySqlCommand cmd; @@ -560,12 +560,12 @@ namespace FFXIVClassic_Map_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); @@ -712,7 +712,7 @@ namespace FFXIVClassic_Map_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); } } @@ -779,14 +779,14 @@ namespace FFXIVClassic_Map_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) { @@ -800,9 +800,9 @@ namespace FFXIVClassic_Map_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))) { @@ -827,7 +827,7 @@ namespace FFXIVClassic_Map_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; } } @@ -845,7 +845,7 @@ namespace FFXIVClassic_Map_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))) @@ -882,7 +882,7 @@ namespace FFXIVClassic_Map_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))) @@ -915,7 +915,7 @@ namespace FFXIVClassic_Map_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(); @@ -987,7 +987,7 @@ namespace FFXIVClassic_Map_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; @@ -1028,7 +1028,7 @@ namespace FFXIVClassic_Map_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) { @@ -1043,7 +1043,7 @@ namespace FFXIVClassic_Map_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))) { @@ -1077,7 +1077,7 @@ namespace FFXIVClassic_Map_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))) { @@ -1117,7 +1117,7 @@ namespace FFXIVClassic_Map_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))) { @@ -1158,7 +1158,7 @@ namespace FFXIVClassic_Map_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))) @@ -1196,10 +1196,10 @@ namespace FFXIVClassic_Map_Server } } - 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(); @@ -1242,7 +1242,7 @@ namespace FFXIVClassic_Map_Server } } - return cheevosPacket.buildPacket(player.actorId); + return cheevosPacket.BuildPacket(player.actorId); } diff --git a/FFXIVClassic Map Server/PacketProcessor.cs b/FFXIVClassic Map Server/PacketProcessor.cs index 734df6cd..7474c7eb 100644 --- a/FFXIVClassic Map Server/PacketProcessor.cs +++ b/FFXIVClassic Map Server/PacketProcessor.cs @@ -36,17 +36,17 @@ namespace FFXIVClassic_Map_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, @@ -117,35 +117,35 @@ namespace FFXIVClassic_Map_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) - Program.Log.Debug("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) - Program.Log.Debug("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) { @@ -162,18 +162,18 @@ namespace FFXIVClassic_Map_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; @@ -181,15 +181,15 @@ namespace FFXIVClassic_Map_Server case 0x0003: ChatMessagePacket chatMessage = new ChatMessagePacket(subpacket.data); 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(); + 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 @@ -199,37 +199,37 @@ namespace FFXIVClassic_Map_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); /* @@ -245,83 +245,83 @@ namespace FFXIVClassic_Map_Server } */ - 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 { - 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)); + 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); - 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)); + 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); - 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)); + 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: @@ -335,84 +335,84 @@ namespace FFXIVClassic_Map_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)); + 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)); + 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); Program.Log.Info("Got GM Ticket: \n" + gmTicket.ticketTitle + "\n" + gmTicket.ticketBody); - client.queuePacket(BasePacket.createPacket(GMTicketSentResponsePacket.buildPacket(player.actorID, true), true, false)); + 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: Program.Log.Debug("Unknown command 0x{0:X} received.", subpacket.gameMessage.opcode); - subpacket.debugPrintSubPacket(); + subpacket.DebugPrintSubPacket(); break; } } else - packet.debugPrintPacket(); + packet.DebugPrintPacket(); } } diff --git a/FFXIVClassic Map Server/Program.cs b/FFXIVClassic Map Server/Program.cs index 80a3a6e4..0f0ff4f8 100644 --- a/FFXIVClassic Map Server/Program.cs +++ b/FFXIVClassic Map Server/Program.cs @@ -26,11 +26,11 @@ namespace FFXIVClassic_Map_Server bool startServer = true; //Load Config - if (!ConfigConstants.load()) - startServer = false; - - // set up logging - + if (!ConfigConstants.Load()) + startServer = false; + + // set up logging + Log = LogManager.GetCurrentClassLogger(); Program.Log.Info("---------FFXIV 1.0 Map Server---------"); @@ -58,7 +58,7 @@ namespace FFXIVClassic_Map_Server } //Check World ID - DBWorld thisWorld = Database.getServer(ConfigConstants.DATABASE_WORLDID); + DBWorld thisWorld = Database.GetServer(ConfigConstants.DATABASE_WORLDID); if (thisWorld != null) Program.Log.Info("Successfully pulled world info from DB. Server name is {0}.", thisWorld.name); else @@ -68,14 +68,14 @@ namespace FFXIVClassic_Map_Server if (startServer) { Server server = new Server(); - CommandProcessor cp = new CommandProcessor(server.getConnectedPlayerList()); - server.startServer(); + CommandProcessor cp = new CommandProcessor(server.GetConnectedPlayerList()); + server.StartServer(); while (startServer) { String input = Console.ReadLine(); Log.Info("[Console Input] " + input); - cp.doCommand(input, null); + cp.DoCommand(input, null); } } diff --git a/FFXIVClassic Map Server/Properties/Resources.Designer.cs b/FFXIVClassic Map Server/Properties/Resources.Designer.cs index 62ed5ea5..11a22948 100644 --- a/FFXIVClassic Map Server/Properties/Resources.Designer.cs +++ b/FFXIVClassic Map Server/Properties/Resources.Designer.cs @@ -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 { @@ -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 5bcac0de..92cb1168 100644 --- a/FFXIVClassic Map Server/Server.cs +++ b/FFXIVClassic Map Server/Server.cs @@ -38,7 +38,7 @@ namespace FFXIVClassic_Map_Server private Thread mConnectionHealthThread; private bool killHealthThread = false; - private void connectionHealth() + private void ConnectionHealth() { Program.Log.Info("Connection Health thread started; it will run every {0} seconds.", HEALTH_THREAD_SLEEP_TIME); while (!killHealthThread) @@ -48,12 +48,12 @@ namespace FFXIVClassic_Map_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); } @@ -64,20 +64,20 @@ namespace FFXIVClassic_Map_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(); + gamedataItems = Database.GetItemGamedata(); Program.Log.Info("Loaded {0} items.", gamedataItems.Count); mWorldManager = new WorldManager(this); @@ -93,7 +93,7 @@ namespace FFXIVClassic_Map_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 { @@ -106,7 +106,7 @@ namespace FFXIVClassic_Map_Server } try { - mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket); + mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket); } catch (Exception e) { @@ -124,7 +124,7 @@ namespace FFXIVClassic_Map_Server return true; } - public void removePlayer(Player player) + public void RemovePlayer(Player player) { lock (mConnectedPlayerList) { @@ -134,7 +134,7 @@ namespace FFXIVClassic_Map_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; @@ -153,9 +153,9 @@ namespace FFXIVClassic_Map_Server 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) { @@ -167,7 +167,7 @@ namespace FFXIVClassic_Map_Server mConnectionList.Remove(conn); } } - mServerSocket.BeginAccept(new AsyncCallback(acceptCallback), mServerSocket); + mServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), mServerSocket); } catch (Exception) { @@ -178,21 +178,21 @@ namespace FFXIVClassic_Map_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]; @@ -204,7 +204,7 @@ namespace FFXIVClassic_Map_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; @@ -218,7 +218,7 @@ namespace FFXIVClassic_Map_Server mConnectionList.Remove(conn); } if (conn.connType == BasePacket.TYPE_ZONE) - Program.Log.Info("{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; } @@ -235,13 +235,13 @@ namespace FFXIVClassic_Map_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 @@ -251,18 +251,18 @@ namespace FFXIVClassic_Map_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 { - Program.Log.Info("{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) { @@ -274,7 +274,7 @@ namespace FFXIVClassic_Map_Server { if (conn.socket != null) { - Program.Log.Info("{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) { @@ -290,7 +290,7 @@ namespace FFXIVClassic_Map_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; @@ -327,7 +327,7 @@ namespace FFXIVClassic_Map_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 1353c440..e0cbb995 100644 --- a/FFXIVClassic Map Server/WorldManager.cs +++ b/FFXIVClassic Map Server/WorldManager.cs @@ -106,7 +106,7 @@ namespace FFXIVClassic_Map_Server { Zone parent = zoneList[parentZoneId]; PrivateArea privArea = new PrivateArea(parent, reader.GetUInt32("id"), reader.GetString("className"), reader.GetString("privateAreaName"), reader.GetUInt16("dayMusic"), reader.GetUInt16("nightMusic"), reader.GetUInt16("battleMusic")); - parent.addPrivateArea(privArea); + parent.AddPrivateArea(privArea); } else continue; @@ -224,7 +224,7 @@ namespace FFXIVClassic_Map_Server if (!reader.IsDBNull(12)) { string eventConditions = reader.GetString(12); - npc.loadEventConditions(eventConditions); + npc.LoadEventConditions(eventConditions); } if (!zoneList.ContainsKey(npc.zoneId)) @@ -233,7 +233,7 @@ namespace FFXIVClassic_Map_Server if (zone == null) continue; npc.zone = zone; - zone.addActorToZone(npc); + zone.AddActorToZone(npc); count++; } @@ -297,7 +297,7 @@ namespace FFXIVClassic_Map_Server if (!reader.IsDBNull(12)) { string eventConditions = reader.GetString(12); - npc.loadEventConditions(eventConditions); + npc.LoadEventConditions(eventConditions); } if (!zoneList.ContainsKey(npc.zoneId)) @@ -306,7 +306,7 @@ namespace FFXIVClassic_Map_Server if (zone == null) continue; npc.zone = zone; - zone.addActorToZone(npc); + zone.AddActorToZone(npc); count++; } @@ -326,7 +326,7 @@ namespace FFXIVClassic_Map_Server Program.Log.Info("Loaded {0} npc(s).", count); } - //Moves the actor to the new zone if exists. No packets are sent nor position changed. + //Moves the actor to the new zone if exists. No packets are sent nor position Changed. public void DoSeamlessZoneChange(Player player, uint destinationZoneId) { Area oldZone; @@ -334,19 +334,19 @@ namespace FFXIVClassic_Map_Server if (player.zone != null) { oldZone = player.zone; - oldZone.removeActorFromZone(player); + oldZone.RemoveActorFromZone(player); } //Add player to new zone and update Zone newZone = GetZone(destinationZoneId); - //This server does not contain that zoneId + //This server Does not contain that zoneId 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 @@ -371,7 +371,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 @@ -380,12 +380,12 @@ namespace FFXIVClassic_Map_Server if (destinationPrivateArea == null) newArea = GetZone(destinationZoneId); else - newArea = GetZone(destinationZoneId).getPrivateArea(destinationPrivateArea, 0); - //This server does not contain that zoneId + 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; @@ -396,13 +396,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 @@ -428,8 +428,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; @@ -438,9 +438,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(); } } @@ -451,31 +451,31 @@ namespace FFXIVClassic_Map_Server //Add player to new zone and update Zone zone = GetZone(player.zoneId); - //This server does not contain that zoneId + //This server Does not contain that zoneId if (zone == null) return; - //Set the current zone and add player + //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) + public void ReloadZone(uint zoneId) { if (!zoneList.ContainsKey(zoneId)) return; Zone zone = zoneList[zoneId]; - //zone.clear(); + //zone.Clear(); LoadNPCs(zone.actorId); } @@ -552,7 +552,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 18901a16..53e2c9b2 100644 --- a/FFXIVClassic Map Server/actors/Actor.cs +++ b/FFXIVClassic Map Server/actors/Actor.cs @@ -52,66 +52,66 @@ namespace FFXIVClassic_Map_Server.Actors this.moveSpeeds[3] = SetActorSpeedPacket.DEFAULT_RUN; } - public SubPacket createAddActorPacket(uint playerActorId, byte val) + public SubPacket CreateAddActorPacket(uint playerActorId, byte val) { - return AddActorPacket.buildPacket(actorId, playerActorId, val); + return AddActorPacket.BuildPacket(actorId, playerActorId, val); } - public SubPacket createNamePacket(uint playerActorId) + public SubPacket CreateNamePacket(uint playerActorId) { - return SetActorNamePacket.buildPacket(actorId, playerActorId, displayNameId, displayNameId == 0xFFFFFFFF | displayNameId == 0x0 ? customDisplayName : ""); + return SetActorNamePacket.BuildPacket(actorId, playerActorId, displayNameId, displayNameId == 0xFFFFFFFF | displayNameId == 0x0 ? customDisplayName : ""); } - public SubPacket createSpeedPacket(uint playerActorId) + public SubPacket CreateSpeedPacket(uint playerActorId) { - return SetActorSpeedPacket.buildPacket(actorId, playerActorId); + return SetActorSpeedPacket.BuildPacket(actorId, playerActorId); } - public SubPacket createSpawnPositonPacket(uint playerActorId, uint spawnType) + 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); + 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); + 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); + 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); + 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); + //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) + public SubPacket CreateSpawnTeleportPacket(uint playerActorId, uint spawnType) { SubPacket spawnPacket; - spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, 0xFFFFFFFF, positionX, positionY, positionZ, rotation, spawnType, false); + 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); + //return SetActorPositionPacket.BuildPacket(actorId, playerActorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE); - spawnPacket.debugPrintSubPacket(); + spawnPacket.DebugPrintSubPacket(); return spawnPacket; } - public SubPacket createPositionUpdatePacket(uint playerActorId) + public SubPacket CreatePositionUpdatePacket(uint playerActorId) { - return MoveActorToPositionPacket.buildPacket(actorId, playerActorId, positionX, positionY, positionZ, rotation, moveState); + return MoveActorToPositionPacket.BuildPacket(actorId, playerActorId, positionX, positionY, positionZ, rotation, moveState); } - public SubPacket createStatePacket(uint playerActorID) + public SubPacket CreateStatePacket(uint playerActorID) { - return SetActorStatePacket.buildPacket(actorId, playerActorID, currentMainState, currentSubState); + return SetActorStatePacket.BuildPacket(actorId, playerActorID, currentMainState, currentSubState); } - public List getEventConditionPackets(uint playerActorId) + public List GetEventConditionPackets(uint playerActorId) { List subpackets = new List(); @@ -122,126 +122,126 @@ namespace FFXIVClassic_Map_Server.Actors if (eventConditions.talkEventConditions != null) { foreach (EventList.TalkEventCondition condition in eventConditions.talkEventConditions) - subpackets.Add(SetTalkEventCondition.buildPacket(playerActorId, actorId, condition)); + 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)); + 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)); + 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)); + 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)); + 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)); + subpackets.Add(SetPushEventConditionWithTriggerBox.BuildPacket(playerActorId, actorId, condition)); } return subpackets; } - public BasePacket getSetEventStatusPackets(uint playerActorId) + public BasePacket GetSetEventStatusPackets(uint playerActorId) { List subpackets = new List(); //Return empty list if (eventConditions == null) - return BasePacket.createPacket(subpackets, true, false); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + subpackets.Add(SetEventStatus.BuildPacket(playerActorId, actorId, true, 2, condition.conditionName)); } - return BasePacket.createPacket(subpackets, true, false); + return BasePacket.CreatePacket(subpackets, true, false); } - public SubPacket createIsZoneingPacket(uint playerActorId) + public SubPacket CreateIsZoneingPacket(uint playerActorId) { - return SetActorIsZoningPacket.buildPacket(actorId, playerActorId, false); + return SetActorIsZoningPacket.BuildPacket(actorId, playerActorId, false); } - public virtual SubPacket createScriptBindPacket(uint playerActorId) + public virtual SubPacket CreateScriptBindPacket(uint playerActorId) { - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, classParams); + return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, classParams); } - public virtual BasePacket getSpawnPackets(uint playerActorId) + public virtual BasePacket GetSpawnPackets(uint playerActorId) { - return getSpawnPackets(playerActorId, 0x1); + return GetSpawnPackets(playerActorId, 0x1); } - public virtual BasePacket getSpawnPackets(uint playerActorId, uint spawnType) + 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); + 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) + 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); + 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) @@ -253,50 +253,50 @@ namespace FFXIVClassic_Map_Server.Actors return actorId == actorObj.actorId; } - public string getName() + public string GetName() { return actorName; } - public string getClassName() + public string GetClassName() { return className; } - public ushort getState() + public ushort GetState() { return currentMainState; } - public List getLuaParams() + public List GetLuaParams() { return classParams; } - public void changeState(ushort newState) + 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); + 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) + 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); + 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) + 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); + SubPacket ChangeSpeedPacket = SetActorSpeedPacket.BuildPacket(actorId, actorId, moveSpeeds[0], moveSpeeds[1], moveSpeeds[2]); + zone.BroadcastPacketAroundActor(this, ChangeSpeedPacket); } } diff --git a/FFXIVClassic Map Server/actors/StaticActors.cs b/FFXIVClassic Map Server/actors/StaticActors.cs index 8cee5340..998cdb06 100644 --- a/FFXIVClassic Map Server/actors/StaticActors.cs +++ b/FFXIVClassic Map Server/actors/StaticActors.cs @@ -18,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) @@ -50,7 +50,7 @@ namespace FFXIVClassic_Map_Server.Actors return decoded; } - private bool loadStaticActors(byte[] data) + private bool LoadStaticActors(byte[] data) { try { @@ -61,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; @@ -96,12 +96,12 @@ namespace FFXIVClassic_Map_Server.Actors 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) { @@ -112,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 def0b87d..9d66bc23 100644 --- a/FFXIVClassic Map Server/actors/area/Area.cs +++ b/FFXIVClassic Map Server/actors/area/Area.cs @@ -65,29 +65,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); @@ -112,7 +112,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); @@ -136,7 +136,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; @@ -181,7 +181,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; @@ -224,7 +224,7 @@ namespace FFXIVClassic_Map_Server.Actors return result; } - public List getActorsAroundActor(Actor actor, int checkDistance) + public List GetActorsAroundActor(Actor actor, int checkDistance) { checkDistance /= boundingGridSize; @@ -296,7 +296,7 @@ namespace FFXIVClassic_Map_Server.Actors return (Player)mActorList[id]; } - public void clear() + public void Clear() { //Clear All mActorList.Clear(); @@ -309,12 +309,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) @@ -324,7 +324,7 @@ namespace FFXIVClassic_Map_Server.Actors SubPacket clonedPacket = new SubPacket(packet, actor.actorId); Player p = (Player)a; - p.queuePacket(clonedPacket); + p.QueuePacket(clonedPacket); } } } diff --git a/FFXIVClassic Map Server/actors/area/PrivateArea.cs b/FFXIVClassic Map Server/actors/area/PrivateArea.cs index 1858076e..997adb2c 100644 --- a/FFXIVClassic Map Server/actors/area/PrivateArea.cs +++ b/FFXIVClassic Map Server/actors/area/PrivateArea.cs @@ -18,17 +18,17 @@ namespace FFXIVClassic_Map_Server.actors.area this.privateAreaName = privateAreaName; } - public string getPrivateAreaName() + public string GetPrivateAreaName() { return privateAreaName; } - public Zone getParentZone() + public Zone GetParentZone() { return parentZone; } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; @@ -37,9 +37,9 @@ 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); } } diff --git a/FFXIVClassic Map Server/actors/area/Zone.cs b/FFXIVClassic Map Server/actors/area/Zone.cs index 78bb4d25..24e8fa0a 100644 --- a/FFXIVClassic Map Server/actors/area/Zone.cs +++ b/FFXIVClassic Map Server/actors/area/Zone.cs @@ -16,18 +16,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)) { @@ -41,13 +41,13 @@ 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); } } diff --git a/FFXIVClassic Map Server/actors/chara/Character.cs b/FFXIVClassic Map Server/actors/chara/Character.cs index 5766b9b5..ddde616c 100644 --- a/FFXIVClassic Map Server/actors/chara/Character.cs +++ b/FFXIVClassic Map Server/actors/chara/Character.cs @@ -55,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/npc/Npc.cs b/FFXIVClassic Map Server/actors/chara/npc/Npc.cs index c8297e2f..83e10097 100644 --- a/FFXIVClassic Map Server/actors/chara/npc/Npc.cs +++ b/FFXIVClassic Map Server/actors/chara/npc/Npc.cs @@ -35,7 +35,7 @@ namespace FFXIVClassic_Map_Server.Actors this.zoneId = zoneId; - loadNpcTemplate(id); + LoadNpcTemplate(id); charaWork.battleSave.potencial = 1.0f; @@ -58,47 +58,47 @@ namespace FFXIVClassic_Map_Server.Actors charaWork.property[4] = 1; } - public SubPacket createAddActorPacket(uint playerActorId) + public SubPacket CreateAddActorPacket(uint playerActorId) { - return AddActorPacket.buildPacket(actorId, playerActorId, 8); + return AddActorPacket.BuildPacket(actorId, playerActorId, 8); } - public override SubPacket createScriptBindPacket(uint playerActorId) + public override SubPacket CreateScriptBindPacket(uint playerActorId) { List lParams; Player player = Server.GetWorldManager().GetPCInWorld(playerActorId); - lParams = LuaEngine.doActorInstantiate(player, this); + lParams = LuaEngine.DoActorInstantiate(player, this); if (lParams == null) { className = "PopulaceStandard"; - lParams = LuaUtils.createLuaParamList("/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, 0xF47F6, false, false, 0, 1, "TEST"); + lParams = LuaUtils.CreateLuaParamList("/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, 0xF47F6, false, false, 0, 1, "TEST"); } - return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams); + 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); @@ -106,52 +106,52 @@ 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.hateType"); - return BasePacket.createPacket(propPacketUtil.done(), true, false); + return BasePacket.CreatePacket(propPacketUtil.Done(), true, false); } - public uint getActorClassId() + public uint GetActorClassId() { return actorClassId; } - public void loadNpcTemplate(uint id) + public void LoadNpcTemplate(uint id) { 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))) { @@ -216,7 +216,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); @@ -247,7 +247,7 @@ namespace FFXIVClassic_Map_Server.Actors } } - public void loadEventConditions(string eventConditions) + public void LoadEventConditions(string eventConditions) { EventList conditions = JsonConvert.DeserializeObject(eventConditions); this.eventConditions = conditions; diff --git a/FFXIVClassic Map Server/actors/chara/player/Equipment.cs b/FFXIVClassic Map Server/actors/chara/player/Equipment.cs index 106f32af..ebe1f88d 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Equipment.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Equipment.cs @@ -64,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) @@ -107,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) @@ -134,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; @@ -148,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; } @@ -177,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; } @@ -195,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) @@ -208,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 855934b5..38ec5ffe 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Inventory.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Inventory.cs @@ -33,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]; @@ -46,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) { @@ -58,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(); @@ -121,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; @@ -220,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]); } @@ -241,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; @@ -274,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 @@ -380,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 @@ -405,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 @@ -439,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); @@ -459,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; @@ -483,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 340a4fb0..53be333c 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -228,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)); } @@ -373,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 @@ -485,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) { @@ -538,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) { @@ -612,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); 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) { @@ -679,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; @@ -773,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) { @@ -792,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) { @@ -824,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 @@ -886,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; @@ -926,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]; @@ -939,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) { @@ -950,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++) { @@ -981,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++) { @@ -1017,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++) { @@ -1028,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++) { @@ -1039,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++) { @@ -1050,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++) { @@ -1061,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")) { @@ -1082,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) @@ -1105,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/debug/Debug.cs b/FFXIVClassic Map Server/actors/debug/Debug.cs index 9625afd6..8c84c223 100644 --- a/FFXIVClassic Map Server/actors/debug/Debug.cs +++ b/FFXIVClassic Map Server/actors/debug/Debug.cs @@ -18,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 f8a5e12f..fb50c3c8 100644 --- a/FFXIVClassic Map Server/actors/director/Director.cs +++ b/FFXIVClassic Map Server/actors/director/Director.cs @@ -15,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 276d4e9e..c47f18b5 100644 --- a/FFXIVClassic Map Server/actors/director/OpeningDirector.cs +++ b/FFXIVClassic Map Server/actors/director/OpeningDirector.cs @@ -30,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 931750ef..2ce196f9 100644 --- a/FFXIVClassic Map Server/actors/director/WeatherDirector.cs +++ b/FFXIVClassic Map Server/actors/director/WeatherDirector.cs @@ -25,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 5c0a972f..a5404dd6 100644 --- a/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0g001.cs +++ b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0g001.cs @@ -27,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 26b8cf0c..821bcb86 100644 --- a/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0l001.cs +++ b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0l001.cs @@ -27,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 11c50869..1c581b3b 100644 --- a/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0u001.cs +++ b/FFXIVClassic Map Server/actors/director/quest/QuestDirectorMan0u001.cs @@ -27,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/quest/Quest.cs b/FFXIVClassic Map Server/actors/quest/Quest.cs index 1a56a6ba..4baa6899 100644 --- a/FFXIVClassic Map Server/actors/quest/Quest.cs +++ b/FFXIVClassic Map Server/actors/quest/Quest.cs @@ -115,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 7d58aa50..fd2a4a6a 100644 --- a/FFXIVClassic Map Server/actors/world/WorldMaster.cs +++ b/FFXIVClassic Map Server/actors/world/WorldMaster.cs @@ -16,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/dataobjects/ConnectedPlayer.cs b/FFXIVClassic Map Server/dataobjects/ConnectedPlayer.cs index a3438b22..47b4defb 100644 --- a/FFXIVClassic Map Server/dataobjects/ConnectedPlayer.cs +++ b/FFXIVClassic Map Server/dataobjects/ConnectedPlayer.cs @@ -29,7 +29,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) @@ -43,55 +43,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; @@ -104,11 +104,11 @@ 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(); @@ -119,7 +119,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); } } @@ -134,18 +134,18 @@ 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) { - LuaEngine.doActorOnSpawn(getActor(), (Npc)actor); + LuaEngine.DoActorOnSpawn(GetActor(), (Npc)actor); } } } @@ -153,7 +153,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 f9b79bf6..4cad9ca3 100644 --- a/FFXIVClassic Map Server/dataobjects/DBWorld.cs +++ b/FFXIVClassic Map Server/dataobjects/DBWorld.cs @@ -3,7 +3,7 @@ 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 e7d8f6fc..aec328be 100644 --- a/FFXIVClassic Map Server/dataobjects/InventoryItem.cs +++ b/FFXIVClassic Map Server/dataobjects/InventoryItem.cs @@ -30,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; } @@ -72,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 351117c9..b9240aa7 100644 --- a/FFXIVClassic Map Server/dataobjects/Item.cs +++ b/FFXIVClassic Map Server/dataobjects/Item.cs @@ -378,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)); } @@ -420,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; @@ -459,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/SearchEntry.cs b/FFXIVClassic Map Server/dataobjects/SearchEntry.cs index 9a60b055..d272a1bf 100644 --- a/FFXIVClassic Map Server/dataobjects/SearchEntry.cs +++ b/FFXIVClassic Map Server/dataobjects/SearchEntry.cs @@ -16,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 4e3e61d5..3444babd 100644 --- a/FFXIVClassic Map Server/lua/LuaEngine.cs +++ b/FFXIVClassic Map Server/lua/LuaEngine.cs @@ -28,13 +28,13 @@ 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); @@ -43,12 +43,12 @@ namespace FFXIVClassic_Map_Server.lua 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; } } @@ -56,20 +56,20 @@ 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) { 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)) { @@ -78,14 +78,14 @@ namespace FFXIVClassic_Map_Server.lua 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()) @@ -93,14 +93,14 @@ 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)) { @@ -115,21 +115,21 @@ 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) { 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)) { @@ -138,12 +138,12 @@ namespace FFXIVClassic_Map_Server.lua 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()) @@ -151,13 +151,13 @@ 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)) { @@ -172,7 +172,7 @@ namespace FFXIVClassic_Map_Server.lua } } - public static void onBeginLogin(Player player) + public static void OnBeginLogin(Player player) { if (File.Exists(FILEPATH_PLAYER)) { @@ -187,7 +187,7 @@ namespace FFXIVClassic_Map_Server.lua } } - public static void onLogin(Player player) + public static void OnLogin(Player player) { if (File.Exists(FILEPATH_PLAYER)) { @@ -207,9 +207,9 @@ namespace FFXIVClassic_Map_Server.lua 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["getStaticActor"] = (Func)Server.GetStaticActors; script.Globals["getWorldMaster"] = (Func)Server.GetWorldManager().GetActor; - script.Globals["getItemGamedata"] = (Func)Server.getItemGamedata; + script.Globals["getItemGamedata"] = (Func)Server.GetItemGamedata; try { @@ -225,16 +225,16 @@ namespace FFXIVClassic_Map_Server.lua private 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)) { @@ -249,13 +249,13 @@ 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)) { @@ -270,7 +270,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 12a57ed9..a22aae1b 100644 --- a/FFXIVClassic Map Server/lua/LuaEvent.cs +++ b/FFXIVClassic Map Server/lua/LuaEvent.cs @@ -2,12 +2,12 @@ { 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/LuaPlayer.cs b/FFXIVClassic Map Server/lua/LuaPlayer.cs index b8be404b..5ad16978 100644 --- a/FFXIVClassic Map Server/lua/LuaPlayer.cs +++ b/FFXIVClassic Map Server/lua/LuaPlayer.cs @@ -15,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 341f69be..84a340ab 100644 --- a/FFXIVClassic Map Server/lua/LuaUtils.cs +++ b/FFXIVClassic Map Server/lua/LuaUtils.cs @@ -40,7 +40,7 @@ namespace FFXIVClassic_Map_Server } } - public static List readLuaParams(BinaryReader reader) + public static List ReadLuaParams(BinaryReader reader) { List luaParams = new List(); @@ -54,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(); @@ -79,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(); @@ -114,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) { @@ -126,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; @@ -143,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); @@ -169,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(); @@ -187,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(); @@ -213,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(); @@ -249,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(); @@ -257,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(); @@ -276,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) { @@ -316,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) { @@ -326,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)); @@ -364,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]; @@ -375,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/packets/BasePacket.cs b/FFXIVClassic Map Server/packets/BasePacket.cs index 1def763e..2a74d790 100644 --- a/FFXIVClassic Map Server/packets/BasePacket.cs +++ b/FFXIVClassic Map Server/packets/BasePacket.cs @@ -102,7 +102,7 @@ namespace FFXIVClassic_Map_Server.packets this.data = data; } - public List getSubpackets() + public List GetSubpackets() { List subpackets = new List(header.numSubpackets); @@ -114,7 +114,7 @@ namespace FFXIVClassic_Map_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) @@ -128,7 +128,7 @@ namespace FFXIVClassic_Map_Server.packets return header; } - public byte[] getHeaderBytes() + public byte[] GetHeaderBytes() { int size = Marshal.SizeOf(header); byte[] arr = new byte[size]; @@ -140,16 +140,16 @@ namespace FFXIVClassic_Map_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)) { @@ -172,7 +172,7 @@ namespace FFXIVClassic_Map_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)) { @@ -195,7 +195,7 @@ namespace FFXIVClassic_Map_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(); @@ -217,7 +217,7 @@ namespace FFXIVClassic_Map_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; } @@ -228,7 +228,7 @@ namespace FFXIVClassic_Map_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(); @@ -246,7 +246,7 @@ namespace FFXIVClassic_Map_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); @@ -255,7 +255,7 @@ namespace FFXIVClassic_Map_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); @@ -276,7 +276,7 @@ namespace FFXIVClassic_Map_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; @@ -302,7 +302,7 @@ namespace FFXIVClassic_Map_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; @@ -329,16 +329,16 @@ namespace FFXIVClassic_Map_Server.packets } #endregion - public void debugPrintPacket() + public void DebugPrintPacket() { #if DEBUG Console.BackgroundColor = ConsoleColor.DarkYellow; - 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())); + 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()) + foreach (SubPacket sub in GetSubpackets()) { - sub.debugPrintSubPacket(); + sub.DebugPrintSubPacket(); } Console.BackgroundColor = ConsoleColor.Black; diff --git a/FFXIVClassic Map Server/packets/SubPacket.cs b/FFXIVClassic Map Server/packets/SubPacket.cs index da285388..5bb0b746 100644 --- a/FFXIVClassic Map Server/packets/SubPacket.cs +++ b/FFXIVClassic Map Server/packets/SubPacket.cs @@ -101,7 +101,7 @@ namespace FFXIVClassic_Map_Server.packets data = original.data; } - public byte[] getHeaderBytes() + public byte[] GetHeaderBytes() { int size = Marshal.SizeOf(header); byte[] arr = new byte[size]; @@ -113,7 +113,7 @@ namespace FFXIVClassic_Map_Server.packets return arr; } - public byte[] getGameMessageBytes() + public byte[] GetGameMessageBytes() { int size = Marshal.SizeOf(gameMessage); byte[] arr = new byte[size]; @@ -125,28 +125,28 @@ namespace FFXIVClassic_Map_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; - Program.Log.Debug("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes())); + Program.Log.Debug("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(GetHeaderBytes())); if (header.type == 0x03) { - Program.Log.Debug("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE)); + Program.Log.Debug("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(GetGameMessageBytes(), SUBPACKET_SIZE)); Console.BackgroundColor = ConsoleColor.DarkMagenta; diff --git a/FFXIVClassic Map Server/packets/receive/events/EventStartPacket.cs b/FFXIVClassic Map Server/packets/receive/events/EventStartPacket.cs index a7e14a2a..34daa640 100644 --- a/FFXIVClassic Map Server/packets/receive/events/EventStartPacket.cs +++ b/FFXIVClassic Map Server/packets/receive/events/EventStartPacket.cs @@ -63,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 dfc60347..656531de 100644 --- a/FFXIVClassic Map Server/packets/receive/events/EventUpdatePacket.cs +++ b/FFXIVClassic Map Server/packets/receive/events/EventUpdatePacket.cs @@ -31,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/send/Actor/ActorDoEmotePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/ActorDoEmotePacket.cs index 6bb36c4b..ee59c7d3 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/ActorDoEmotePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/ActorDoEmotePacket.cs @@ -8,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]; @@ -28,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 0a9f69f8..14a72cb8 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/ActorInstantiatePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/ActorInstantiatePacket.cs @@ -11,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]; @@ -27,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 7db9cef7..2ba4f976 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/ActorSpecialGraphicPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/ActorSpecialGraphicPacket.cs @@ -13,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 b0f4fd24..c561e9d4 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/AddActorPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/AddActorPacket.cs @@ -5,7 +5,7 @@ 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 c2ac69e3..e6d61e39 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/BattleAction1Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/BattleAction1Packet.cs @@ -7,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 d3461cd3..e4bf1ef1 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/DeleteAllActorsPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/DeleteAllActorsPacket.cs @@ -5,7 +5,7 @@ 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 01c054c9..60e5596a 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/MoveActorToPositionPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/MoveActorToPositionPacket.cs @@ -8,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 eaeb97bf..6d612713 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/RemoveActorPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/RemoveActorPacket.cs @@ -8,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 d0e7d85b..2769482c 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorAppearancePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorAppearancePacket.cs @@ -51,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 adedc0b0..662e6096 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorIconPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorIconPacket.cs @@ -12,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 e332dbaf..12341c95 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorIdleAnimationPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorIdleAnimationPacket.cs @@ -8,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 8e30823a..5b46c55b 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorIsZoningPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorIsZoningPacket.cs @@ -5,7 +5,7 @@ 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 7ef682fb..6036cd4d 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorNamePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorNamePacket.cs @@ -9,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 59a1a683..7e0012ea 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs @@ -22,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 62d53728..b059f506 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs @@ -34,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; @@ -53,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; @@ -66,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; @@ -79,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; @@ -92,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; @@ -106,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; @@ -151,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)); @@ -197,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)); @@ -205,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 659fc5aa..5f22942b 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorSpeedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorSpeedPacket.cs @@ -12,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]; @@ -41,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 386abe7c..bb3a0cc6 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatePacket.cs @@ -27,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 3135f353..277dda2b 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusAllPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusAllPacket.cs @@ -8,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 63b3d8e6..bd148efb 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusPacket.cs @@ -8,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 b144942e..ebc77e0d 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetAnimatedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetAnimatedPacket.cs @@ -7,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 db269009..645209cc 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetPacket.cs @@ -7,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 90f6395a..066cb231 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/_0x132Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/_0x132Packet.cs @@ -9,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 ad31f280..7fe72cae 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/_0xFPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/_0xFPacket.cs @@ -7,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/BattleActionX00Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX00Packet.cs index f2173c62..30995408 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX00Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX00Packet.cs @@ -8,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 04edb879..0a90d960 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX01Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX01Packet.cs @@ -8,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 c809bc61..67775962 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX10Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX10Packet.cs @@ -8,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 3345b801..38038ab3 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX18Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX18Packet.cs @@ -8,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 a5f6d6e3..dc98bab6 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetEmoteEventCondition.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetEmoteEventCondition.cs @@ -10,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 dcf14e4a..4867950a 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetEventStatus.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetEventStatus.cs @@ -9,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 d48bff56..04099db3 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetNoticeEventCondition.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetNoticeEventCondition.cs @@ -10,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 c218339e..7b55dbd1 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithCircle.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithCircle.cs @@ -10,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 21b638b2..3d81c625 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithFan.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithFan.cs @@ -10,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]; @@ -30,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 517dc082..97a0ffd2 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithTriggerBox.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetPushEventConditionWithTriggerBox.cs @@ -10,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 716ead46..4616cbd9 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/events/SetTalkEventCondition.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/events/SetTalkEventCondition.cs @@ -10,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 4f3175b1..364c575c 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX01Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX01Packet.cs @@ -8,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 5e956990..ccf67e65 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX08Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX08Packet.cs @@ -10,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 c9776eb7..5fc79272 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX16Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX16Packet.cs @@ -10,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 b4827947..c6dde267 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX32Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX32Packet.cs @@ -10,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 410556b2..309f2cf5 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX64Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/EquipmentListX64Packet.cs @@ -10,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 ea90f1d0..4df15032 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryBeginChangePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryBeginChangePacket.cs @@ -5,14 +5,14 @@ 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 516d3396..c6944676 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryEndChangePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryEndChangePacket.cs @@ -5,12 +5,12 @@ 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 ab5db224..d1665120 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryItemEndPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryItemEndPacket.cs @@ -10,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; @@ -20,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 bffc20bc..75cdd97d 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryItemPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryItemPacket.cs @@ -10,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; @@ -20,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 f585b22c..5d4db4fe 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX01Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX01Packet.cs @@ -8,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]; @@ -21,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 2e811033..b136429c 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX08Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX08Packet.cs @@ -10,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]; @@ -31,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 5c79fea3..31cf4cc4 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX16Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX16Packet.cs @@ -9,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]; @@ -30,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 32eae219..58e1c9c8 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX32Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX32Packet.cs @@ -9,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]; @@ -25,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 127bf32b..7599f309 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX64Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX64Packet.cs @@ -9,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]; @@ -25,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 fe7e035e..e210bacb 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX01Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX01Packet.cs @@ -8,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 0d59892c..54f9cfa4 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX08Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX08Packet.cs @@ -9,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 4414c9bb..e47e0e95 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX16Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX16Packet.cs @@ -9,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 5e3e9808..6af8c465 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX32Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX32Packet.cs @@ -9,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 5233dd31..b6d7a3b5 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX64Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryRemoveX64Packet.cs @@ -9,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 cf12e0e8..707f9ca1 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetBeginPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetBeginPacket.cs @@ -8,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 c6cf8dd0..29da7459 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetEndPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetEndPacket.cs @@ -6,12 +6,12 @@ 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 b96a26a3..9524bae1 100644 --- a/FFXIVClassic Map Server/packets/send/GameMessagePacket.cs +++ b/FFXIVClassic Map Server/packets/send/GameMessagePacket.cs @@ -56,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]; @@ -74,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; @@ -109,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) { @@ -122,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]; @@ -140,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; @@ -175,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) { @@ -188,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]; @@ -206,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; @@ -241,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) { @@ -254,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]; @@ -271,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; @@ -305,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 fbb5d4a7..cd8babaf 100644 --- a/FFXIVClassic Map Server/packets/send/LogoutPacket.cs +++ b/FFXIVClassic Map Server/packets/send/LogoutPacket.cs @@ -5,7 +5,7 @@ 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 1ae4233e..695116b9 100644 --- a/FFXIVClassic Map Server/packets/send/PongPacket.cs +++ b/FFXIVClassic Map Server/packets/send/PongPacket.cs @@ -8,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 f425537c..b10c9e24 100644 --- a/FFXIVClassic Map Server/packets/send/QuitPacket.cs +++ b/FFXIVClassic Map Server/packets/send/QuitPacket.cs @@ -5,7 +5,7 @@ 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 09a59e97..6152f215 100644 --- a/FFXIVClassic Map Server/packets/send/SendMessagePacket.cs +++ b/FFXIVClassic Map Server/packets/send/SendMessagePacket.cs @@ -34,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 3a54c3e4..797b8199 100644 --- a/FFXIVClassic Map Server/packets/send/SetMapPacket.cs +++ b/FFXIVClassic Map Server/packets/send/SetMapPacket.cs @@ -7,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 e69305c9..08a66521 100644 --- a/FFXIVClassic Map Server/packets/send/SetMusicPacket.cs +++ b/FFXIVClassic Map Server/packets/send/SetMusicPacket.cs @@ -14,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 cb076e7d..cce963f3 100644 --- a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs +++ b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs @@ -35,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 95810c97..0f627e35 100644 --- a/FFXIVClassic Map Server/packets/send/_0x02Packet.cs +++ b/FFXIVClassic Map Server/packets/send/_0x02Packet.cs @@ -8,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 5100cf7a..e0f229c2 100644 --- a/FFXIVClassic Map Server/packets/send/_0x10Packet.cs +++ b/FFXIVClassic Map Server/packets/send/_0x10Packet.cs @@ -8,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 1bc7c351..0ad9b340 100644 --- a/FFXIVClassic Map Server/packets/send/_0xE2Packet.cs +++ b/FFXIVClassic Map Server/packets/send/_0xE2Packet.cs @@ -7,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 7f1bc1cd..29facf3d 100644 --- a/FFXIVClassic Map Server/packets/send/events/EndEventPacket.cs +++ b/FFXIVClassic Map Server/packets/send/events/EndEventPacket.cs @@ -9,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 f67398a2..35571c55 100644 --- a/FFXIVClassic Map Server/packets/send/events/KickEventPacket.cs +++ b/FFXIVClassic Map Server/packets/send/events/KickEventPacket.cs @@ -11,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]; @@ -30,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 98a153c6..fe2c989e 100644 --- a/FFXIVClassic Map Server/packets/send/events/RunEventFunctionPacket.cs +++ b/FFXIVClassic Map Server/packets/send/events/RunEventFunctionPacket.cs @@ -11,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; @@ -28,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 263e2a4a..9acebfd7 100644 --- a/FFXIVClassic Map Server/packets/send/list/ListBeginPacket.cs +++ b/FFXIVClassic Map Server/packets/send/list/ListBeginPacket.cs @@ -8,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 fe5f0100..e8cc597d 100644 --- a/FFXIVClassic Map Server/packets/send/list/ListEndPacket.cs +++ b/FFXIVClassic Map Server/packets/send/list/ListEndPacket.cs @@ -8,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 809af982..eaf661ba 100644 --- a/FFXIVClassic Map Server/packets/send/list/ListEntriesEndPacket.cs +++ b/FFXIVClassic Map Server/packets/send/list/ListEntriesEndPacket.cs @@ -10,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/ListStartPacket.cs b/FFXIVClassic Map Server/packets/send/list/ListStartPacket.cs index 05fa6f90..56934bef 100644 --- a/FFXIVClassic Map Server/packets/send/list/ListStartPacket.cs +++ b/FFXIVClassic Map Server/packets/send/list/ListStartPacket.cs @@ -13,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]; @@ -34,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 59318c8b..03269fe1 100644 --- a/FFXIVClassic Map Server/packets/send/list/ListUtils.cs +++ b/FFXIVClassic Map Server/packets/send/list/ListUtils.cs @@ -5,33 +5,33 @@ 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 896225fc..781e137f 100644 --- a/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs +++ b/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs @@ -29,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; @@ -48,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; @@ -61,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; @@ -74,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; @@ -87,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; @@ -132,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)); @@ -166,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 015b7f08..59a1f583 100644 --- a/FFXIVClassic Map Server/packets/send/login/0x2Packet.cs +++ b/FFXIVClassic Map Server/packets/send/login/0x2Packet.cs @@ -7,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 bad66f4d..133fffb5 100644 --- a/FFXIVClassic Map Server/packets/send/login/0x7ResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/login/0x7ResponsePacket.cs @@ -5,7 +5,7 @@ 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]; @@ -30,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 31764238..2151e81c 100644 --- a/FFXIVClassic Map Server/packets/send/player/AchievementEarnedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/AchievementEarnedPacket.cs @@ -7,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 e771fe30..73780b4c 100644 --- a/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs @@ -9,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]; @@ -17,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 a80c90b9..60b9b2b9 100644 --- a/FFXIVClassic Map Server/packets/send/player/SendAchievementRatePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SendAchievementRatePacket.cs @@ -8,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 232548d9..6c4248a2 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetAchievementPointsPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetAchievementPointsPacket.cs @@ -7,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 b38bed3c..53bbb748 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetChocoboNamePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetChocoboNamePacket.cs @@ -7,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 7a97fd27..4368f77a 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCompletedAchievementsPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCompletedAchievementsPacket.cs @@ -24,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]; diff --git a/FFXIVClassic Map Server/packets/send/player/SetCurrentJobPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetCurrentJobPacket.cs index e4043714..43a07cd0 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCurrentJobPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCurrentJobPacket.cs @@ -7,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 28c7bc2e..b4d7a013 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCurrentMountChocoboPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCurrentMountChocoboPacket.cs @@ -22,7 +22,7 @@ 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 0429392c..ec65824c 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCurrentMountGoobbuePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCurrentMountGoobbuePacket.cs @@ -6,7 +6,7 @@ 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 fe45db0f..75211b87 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCutsceneBookPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCutsceneBookPacket.cs @@ -60,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]; diff --git a/FFXIVClassic Map Server/packets/send/player/SetGrandCompanyPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetGrandCompanyPacket.cs index b175c2ea..4b177966 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetGrandCompanyPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetGrandCompanyPacket.cs @@ -8,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 bc7d9321..d2fe62d3 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetHasChocoboPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetHasChocoboPacket.cs @@ -5,7 +5,7 @@ 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 c4f28e2c..114bf124 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetHasGoobbuePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetHasGoobbuePacket.cs @@ -5,7 +5,7 @@ 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 155d27b0..cb50cdb7 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetLatestAchievementsPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetLatestAchievementsPacket.cs @@ -8,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 8f1df9b3..5f357dc1 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetPlayerDreamPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetPlayerDreamPacket.cs @@ -7,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 155e8cd3..112def38 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetPlayerTitlePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetPlayerTitlePacket.cs @@ -7,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 ab5e0e3f..221f4d37 100644 --- a/FFXIVClassic Map Server/packets/send/player/_0x196Packet.cs +++ b/FFXIVClassic Map Server/packets/send/player/_0x196Packet.cs @@ -8,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 77c9095f..99068bf6 100644 --- a/FFXIVClassic Map Server/packets/send/recruitment/CurrentRecruitmentDetailsPacket.cs +++ b/FFXIVClassic Map Server/packets/send/recruitment/CurrentRecruitmentDetailsPacket.cs @@ -10,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 4709f0bf..e0ef929d 100644 --- a/FFXIVClassic Map Server/packets/send/recruitment/EndRecruitmentPacket.cs +++ b/FFXIVClassic Map Server/packets/send/recruitment/EndRecruitmentPacket.cs @@ -5,7 +5,7 @@ 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 6e13ac72..3e557b97 100644 --- a/FFXIVClassic Map Server/packets/send/recruitment/RecruiterStatePacket.cs +++ b/FFXIVClassic Map Server/packets/send/recruitment/RecruiterStatePacket.cs @@ -8,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 d4a8b87d..5e78f219 100644 --- a/FFXIVClassic Map Server/packets/send/recruitment/StartRecruitingResponse.cs +++ b/FFXIVClassic Map Server/packets/send/recruitment/StartRecruitingResponse.cs @@ -5,7 +5,7 @@ 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 9962a699..eac92f94 100644 --- a/FFXIVClassic Map Server/packets/send/social/BlacklistAddedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/BlacklistAddedPacket.cs @@ -8,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 ff6cdc13..507d8e58 100644 --- a/FFXIVClassic Map Server/packets/send/social/BlacklistRemovedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/BlacklistRemovedPacket.cs @@ -8,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 3ddb2e1b..5cee912d 100644 --- a/FFXIVClassic Map Server/packets/send/social/FriendStatusPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/FriendStatusPacket.cs @@ -8,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 6e6a69e5..7f708c29 100644 --- a/FFXIVClassic Map Server/packets/send/social/FriendlistAddedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/FriendlistAddedPacket.cs @@ -9,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 95882a58..f4ccef4d 100644 --- a/FFXIVClassic Map Server/packets/send/social/FriendlistRemovedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/FriendlistRemovedPacket.cs @@ -8,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 5f7dccfa..54d3b9b9 100644 --- a/FFXIVClassic Map Server/packets/send/social/SendBlacklistPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/SendBlacklistPacket.cs @@ -9,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 7d8ed27c..7074ca3d 100644 --- a/FFXIVClassic Map Server/packets/send/social/SendFriendlistPacket.cs +++ b/FFXIVClassic Map Server/packets/send/social/SendFriendlistPacket.cs @@ -9,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 b4370f63..0a84b09a 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/EndGMTicketPacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/EndGMTicketPacket.cs @@ -5,7 +5,7 @@ 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 e7f2ce35..a3ab11c5 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/FaqBodyResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/FaqBodyResponsePacket.cs @@ -8,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 a4141982..cc8193b4 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/FaqListResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/FaqListResponsePacket.cs @@ -8,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 811f7177..3ec04973 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/GMTicketPacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/GMTicketPacket.cs @@ -8,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 f1135116..502b1f74 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/GMTicketSentResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/GMTicketSentResponsePacket.cs @@ -5,7 +5,7 @@ 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 58d32f5c..7f1defa5 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/IssueListResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/IssueListResponsePacket.cs @@ -8,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 a7ebe4db..a06b23bb 100644 --- a/FFXIVClassic Map Server/packets/send/supportdesk/StartGMTicketPacket.cs +++ b/FFXIVClassic Map Server/packets/send/supportdesk/StartGMTicketPacket.cs @@ -5,7 +5,7 @@ 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 0447d0d4..e86996eb 100644 --- a/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs +++ b/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs @@ -21,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 64b2306d..3df2bc6a 100644 --- a/FFXIVClassic Map Server/utils/CharacterUtils.cs +++ b/FFXIVClassic Map Server/utils/CharacterUtils.cs @@ -31,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; @@ -47,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 c50f3650..b48be652 100644 --- a/FFXIVClassic Map Server/utils/SQLGeneration.cs +++ b/FFXIVClassic Map Server/utils/SQLGeneration.cs @@ -12,7 +12,7 @@ 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))) @@ -95,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))) @@ -153,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))) @@ -221,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))) @@ -311,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"))) { @@ -324,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; From b6331265686e3e681b0705a158a64bcbdd98dfd9 Mon Sep 17 00:00:00 2001 From: Tahir Akhlaq Date: Wed, 15 Jun 2016 00:04:15 +0100 Subject: [PATCH 10/13] fixed import script --- sql/import.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sql/import.sh b/sql/import.sh index c9767e0b..4022144c 100644 --- a/sql/import.sh +++ b/sql/import.sh @@ -12,6 +12,10 @@ 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 +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 From ba13d5798d9a2cd07dc39f79a47d3ee565286e95 Mon Sep 17 00:00:00 2001 From: Tahir Akhlaq Date: Wed, 15 Jun 2016 00:08:05 +0100 Subject: [PATCH 11/13] derp --- FFXIVClassic Lobby Server/Database.cs | 4 +- .../packets/SubPacket.cs | 8 +-- FFXIVClassic Map Server/CommandProcessor.cs | 6 +- .../actors/chara/ParameterTemp.cs | 2 +- FFXIVClassic Map Server/lua/LuaEngine.cs | 58 +++++++++---------- FFXIVClassic Map Server/packets/SubPacket.cs | 8 +-- .../packets/send/Actor/ActorDoEmotePacket.cs | 12 ++-- .../send/Actor/ActorInstantiatePacket.cs | 4 +- .../send/Actor/ActorSpecialGraphicPacket.cs | 4 +- .../packets/send/Actor/BattleAction1Packet.cs | 4 +- .../send/Actor/MoveActorToPositionPacket.cs | 4 +- .../packets/send/Actor/SetActorIconPacket.cs | 4 +- .../send/Actor/SetActorIdleAnimationPacket.cs | 4 +- .../send/Actor/SetActorIsZoningPacket.cs | 4 +- .../packets/send/Actor/SetActorNamePacket.cs | 4 +- .../send/Actor/SetActorPositionPacket.cs | 4 +- .../send/Actor/SetActorPropetyPacket.cs | 4 +- .../packets/send/Actor/SetActorSpeedPacket.cs | 8 +-- .../packets/send/Actor/SetActorStatePacket.cs | 4 +- .../send/Actor/SetActorStatusAllPacket.cs | 4 +- .../send/Actor/SetActorStatusPacket.cs | 4 +- .../Actor/SetActorTargetAnimatedPacket.cs | 4 +- .../send/Actor/SetActorTargetPacket.cs | 4 +- .../packets/send/Actor/_0xFPacket.cs | 4 +- .../packets/send/Actor/battle/BattleAction.cs | 2 +- .../Actor/battle/BattleActionX00Packet.cs | 2 +- .../Actor/battle/BattleActionX01Packet.cs | 4 +- .../Actor/battle/BattleActionX10Packet.cs | 2 +- .../Actor/battle/BattleActionX18Packet.cs | 2 +- .../inventory/InventoryBeginChangePacket.cs | 4 +- .../inventory/InventoryEndChangePacket.cs | 4 +- .../Actor/inventory/InventoryListX01Packet.cs | 4 +- .../Actor/inventory/InventoryListX08Packet.cs | 4 +- .../Actor/inventory/InventoryListX16Packet.cs | 4 +- .../inventory/InventorySetBeginPacket.cs | 4 +- .../Actor/inventory/InventorySetEndPacket.cs | 4 +- .../packets/send/GameMessagePacket.cs | 32 +++++----- .../packets/send/SendMessagePacket.cs | 4 +- .../packets/send/events/KickEventPacket.cs | 4 +- .../send/list/SetListPropertyPacket.cs | 8 +-- .../send/player/InfoRequestResponsePacket.cs | 4 +- .../send/player/SetChocoboNamePacket.cs | 4 +- .../send/player/SetCurrentJobPacket.cs | 4 +- .../send/player/SetGrandCompanyPacket.cs | 4 +- .../send/player/SetPlayerTitlePacket.cs | 4 +- .../packets/send/player/_0x196Packet.cs | 4 +- .../utils/ActorPropertyPacketUtil.cs | 6 +- 47 files changed, 144 insertions(+), 144 deletions(-) diff --git a/FFXIVClassic Lobby Server/Database.cs b/FFXIVClassic Lobby Server/Database.cs index de0ff845..deb776b4 100644 --- a/FFXIVClassic Lobby Server/Database.cs +++ b/FFXIVClassic Lobby Server/Database.cs @@ -384,7 +384,7 @@ namespace FFXIVClassic_Lobby_Server serverId, name, isLegacy, - DoRename, + doRename, currentZoneId, guardian, birthMonth, @@ -441,7 +441,7 @@ namespace FFXIVClassic_Lobby_Server serverId, name, isLegacy, - DoRename, + doRename, currentZoneId, guardian, birthMonth, diff --git a/FFXIVClassic Lobby Server/packets/SubPacket.cs b/FFXIVClassic Lobby Server/packets/SubPacket.cs index fe8a99ec..43b54a2a 100644 --- a/FFXIVClassic Lobby Server/packets/SubPacket.cs +++ b/FFXIVClassic Lobby Server/packets/SubPacket.cs @@ -10,7 +10,7 @@ namespace FFXIVClassic_Lobby_Server.packets public ushort subpacketSize; public ushort type; public uint sourceId; - public uint tarGetId; + public uint targetId; public uint unknown1; } @@ -68,14 +68,14 @@ namespace FFXIVClassic_Lobby_Server.packets offset += header.subpacketSize; } - public SubPacket(ushort opcode, uint sourceId, uint tarGetId, byte[] data) + public SubPacket(ushort opcode, uint sourceId, uint targetId, byte[] data) { this.header = new SubPacketHeader(); this.gameMessage = new GameMessageHeader(); gameMessage.opcode = opcode; header.sourceId = sourceId; - header.tarGetId = tarGetId; + header.targetId = targetId; gameMessage.timestamp = Utils.UnixTimeStampUTC(); @@ -97,7 +97,7 @@ namespace FFXIVClassic_Lobby_Server.packets header.subpacketSize = original.header.subpacketSize; header.type = original.header.type; header.sourceId = original.header.sourceId; - header.tarGetId = newTarGetId; + header.targetId = newTarGetId; data = original.data; } diff --git a/FFXIVClassic Map Server/CommandProcessor.cs b/FFXIVClassic Map Server/CommandProcessor.cs index 19163650..23ea3d7c 100644 --- a/FFXIVClassic Map Server/CommandProcessor.cs +++ b/FFXIVClassic Map Server/CommandProcessor.cs @@ -54,11 +54,11 @@ namespace FFXIVClassic_Map_Server } } - 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.SetTarget(target); ChangeProperty.AddInt(id, value); ChangeProperty.AddTarget(); diff --git a/FFXIVClassic Map Server/actors/chara/ParameterTemp.cs b/FFXIVClassic Map Server/actors/chara/ParameterTemp.cs index 71f71767..399e7e84 100644 --- a/FFXIVClassic Map Server/actors/chara/ParameterTemp.cs +++ b/FFXIVClassic Map Server/actors/chara/ParameterTemp.cs @@ -4,7 +4,7 @@ { public short tp = 0; - public int tarGetInformation = 0; + public int targetInformation = 0; public ushort[] maxCommandRecastTime = new ushort[40]; diff --git a/FFXIVClassic Map Server/lua/LuaEngine.cs b/FFXIVClassic Map Server/lua/LuaEngine.cs index e0b898a5..fef4e299 100644 --- a/FFXIVClassic Map Server/lua/LuaEngine.cs +++ b/FFXIVClassic Map Server/lua/LuaEngine.cs @@ -28,13 +28,13 @@ 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) + 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); @@ -42,13 +42,13 @@ namespace FFXIVClassic_Map_Server.lua if (script == null) return null; - DynValue result = script.Call(script.Globals["init"], tarGet); + DynValue result = script.Call(script.Globals["init"], target); 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; } } @@ -56,26 +56,26 @@ 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) + if (target is Npc) { - ((Npc)tarGet).DoEventStart(player, eventStart); + ((Npc)target).DoEventStart(player, eventStart); return; } string luaPath; - if (tarGet is Command) + if (target is Command) { - luaPath = String.Format(FILEPATH_COMMANDS, tarGet.GetName()); + luaPath = String.Format(FILEPATH_COMMANDS, target.GetName()); } - else if (tarGet is Director) + 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)) { @@ -87,7 +87,7 @@ namespace FFXIVClassic_Map_Server.lua //Have to Do this to combine LuaParams List objects = new List(); objects.Add(player); - objects.Add(tarGet); + objects.Add(target); objects.Add(eventStart.triggerName); if (eventStart.luaParams != null) @@ -99,14 +99,14 @@ 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)) { @@ -117,31 +117,31 @@ namespace FFXIVClassic_Map_Server.lua //Run Script if (!script.Globals.Get("onSpawn").IsNil()) - script.Call(script.Globals["onSpawn"], player, tarGet); + script.Call(script.Globals["onSpawn"], player, target); } 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) + if (target is Npc) { - ((Npc)tarGet).DoEventUpdate(player, eventUpdate); + ((Npc)target).DoEventUpdate(player, eventUpdate); return; } string luaPath; - if (tarGet is Command) - luaPath = String.Format(FILEPATH_COMMANDS, tarGet.GetName()); - else if (tarGet is Director) - luaPath = String.Format(FILEPATH_DIRECTORS, tarGet.GetName()); + if (target is Command) + luaPath = String.Format(FILEPATH_COMMANDS, target.GetName()); + else if (target is Director) + 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)) { @@ -153,7 +153,7 @@ namespace FFXIVClassic_Map_Server.lua //Have to Do this to combine LuaParams List objects = new List(); objects.Add(player); - objects.Add(tarGet); + objects.Add(target); objects.Add(eventUpdate.val2); objects.AddRange(LuaUtils.CreateLuaParamObjectList(eventUpdate.luaParams)); @@ -163,7 +163,7 @@ 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())); } } diff --git a/FFXIVClassic Map Server/packets/SubPacket.cs b/FFXIVClassic Map Server/packets/SubPacket.cs index f6db325e..5bb0b746 100644 --- a/FFXIVClassic Map Server/packets/SubPacket.cs +++ b/FFXIVClassic Map Server/packets/SubPacket.cs @@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets public ushort subpacketSize; public ushort type; public uint sourceId; - public uint tarGetId; + public uint targetId; public uint unknown1; } @@ -68,14 +68,14 @@ namespace FFXIVClassic_Map_Server.packets offset += header.subpacketSize; } - public SubPacket(ushort opcode, uint sourceId, uint tarGetId, byte[] data) + public SubPacket(ushort opcode, uint sourceId, uint targetId, byte[] data) { this.header = new SubPacketHeader(); this.gameMessage = new GameMessageHeader(); gameMessage.opcode = opcode; header.sourceId = sourceId; - header.tarGetId = tarGetId; + header.targetId = targetId; gameMessage.timestamp = Utils.UnixTimeStampUTC(); @@ -97,7 +97,7 @@ namespace FFXIVClassic_Map_Server.packets header.subpacketSize = original.header.subpacketSize; header.type = original.header.type; header.sourceId = original.header.sourceId; - header.tarGetId = newTargetId; + header.targetId = newTargetId; data = original.data; } diff --git a/FFXIVClassic Map Server/packets/send/Actor/ActorDoEmotePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/ActorDoEmotePacket.cs index fa0886e4..ee59c7d3 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/ActorDoEmotePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/ActorDoEmotePacket.cs @@ -8,26 +8,26 @@ 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]; - if (tarGettedActorId == 0xC0000000) - tarGettedActorId = sourceActorId; + if (targettedActorId == 0xC0000000) + targettedActorId = sourceActorId; using (MemoryStream mem = new MemoryStream(data)) { using (BinaryWriter binWriter = new BinaryWriter(mem)) { uint realAnimID = 0x5000000 | ((emoteID - 100) << 12); - uint realDescID = 20000 + ((emoteID - 1) * 10) + (tarGettedActorId == sourceActorId ? (uint)2 : (uint)1); + uint realDescID = 20000 + ((emoteID - 1) * 10) + (targettedActorId == sourceActorId ? (uint)2 : (uint)1); binWriter.Write((UInt32)realAnimID); - binWriter.Write((UInt32)tarGettedActorId); + binWriter.Write((UInt32)targettedActorId); binWriter.Write((UInt32)realDescID); } } - SubPacket packet = new SubPacket(OPCODE, sourceActorId, tarGetActorId, data); + SubPacket packet = new SubPacket(OPCODE, sourceActorId, targetActorId, data); 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 1dded5f3..14a72cb8 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/ActorInstantiatePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/ActorInstantiatePacket.cs @@ -11,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]; @@ -31,7 +31,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - return new SubPacket(OPCODE, sourceActorID, tarGetActorID, data); + return new SubPacket(OPCODE, sourceActorID, targetActorID, data); } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/ActorSpecialGraphicPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/ActorSpecialGraphicPacket.cs index e5479f82..2ba4f976 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/ActorSpecialGraphicPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/ActorSpecialGraphicPacket.cs @@ -13,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]; @@ -25,7 +25,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - return new SubPacket(OPCODE, tarGetActorID, playerActorID, data); + return new SubPacket(OPCODE, targetActorID, playerActorID, data); } } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/BattleAction1Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/BattleAction1Packet.cs index 88525e92..e6d61e39 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/BattleAction1Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/BattleAction1Packet.cs @@ -7,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]; @@ -18,7 +18,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - return new SubPacket(OPCODE, sourceId, tarGetId, data); + return new SubPacket(OPCODE, sourceId, targetId, data); } } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/MoveActorToPositionPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/MoveActorToPositionPacket.cs index e812ba4b..60e5596a 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/MoveActorToPositionPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/MoveActorToPositionPacket.cs @@ -8,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]; @@ -25,7 +25,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - SubPacket packet = new SubPacket(OPCODE, playerActorID, tarGetActorID, data); + SubPacket packet = new SubPacket(OPCODE, playerActorID, targetActorID, data); return packet; } diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorIconPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorIconPacket.cs index c8390e06..662e6096 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorIconPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorIconPacket.cs @@ -12,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]; @@ -24,7 +24,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - return new SubPacket(OPCODE, playerActorID, tarGetActorID, data); + return new SubPacket(OPCODE, playerActorID, targetActorID, data); } } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorIdleAnimationPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorIdleAnimationPacket.cs index 3bbcfffd..12341c95 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorIdleAnimationPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorIdleAnimationPacket.cs @@ -8,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]; @@ -21,7 +21,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - return new SubPacket(OPCODE, playerActorID, tarGetID, data); + return new SubPacket(OPCODE, playerActorID, targetID, data); } } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorIsZoningPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorIsZoningPacket.cs index f7edc364..5b46c55b 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorIsZoningPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorIsZoningPacket.cs @@ -5,11 +5,11 @@ 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); - return new SubPacket(OPCODE, playerActorID, tarGetActorID, data); + return new SubPacket(OPCODE, playerActorID, targetActorID, data); } } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorNamePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorNamePacket.cs index 9ec68113..6036cd4d 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorNamePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorNamePacket.cs @@ -9,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]; @@ -27,7 +27,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - SubPacket packet = new SubPacket(OPCODE, playerActorID, tarGetActorID, data); + SubPacket packet = new SubPacket(OPCODE, playerActorID, targetActorID, data); return packet; } diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs index b48966b9..7e0012ea 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs @@ -22,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]; @@ -44,7 +44,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - return new SubPacket(OPCODE, sourceActorID, tarGetActorID, data); + return new SubPacket(OPCODE, sourceActorID, targetActorID, data); } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs index 3591c3e0..b059f506 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorPropetyPacket.cs @@ -182,9 +182,9 @@ namespace FFXIVClassic_Map_Server.packets.send.actor isMore = flag; } - public void SetTarget(string tarGet) + public void SetTarget(string target) { - currentTarget = tarGet; + currentTarget = target; } public void AddTarget() diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorSpeedPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorSpeedPacket.cs index 791b2b0b..5f22942b 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorSpeedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorSpeedPacket.cs @@ -12,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]; @@ -38,10 +38,10 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - return new SubPacket(OPCODE, playerActorID, tarGetActorID, data); + 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]; @@ -67,7 +67,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - return new SubPacket(OPCODE, playerActorID, tarGetActorID, data); + return new SubPacket(OPCODE, playerActorID, targetActorID, data); } } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatePacket.cs index 317e5214..bb3a0cc6 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatePacket.cs @@ -27,10 +27,10 @@ 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)); + 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 4f903091..277dda2b 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusAllPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusAllPacket.cs @@ -8,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]; @@ -25,7 +25,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - SubPacket packet = new SubPacket(OPCODE, playerActorID, tarGetActorID, data); + SubPacket packet = new SubPacket(OPCODE, playerActorID, targetActorID, data); return packet; } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusPacket.cs index 65811b30..bd148efb 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorStatusPacket.cs @@ -8,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]; @@ -21,7 +21,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - return new SubPacket(OPCODE, playerActorID, tarGetActorID, data); + return new SubPacket(OPCODE, playerActorID, targetActorID, data); } } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetAnimatedPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetAnimatedPacket.cs index 62a42bab..ebc77e0d 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetAnimatedPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetAnimatedPacket.cs @@ -7,9 +7,9 @@ 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)); + 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 5ef0052c..645209cc 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorTargetPacket.cs @@ -7,9 +7,9 @@ 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)); + return new SubPacket(OPCODE, playerActorID, targetID, BitConverter.GetBytes((ulong)targetID)); } } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/_0xFPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/_0xFPacket.cs index e9c598ee..7fe72cae 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/_0xFPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/_0xFPacket.cs @@ -7,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]; @@ -19,7 +19,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - return new SubPacket(OPCODE, playerActorID, tarGetActorID, data); + return new SubPacket(OPCODE, playerActorID, targetActorID, data); } } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleAction.cs b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleAction.cs index 77dda47b..71bf867b 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleAction.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleAction.cs @@ -2,7 +2,7 @@ { class BattleAction { - public uint tarGetId; + public uint targetId; public ushort amount; public ushort worldMasterTextId; public uint effectId; diff --git a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX00Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX00Packet.cs index aa61508c..30995408 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX00Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX00Packet.cs @@ -8,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 e91efe59..0a90d960 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX01Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX01Packet.cs @@ -8,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]; @@ -26,7 +26,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle binWriter.Write((UInt16)commandId); binWriter.Write((UInt16)810); //? - binWriter.Write((UInt32)tarGetActorId); + binWriter.Write((UInt32)targetActorId); binWriter.Write((UInt16)amount); binWriter.Write((UInt16)worldMasterTextId); diff --git a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX10Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX10Packet.cs index 8a136009..67775962 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX10Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX10Packet.cs @@ -28,7 +28,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle binWriter.Seek(0x20, SeekOrigin.Begin); foreach (BattleAction action in actionList) - binWriter.Write((UInt32)action.tarGetId); + binWriter.Write((UInt32)action.targetId); binWriter.Seek(0x50, SeekOrigin.Begin); foreach (BattleAction action in actionList) diff --git a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX18Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX18Packet.cs index 63e2f960..38038ab3 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX18Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX18Packet.cs @@ -28,7 +28,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle binWriter.Seek(0x58, SeekOrigin.Begin); foreach (BattleAction action in actionList) - binWriter.Write((UInt32)action.tarGetId); + binWriter.Write((UInt32)action.targetId); binWriter.Seek(0xA0, SeekOrigin.Begin); foreach (BattleAction action in actionList) diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryBeginChangePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryBeginChangePacket.cs index a8d450c6..4df15032 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryBeginChangePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryBeginChangePacket.cs @@ -5,11 +5,11 @@ 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); + return new SubPacket(OPCODE, sourceActorId, targetActorId, data); } public static SubPacket BuildPacket(uint playerActorID) diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryEndChangePacket.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryEndChangePacket.cs index 369e26f9..c6944676 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryEndChangePacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryEndChangePacket.cs @@ -5,9 +5,9 @@ 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]); + return new SubPacket(OPCODE, sourceActorId, targetActorId, new byte[8]); } public static SubPacket BuildPacket(uint playerActorID) diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX01Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX01Packet.cs index 5a3c5757..5d4db4fe 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX01Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX01Packet.cs @@ -13,7 +13,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory 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]; @@ -25,7 +25,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory } } - return new SubPacket(OPCODE, sourceActorId, tarGetActorId, data); + return new SubPacket(OPCODE, sourceActorId, targetActorId, data); } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX08Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX08Packet.cs index 19ebd593..b136429c 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX08Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX08Packet.cs @@ -15,7 +15,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory 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]; @@ -40,7 +40,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory } } - return new SubPacket(OPCODE, sourceActorId, tarGetActorId, data); + return new SubPacket(OPCODE, sourceActorId, targetActorId, data); } } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX16Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX16Packet.cs index 57cdb134..31cf4cc4 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX16Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventoryListX16Packet.cs @@ -14,7 +14,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory 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]; @@ -36,7 +36,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory } } - return new SubPacket(OPCODE, sourceActorId, tarGetActorId, data); + return new SubPacket(OPCODE, sourceActorId, targetActorId, data); } } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetBeginPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetBeginPacket.cs index 99d8370f..707f9ca1 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetBeginPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetBeginPacket.cs @@ -13,7 +13,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory 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]; @@ -27,7 +27,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory } } - return new SubPacket(OPCODE, sourceActorId, tarGetActorId, data); + return new SubPacket(OPCODE, sourceActorId, targetActorId, data); } } diff --git a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetEndPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetEndPacket.cs index cdfc485d..29da7459 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetEndPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/inventory/InventorySetEndPacket.cs @@ -11,9 +11,9 @@ 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]); + return new SubPacket(OPCODE, sourceActorId, targetActorID, new byte[8]); } } diff --git a/FFXIVClassic Map Server/packets/send/GameMessagePacket.cs b/FFXIVClassic Map Server/packets/send/GameMessagePacket.cs index cf780440..9524bae1 100644 --- a/FFXIVClassic Map Server/packets/send/GameMessagePacket.cs +++ b/FFXIVClassic Map Server/packets/send/GameMessagePacket.cs @@ -56,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]; @@ -71,10 +71,10 @@ namespace FFXIVClassic_Map_Server.packets.send } } - return new SubPacket(OPCODE_GAMEMESSAGE_WITH_ACTOR1, sourceId, tarGetId, data); + 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; @@ -119,10 +119,10 @@ namespace FFXIVClassic_Map_Server.packets.send } } - return new SubPacket(opcode, sourceId, tarGetId, data); + 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]; @@ -137,10 +137,10 @@ namespace FFXIVClassic_Map_Server.packets.send } } - return new SubPacket(OPCODE_GAMEMESSAGE_WITH_CUSTOM_SENDER1, sourceId, tarGetId, data); + 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; @@ -185,10 +185,10 @@ namespace FFXIVClassic_Map_Server.packets.send } } - return new SubPacket(opcode, sourceId, tarGetId, data); + 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]; @@ -203,10 +203,10 @@ namespace FFXIVClassic_Map_Server.packets.send } } - return new SubPacket(OPCODE_GAMEMESSAGE_WITH_DISPID_SENDER1, sourceId, tarGetId, data); + 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; @@ -251,10 +251,10 @@ namespace FFXIVClassic_Map_Server.packets.send } } - return new SubPacket(opcode, sourceId, tarGetId, data); + 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]; @@ -268,10 +268,10 @@ namespace FFXIVClassic_Map_Server.packets.send } } - return new SubPacket(OPCODE_GAMEMESSAGE_WITHOUT_ACTOR1, sourceId, tarGetId, data); + 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; @@ -315,7 +315,7 @@ namespace FFXIVClassic_Map_Server.packets.send } } - return new SubPacket(opcode, sourceId, tarGetId, data); + return new SubPacket(opcode, sourceId, targetId, data); } private static int findSizeOfParams(List lParams) diff --git a/FFXIVClassic Map Server/packets/send/SendMessagePacket.cs b/FFXIVClassic Map Server/packets/send/SendMessagePacket.cs index 2e305057..6152f215 100644 --- a/FFXIVClassic Map Server/packets/send/SendMessagePacket.cs +++ b/FFXIVClassic Map Server/packets/send/SendMessagePacket.cs @@ -34,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]; @@ -49,7 +49,7 @@ namespace FFXIVClassic_Map_Server.packets.send } } - return new SubPacket(OPCODE, playerActorID, tarGetID, data); + return new SubPacket(OPCODE, playerActorID, targetID, data); } } diff --git a/FFXIVClassic Map Server/packets/send/events/KickEventPacket.cs b/FFXIVClassic Map Server/packets/send/events/KickEventPacket.cs index 3ba3455b..35571c55 100644 --- a/FFXIVClassic Map Server/packets/send/events/KickEventPacket.cs +++ b/FFXIVClassic Map Server/packets/send/events/KickEventPacket.cs @@ -11,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]; @@ -20,7 +20,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events using (BinaryWriter binWriter = new BinaryWriter(mem)) { binWriter.Write((UInt32)playerActorId); - binWriter.Write((UInt32)tarGetActorId); + binWriter.Write((UInt32)targetActorId); binWriter.Write((Byte)0x5); binWriter.Write((Byte)0x87); binWriter.Write((Byte)0xDC); diff --git a/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs b/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs index 2b76466d..781e137f 100644 --- a/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs +++ b/FFXIVClassic Map Server/packets/send/list/SetListPropertyPacket.cs @@ -158,11 +158,11 @@ namespace FFXIVClassic_Map_Server.packets.send.actor 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)); - runningByteTotal += (ushort)(1 + Encoding.ASCII.GetByteCount(tarGet)); + binWriter.Write((byte)(isMore ? 0x62 + target.Length : 0x82 + target.Length)); + binWriter.Write(Encoding.ASCII.GetBytes(target)); + runningByteTotal += (ushort)(1 + Encoding.ASCII.GetByteCount(target)); } diff --git a/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs b/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs index a6b51c95..73780b4c 100644 --- a/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs @@ -9,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]; @@ -21,7 +21,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player } } - return new SubPacket(OPCODE, playerActorID, tarGetActorID, data); + return new SubPacket(OPCODE, playerActorID, targetActorID, data); } } } diff --git a/FFXIVClassic Map Server/packets/send/player/SetChocoboNamePacket.cs b/FFXIVClassic Map Server/packets/send/player/SetChocoboNamePacket.cs index 5b3776e0..53bbb748 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetChocoboNamePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetChocoboNamePacket.cs @@ -7,11 +7,11 @@ 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"; - return new SubPacket(OPCODE, playerActorID, tarGetActorID, Encoding.ASCII.GetBytes(name)); + return new SubPacket(OPCODE, playerActorID, targetActorID, Encoding.ASCII.GetBytes(name)); } } } diff --git a/FFXIVClassic Map Server/packets/send/player/SetCurrentJobPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetCurrentJobPacket.cs index 152aa55e..43a07cd0 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetCurrentJobPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetCurrentJobPacket.cs @@ -7,9 +7,9 @@ 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)); + return new SubPacket(OPCODE, sourceActorID, targetActorID, BitConverter.GetBytes((uint)jobId)); } } } diff --git a/FFXIVClassic Map Server/packets/send/player/SetGrandCompanyPacket.cs b/FFXIVClassic Map Server/packets/send/player/SetGrandCompanyPacket.cs index 326a4bcb..4b177966 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetGrandCompanyPacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetGrandCompanyPacket.cs @@ -8,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]; @@ -23,7 +23,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor } } - return new SubPacket(OPCODE, sourceActorID, tarGetActorID, data); + return new SubPacket(OPCODE, sourceActorID, targetActorID, data); } } diff --git a/FFXIVClassic Map Server/packets/send/player/SetPlayerTitlePacket.cs b/FFXIVClassic Map Server/packets/send/player/SetPlayerTitlePacket.cs index 7a053092..112def38 100644 --- a/FFXIVClassic Map Server/packets/send/player/SetPlayerTitlePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/SetPlayerTitlePacket.cs @@ -7,9 +7,9 @@ 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)); + 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 6924769d..221f4d37 100644 --- a/FFXIVClassic Map Server/packets/send/player/_0x196Packet.cs +++ b/FFXIVClassic Map Server/packets/send/player/_0x196Packet.cs @@ -8,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]; @@ -21,7 +21,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player } } - return new SubPacket(OPCODE, playerActorID, tarGetActorID, data); + return new SubPacket(OPCODE, playerActorID, targetActorID, data); } } } diff --git a/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs b/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs index 095cb206..e86996eb 100644 --- a/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs +++ b/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs @@ -32,11 +32,11 @@ namespace FFXIVClassic_Map_Server.utils } } - public void NewTarget(string tarGet) + public void NewTarget(string target) { currentActorPropertyPacket.AddTarget(); - currentTarget = tarGet; - currentActorPropertyPacket.SetTarget(tarGet); + currentTarget = target; + currentActorPropertyPacket.SetTarget(target); } public List Done() From 884a26dc52ba159e44722786d209384eccd9286a Mon Sep 17 00:00:00 2001 From: Tahir Akhlaq Date: Wed, 15 Jun 2016 03:41:23 +0100 Subject: [PATCH 12/13] fixed method casing in lua --- .../base/chara/npc/object/ObjectBed.lua | 8 +- .../base/chara/npc/object/ObjectInnDoor.lua | 8 +- .../chara/npc/object/ObjectItemStorage.lua | 2 +- .../chara/npc/object/OpeningStoperF0B1.lua | 8 +- .../base/chara/npc/object/TaskBoard.lua | 14 +- .../npc/object/aetheryte/AetheryteParent.lua | 6 +- .../populace/PopulaceGuildlevePublisher.lua | 14 +- .../npc/populace/PopulaceLinkshellManager.lua | 10 +- .../populace/PopulacePassiveGLPublisher.lua | 6 +- .../chara/npc/populace/PopulaceStandard.lua | 6 +- .../populace/shop/PopulaceShopSalesman.lua | 8 +- data/scripts/commands/ActivateCommand.lua | 8 +- data/scripts/commands/AttackWeaponSkill.lua | 8 +- data/scripts/commands/BonusPointCommand.lua | 8 +- data/scripts/commands/CheckCommand.lua | 4 +- data/scripts/commands/ChocoboRideCommand.lua | 30 ++--- data/scripts/commands/DiceCommand.lua | 6 +- data/scripts/commands/EmoteSitCommand.lua | 4 +- .../scripts/commands/EmoteStandardCommand.lua | 4 +- data/scripts/commands/EquipCommand.lua | 40 +++--- data/scripts/commands/ItemWasteCommand.lua | 4 +- data/scripts/commands/LogoutCommand.lua | 20 +-- data/scripts/commands/PartyInviteCommand.lua | 6 +- .../commands/RequestInformationCommand.lua | 4 +- .../commands/RequestQuestJournalCommand.lua | 2 +- data/scripts/commands/TeleportCommand.lua | 24 ++-- .../openingDire_fst0Btl03_04@0A600.lua | 20 +-- .../openingDire_ocn0Btl02_04@0C100.lua | 16 +-- .../openingDire_wil0Btl01_04@0B800.lua | 8 +- .../questDirect_fst0Btl03_01@0A615.lua | 18 +-- .../questDirect_ocn0Btl02_01@0C196.lua | 24 ++-- data/scripts/player.lua | 124 +++++++++--------- .../openingStop_fstBtl03_03@0A600.lua | 10 +- .../pplStd_fst0Btl03_01@0A600.lua | 40 +++--- .../pplStd_fst0Btl03_02@0A600.lua | 14 +- .../fst0Town01/PopulaceStandard/vkorolon.lua | 8 +- .../fighterAlly_ocn0Btl02_02@0C196.lua | 2 +- .../fighterAlly_ocn0Btl02_03@0C196.lua | 2 +- .../jellyfishSc_ocn0Btl02_04@0C196.lua | 2 +- .../PopulaceStandard/pplStd_01@0C100.lua | 10 +- .../PopulaceStandard/pplStd_02@0C100.lua | 10 +- .../PopulaceStandard/pplStd_03@0C100.lua | 10 +- .../PopulaceStandard/pplStd_04@0C100.lua | 10 +- .../PopulaceStandard/pplStd_05@0C100.lua | 20 +-- .../PopulaceStandard/pplStd_06@0C100.lua | 10 +- .../PopulaceStandard/pplStd_07@0C100.lua | 10 +- .../PopulaceStandard/pplStd_08@0C100.lua | 10 +- .../PopulaceStandard/pplStd_09@0C100.lua | 10 +- .../PopulaceStandard/pplStd_0a@0C100.lua | 22 ++-- .../PopulaceStandard/pplStd_0b@0C100.lua | 12 +- .../PopulaceStandard/pplStd_0c@0C100.lua | 10 +- .../PopulaceStandard/pplStd_0d@0C100.lua | 10 +- .../PopulaceStandard/pplStd_0e@0C100.lua | 10 +- .../PopulaceStandard/pplStd_0f@0C100.lua | 38 +++--- .../PopulaceStandard/pplStd_11@0C100.lua | 32 ++--- .../ocn0Battle02/PopulaceStandard/zone.lua | 4 +- .../sea0Town01/PopulaceStandard/aergwynt.lua | 4 +- .../sea0Town01/PopulaceStandard/baderon.lua | 4 +- .../sea0Town01/PopulaceStandard/chantine.lua | 8 +- .../sea0Town01/PopulaceStandard/estrilda.lua | 8 +- .../sea0Town01/PopulaceStandard/frithuric.lua | 8 +- .../sea0Town01/PopulaceStandard/fzhumii.lua | 4 +- .../sea0Town01/PopulaceStandard/gigirya.lua | 8 +- .../sea0Town01/PopulaceStandard/gnibnpha.lua | 4 +- .../sea0Town01/PopulaceStandard/gregory.lua | 8 +- .../sea0Town01/PopulaceStandard/isleen.lua | 4 +- .../sea0Town01/PopulaceStandard/istrilda.lua | 4 +- .../sea0Town01/PopulaceStandard/josias.lua | 8 +- .../sea0Town01/PopulaceStandard/kakamehi.lua | 8 +- .../sea0Town01/PopulaceStandard/kokoto.lua | 8 +- .../sea0Town01/PopulaceStandard/laniaitte.lua | 4 +- .../sea0Town01/PopulaceStandard/lauda.lua | 8 +- .../sea0Town01/PopulaceStandard/maunie.lua | 8 +- .../sea0Town01/PopulaceStandard/mytesyn.lua | 8 +- .../sea0Town01/PopulaceStandard/nanaka.lua | 8 +- .../PopulaceStandard/stephannot.lua | 8 +- .../sea0Town01/PopulaceStandard/tirauland.lua | 10 +- .../sea0Town01/PopulaceStandard/zanthael.lua | 4 +- .../sea0Town01/PopulaceStandard/zehrymm.lua | 4 +- .../sea0Town01a/PopulaceStandard/aentfoet.lua | 4 +- .../sea0Town01a/PopulaceStandard/aergwynt.lua | 4 +- .../sea0Town01a/PopulaceStandard/ahldskyf.lua | 4 +- .../PopulaceStandard/angry_river.lua | 4 +- .../sea0Town01a/PopulaceStandard/ansgor.lua | 4 +- .../sea0Town01a/PopulaceStandard/arnegis.lua | 4 +- .../PopulaceStandard/arthurioux.lua | 4 +- .../sea0Town01a/PopulaceStandard/astrid.lua | 4 +- .../sea0Town01a/PopulaceStandard/audaine.lua | 4 +- .../PopulaceStandard/bango_zango.lua | 4 +- .../sea0Town01a/PopulaceStandard/bayard.lua | 4 +- .../sea0Town01a/PopulaceStandard/bloemerl.lua | 4 +- .../sea0Town01a/PopulaceStandard/bmallpa.lua | 4 +- .../sea0Town01a/PopulaceStandard/bnhapla.lua | 4 +- .../sea0Town01a/PopulaceStandard/bodenolf.lua | 4 +- .../sea0Town01a/PopulaceStandard/brictt.lua | 4 +- .../sea0Town01a/PopulaceStandard/buburoon.lua | 4 +- .../PopulaceStandard/carrilaut.lua | 4 +- .../sea0Town01a/PopulaceStandard/ceadda.lua | 4 +- .../sea0Town01a/PopulaceStandard/charlys.lua | 4 +- .../PopulaceStandard/chaunollet.lua | 4 +- .../PopulaceStandard/chichiroon.lua | 4 +- .../sea0Town01a/PopulaceStandard/clifton.lua | 4 +- .../sea0Town01a/PopulaceStandard/colson.lua | 4 +- .../PopulaceStandard/daca_jinjahl.lua | 4 +- .../PopulaceStandard/delado_madalado.lua | 4 +- .../sea0Town01a/PopulaceStandard/dhemsunn.lua | 4 +- .../sea0Town01a/PopulaceStandard/dodoroba.lua | 4 +- .../drowsy-eyed_adventurer.lua | 4 +- .../sea0Town01a/PopulaceStandard/dympna.lua | 4 +- .../sea0Town01a/PopulaceStandard/elilwaen.lua | 4 +- .../PopulaceStandard/enraptured_traveler.lua | 4 +- .../PopulaceStandard/eugennoix.lua | 4 +- .../sea0Town01a/PopulaceStandard/fabodji.lua | 4 +- .../PopulaceStandard/ferdillaix.lua | 4 +- .../PopulaceStandard/fickle_beggar.lua | 4 +- .../PopulaceStandard/frailoise.lua | 4 +- .../sea0Town01a/PopulaceStandard/fufuna.lua | 4 +- .../PopulaceStandard/fuzak_anzak.lua | 4 +- .../PopulaceStandard/gautzelin.lua | 4 +- .../sea0Town01a/PopulaceStandard/gert.lua | 4 +- .../sea0Town01a/PopulaceStandard/gerulf.lua | 4 +- .../sea0Town01a/PopulaceStandard/ginnade.lua | 4 +- .../PopulaceStandard/glowing_goodwife.lua | 4 +- .../sea0Town01a/PopulaceStandard/gnanghal.lua | 4 +- .../sea0Town01a/PopulaceStandard/gnibnpha.lua | 4 +- .../sea0Town01a/PopulaceStandard/haldberk.lua | 4 +- .../sea0Town01a/PopulaceStandard/hasthwab.lua | 4 +- .../sea0Town01a/PopulaceStandard/hihine.lua | 4 +- .../sea0Town01a/PopulaceStandard/hlahono.lua | 4 +- .../sea0Town01a/PopulaceStandard/hob.lua | 4 +- .../sea0Town01a/PopulaceStandard/hobriaut.lua | 4 +- .../PopulaceStandard/hrhanbolo.lua | 4 +- .../PopulaceStandard/ighii_moui.lua | 4 +- .../sea0Town01a/PopulaceStandard/imania.lua | 4 +- .../sea0Town01a/PopulaceStandard/iofa.lua | 4 +- .../PopulaceStandard/isaudorel.lua | 4 +- .../sea0Town01a/PopulaceStandard/ivan.lua | 4 +- .../PopulaceStandard/jainelette.lua | 4 +- .../sea0Town01a/PopulaceStandard/jghonako.lua | 4 +- .../sea0Town01a/PopulaceStandard/jojoroon.lua | 4 +- .../PopulaceStandard/kehda_mujuuk.lua | 4 +- .../sea0Town01a/PopulaceStandard/kikichua.lua | 4 +- .../PopulaceStandard/laniaitte.lua | 4 +- .../PopulaceStandard/leveridge.lua | 4 +- .../PopulaceStandard/liautroix.lua | 4 +- .../sea0Town01a/PopulaceStandard/lilina.lua | 4 +- .../sea0Town01a/PopulaceStandard/lorhzant.lua | 4 +- .../PopulaceStandard/maetistym.lua | 4 +- .../sea0Town01a/PopulaceStandard/maisie.lua | 4 +- .../PopulaceStandard/mareillie.lua | 4 +- .../PopulaceStandard/martiallais.lua | 4 +- .../sea0Town01a/PopulaceStandard/merlzirn.lua | 4 +- .../sea0Town01a/PopulaceStandard/mharelak.lua | 4 +- .../sea0Town01a/PopulaceStandard/mimiroon.lua | 4 +- .../muscle-bound_deckhand.lua | 4 +- .../sea0Town01a/PopulaceStandard/mynadaeg.lua | 4 +- .../sea0Town01a/PopulaceStandard/mzimzizi.lua | 4 +- .../sea0Town01a/PopulaceStandard/nanapiri.lua | 4 +- .../sea0Town01a/PopulaceStandard/neale.lua | 4 +- .../PopulaceStandard/nheu_jawantal.lua | 4 +- .../sea0Town01a/PopulaceStandard/ninianne.lua | 4 +- .../sea0Town01a/PopulaceStandard/nnmulika.lua | 4 +- .../sea0Town01a/PopulaceStandard/nunuba.lua | 4 +- .../sea0Town01a/PopulaceStandard/ortolf.lua | 4 +- .../sea0Town01a/PopulaceStandard/ositha.lua | 4 +- .../PopulaceStandard/overweening_woman.lua | 4 +- .../pasty-faced_adventurer.lua | 4 +- .../pearly-toothed_porter.lua | 4 +- .../PopulaceStandard/pfynhaemr.lua | 4 +- .../PopulaceStandard/pissed_pirate.lua | 4 +- .../positively_pungent_pirate.lua | 4 +- .../PopulaceStandard/prudentia.lua | 4 +- .../sea0Town01a/PopulaceStandard/ptahjha.lua | 4 +- .../sea0Town01a/PopulaceStandard/pulmia.lua | 4 +- .../sea0Town01a/PopulaceStandard/raragun.lua | 4 +- .../sea0Town01a/PopulaceStandard/rbaharra.lua | 4 +- .../sea0Town01a/PopulaceStandard/rerenasu.lua | 4 +- .../PopulaceStandard/robairlain.lua | 4 +- .../PopulaceStandard/roosting_crow.lua | 4 +- .../sea0Town01a/PopulaceStandard/rsushmo.lua | 4 +- .../PopulaceStandard/rubh_epocan.lua | 4 +- .../sea0Town01a/PopulaceStandard/rubh_hob.lua | 4 +- .../sea0Town01a/PopulaceStandard/sathzant.lua | 4 +- .../PopulaceStandard/satiated_shopkeep.lua | 4 +- .../sea0Town01a/PopulaceStandard/shoshoma.lua | 4 +- .../PopulaceStandard/skarnwaen.lua | 4 +- .../PopulaceStandard/skoefmynd.lua | 4 +- .../sea0Town01a/PopulaceStandard/slaiboli.lua | 4 +- .../sea0Town01a/PopulaceStandard/sosoze.lua | 4 +- .../PopulaceStandard/sundhimal.lua | 4 +- .../sure-voiced_barracuda_knight.lua | 4 +- .../suspicious-looking_traveler.lua | 4 +- .../sea0Town01a/PopulaceStandard/syhrdaeg.lua | 4 +- .../sea0Town01a/PopulaceStandard/syngsmyd.lua | 4 +- .../sea0Town01a/PopulaceStandard/tatasako.lua | 4 +- .../PopulaceStandard/tefh_moshroca.lua | 4 +- .../PopulaceStandard/thata_khamazom.lua | 4 +- .../PopulaceStandard/thosinbaen.lua | 4 +- .../PopulaceStandard/tittering_traveler.lua | 4 +- .../sea0Town01a/PopulaceStandard/totoruto.lua | 4 +- .../sea0Town01a/PopulaceStandard/triaine.lua | 4 +- .../sea0Town01a/PopulaceStandard/trinne.lua | 4 +- .../unconscious_adventurer.lua | 4 +- .../sea0Town01a/PopulaceStandard/undsatz.lua | 4 +- .../sea0Town01a/PopulaceStandard/vhynho.lua | 4 +- .../sea0Town01a/PopulaceStandard/waekbyrt.lua | 4 +- .../sea0Town01a/PopulaceStandard/whahtoa.lua | 4 +- .../PopulaceStandard/wyra_khamazom.lua | 4 +- .../PopulaceStandard/wyrstmann.lua | 4 +- .../sea0Town01a/PopulaceStandard/xavalien.lua | 4 +- .../sea0Town01a/PopulaceStandard/zonggo.lua | 4 +- .../sea0Town01a/PopulaceStandard/zuzule.lua | 4 +- .../pplStd_wil0Btl01_01@0B800.lua | 10 +- .../pplStd_wil0Btl01_02@0B800.lua | 18 +-- .../pplStd_wil0Btl01_03@0B800.lua | 10 +- .../pplStd_wil0Btl01_04@0B800.lua | 10 +- .../pplStd_wil0Btl01_05@0B800.lua | 10 +- .../pplStd_wil0Btl01_06@0B800.lua | 18 +-- .../pplStd_wil0Btl01_07@0B800.lua | 10 +- .../pplStd_wil0Btl01_08@0B800.lua | 10 +- .../pplStd_wil0Btl01_09@0B800.lua | 4 +- .../pplStd_wil0Btl01_0a@0B800.lua | 24 ++-- .../pplStd_wil0Btl01_0b@0B800.lua | 4 +- .../wil0Town01/PopulaceStandard/aistan.lua | 4 +- .../wil0Town01/PopulaceStandard/baterich.lua | 4 +- .../wil0Town01/PopulaceStandard/berndan.lua | 6 +- .../wil0Town01/PopulaceStandard/bertram.lua | 10 +- .../wil0Town01/PopulaceStandard/claroise.lua | 4 +- .../wil0Town01/PopulaceStandard/drew.lua | 4 +- .../PopulaceStandard/dural_tharal.lua | 4 +- .../flame_lieutenant_somber_meadow.lua | 4 +- .../flame_private_sisimuza_tetemuza.lua | 4 +- .../flame_sergeant_mimio_mio.lua | 4 +- .../wil0Town01/PopulaceStandard/gagaruna.lua | 4 +- .../wil0Town01/PopulaceStandard/gairbert.lua | 4 +- .../wil0Town01/PopulaceStandard/gegeissa.lua | 4 +- .../PopulaceStandard/guillaunaux.lua | 4 +- .../wil0Town01/PopulaceStandard/gunnulf.lua | 4 +- .../wil0Town01/PopulaceStandard/halstein.lua | 4 +- .../wil0Town01/PopulaceStandard/hehena.lua | 4 +- .../wil0Town01/PopulaceStandard/heibert.lua | 4 +- .../wil0Town01/PopulaceStandard/hildie.lua | 4 +- .../wil0Town01/PopulaceStandard/ipaghlo.lua | 4 +- .../wil0Town01/PopulaceStandard/judithe.lua | 4 +- .../wil0Town01/PopulaceStandard/kiora.lua | 10 +- .../wil0Town01/PopulaceStandard/kokobi.lua | 4 +- .../wil0Town01/PopulaceStandard/kukumuko.lua | 4 +- .../wil0Town01/PopulaceStandard/lettice.lua | 10 +- .../wil0Town01/PopulaceStandard/lulumo.lua | 4 +- .../wil0Town01/PopulaceStandard/mammet.lua | 4 +- .../wil0Town01/PopulaceStandard/melisie.lua | 4 +- .../wil0Town01/PopulaceStandard/mimishu.lua | 4 +- .../wil0Town01/PopulaceStandard/minerva.lua | 10 +- .../wil0Town01/PopulaceStandard/momodi.lua | 6 +- .../PopulaceStandard/naida_zamaida.lua | 4 +- .../PopulaceStandard/nokksu_shanksu.lua | 4 +- .../wil0Town01/PopulaceStandard/ococo.lua | 4 +- .../wil0Town01/PopulaceStandard/opondhao.lua | 10 +- .../PopulaceStandard/otopa_pottopa.lua | 6 +- .../wil0Town01/PopulaceStandard/popori.lua | 4 +- .../wil0Town01/PopulaceStandard/qaruru.lua | 4 +- .../PopulaceStandard/qata_nelhah.lua | 4 +- .../wil0Town01/PopulaceStandard/roarich.lua | 4 +- .../wil0Town01/PopulaceStandard/robyn.lua | 4 +- .../wil0Town01/PopulaceStandard/rorojaru.lua | 4 +- .../wil0Town01/PopulaceStandard/rururaji.lua | 4 +- .../PopulaceStandard/shamani_lohmani.lua | 4 +- .../wil0Town01/PopulaceStandard/sibold.lua | 4 +- .../wil0Town01/PopulaceStandard/styrmoeya.lua | 10 +- .../wil0Town01/PopulaceStandard/thimm.lua | 4 +- .../wil0Town01/PopulaceStandard/titinin.lua | 4 +- .../wil0Town01/PopulaceStandard/tyon.lua | 10 +- .../wil0Town01/PopulaceStandard/wenefreda.lua | 4 +- .../wil0Town01/PopulaceStandard/wracwulf.lua | 4 +- .../wil0Town01/PopulaceStandard/yayatoki.lua | 4 +- .../PopulaceStandard/yhah_amariyo.lua | 10 +- .../wil0Town01/PopulaceStandard/yuyuhase.lua | 4 +- .../PopulaceStandard/zoengterbin.lua | 10 +- .../PopulaceStandard/abylgo_hamylgo.lua | 4 +- .../PopulaceStandard/anthoinette.lua | 4 +- .../PopulaceStandard/apacho_naccho.lua | 4 +- .../wil0Town01a/PopulaceStandard/aspipi.lua | 4 +- .../wil0Town01a/PopulaceStandard/babaki.lua | 4 +- .../PopulaceStandard/barnabaix.lua | 4 +- .../wil0Town01a/PopulaceStandard/berthar.lua | 4 +- .../wil0Town01a/PopulaceStandard/bouchard.lua | 4 +- .../PopulaceStandard/cahernaut.lua | 4 +- .../wil0Town01a/PopulaceStandard/chachai.lua | 4 +- .../wil0Town01a/PopulaceStandard/ciceroix.lua | 4 +- .../wil0Town01a/PopulaceStandard/crhabye.lua | 4 +- .../PopulaceStandard/dariustel.lua | 4 +- .../wil0Town01a/PopulaceStandard/deaustie.lua | 4 +- .../wil0Town01a/PopulaceStandard/diriaine.lua | 4 +- .../wil0Town01a/PopulaceStandard/dylise.lua | 4 +- .../wil0Town01a/PopulaceStandard/eara.lua | 4 +- .../wil0Town01a/PopulaceStandard/eleanor.lua | 4 +- .../wil0Town01a/PopulaceStandard/elecotte.lua | 4 +- .../wil0Town01a/PopulaceStandard/fifilo.lua | 4 +- .../PopulaceStandard/fineco_romanecco.lua | 4 +- .../PopulaceStandard/fruhybolg.lua | 4 +- .../PopulaceStandard/fyrilsunn.lua | 4 +- .../wil0Town01a/PopulaceStandard/galeren.lua | 4 +- .../wil0Town01a/PopulaceStandard/gloiucen.lua | 4 +- .../wil0Town01a/PopulaceStandard/gogofu.lua | 4 +- .../wil0Town01a/PopulaceStandard/goodife.lua | 4 +- .../wil0Town01a/PopulaceStandard/guencen.lua | 4 +- .../PopulaceStandard/guillestet.lua | 4 +- .../wil0Town01a/PopulaceStandard/hahayo.lua | 4 +- .../PopulaceStandard/hawazi_zowazi.lua | 4 +- .../wil0Town01a/PopulaceStandard/hcidjaa.lua | 4 +- .../wil0Town01a/PopulaceStandard/holbubu.lua | 4 +- .../wil0Town01a/PopulaceStandard/illofii.lua | 4 +- .../wil0Town01a/PopulaceStandard/isabella.lua | 4 +- .../wil0Town01a/PopulaceStandard/jajanzo.lua | 4 +- .../wil0Town01a/PopulaceStandard/jannie.lua | 4 +- .../wil0Town01a/PopulaceStandard/jeger.lua | 4 +- .../wil0Town01a/PopulaceStandard/jenlyns.lua | 4 +- .../PopulaceStandard/kamlito_halito.lua | 4 +- .../PopulaceStandard/kopuru_fupuru.lua | 8 +- .../wil0Town01a/PopulaceStandard/kukusi.lua | 4 +- .../wil0Town01a/PopulaceStandard/lefchild.lua | 4 +- .../wil0Town01a/PopulaceStandard/liaime.lua | 4 +- .../wil0Town01a/PopulaceStandard/linette.lua | 4 +- .../wil0Town01a/PopulaceStandard/lohwaeb.lua | 4 +- .../wil0Town01a/PopulaceStandard/lulutsu.lua | 4 +- .../wil0Town01a/PopulaceStandard/lyngwaek.lua | 4 +- .../wil0Town01a/PopulaceStandard/mamaza.lua | 4 +- .../wil0Town01a/PopulaceStandard/mammet.lua | 4 +- .../PopulaceStandard/margarete.lua | 4 +- .../wil0Town01a/PopulaceStandard/martine.lua | 4 +- .../wil0Town01a/PopulaceStandard/milgogo.lua | 4 +- .../wil0Town01a/PopulaceStandard/miyaya.lua | 4 +- .../wil0Town01a/PopulaceStandard/mohtfryd.lua | 4 +- .../wil0Town01a/PopulaceStandard/mumukiya.lua | 4 +- .../wil0Town01a/PopulaceStandard/mumutano.lua | 4 +- .../wil0Town01a/PopulaceStandard/neymumu.lua | 4 +- .../PopulaceStandard/nhagi_amariyo.lua | 4 +- .../wil0Town01a/PopulaceStandard/nogeloix.lua | 4 +- .../PopulaceStandard/obili_tambili.lua | 4 +- .../PopulaceStandard/oefyrblaet.lua | 4 +- .../wil0Town01a/PopulaceStandard/papawa.lua | 4 +- .../PopulaceStandard/peneli_zuneli.lua | 4 +- .../PopulaceStandard/pierriquet.lua | 4 +- .../PopulaceStandard/qhota_nbolo.lua | 4 +- .../wil0Town01a/PopulaceStandard/qmhalawi.lua | 4 +- .../PopulaceStandard/rinh_maimhov.lua | 4 +- .../wil0Town01a/PopulaceStandard/rosalind.lua | 4 +- .../wil0Town01a/PopulaceStandard/safufu.lua | 4 +- .../wil0Town01a/PopulaceStandard/sinette.lua | 4 +- .../PopulaceStandard/singleton.lua | 4 +- .../PopulaceStandard/sungi_kelungi.lua | 4 +- .../PopulaceStandard/swerdahrm.lua | 4 +- .../wil0Town01a/PopulaceStandard/tatasha.lua | 4 +- .../wil0Town01a/PopulaceStandard/totono.lua | 4 +- .../wil0Town01a/PopulaceStandard/tutubuki.lua | 4 +- .../PopulaceStandard/tyago_moui.lua | 4 +- .../wil0Town01a/PopulaceStandard/ubokhn.lua | 4 +- .../wil0Town01a/PopulaceStandard/uwilsyng.lua | 4 +- .../wil0Town01a/PopulaceStandard/vannes.lua | 4 +- .../wil0Town01a/PopulaceStandard/vavaki.lua | 4 +- .../wil0Town01a/PopulaceStandard/wannore.lua | 4 +- .../wil0Town01a/PopulaceStandard/wawaton.lua | 4 +- .../PopulaceStandard/wise_moon.lua | 4 +- .../wil0Town01a/PopulaceStandard/wyznguld.lua | 4 +- .../PopulaceStandard/xau_nbolo.lua | 4 +- .../wil0Town01a/PopulaceStandard/xdhilogo.lua | 4 +- .../wil0Town01a/PopulaceStandard/yayake.lua | 4 +- .../wil0Town01a/PopulaceStandard/yuyubesu.lua | 4 +- 368 files changed, 1121 insertions(+), 1121 deletions(-) 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 37555a36..05ecaa3b 100644 --- a/data/scripts/base/chara/npc/object/TaskBoard.lua +++ b/data/scripts/base/chara/npc/object/TaskBoard.lua @@ -3,18 +3,18 @@ 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..84a42bfa 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..4592dee9 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..474e97bd 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..0d9768cd 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..37614f6d 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..34b9ab17 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..418262de 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..1de68eaf 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..395783d1 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..e181651d 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..cd3546d2 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..d5b8d6b7 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..b99aa89d 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..b9e93f9f 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..81946f31 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..e0284433 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..cccd1046 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..189ac039 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..d5f80f2f 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..1e88f684 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..bf4bd8cb 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..9e5e6466 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..21832393 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..27a47505 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..8f5c6af1 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..ab0b827b 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..c2cc7507 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..514f37a2 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..95b6cd33 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..5b018c3a 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..07e03729 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..b08689db 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..938d1aeb 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..b08689db 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 4852f3f3..18109081 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_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithBaterich_001", 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 f0ceec4b..044656e5 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, "defaultTalkWithClaroise_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithClaroise_001", 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 1d32847e..52560608 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, "defaultTalkWithFlamelieutenantsombermeadow_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFlamelieutenantsombermeadow_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..645930bf 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, "defaultTalkWithGagaruna_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 01953d7a..53a3f0c1 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, "defaultTalkWithGunnulf_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGunnulf_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 e7e5bd49..ed534d85 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, "defaultTalkWithHeibert_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithHeibert_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 4a707610..00aa4585 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, "defaultTalkWithIpaghlo_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithIpaghlo_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 8dbb1e38..1e9d24a9 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, "defaultTalkWithKokobi_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithKokobi_001", 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 456d873c..5dd2e432 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, "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/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 4659ea3b..e11cbf44 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, "defaultTalkWithRoarich_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithRoarich_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 f9ee5e1e..62daaa77 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/dariustel.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/dariustel.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDariustel_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithDariustel_001", nil, nil, nil); 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 2f9bca7d..285edabc 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, "defaultTalkWithFruhybolg_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithFruhybolg_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 a9d21ae7..eb37c8f4 100644 --- a/data/scripts/unique/wil0Town01a/PopulaceStandard/guencen.lua +++ b/data/scripts/unique/wil0Town01a/PopulaceStandard/guencen.lua @@ -1,6 +1,6 @@ function onEventStarted(player, npc) - defaultWil = getStaticActor("DftWil"); - player:runEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGuencen_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithGuencen_001", nil, nil, nil); 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 7c0d6bdc..dd73663a 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/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 94f30622..13715238 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, "defaultTalkWithUwilsyng_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithUwilsyng_001", 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 9f4ea80d..77b9457a 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, "defaultTalkWithVavaki_001", nil, nil, nil); + defaultWil = GetStaticActor("DftWil"); + player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithVavaki_001", 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 From 2b81660dce1396fee713eb0250d4eb518961f1d6 Mon Sep 17 00:00:00 2001 From: Tahir Akhlaq Date: Wed, 15 Jun 2016 04:20:24 +0100 Subject: [PATCH 13/13] accidentally mass replaced "target", fixed now --- FFXIVClassic Lobby Server/NLog.config | 14 +- FFXIVClassic Lobby Server/NLog.xsd | 348 ++++----- FFXIVClassic Lobby Server/Server.cs | 2 +- FFXIVClassic Lobby Server/packages.config | 14 +- .../packets/SubPacket.cs | 4 +- FFXIVClassic Map Server/NLog.config | 14 +- FFXIVClassic Map Server/NLog.xsd | 348 ++++----- FFXIVClassic Map Server/Server.cs | 2 +- FFXIVClassic Map Server/actors/Actor.cs | 704 +++++++++--------- FFXIVClassic Map Server/packages.config | 16 +- 10 files changed, 733 insertions(+), 733 deletions(-) diff --git a/FFXIVClassic Lobby Server/NLog.config b/FFXIVClassic Lobby Server/NLog.config index 535cf7e4..c152c074 100644 --- a/FFXIVClassic Lobby Server/NLog.config +++ b/FFXIVClassic Lobby Server/NLog.config @@ -16,22 +16,22 @@ See https://github.com/nlog/nlog/wiki/Configuration-file for information on customizing logging rules and outputs. --> - + - - - + + + diff --git a/FFXIVClassic Lobby Server/NLog.xsd b/FFXIVClassic Lobby Server/NLog.xsd index 63ded8c9..395075c9 100644 --- a/FFXIVClassic Lobby Server/NLog.xsd +++ b/FFXIVClassic Lobby Server/NLog.xsd @@ -1,12 +1,12 @@  - + - + @@ -51,17 +51,17 @@ - + - - - - - + + + + + - Make all tarGets within this section asynchronous (Creates additional threads but the calling thread isn't blocked by any tarGet writes). + Make all targets within this section asynchronous (Creates additional threads but the calling thread isn't blocked by any target writes). @@ -78,7 +78,7 @@ - Prefix for tarGets/layout renderers/filters/conditions loaded from this assembly. + Prefix for targets/layout renderers/filters/conditions loaded from this assembly. @@ -121,9 +121,9 @@ Level that this rule matches. - + - Comma separated list of tarGet names. + Comma separated list of target names. @@ -195,39 +195,39 @@ - + - - + + - + - + - - - - - - + + + + + + - + - + - - - - - - + + + + + + @@ -247,7 +247,7 @@ - + @@ -255,7 +255,7 @@ - Name of the tarGet. + Name of the target. @@ -273,17 +273,17 @@ - + - + - Name of the tarGet. + Name of the target. @@ -291,7 +291,7 @@ 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. @@ -309,7 +309,7 @@ - + @@ -318,13 +318,13 @@ - + - Name of the tarGet. + Name of the target. @@ -332,7 +332,7 @@ - + @@ -341,7 +341,7 @@ - Name of the tarGet. + Name of the target. @@ -364,15 +364,15 @@ - + - - + + @@ -380,7 +380,7 @@ - + @@ -389,7 +389,7 @@ - Name of the tarGet. + Name of the target. @@ -412,12 +412,12 @@ 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. @@ -485,21 +485,21 @@ - + - + - + @@ -517,21 +517,21 @@ - + - - + + - Name of the tarGet. + Name of the target. @@ -567,7 +567,7 @@ - + @@ -588,37 +588,37 @@ - + - - + + Condition that must be met in order to set the specified foreground and background color. - + Background color. - + Foreground color. - + - - + + @@ -645,12 +645,12 @@ 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. @@ -658,7 +658,7 @@ - + @@ -669,7 +669,7 @@ - Name of the tarGet. + Name of the target. @@ -702,7 +702,7 @@ - + @@ -715,15 +715,15 @@ - - + + - + - Name of the tarGet. + Name of the target. @@ -796,12 +796,12 @@ - + - + @@ -811,7 +811,7 @@ - Connection string to run the command against. If not provided, connection string from the tarGet is used. + Connection string to run the command against. If not provided, connection string from the target is used. @@ -825,7 +825,7 @@ - + @@ -861,7 +861,7 @@ - + @@ -870,7 +870,7 @@ - Name of the tarGet. + Name of the target. @@ -893,14 +893,14 @@ - + - Name of the tarGet. + Name of the target. @@ -913,7 +913,7 @@ - + @@ -922,13 +922,13 @@ - + - Name of the tarGet. + Name of the target. @@ -961,7 +961,7 @@ Value to be used as the event Source. - + Action to take if the message is larger than the option. @@ -979,7 +979,7 @@ - + @@ -988,19 +988,19 @@ - + - Name of the tarGet. + Name of the target. - Indicates whether to return to the first tarGet after any successful write. + Indicates whether to return to the first target after any successful write. @@ -1008,7 +1008,7 @@ - + @@ -1016,9 +1016,9 @@ - + - + @@ -1029,7 +1029,7 @@ - + @@ -1045,7 +1045,7 @@ - Name of the tarGet. + Name of the target. @@ -1073,7 +1073,7 @@ Line ending mode. - + Way file archives are numbered. @@ -1083,7 +1083,7 @@ Name of the file to be used for an archive. - + Indicates whether to automatically archive log files every time the specified time passes. @@ -1138,7 +1138,7 @@ Indicates whether to enable log file(s) to be deleted. - + File attributes (Windows only). @@ -1175,7 +1175,7 @@ - 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). + 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). @@ -1206,7 +1206,7 @@ - + @@ -1214,7 +1214,7 @@ - + @@ -1224,7 +1224,7 @@ - + @@ -1246,19 +1246,19 @@ - + - Name of the tarGet. + Name of the target. - Condition expression. Log events who meet this condition will be forwarded to the wrapped tarGet. + Condition expression. Log events who meet this condition will be forwarded to the wrapped target. @@ -1266,20 +1266,20 @@ - + - - - + + + - Name of the tarGet. + Name of the target. @@ -1287,17 +1287,17 @@ Windows Domain name to change context to. - + Required impersonation level. - + Type of the logon provider. - + Logon Type. @@ -1320,7 +1320,7 @@ - + @@ -1328,12 +1328,12 @@ - + - + @@ -1345,7 +1345,7 @@ - + @@ -1353,12 +1353,12 @@ - + - Name of the tarGet. + Name of the target. @@ -1394,7 +1394,7 @@ - + @@ -1418,7 +1418,7 @@ - + @@ -1437,7 +1437,7 @@ - + @@ -1448,7 +1448,7 @@ - Name of the tarGet. + Name of the target. @@ -1531,7 +1531,7 @@ SMTP Server to be used for sending. - + SMTP Authentication mode. @@ -1574,7 +1574,7 @@ - + @@ -1590,14 +1590,14 @@ - + - Name of the tarGet. + Name of the target. @@ -1610,7 +1610,7 @@ - + @@ -1624,7 +1624,7 @@ - Name of the tarGet. + Name of the target. @@ -1672,16 +1672,16 @@ - + - + - Name of the tarGet. + Name of the target. @@ -1699,15 +1699,15 @@ - + - - + + @@ -1716,7 +1716,7 @@ - Name of the tarGet. + Name of the target. @@ -1739,12 +1739,12 @@ 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. @@ -1779,15 +1779,15 @@ - + - - + + @@ -1795,7 +1795,7 @@ - + @@ -1804,7 +1804,7 @@ - Name of the tarGet. + Name of the target. @@ -1827,12 +1827,12 @@ 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. @@ -1902,7 +1902,7 @@ - + @@ -1910,7 +1910,7 @@ - Name of the tarGet. + Name of the target. @@ -1928,14 +1928,14 @@ - + - Name of the tarGet. + Name of the target. @@ -1948,7 +1948,7 @@ - + @@ -1961,7 +1961,7 @@ - Name of the tarGet. + Name of the target. @@ -2036,15 +2036,15 @@ - + - + - Name of the tarGet. + Name of the target. @@ -2055,7 +2055,7 @@ - + @@ -2073,13 +2073,13 @@ - + - Name of the tarGet. + Name of the target. @@ -2087,14 +2087,14 @@ - + - Name of the tarGet. + Name of the target. @@ -2107,7 +2107,7 @@ - + @@ -2115,12 +2115,12 @@ - Name of the tarGet. + Name of the target. - Number of retries that should be attempted on the wrapped tarGet in case of a failure. + Number of retries that should be attempted on the wrapped target in case of a failure. @@ -2133,13 +2133,13 @@ - + - Name of the tarGet. + Name of the target. @@ -2147,13 +2147,13 @@ - + - Name of the tarGet. + Name of the target. @@ -2161,14 +2161,14 @@ - + - Name of the tarGet. + Name of the target. @@ -2181,20 +2181,20 @@ - + - + - + - Name of the tarGet. + Name of the target. @@ -2217,7 +2217,7 @@ Web service namespace. Only used with Soap. - + Protocol to be used when calling web service. @@ -2230,7 +2230,7 @@ - + diff --git a/FFXIVClassic Lobby Server/Server.cs b/FFXIVClassic Lobby Server/Server.cs index 98563bdb..20b08be8 100644 --- a/FFXIVClassic Lobby Server/Server.cs +++ b/FFXIVClassic Lobby Server/Server.cs @@ -213,7 +213,7 @@ namespace FFXIVClassic_Lobby_Server { BasePacket newPacket = null; - //Too small to even Get length + //Too small to even get length if (bytesRead <= offset) return null; diff --git a/FFXIVClassic Lobby Server/packages.config b/FFXIVClassic Lobby Server/packages.config index cd0d69ec..5a3427bf 100644 --- a/FFXIVClassic Lobby Server/packages.config +++ b/FFXIVClassic Lobby Server/packages.config @@ -1,10 +1,10 @@  - - - - - - - + + + + + + + \ No newline at end of file diff --git a/FFXIVClassic Lobby Server/packets/SubPacket.cs b/FFXIVClassic Lobby Server/packets/SubPacket.cs index 43b54a2a..f30393b8 100644 --- a/FFXIVClassic Lobby Server/packets/SubPacket.cs +++ b/FFXIVClassic Lobby Server/packets/SubPacket.cs @@ -90,14 +90,14 @@ namespace FFXIVClassic_Lobby_Server.packets header.subpacketSize = (ushort)(SUBPACKET_SIZE + GAMEMESSAGE_SIZE + data.Length); } - public SubPacket(SubPacket original, uint newTarGetId) + public SubPacket(SubPacket original, uint newTargetId) { this.header = new SubPacketHeader(); this.gameMessage = original.gameMessage; header.subpacketSize = original.header.subpacketSize; header.type = original.header.type; header.sourceId = original.header.sourceId; - header.targetId = newTarGetId; + header.targetId = newTargetId; data = original.data; } diff --git a/FFXIVClassic Map Server/NLog.config b/FFXIVClassic Map Server/NLog.config index 603cb587..1d8fb2f4 100644 --- a/FFXIVClassic Map Server/NLog.config +++ b/FFXIVClassic Map Server/NLog.config @@ -16,22 +16,22 @@ See https://github.com/nlog/nlog/wiki/Configuration-file for information on customizing logging rules and outputs. --> - + - - - + + + diff --git a/FFXIVClassic Map Server/NLog.xsd b/FFXIVClassic Map Server/NLog.xsd index 63ded8c9..395075c9 100644 --- a/FFXIVClassic Map Server/NLog.xsd +++ b/FFXIVClassic Map Server/NLog.xsd @@ -1,12 +1,12 @@  - + - + @@ -51,17 +51,17 @@ - + - - - - - + + + + + - Make all tarGets within this section asynchronous (Creates additional threads but the calling thread isn't blocked by any tarGet writes). + Make all targets within this section asynchronous (Creates additional threads but the calling thread isn't blocked by any target writes). @@ -78,7 +78,7 @@ - Prefix for tarGets/layout renderers/filters/conditions loaded from this assembly. + Prefix for targets/layout renderers/filters/conditions loaded from this assembly. @@ -121,9 +121,9 @@ Level that this rule matches. - + - Comma separated list of tarGet names. + Comma separated list of target names. @@ -195,39 +195,39 @@ - + - - + + - + - + - - - - - - + + + + + + - + - + - - - - - - + + + + + + @@ -247,7 +247,7 @@ - + @@ -255,7 +255,7 @@ - Name of the tarGet. + Name of the target. @@ -273,17 +273,17 @@ - + - + - Name of the tarGet. + Name of the target. @@ -291,7 +291,7 @@ 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. @@ -309,7 +309,7 @@ - + @@ -318,13 +318,13 @@ - + - Name of the tarGet. + Name of the target. @@ -332,7 +332,7 @@ - + @@ -341,7 +341,7 @@ - Name of the tarGet. + Name of the target. @@ -364,15 +364,15 @@ - + - - + + @@ -380,7 +380,7 @@ - + @@ -389,7 +389,7 @@ - Name of the tarGet. + Name of the target. @@ -412,12 +412,12 @@ 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. @@ -485,21 +485,21 @@ - + - + - + @@ -517,21 +517,21 @@ - + - - + + - Name of the tarGet. + Name of the target. @@ -567,7 +567,7 @@ - + @@ -588,37 +588,37 @@ - + - - + + Condition that must be met in order to set the specified foreground and background color. - + Background color. - + Foreground color. - + - - + + @@ -645,12 +645,12 @@ 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. @@ -658,7 +658,7 @@ - + @@ -669,7 +669,7 @@ - Name of the tarGet. + Name of the target. @@ -702,7 +702,7 @@ - + @@ -715,15 +715,15 @@ - - + + - + - Name of the tarGet. + Name of the target. @@ -796,12 +796,12 @@ - + - + @@ -811,7 +811,7 @@ - Connection string to run the command against. If not provided, connection string from the tarGet is used. + Connection string to run the command against. If not provided, connection string from the target is used. @@ -825,7 +825,7 @@ - + @@ -861,7 +861,7 @@ - + @@ -870,7 +870,7 @@ - Name of the tarGet. + Name of the target. @@ -893,14 +893,14 @@ - + - Name of the tarGet. + Name of the target. @@ -913,7 +913,7 @@ - + @@ -922,13 +922,13 @@ - + - Name of the tarGet. + Name of the target. @@ -961,7 +961,7 @@ Value to be used as the event Source. - + Action to take if the message is larger than the option. @@ -979,7 +979,7 @@ - + @@ -988,19 +988,19 @@ - + - Name of the tarGet. + Name of the target. - Indicates whether to return to the first tarGet after any successful write. + Indicates whether to return to the first target after any successful write. @@ -1008,7 +1008,7 @@ - + @@ -1016,9 +1016,9 @@ - + - + @@ -1029,7 +1029,7 @@ - + @@ -1045,7 +1045,7 @@ - Name of the tarGet. + Name of the target. @@ -1073,7 +1073,7 @@ Line ending mode. - + Way file archives are numbered. @@ -1083,7 +1083,7 @@ Name of the file to be used for an archive. - + Indicates whether to automatically archive log files every time the specified time passes. @@ -1138,7 +1138,7 @@ Indicates whether to enable log file(s) to be deleted. - + File attributes (Windows only). @@ -1175,7 +1175,7 @@ - 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). + 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). @@ -1206,7 +1206,7 @@ - + @@ -1214,7 +1214,7 @@ - + @@ -1224,7 +1224,7 @@ - + @@ -1246,19 +1246,19 @@ - + - Name of the tarGet. + Name of the target. - Condition expression. Log events who meet this condition will be forwarded to the wrapped tarGet. + Condition expression. Log events who meet this condition will be forwarded to the wrapped target. @@ -1266,20 +1266,20 @@ - + - - - + + + - Name of the tarGet. + Name of the target. @@ -1287,17 +1287,17 @@ Windows Domain name to change context to. - + Required impersonation level. - + Type of the logon provider. - + Logon Type. @@ -1320,7 +1320,7 @@ - + @@ -1328,12 +1328,12 @@ - + - + @@ -1345,7 +1345,7 @@ - + @@ -1353,12 +1353,12 @@ - + - Name of the tarGet. + Name of the target. @@ -1394,7 +1394,7 @@ - + @@ -1418,7 +1418,7 @@ - + @@ -1437,7 +1437,7 @@ - + @@ -1448,7 +1448,7 @@ - Name of the tarGet. + Name of the target. @@ -1531,7 +1531,7 @@ SMTP Server to be used for sending. - + SMTP Authentication mode. @@ -1574,7 +1574,7 @@ - + @@ -1590,14 +1590,14 @@ - + - Name of the tarGet. + Name of the target. @@ -1610,7 +1610,7 @@ - + @@ -1624,7 +1624,7 @@ - Name of the tarGet. + Name of the target. @@ -1672,16 +1672,16 @@ - + - + - Name of the tarGet. + Name of the target. @@ -1699,15 +1699,15 @@ - + - - + + @@ -1716,7 +1716,7 @@ - Name of the tarGet. + Name of the target. @@ -1739,12 +1739,12 @@ 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. @@ -1779,15 +1779,15 @@ - + - - + + @@ -1795,7 +1795,7 @@ - + @@ -1804,7 +1804,7 @@ - Name of the tarGet. + Name of the target. @@ -1827,12 +1827,12 @@ 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. @@ -1902,7 +1902,7 @@ - + @@ -1910,7 +1910,7 @@ - Name of the tarGet. + Name of the target. @@ -1928,14 +1928,14 @@ - + - Name of the tarGet. + Name of the target. @@ -1948,7 +1948,7 @@ - + @@ -1961,7 +1961,7 @@ - Name of the tarGet. + Name of the target. @@ -2036,15 +2036,15 @@ - + - + - Name of the tarGet. + Name of the target. @@ -2055,7 +2055,7 @@ - + @@ -2073,13 +2073,13 @@ - + - Name of the tarGet. + Name of the target. @@ -2087,14 +2087,14 @@ - + - Name of the tarGet. + Name of the target. @@ -2107,7 +2107,7 @@ - + @@ -2115,12 +2115,12 @@ - Name of the tarGet. + Name of the target. - Number of retries that should be attempted on the wrapped tarGet in case of a failure. + Number of retries that should be attempted on the wrapped target in case of a failure. @@ -2133,13 +2133,13 @@ - + - Name of the tarGet. + Name of the target. @@ -2147,13 +2147,13 @@ - + - Name of the tarGet. + Name of the target. @@ -2161,14 +2161,14 @@ - + - Name of the tarGet. + Name of the target. @@ -2181,20 +2181,20 @@ - + - + - + - Name of the tarGet. + Name of the target. @@ -2217,7 +2217,7 @@ Web service namespace. Only used with Soap. - + Protocol to be used when calling web service. @@ -2230,7 +2230,7 @@ - + diff --git a/FFXIVClassic Map Server/Server.cs b/FFXIVClassic Map Server/Server.cs index 1d8b6061..f5005496 100644 --- a/FFXIVClassic Map Server/Server.cs +++ b/FFXIVClassic Map Server/Server.cs @@ -296,7 +296,7 @@ namespace FFXIVClassic_Map_Server { BasePacket newPacket = null; - //Too small to even Get length + //Too small to even get length if (bytesRead <= offset) return null; diff --git a/FFXIVClassic Map Server/actors/Actor.cs b/FFXIVClassic Map Server/actors/Actor.cs index c323d980..5db8a9dd 100644 --- a/FFXIVClassic Map Server/actors/Actor.cs +++ b/FFXIVClassic Map Server/actors/Actor.cs @@ -1,354 +1,354 @@ -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.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); - } - - } -} - +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/packages.config b/FFXIVClassic Map Server/packages.config index 4d7799bb..6d8ab227 100644 --- a/FFXIVClassic Map Server/packages.config +++ b/FFXIVClassic Map Server/packages.config @@ -1,11 +1,11 @@  - - - - - - - - + + + + + + + + \ No newline at end of file