1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-23 13:17:45 +00:00

Merged in TheManii/ffxiv-classic-server (pull request #10)

Merge ingame_help part 3
This commit is contained in:
Filip Maj 2016-05-09 20:38:28 -04:00
commit 78f2b18641
4 changed files with 135 additions and 42 deletions

View file

@ -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) if (mWorldManager.GetZone(zoneId) == null)
{ {
@ -128,12 +128,12 @@ namespace FFXIVClassic_Lobby_Server
} }
if (client != null) 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 else
{ {
foreach (KeyValuePair<uint, ConnectedPlayer> entry in mConnectedPlayerList) foreach (KeyValuePair<uint, ConnectedPlayer> 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 #endregion
sendMessage(client, String.Format("Warping to: ZoneID: {0} X: {1}, Y: {2}, Z: {3}", zoneId, x, y, z)); 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) else if (split.Length == 5)
{ {
@ -420,7 +420,7 @@ namespace FFXIVClassic_Lobby_Server
#endregion #endregion
sendMessage(client, String.Format("Warping to: ZoneID: {0} X: {1}, Y: {2}, Z: {3}", zoneId, x, y, z)); 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) else if (split.Length == 6)
{ {
@ -448,12 +448,42 @@ namespace FFXIVClassic_Lobby_Server
#endregion #endregion
sendMessage(client, String.Format("Warping to: ZoneID: {0} X: {1}, Y: {2}, Z: {3}", zoneId, x, y, z)); 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 else
return; // catch any invalid warps here 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<uint, ConnectedPlayer> 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);
}
}
}
*/
}
/// <summary> /// <summary>
/// We only use the default options for SendMessagePacket. /// We only use the default options for SendMessagePacket.
/// May as well make it less unwieldly to view /// May as well make it less unwieldly to view
@ -523,11 +553,48 @@ namespace FFXIVClassic_Lobby_Server
sendMessage(client, Resources.CPsetgraphic); sendMessage(client, Resources.CPsetgraphic);
*/ */
} }
if (split.Length == 3)
{
if(split[1].Equals("test"))
{
if (split[2].Equals("weather"))
sendMessage(client, Resources.CPtestweather);
}
}
return true; return true;
} }
#endregion #endregion
#region !test
else if (split[0].Equals("test"))
{
if (split.Length == 1)
{
// catch invalid commands
sendMessage(client, Resources.CPhelp);
}
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
#region !mypos #region !mypos
else if (split[0].Equals("mypos")) else if (split[0].Equals("mypos"))
{ {

View file

@ -64,7 +64,7 @@ namespace FFXIVClassic_Map_Server.Properties {
/// Looks up a localized string similar to Adds the specified currency to the current player&apos;s inventory /// Looks up a localized string similar to Adds the specified currency to the current player&apos;s inventory
/// ///
///*Syntax: givecurrency &lt;quantity&gt; ///*Syntax: givecurrency &lt;quantity&gt;
/// givecurrency &lt;quantity&gt; &lt;type&gt; /// givecurrency &lt;type&gt; &lt;quantity&gt;
///&lt;type&gt; is the specific type of currency desired, defaults to gil if no type specified. ///&lt;type&gt; is the specific type of currency desired, defaults to gil if no type specified.
/// </summary> /// </summary>
public static string CPgivecurrency { public static string CPgivecurrency {
@ -105,7 +105,8 @@ namespace FFXIVClassic_Map_Server.Properties {
/// ///
///Available commands: ///Available commands:
///Standard: mypos, music, warp ///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.
/// </summary> /// </summary>
public static string CPhelp { public static string CPhelp {
get { get {
@ -117,7 +118,7 @@ namespace FFXIVClassic_Map_Server.Properties {
/// Looks up a localized string similar to Changes the currently playing background music /// Looks up a localized string similar to Changes the currently playing background music
/// ///
///*Syntax: music &lt;music id&gt; ///*Syntax: music &lt;music id&gt;
///&lt;music id&gt; is the key item&apos;s specific id as defined in the server database. ///&lt;music id&gt; is the music&apos;s specific id as defined in the client.
/// </summary> /// </summary>
public static string CPmusic { public static string CPmusic {
get { get {
@ -176,7 +177,7 @@ namespace FFXIVClassic_Map_Server.Properties {
/// Looks up a localized string similar to Removes the specified currency from the current player&apos;s inventory /// Looks up a localized string similar to Removes the specified currency from the current player&apos;s inventory
/// ///
///*Syntax: removecurrency &lt;quantity&gt; ///*Syntax: removecurrency &lt;quantity&gt;
/// removecurrency &lt;quantity&gt; &lt;type&gt; /// removecurrency &lt;type&gt; &lt;quantity&gt;
///&lt;type&gt; is the specific type of currency desired, defaults to gil if no type specified. ///&lt;type&gt; is the specific type of currency desired, defaults to gil if no type specified.
/// </summary> /// </summary>
public static string CPremovecurrency { public static string CPremovecurrency {
@ -236,6 +237,18 @@ namespace FFXIVClassic_Map_Server.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to Changes the current weather
///
///*Syntax: test weather &lt;weather id&gt;
///&lt;weather id&gt; is the weather&apos;s specific id as defined in the client.
/// </summary>
public static string CPtestweather {
get {
return ResourceManager.GetString("CPtestweather", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Teleports the player to the specified location /// Looks up a localized string similar to Teleports the player to the specified location
/// ///

View file

@ -121,7 +121,7 @@
<value>Adds the specified currency to the current player's inventory <value>Adds the specified currency to the current player's inventory
*Syntax: givecurrency &lt;quantity&gt; *Syntax: givecurrency &lt;quantity&gt;
givecurrency &lt;quantity&gt; &lt;type&gt; givecurrency &lt;type&gt; &lt;quantity&gt;
&lt;type&gt; is the specific type of currency desired, defaults to gil if no type specified</value> &lt;type&gt; is the specific type of currency desired, defaults to gil if no type specified</value>
</data> </data>
<data name="CPgiveitem" xml:space="preserve"> <data name="CPgiveitem" xml:space="preserve">
@ -144,13 +144,14 @@
Available commands: Available commands:
Standard: mypos, music, warp Standard: mypos, music, warp
Server Administration: givecurrency, giveitem, givekeyitem, removecurrency, removekeyitem, reloaditems, reloadzones</value> Server Administration: givecurrency, giveitem, givekeyitem, removecurrency, removekeyitem, reloaditems, reloadzones
Test: test weather</value>
</data> </data>
<data name="CPmusic" xml:space="preserve"> <data name="CPmusic" xml:space="preserve">
<value>Changes the currently playing background music <value>Changes the currently playing background music
*Syntax: music &lt;music id&gt; *Syntax: music &lt;music id&gt;
&lt;music id&gt; is the key item's specific id as defined in the server database</value> &lt;music id&gt; is the music's specific id as defined in the client</value>
</data> </data>
<data name="CPmypos" xml:space="preserve"> <data name="CPmypos" xml:space="preserve">
<value>Prints out your current location <value>Prints out your current location
@ -173,7 +174,7 @@ Server Administration: givecurrency, giveitem, givekeyitem, removecurrency, remo
<value>Removes the specified currency from the current player's inventory <value>Removes the specified currency from the current player's inventory
*Syntax: removecurrency &lt;quantity&gt; *Syntax: removecurrency &lt;quantity&gt;
removecurrency &lt;quantity&gt; &lt;type&gt; removecurrency &lt;type&gt; &lt;quantity&gt;
&lt;type&gt; is the specific type of currency desired, defaults to gil if no type specified</value> &lt;type&gt; is the specific type of currency desired, defaults to gil if no type specified</value>
</data> </data>
<data name="CPremoveitem" xml:space="preserve"> <data name="CPremoveitem" xml:space="preserve">
@ -202,6 +203,12 @@ Server Administration: givecurrency, giveitem, givekeyitem, removecurrency, remo
*Syntax: sendpacket &lt;slot&gt; &lt;wid&gt; &lt;eid&gt; &lt;vid&gt; &lt;cid&gt; *Syntax: sendpacket &lt;slot&gt; &lt;wid&gt; &lt;eid&gt; &lt;vid&gt; &lt;cid&gt;
&lt;w/e/v/c id&gt; are as defined in the client game data</value> &lt;w/e/v/c id&gt; are as defined in the client game data</value>
</data>
<data name="CPtestweather" xml:space="preserve">
<value>Changes the current weather
*Syntax: test weather &lt;weather id&gt;
&lt;weather id&gt; is the weather's specific id as defined in the client</value>
</data> </data>
<data name="CPwarp" xml:space="preserve"> <data name="CPwarp" xml:space="preserve">
<value>Teleports the player to the specified location <value>Teleports the player to the specified location

View file

@ -9,28 +9,34 @@ namespace FFXIVClassic_Map_Server.packets.send
{ {
class SetWeatherPacket class SetWeatherPacket
{ {
//TODO: Fix these ids! // Use the first value to change without a transition, the second value to do a standard transition
public const uint WEATHER_CLEAR = 0x011F41; public const uint WEATHER_CLEAR = 0x011F41; // 8001 / 73537
public const uint WEATHER_FINE = 0x011F42; public const uint WEATHER_FAIR = 0x011F42; // 8002 / 73538
public const uint WEATHER_CLOUDY = 0x011F3; public const uint WEATHER_CLOUDY = 0x011F43; // 8003 / 73539
public const uint WEATHER_FOGGY = 0x011F4; public const uint WEATHER_FOGGY = 0x011F44; // 8004 / 73540
public const uint WEATHER_WINDY = 0x011F5; //NOT SUPPORTED in v1.23 public const uint WEATHER_WINDY = 0x011F45; // 8005 / 73541 - NOT SUPPORTED in v1.23b
public const uint WEATHER_BLUSTERY = 0x011F6; public const uint WEATHER_BLUSTERY = 0x011F46; // 8006 / 73542
public const uint WEATHER_RAINY = 0x011F7; public const uint WEATHER_RAINY = 0x011F47; // 8007 / 73543
public const uint WEATHER_SHOWERY = 0x011F8; //NOT SUPPORTED in v1.23 public const uint WEATHER_SHOWERY = 0x011F48; // 8008 / 73544 - NOT SUPPORTED in v1.23b
public const uint WEATHER_THUNDERY = 0x011F9; //NOT SUPPORTED in v1.23 public const uint WEATHER_THUNDERY = 0x011F49; // 8009 / 73545 - NOT SUPPORTED in v1.23b
public const uint WEATHER_STORMY = 0x011FA; public const uint WEATHER_STORMY = 0x011F4A; // 8010 / 73546
public const uint WEATHER_DUSTY = 0x011FB; //NOT SUPPORTED in v1.23 public const uint WEATHER_DUSTY = 0x011F4B; // 8011 / 73547 - NOT SUPPORTED in v1.23b
public const uint WEATHER_SANDY = 0x011FC; public const uint WEATHER_SANDY = 0x011F4C; // 8012 / 73548
public const uint WEATHER_IFRIT = 0x011F4E; public const uint WEATHER_HOT = 0x011F4D; // 8013 / 73549 - NOT SUPPORTED in v1.23b
public const uint WEATHER_GARUDA = 0x011F5C; public const uint WEATHER_BLISTERING = 0x011F4E; // 8014 / 73550 - Bowl Of Embers Weather
public const uint WEATHER_BLISTERIN = 0x011FD; //NOT SUPPORTED in v1.23 public const uint WEATHER_SNOWY = 0x011F4F; // 8015 / 73551 - NOT SUPPORTED in v1.23b
public const uint WEATHER_SNOWY = 0x011FE; //NOT SUPPORTED in v1.23 public const uint WEATHER_WINTRY = 0x011F50; // 8016 / 73552 - NOT SUPPORTED in v1.23b
public const uint WEATHER_WINTRY = 0x011FF; //NOT SUPPORTED in v1.23 public const uint WEATHER_GLOOMY = 0x011F51; // 8017 / 73553
public const uint WEATHER_GLOOMY = 0x01200; // 8018 - 8026 / 73554 - 73562 - NOT SUPPORTED in v1.23b
public const uint WEATHER_PREDALAMUD = 0x011F5F; public const uint WEATHER_SEASONAL = 0x011F5B; // 8027 / 73563 - Snow in Black Shroud, nothing elsewhere
public const uint WEATHER_DALAMUD = 0x011F5E; public const uint WEATHER_PRIMAL = 0x011F5C; // 8028 / 73564 - Howling Eye and Thornmarch Weather
public const uint WEATHER_SCARYDALAMUD = 0x011F60; 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 ushort OPCODE = 0x000D;
public const uint PACKET_SIZE = 0x28; public const uint PACKET_SIZE = 0x28;