mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-08-20 08:13:49 +02:00
more work on commands
- moved script object to wrapper class to catch and log exceptions - added loggers for basepacket/subpacket (todo: colour and use them in NLog.config) - finished up most commands (todo: !property and !property2) - todo: create and use mysql wrapper class to log exceptions
This commit is contained in:
parent
57b9d5ab99
commit
1ad2b5d7d0
35 changed files with 780 additions and 958 deletions
|
@ -13,7 +13,8 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using FFXIVClassic_Map_Server.packets.send;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
class Area : Actor
|
||||
|
@ -352,5 +353,25 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
AddActorToZone(npc);
|
||||
}
|
||||
|
||||
public void ChangeWeather(ushort weather, ushort transitionTime, Player player, bool zoneWide = false)
|
||||
{
|
||||
weatherNormal = weather;
|
||||
|
||||
if (player != null && !zoneWide)
|
||||
{
|
||||
player.QueuePacket(BasePacket.CreatePacket(SetWeatherPacket.BuildPacket(player.actorId, weather, transitionTime), true, false));
|
||||
}
|
||||
if (zoneWide)
|
||||
{
|
||||
foreach (var actor in mActorList)
|
||||
{
|
||||
if (actor.Value is Player)
|
||||
{
|
||||
player = ((Player)actor.Value);
|
||||
player.QueuePacket(BasePacket.CreatePacket(SetWeatherPacket.BuildPacket(player.actorId, weather, transitionTime), true, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue