mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-24 05:37:46 +00:00
Found out the second weather packet value is a transition time.
This commit is contained in:
parent
b45390adb6
commit
f0ec2125ac
5 changed files with 42 additions and 36 deletions
|
@ -455,13 +455,13 @@ namespace FFXIVClassic_Lobby_Server
|
|||
return; // catch any invalid warps here
|
||||
}
|
||||
|
||||
private void doWeather(ConnectedPlayer client, string weatherID)
|
||||
private void doWeather(ConnectedPlayer client, string weatherID, string value)
|
||||
{
|
||||
long weather = Convert.ToInt64(weatherID);
|
||||
ushort weather = Convert.ToUInt16(weatherID);
|
||||
|
||||
if (client != null)
|
||||
{
|
||||
client.queuePacket(BasePacket.createPacket(SetWeatherPacket.buildPacket(client.actorID, weather, true), true, false));
|
||||
client.queuePacket(BasePacket.createPacket(SetWeatherPacket.buildPacket(client.actorID, weather, Convert.ToUInt16(value)), true, false));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -582,7 +582,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
{
|
||||
try
|
||||
{
|
||||
doWeather(client, split[2]);
|
||||
doWeather(client, split[2], split[3]);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -479,7 +479,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
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, true));
|
||||
queuePacket(SetWeatherPacket.buildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR, 1));
|
||||
|
||||
queuePacket(SetMapPacket.buildPacket(actorId, zone.regionId, zone.actorId));
|
||||
|
||||
|
@ -522,6 +522,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
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)
|
||||
|
@ -550,6 +551,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
packet.debugPrintSubPacket();
|
||||
queuePacket(packet);
|
||||
}
|
||||
|
||||
playerSession.queuePacket(weatherDirectorSpawn);
|
||||
|
||||
/*
|
||||
#region hardcode
|
||||
BasePacket reply10 = new BasePacket("./packets/login/login10.bin"); //Item Storage, Inn Door created
|
||||
|
|
|
@ -21,9 +21,11 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
this.weatherId = weatherId;
|
||||
|
||||
this.displayNameId = 0;
|
||||
this.customDisplayName = String.Format("weatherDire_{0}", zone.zoneName, zone.actorId);
|
||||
|
||||
this.actorName = String.Format("weatherDire_{0}@{0:04x}", zone.zoneName, zone.actorId);
|
||||
this.customDisplayName = String.Format("weatherDire_{0}_{1}", player.zone.zoneName, "07");
|
||||
|
||||
this.actorName = String.Format("weatherDire_{0}_{1}@{2:x3}{3:x2}", player.zone.zoneName, "04", player.zoneId, 0);
|
||||
|
||||
this.className = "Debug";
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@ namespace FFXIVClassic_Map_Server.lua
|
|||
player.playerSession.queuePacket(SetMusicPacket.buildPacket(player.actorId, musicID, playMode), true, false);
|
||||
}
|
||||
|
||||
public void setWeather(uint weatherID)
|
||||
public void setWeather(ushort weatherID)
|
||||
{
|
||||
player.playerSession.queuePacket(SetWeatherPacket.buildPacket(player.actorId, weatherID, true), true, false);
|
||||
player.playerSession.queuePacket(SetWeatherPacket.buildPacket(player.actorId, weatherID, 1), true, false);
|
||||
}
|
||||
|
||||
public void getParameter(string paramName)
|
||||
|
|
|
@ -9,40 +9,40 @@ namespace FFXIVClassic_Map_Server.packets.send
|
|||
{
|
||||
class SetWeatherPacket
|
||||
{
|
||||
public const uint WEATHER_CLEAR = 8001;
|
||||
public const uint WEATHER_FAIR = 8002;
|
||||
public const uint WEATHER_CLOUDY = 8003;
|
||||
public const uint WEATHER_FOGGY = 8004;
|
||||
public const uint WEATHER_WINDY = 8005;
|
||||
public const uint WEATHER_BLUSTERY = 8006;
|
||||
public const uint WEATHER_RAINY = 8007;
|
||||
public const uint WEATHER_SHOWERY = 8008;
|
||||
public const uint WEATHER_THUNDERY = 8009;
|
||||
public const uint WEATHER_STORMY = 8010;
|
||||
public const uint WEATHER_DUSTY = 8011;
|
||||
public const uint WEATHER_SANDY = 8012;
|
||||
public const uint WEATHER_HOT = 8013;
|
||||
public const uint WEATHER_BLISTERING = 8014; //Bowl Of Embers Weather
|
||||
public const uint WEATHER_SNOWY = 8015;
|
||||
public const uint WEATHER_WINTRY = 8016;
|
||||
public const uint WEATHER_GLOOMY = 8017;
|
||||
public const ushort WEATHER_CLEAR = 8001;
|
||||
public const ushort WEATHER_FAIR = 8002;
|
||||
public const ushort WEATHER_CLOUDY = 8003;
|
||||
public const ushort WEATHER_FOGGY = 8004;
|
||||
public const ushort WEATHER_WINDY = 8005;
|
||||
public const ushort WEATHER_BLUSTERY = 8006;
|
||||
public const ushort WEATHER_RAINY = 8007;
|
||||
public const ushort WEATHER_SHOWERY = 8008;
|
||||
public const ushort WEATHER_THUNDERY = 8009;
|
||||
public const ushort WEATHER_STORMY = 8010;
|
||||
public const ushort WEATHER_DUSTY = 8011;
|
||||
public const ushort WEATHER_SANDY = 8012;
|
||||
public const ushort WEATHER_HOT = 8013;
|
||||
public const ushort WEATHER_BLISTERING = 8014; //Bowl Of Embers Weather
|
||||
public const ushort WEATHER_SNOWY = 8015;
|
||||
public const ushort WEATHER_WINTRY = 8016;
|
||||
public const ushort WEATHER_GLOOMY = 8017;
|
||||
|
||||
public const uint WEATHER_SEASONAL = 8027; //Snow in Black Shroud, nothing elsewhere
|
||||
public const uint WEATHER_PRIMAL = 8028; //Howling Eye and Thornmarch Weather
|
||||
public const uint WEATHER_SEASONAL_FIREWORKS = 8029; //Plays fireworks between 20:00 - 21:00 ET
|
||||
public const uint WEATHER_DALAMUD = 8030;
|
||||
public const uint WEATHER_AURORA = 8031;
|
||||
public const uint WEATHER_DALAMUD_THUNDER = 8032;
|
||||
public const ushort WEATHER_SEASONAL = 8027; //Snow in Black Shroud, nothing elsewhere
|
||||
public const ushort WEATHER_PRIMAL = 8028; //Howling Eye and Thornmarch Weather
|
||||
public const ushort WEATHER_SEASONAL_FIREWORKS = 8029; //Plays fireworks between 20:00 - 21:00 ET
|
||||
public const ushort WEATHER_DALAMUD = 8030;
|
||||
public const ushort WEATHER_AURORA = 8031;
|
||||
public const ushort WEATHER_DALAMUD_THUNDER = 8032;
|
||||
|
||||
public const uint WEATHER_DAY = 8065; //Force skybox to show Day + Fair regardless of current ET
|
||||
public const uint WEATHER_TWILIGHT = 8066; //Force skybox to show Twilight + Clear regardless of current ET
|
||||
public const ushort WEATHER_DAY = 8065; //Force skybox to show Day + Fair regardless of current ET
|
||||
public const ushort WEATHER_TWILIGHT = 8066; //Force skybox to show Twilight + Clear regardless of current ET
|
||||
|
||||
public const ushort OPCODE = 0x000D;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, long weatherId, bool smoothTransition)
|
||||
public static SubPacket buildPacket(uint playerActorID, ushort weatherId, ushort transitionTime)
|
||||
{
|
||||
ulong combined = (uint)(weatherId | ((smoothTransition ? 1 : 0) << 16));
|
||||
ulong combined = (ulong)(weatherId | (transitionTime << 16));
|
||||
return new SubPacket(OPCODE, 0, playerActorID, BitConverter.GetBytes(combined));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue