From 73d5b9fbf135782d5496cba21030f1a5bd2fd01d Mon Sep 17 00:00:00 2001 From: TheManii Date: Mon, 11 Apr 2016 14:33:18 -0400 Subject: [PATCH 1/8] Use intra-zone warps for !warp relative --- FFXIVClassic Map Server/CommandProcessor.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/FFXIVClassic Map Server/CommandProcessor.cs b/FFXIVClassic Map Server/CommandProcessor.cs index 1e4de7a0..bdbe6354 100644 --- a/FFXIVClassic Map Server/CommandProcessor.cs +++ b/FFXIVClassic Map Server/CommandProcessor.cs @@ -118,7 +118,7 @@ namespace FFXIVClassic_Lobby_Server } } - public void doWarp(ConnectedPlayer client, uint zoneId, string privateArea, 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) { if (mWorldManager.GetZone(zoneId) == null) { @@ -128,12 +128,12 @@ namespace FFXIVClassic_Lobby_Server } if (client != null) - mWorldManager.DoZoneChange(client.getActor(), zoneId, privateArea, 0x2, x, y, z, r); + mWorldManager.DoZoneChange(client.getActor(), zoneId, privateArea, spawnType, x, y, z, r); else { foreach (KeyValuePair entry in mConnectedPlayerList) { - mWorldManager.DoZoneChange(entry.Value.getActor(), zoneId, privateArea, 0x2, x, y, z, r); + mWorldManager.DoZoneChange(entry.Value.getActor(), zoneId, privateArea, spawnType, x, y, z, r); } } } @@ -394,7 +394,7 @@ namespace FFXIVClassic_Lobby_Server #endregion sendMessage(client, String.Format("Warping to: ZoneID: {0} X: {1}, Y: {2}, Z: {3}", zoneId, x, y, z)); - doWarp(client, zoneId, privatearea, x, y, z, r); + doWarp(client, zoneId, privatearea, 0x00, x, y, z, r); } else if (split.Length == 5) { @@ -420,7 +420,7 @@ namespace FFXIVClassic_Lobby_Server #endregion sendMessage(client, String.Format("Warping to: ZoneID: {0} X: {1}, Y: {2}, Z: {3}", zoneId, x, y, z)); - doWarp(client, zoneId, privatearea, x, y, z, r); + doWarp(client, zoneId, privatearea, 0x2, x, y, z, r); } else if (split.Length == 6) { @@ -448,7 +448,7 @@ namespace FFXIVClassic_Lobby_Server #endregion sendMessage(client, String.Format("Warping to: ZoneID: {0} X: {1}, Y: {2}, Z: {3}", zoneId, x, y, z)); - doWarp(client, zoneId, privatearea, x, y, z, r); + doWarp(client, zoneId, privatearea, 0x2, x, y, z, r); } else return; // catch any invalid warps here From 11a371f32b16df79a7c0e2ad51d12e45493dd722 Mon Sep 17 00:00:00 2001 From: TheManii Date: Mon, 9 May 2016 00:23:35 -0400 Subject: [PATCH 2/8] Added !set weather and populated weather table --- FFXIVClassic Map Server/CommandProcessor.cs | 62 +++++++++++++++++-- .../packets/send/SetWeatherPacket.cs | 47 +++++++------- 2 files changed, 82 insertions(+), 27 deletions(-) diff --git a/FFXIVClassic Map Server/CommandProcessor.cs b/FFXIVClassic Map Server/CommandProcessor.cs index bdbe6354..ad385694 100644 --- a/FFXIVClassic Map Server/CommandProcessor.cs +++ b/FFXIVClassic Map Server/CommandProcessor.cs @@ -146,7 +146,7 @@ namespace FFXIVClassic_Lobby_Server 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(); @@ -454,6 +454,38 @@ namespace FFXIVClassic_Lobby_Server return; // catch any invalid warps here } + private void doWeather(ConnectedPlayer client, string weatherID) + { + + + long weather = Convert.ToInt64(weatherID); + + if (client != null) + { + client.queuePacket(BasePacket.createPacket(SetWeatherPacket.buildPacket(client.actorID, weather), true, false)); + } + + /* + * WIP: Change weather serverside, currently only clientside + * + uint currentZoneID; + if (client != null) + { + currentZoneID = client.getActor().zoneId; + + foreach (KeyValuePair entry in mConnectedPlayerList) + { + // Change the weather for everyone in the same zone + if (currentZoneID == entry.Value.getActor().zoneId) + { + BasePacket weatherPacket = BasePacket.createPacket(SetWeatherPacket.buildPacket(entry.Value.actorID, weather), true, false); + entry.Value.queuePacket(weatherPacket); + } + } + } + */ + } + /// /// We only use the default options for SendMessagePacket. /// May as well make it less unwieldly to view @@ -521,13 +553,33 @@ namespace FFXIVClassic_Lobby_Server sendMessage(client, Resources.CPsendpacket); else if (split[1].Equals("setgraphic")) sendMessage(client, Resources.CPsetgraphic); - */ - } + */ + } return true; - } + } #endregion - + + #region !dev + else if (split[0].Equals("test")) + { + #region !test weather + if (split[1].Equals("weather")) + { + try + { + doWeather(client, split[2]); + return true; + } + catch (Exception e) + { + Log.error("Could not change weather: " + e); + } + } + #endregion + } + #endregion + #region !mypos else if (split[0].Equals("mypos")) { diff --git a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs index 1eb9bc2e..d2ea05ee 100644 --- a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs +++ b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs @@ -9,28 +9,31 @@ namespace FFXIVClassic_Map_Server.packets.send { class SetWeatherPacket { - //TODO: Fix these ids! - public const uint WEATHER_CLEAR = 0x011F41; - public const uint WEATHER_FINE = 0x011F42; - public const uint WEATHER_CLOUDY = 0x011F3; - public const uint WEATHER_FOGGY = 0x011F4; - public const uint WEATHER_WINDY = 0x011F5; //NOT SUPPORTED in v1.23 - public const uint WEATHER_BLUSTERY = 0x011F6; - public const uint WEATHER_RAINY = 0x011F7; - public const uint WEATHER_SHOWERY = 0x011F8; //NOT SUPPORTED in v1.23 - public const uint WEATHER_THUNDERY = 0x011F9; //NOT SUPPORTED in v1.23 - public const uint WEATHER_STORMY = 0x011FA; - public const uint WEATHER_DUSTY = 0x011FB; //NOT SUPPORTED in v1.23 - public const uint WEATHER_SANDY = 0x011FC; - public const uint WEATHER_IFRIT = 0x011F4E; - public const uint WEATHER_GARUDA = 0x011F5C; - public const uint WEATHER_BLISTERIN = 0x011FD; //NOT SUPPORTED in v1.23 - public const uint WEATHER_SNOWY = 0x011FE; //NOT SUPPORTED in v1.23 - public const uint WEATHER_WINTRY = 0x011FF; //NOT SUPPORTED in v1.23 - public const uint WEATHER_GLOOMY = 0x01200; - public const uint WEATHER_PREDALAMUD = 0x011F5F; - public const uint WEATHER_DALAMUD = 0x011F5E; - public const uint WEATHER_SCARYDALAMUD = 0x011F60; + // Use the first value to change without a transition, the second value to do a standard transition + public const uint WEATHER_CLEAR = 0x011F41; // 8001 / 73537 + public const uint WEATHER_FINE = 0x011F42; // 8002 / 73538 + public const uint WEATHER_CLOUDY = 0x011F43; // 8003 / 73539 + public const uint WEATHER_FOGGY = 0x011F44; // 8004 / 73540 + public const uint WEATHER_WINDY = 0x011F45; // 8005 / 73541 - NOT SUPPORTED in v1.23b + public const uint WEATHER_BLUSTERY = 0x011F46; // 8006 / 73542 + public const uint WEATHER_RAINY = 0x011F47; // 8007 / 73543 + public const uint WEATHER_SHOWERY = 0x011F48; // 8008 / 73544 - NOT SUPPORTED in v1.23b + public const uint WEATHER_THUNDERY = 0x011F49; // 8009 / 73545 - NOT SUPPORTED in v1.23b + public const uint WEATHER_STORMY = 0x011F4A; // 8010 / 73546 + public const uint WEATHER_DUSTY = 0x011F4B; // 8011 / 73547 - NOT SUPPORTED in v1.23b + public const uint WEATHER_SANDY = 0x011F4C; // 8012 / 73548 + public const uint WEATHER_HOT = 0x011F4D; // 8013 / 73549 - NOT SUPPORTED in v1.23b + public const uint WEATHER_BLISTERING = 0x011F4E; // 8014 / 73550 - Bowl Of Embers Weather + public const uint WEATHER_SNOWY = 0x011F4F; // 8015 / 73551 - NOT SUPPORTED in v1.23b + public const uint WEATHER_WINTRY = 0x011F50; // 8016 / 73552 - NOT SUPPORTED in v1.23b + public const uint WEATHER_GLOOMY = 0x011F51; // 8017 / 73553 + // 8018 - 8026 / 73554 - 73562 - NOT SUPPORTED in v1.23b + public const uint WEATHER_SEASONAL = 0x011F5B; // 8027 / 73563 - Snow in Black Shroud, nothing elsewhere + public const uint WEATHER_PRIMAL = 0x011F5C; // 8028 / 73564 - Howling Eye and Thornmarch Weather + // 8029 / 73565 - Not supported + public const uint WEATHER_DALAMUD = 0x011F5E; // 8030 / 73566 + public const uint WEATHER_AURORA = 0x011F5F; // 8031 / 73567 + public const uint WEATHER_DALAMUDTHUNDER = 0x011F60; // 8032 / 73568 public const ushort OPCODE = 0x000D; public const uint PACKET_SIZE = 0x28; From 101a2d50ed2567c1e6d155fa57ceaeaf91429b67 Mon Sep 17 00:00:00 2001 From: TheManii Date: Mon, 9 May 2016 00:26:53 -0400 Subject: [PATCH 3/8] Fixed typo in !help --- FFXIVClassic Map Server/Properties/Resources.Designer.cs | 4 ++-- FFXIVClassic Map Server/Properties/Resources.resx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FFXIVClassic Map Server/Properties/Resources.Designer.cs b/FFXIVClassic Map Server/Properties/Resources.Designer.cs index d0cae89c..a49ec70e 100644 --- a/FFXIVClassic Map Server/Properties/Resources.Designer.cs +++ b/FFXIVClassic Map Server/Properties/Resources.Designer.cs @@ -64,7 +64,7 @@ namespace FFXIVClassic_Map_Server.Properties { /// Looks up a localized string similar to Adds the specified currency to the current player's inventory /// ///*Syntax: givecurrency <quantity> - /// givecurrency <quantity> <type> + /// givecurrency <type> <quantity> ///<type> is the specific type of currency desired, defaults to gil if no type specified. /// public static string CPgivecurrency { @@ -176,7 +176,7 @@ namespace FFXIVClassic_Map_Server.Properties { /// Looks up a localized string similar to Removes the specified currency from the current player's inventory /// ///*Syntax: removecurrency <quantity> - /// removecurrency <quantity> <type> + /// removecurrency <type> <quantity> ///<type> is the specific type of currency desired, defaults to gil if no type specified. /// public static string CPremovecurrency { diff --git a/FFXIVClassic Map Server/Properties/Resources.resx b/FFXIVClassic Map Server/Properties/Resources.resx index f121876e..a5b7477e 100644 --- a/FFXIVClassic Map Server/Properties/Resources.resx +++ b/FFXIVClassic Map Server/Properties/Resources.resx @@ -121,7 +121,7 @@ Adds the specified currency to the current player's inventory *Syntax: givecurrency <quantity> - givecurrency <quantity> <type> + givecurrency <type> <quantity> <type> is the specific type of currency desired, defaults to gil if no type specified @@ -173,7 +173,7 @@ Server Administration: givecurrency, giveitem, givekeyitem, removecurrency, remo Removes the specified currency from the current player's inventory *Syntax: removecurrency <quantity> - removecurrency <quantity> <type> + removecurrency <type> <quantity> <type> is the specific type of currency desired, defaults to gil if no type specified From a99a348c36c61474dc1dbb80abc812b699ad526b Mon Sep 17 00:00:00 2001 From: TheManii Date: Mon, 9 May 2016 00:40:46 -0400 Subject: [PATCH 4/8] Added !help entries for !test weather --- FFXIVClassic Map Server/CommandProcessor.cs | 10 +++++++++- .../Properties/Resources.Designer.cs | 17 +++++++++++++++-- .../Properties/Resources.resx | 11 +++++++++-- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/FFXIVClassic Map Server/CommandProcessor.cs b/FFXIVClassic Map Server/CommandProcessor.cs index ad385694..b23d6ac1 100644 --- a/FFXIVClassic Map Server/CommandProcessor.cs +++ b/FFXIVClassic Map Server/CommandProcessor.cs @@ -554,7 +554,15 @@ namespace FFXIVClassic_Lobby_Server else if (split[1].Equals("setgraphic")) sendMessage(client, Resources.CPsetgraphic); */ - } + } + if (split.Length == 3) + { + if(split[1].Equals("test")) + { + if (split[2].Equals("weather")) + sendMessage(client, Resources.CPtestweather); + } + } return true; } diff --git a/FFXIVClassic Map Server/Properties/Resources.Designer.cs b/FFXIVClassic Map Server/Properties/Resources.Designer.cs index a49ec70e..62ed5ea5 100644 --- a/FFXIVClassic Map Server/Properties/Resources.Designer.cs +++ b/FFXIVClassic Map Server/Properties/Resources.Designer.cs @@ -105,7 +105,8 @@ namespace FFXIVClassic_Map_Server.Properties { /// ///Available commands: ///Standard: mypos, music, warp - ///Server Administration: givecurrency, giveitem, givekeyitem, removecurrency, removekeyitem, reloaditems, reloadzones. + ///Server Administration: givecurrency, giveitem, givekeyitem, removecurrency, removekeyitem, reloaditems, reloadzones + ///Test: test weather. /// public static string CPhelp { get { @@ -117,7 +118,7 @@ namespace FFXIVClassic_Map_Server.Properties { /// Looks up a localized string similar to Changes the currently playing background music /// ///*Syntax: music <music id> - ///<music id> is the key item's specific id as defined in the server database. + ///<music id> is the music's specific id as defined in the client. /// public static string CPmusic { get { @@ -236,6 +237,18 @@ namespace FFXIVClassic_Map_Server.Properties { } } + /// + /// Looks up a localized string similar to Changes the current weather + /// + ///*Syntax: test weather <weather id> + ///<weather id> is the weather's specific id as defined in the client. + /// + public static string CPtestweather { + get { + return ResourceManager.GetString("CPtestweather", resourceCulture); + } + } + /// /// Looks up a localized string similar to Teleports the player to the specified location /// diff --git a/FFXIVClassic Map Server/Properties/Resources.resx b/FFXIVClassic Map Server/Properties/Resources.resx index a5b7477e..0413ecca 100644 --- a/FFXIVClassic Map Server/Properties/Resources.resx +++ b/FFXIVClassic Map Server/Properties/Resources.resx @@ -144,13 +144,14 @@ Available commands: Standard: mypos, music, warp -Server Administration: givecurrency, giveitem, givekeyitem, removecurrency, removekeyitem, reloaditems, reloadzones +Server Administration: givecurrency, giveitem, givekeyitem, removecurrency, removekeyitem, reloaditems, reloadzones +Test: test weather Changes the currently playing background music *Syntax: music <music id> -<music id> is the key item's specific id as defined in the server database +<music id> is the music's specific id as defined in the client Prints out your current location @@ -202,6 +203,12 @@ Server Administration: givecurrency, giveitem, givekeyitem, removecurrency, remo *Syntax: sendpacket <slot> <wid> <eid> <vid> <cid> <w/e/v/c id> are as defined in the client game data + + + Changes the current weather + +*Syntax: test weather <weather id> +<weather id> is the weather's specific id as defined in the client Teleports the player to the specified location From c80eb623b1faa9817a5242068592c61de7ee1705 Mon Sep 17 00:00:00 2001 From: TheManii Date: Mon, 9 May 2016 00:48:16 -0400 Subject: [PATCH 5/8] Fixed whitespaces --- .../packets/send/SetWeatherPacket.cs | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs index d2ea05ee..731650f5 100644 --- a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs +++ b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs @@ -10,32 +10,32 @@ namespace FFXIVClassic_Map_Server.packets.send class SetWeatherPacket { // Use the first value to change without a transition, the second value to do a standard transition - public const uint WEATHER_CLEAR = 0x011F41; // 8001 / 73537 - public const uint WEATHER_FINE = 0x011F42; // 8002 / 73538 - public const uint WEATHER_CLOUDY = 0x011F43; // 8003 / 73539 - public const uint WEATHER_FOGGY = 0x011F44; // 8004 / 73540 - public const uint WEATHER_WINDY = 0x011F45; // 8005 / 73541 - NOT SUPPORTED in v1.23b - public const uint WEATHER_BLUSTERY = 0x011F46; // 8006 / 73542 - public const uint WEATHER_RAINY = 0x011F47; // 8007 / 73543 - public const uint WEATHER_SHOWERY = 0x011F48; // 8008 / 73544 - NOT SUPPORTED in v1.23b - public const uint WEATHER_THUNDERY = 0x011F49; // 8009 / 73545 - NOT SUPPORTED in v1.23b - public const uint WEATHER_STORMY = 0x011F4A; // 8010 / 73546 - public const uint WEATHER_DUSTY = 0x011F4B; // 8011 / 73547 - NOT SUPPORTED in v1.23b - public const uint WEATHER_SANDY = 0x011F4C; // 8012 / 73548 - public const uint WEATHER_HOT = 0x011F4D; // 8013 / 73549 - NOT SUPPORTED in v1.23b - public const uint WEATHER_BLISTERING = 0x011F4E; // 8014 / 73550 - Bowl Of Embers Weather - public const uint WEATHER_SNOWY = 0x011F4F; // 8015 / 73551 - NOT SUPPORTED in v1.23b - public const uint WEATHER_WINTRY = 0x011F50; // 8016 / 73552 - NOT SUPPORTED in v1.23b - public const uint WEATHER_GLOOMY = 0x011F51; // 8017 / 73553 - // 8018 - 8026 / 73554 - 73562 - NOT SUPPORTED in v1.23b - public const uint WEATHER_SEASONAL = 0x011F5B; // 8027 / 73563 - Snow in Black Shroud, nothing elsewhere - public const uint WEATHER_PRIMAL = 0x011F5C; // 8028 / 73564 - Howling Eye and Thornmarch Weather - // 8029 / 73565 - Not supported - public const uint WEATHER_DALAMUD = 0x011F5E; // 8030 / 73566 - public const uint WEATHER_AURORA = 0x011F5F; // 8031 / 73567 - public const uint WEATHER_DALAMUDTHUNDER = 0x011F60; // 8032 / 73568 - - public const ushort OPCODE = 0x000D; + public const uint WEATHER_CLEAR = 0x011F41; // 8001 / 73537 + public const uint WEATHER_FINE = 0x011F42; // 8002 / 73538 + public const uint WEATHER_CLOUDY = 0x011F43; // 8003 / 73539 + public const uint WEATHER_FOGGY = 0x011F44; // 8004 / 73540 + public const uint WEATHER_WINDY = 0x011F45; // 8005 / 73541 - NOT SUPPORTED in v1.23b + public const uint WEATHER_BLUSTERY = 0x011F46; // 8006 / 73542 + public const uint WEATHER_RAINY = 0x011F47; // 8007 / 73543 + public const uint WEATHER_SHOWERY = 0x011F48; // 8008 / 73544 - NOT SUPPORTED in v1.23b + public const uint WEATHER_THUNDERY = 0x011F49; // 8009 / 73545 - NOT SUPPORTED in v1.23b + public const uint WEATHER_STORMY = 0x011F4A; // 8010 / 73546 + public const uint WEATHER_DUSTY = 0x011F4B; // 8011 / 73547 - NOT SUPPORTED in v1.23b + public const uint WEATHER_SANDY = 0x011F4C; // 8012 / 73548 + public const uint WEATHER_HOT = 0x011F4D; // 8013 / 73549 - NOT SUPPORTED in v1.23b + public const uint WEATHER_BLISTERING = 0x011F4E; // 8014 / 73550 - Bowl Of Embers Weather + public const uint WEATHER_SNOWY = 0x011F4F; // 8015 / 73551 - NOT SUPPORTED in v1.23b + public const uint WEATHER_WINTRY = 0x011F50; // 8016 / 73552 - NOT SUPPORTED in v1.23b + public const uint WEATHER_GLOOMY = 0x011F51; // 8017 / 73553 + // 8018 - 8026 / 73554 - 73562 - NOT SUPPORTED in v1.23b + public const uint WEATHER_SEASONAL = 0x011F5B; // 8027 / 73563 - Snow in Black Shroud, nothing elsewhere + public const uint WEATHER_PRIMAL = 0x011F5C; // 8028 / 73564 - Howling Eye and Thornmarch Weather + // 8029 / 73565 - Not supported + public const uint WEATHER_DALAMUD = 0x011F5E; // 8030 / 73566 + public const uint WEATHER_AURORA = 0x011F5F; // 8031 / 73567 + public const uint WEATHER_DALAMUDTHUNDER = 0x011F60; // 8032 / 73568 + + public const ushort OPCODE = 0x000D; public const uint PACKET_SIZE = 0x28; public static SubPacket buildPacket(uint playerActorID, long weatherId) From 59f1ef059431e9eeb9af1d838cc499de3951ba1a Mon Sep 17 00:00:00 2001 From: TheManii Date: Mon, 9 May 2016 00:48:58 -0400 Subject: [PATCH 6/8] REALLY fix whitepaces --- FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs index 731650f5..dd2da746 100644 --- a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs +++ b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs @@ -33,7 +33,7 @@ namespace FFXIVClassic_Map_Server.packets.send // 8029 / 73565 - Not supported public const uint WEATHER_DALAMUD = 0x011F5E; // 8030 / 73566 public const uint WEATHER_AURORA = 0x011F5F; // 8031 / 73567 - public const uint WEATHER_DALAMUDTHUNDER = 0x011F60; // 8032 / 73568 + public const uint WEATHER_DALAMUDTHUNDER = 0x011F60; // 8032 / 73568 public const ushort OPCODE = 0x000D; public const uint PACKET_SIZE = 0x28; From c02c09a2374f8313a45d48bbcd90fcfaafaa8ce6 Mon Sep 17 00:00:00 2001 From: TheManii Date: Mon, 9 May 2016 01:15:58 -0400 Subject: [PATCH 7/8] Bugfixed with !test --- FFXIVClassic Map Server/CommandProcessor.cs | 55 +++++++++++-------- .../packets/send/SetWeatherPacket.cs | 2 +- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/FFXIVClassic Map Server/CommandProcessor.cs b/FFXIVClassic Map Server/CommandProcessor.cs index b23d6ac1..4c4d63d4 100644 --- a/FFXIVClassic Map Server/CommandProcessor.cs +++ b/FFXIVClassic Map Server/CommandProcessor.cs @@ -456,8 +456,6 @@ namespace FFXIVClassic_Lobby_Server private void doWeather(ConnectedPlayer client, string weatherID) { - - long weather = Convert.ToInt64(weatherID); if (client != null) @@ -554,37 +552,46 @@ namespace FFXIVClassic_Lobby_Server else if (split[1].Equals("setgraphic")) sendMessage(client, Resources.CPsetgraphic); */ - } - if (split.Length == 3) - { - if(split[1].Equals("test")) - { - if (split[2].Equals("weather")) - sendMessage(client, Resources.CPtestweather); - } - } + } + if (split.Length == 3) + { + if(split[1].Equals("test")) + { + if (split[2].Equals("weather")) + sendMessage(client, Resources.CPtestweather); + } + } return true; } #endregion - #region !dev + #region !test else if (split[0].Equals("test")) { - #region !test weather - if (split[1].Equals("weather")) + if (split.Length == 1) { - try - { - doWeather(client, split[2]); - return true; - } - catch (Exception e) - { - Log.error("Could not change weather: " + e); - } + // catch invalid commands + sendMessage(client, Resources.CPhelp); } - #endregion + else if (split.Length >= 2) + { + #region !test weather + if (split[1].Equals("weather")) + { + try + { + doWeather(client, split[2]); + return true; + } + catch (Exception e) + { + Log.error("Could not change weather: " + e); + } + } + #endregion + } + } #endregion diff --git a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs index dd2da746..90e863e4 100644 --- a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs +++ b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs @@ -30,7 +30,7 @@ namespace FFXIVClassic_Map_Server.packets.send // 8018 - 8026 / 73554 - 73562 - NOT SUPPORTED in v1.23b public const uint WEATHER_SEASONAL = 0x011F5B; // 8027 / 73563 - Snow in Black Shroud, nothing elsewhere public const uint WEATHER_PRIMAL = 0x011F5C; // 8028 / 73564 - Howling Eye and Thornmarch Weather - // 8029 / 73565 - Not supported + // 8029 / 73565 - NOT SUPPOPORTED in v1.23b public const uint WEATHER_DALAMUD = 0x011F5E; // 8030 / 73566 public const uint WEATHER_AURORA = 0x011F5F; // 8031 / 73567 public const uint WEATHER_DALAMUDTHUNDER = 0x011F60; // 8032 / 73568 From 6dcdabf9a482c4ed7d46a175634661cd820c8fa7 Mon Sep 17 00:00:00 2001 From: TheManii Date: Mon, 9 May 2016 16:58:04 -0400 Subject: [PATCH 8/8] Added more weather types --- .../packets/send/SetWeatherPacket.cs | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs index 90e863e4..44d7ae3a 100644 --- a/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs +++ b/FFXIVClassic Map Server/packets/send/SetWeatherPacket.cs @@ -10,30 +10,33 @@ namespace FFXIVClassic_Map_Server.packets.send class SetWeatherPacket { // Use the first value to change without a transition, the second value to do a standard transition - public const uint WEATHER_CLEAR = 0x011F41; // 8001 / 73537 - public const uint WEATHER_FINE = 0x011F42; // 8002 / 73538 - public const uint WEATHER_CLOUDY = 0x011F43; // 8003 / 73539 - public const uint WEATHER_FOGGY = 0x011F44; // 8004 / 73540 - public const uint WEATHER_WINDY = 0x011F45; // 8005 / 73541 - NOT SUPPORTED in v1.23b - public const uint WEATHER_BLUSTERY = 0x011F46; // 8006 / 73542 - public const uint WEATHER_RAINY = 0x011F47; // 8007 / 73543 - public const uint WEATHER_SHOWERY = 0x011F48; // 8008 / 73544 - NOT SUPPORTED in v1.23b - public const uint WEATHER_THUNDERY = 0x011F49; // 8009 / 73545 - NOT SUPPORTED in v1.23b - public const uint WEATHER_STORMY = 0x011F4A; // 8010 / 73546 - public const uint WEATHER_DUSTY = 0x011F4B; // 8011 / 73547 - NOT SUPPORTED in v1.23b - public const uint WEATHER_SANDY = 0x011F4C; // 8012 / 73548 - public const uint WEATHER_HOT = 0x011F4D; // 8013 / 73549 - NOT SUPPORTED in v1.23b - public const uint WEATHER_BLISTERING = 0x011F4E; // 8014 / 73550 - Bowl Of Embers Weather - public const uint WEATHER_SNOWY = 0x011F4F; // 8015 / 73551 - NOT SUPPORTED in v1.23b - public const uint WEATHER_WINTRY = 0x011F50; // 8016 / 73552 - NOT SUPPORTED in v1.23b - public const uint WEATHER_GLOOMY = 0x011F51; // 8017 / 73553 - // 8018 - 8026 / 73554 - 73562 - NOT SUPPORTED in v1.23b - public const uint WEATHER_SEASONAL = 0x011F5B; // 8027 / 73563 - Snow in Black Shroud, nothing elsewhere - public const uint WEATHER_PRIMAL = 0x011F5C; // 8028 / 73564 - Howling Eye and Thornmarch Weather - // 8029 / 73565 - NOT SUPPOPORTED in v1.23b - public const uint WEATHER_DALAMUD = 0x011F5E; // 8030 / 73566 - public const uint WEATHER_AURORA = 0x011F5F; // 8031 / 73567 - public const uint WEATHER_DALAMUDTHUNDER = 0x011F60; // 8032 / 73568 + public const uint WEATHER_CLEAR = 0x011F41; // 8001 / 73537 + public const uint WEATHER_FAIR = 0x011F42; // 8002 / 73538 + public const uint WEATHER_CLOUDY = 0x011F43; // 8003 / 73539 + public const uint WEATHER_FOGGY = 0x011F44; // 8004 / 73540 + public const uint WEATHER_WINDY = 0x011F45; // 8005 / 73541 - NOT SUPPORTED in v1.23b + public const uint WEATHER_BLUSTERY = 0x011F46; // 8006 / 73542 + public const uint WEATHER_RAINY = 0x011F47; // 8007 / 73543 + public const uint WEATHER_SHOWERY = 0x011F48; // 8008 / 73544 - NOT SUPPORTED in v1.23b + public const uint WEATHER_THUNDERY = 0x011F49; // 8009 / 73545 - NOT SUPPORTED in v1.23b + public const uint WEATHER_STORMY = 0x011F4A; // 8010 / 73546 + public const uint WEATHER_DUSTY = 0x011F4B; // 8011 / 73547 - NOT SUPPORTED in v1.23b + public const uint WEATHER_SANDY = 0x011F4C; // 8012 / 73548 + public const uint WEATHER_HOT = 0x011F4D; // 8013 / 73549 - NOT SUPPORTED in v1.23b + public const uint WEATHER_BLISTERING = 0x011F4E; // 8014 / 73550 - Bowl Of Embers Weather + public const uint WEATHER_SNOWY = 0x011F4F; // 8015 / 73551 - NOT SUPPORTED in v1.23b + public const uint WEATHER_WINTRY = 0x011F50; // 8016 / 73552 - NOT SUPPORTED in v1.23b + public const uint WEATHER_GLOOMY = 0x011F51; // 8017 / 73553 + // 8018 - 8026 / 73554 - 73562 - NOT SUPPORTED in v1.23b + public const uint WEATHER_SEASONAL = 0x011F5B; // 8027 / 73563 - Snow in Black Shroud, nothing elsewhere + public const uint WEATHER_PRIMAL = 0x011F5C; // 8028 / 73564 - Howling Eye and Thornmarch Weather + public const uint WEATHER_SEASONAL_FIREWORKS = 0x011F5D; // 8029 / 73565 - Plays fireworks between 20:00 - 21:00 ET + public const uint WEATHER_DALAMUD = 0x011F5E; // 8030 / 73566 + public const uint WEATHER_AURORA = 0x011F5F; // 8031 / 73567 + public const uint WEATHER_DALAMUD_THUNDER = 0x011F60; // 8032 / 73568 + // 8033 - 8064 / 73569 - 73600 - NOT SUPPORTED in v1.23b + public const uint WEATHER_DAY = 0x011F81; // 8065 / 73601 - Force skybox to show Day + Fair regardless of current ET + public const uint WEATHER_TWILIGHT = 0x011F82; // 8066 / 73602 - Force skybox to show Twilight + Clear regardless of current ET public const ushort OPCODE = 0x000D; public const uint PACKET_SIZE = 0x28;