mirror of
https://github.com/rafi1212122/BLHX.Server.git
synced 2025-12-13 06:54:51 +01:00
ship skin comamnd and changing skin
This commit is contained in:
@@ -113,7 +113,7 @@ namespace BLHX.Server.Game.Handlers
|
||||
connection.Send(rsp);
|
||||
}
|
||||
|
||||
[PacketHandler(Command.Cs10100)]
|
||||
[PacketHandler(Command.Cs10100, IsNotifyHandler = true)]
|
||||
static void HeartbeatHandler(Connection connection, Packet packet)
|
||||
{
|
||||
connection.Send(new Sc10101() { State = 1 });
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using BLHX.Server.Common.Proto;
|
||||
using BLHX.Server.Common.Data;
|
||||
using BLHX.Server.Common.Proto;
|
||||
using BLHX.Server.Common.Proto.common;
|
||||
using BLHX.Server.Common.Proto.p12;
|
||||
|
||||
namespace BLHX.Server.Game.Handlers
|
||||
@@ -18,6 +20,16 @@ namespace BLHX.Server.Game.Handlers
|
||||
|
||||
connection.Send(new Sc12103());
|
||||
}
|
||||
|
||||
[PacketHandler(Command.Cs12202, SaveDataAfterRun = true)]
|
||||
static void SetShipSkinHandler(Connection connection, Packet packet)
|
||||
{
|
||||
var req = packet.Decode<Cs12202>();
|
||||
if (connection.player.Ships.Any(x => x.Id == req.ShipId))
|
||||
connection.player.Ships.First(x => x.Id == req.ShipId).SkinId = req.SkinId;
|
||||
|
||||
connection.Send(new Sc12203());
|
||||
}
|
||||
}
|
||||
|
||||
static class P12ConnectionNotifyExtensions
|
||||
@@ -35,7 +47,7 @@ namespace BLHX.Server.Game.Handlers
|
||||
|
||||
public static void NotifyShipSkinData(this Connection connection)
|
||||
{
|
||||
connection.Send(new Sc12201());
|
||||
connection.Send(new Sc12201() { SkinLists = connection.player.ShipSkins });
|
||||
}
|
||||
|
||||
public static void NotifyFleetData(this Connection connection)
|
||||
|
||||
18
BLHX.Server.Game/Handlers/P33.cs
Normal file
18
BLHX.Server.Game/Handlers/P33.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using BLHX.Server.Common.Proto.p33;
|
||||
|
||||
namespace BLHX.Server.Game.Handlers
|
||||
{
|
||||
internal class P33
|
||||
{
|
||||
}
|
||||
static class P33ConnectionNotifyExtensions
|
||||
{
|
||||
public static void NotifyWorldData(this Connection connection)
|
||||
{
|
||||
connection.Send(new Sc33114()
|
||||
{
|
||||
IsWorldOpen = 1
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,5 +14,11 @@ namespace BLHX.Server.Game.Handlers
|
||||
MetaShipLists = req.GroupIds.Select(x => new MetaShipInfo() { GroupId = x }).ToList()
|
||||
});
|
||||
}
|
||||
|
||||
[PacketHandler(Command.Cs34501)]
|
||||
static void GetWorldBossHandler(Connection connection, Packet packet)
|
||||
{
|
||||
connection.Send(new Sc34502());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user