mirror of
https://git.muiegratis.online/suikoakari/Campofinale
synced 2025-12-12 17:44:37 +01:00
Compare commits
5 Commits
460bfe527c
...
d54bab8906
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d54bab8906 | ||
|
|
68f93eb80d | ||
|
|
c2ba13b5f7 | ||
|
|
b125394b79 | ||
|
|
69d832d376 |
34
Campofinale/Packets/Cs/HandleCsItemBagSetItemLock.cs
Normal file
34
Campofinale/Packets/Cs/HandleCsItemBagSetItemLock.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using Campofinale.Game.Char;
|
||||
using Campofinale.Game.Inventory;
|
||||
using Campofinale.Network;
|
||||
using Campofinale.Protocol;
|
||||
|
||||
namespace Campofinale.Packets.Cs
|
||||
{
|
||||
public class HandleCsItemBagSetItemLock
|
||||
{
|
||||
[Server.Handler(CsMsgId.CsItemBagSetItemLock)]
|
||||
public static void Handle(Player session, CsMsgId cmdId, Packet packet)
|
||||
{
|
||||
CsItemBagSetItemLock req = packet.DecodeBody<CsItemBagSetItemLock>();
|
||||
|
||||
foreach (var info in req.LockInfoList)
|
||||
{
|
||||
Item item = session.inventoryManager.items.items.Find(i=>i.guid==info.InstId);
|
||||
if (item != null)
|
||||
{
|
||||
item.locked = info.IsLock;
|
||||
}
|
||||
}
|
||||
ScItemBagSetItemLock rsp = new()
|
||||
{
|
||||
LockInfoList =
|
||||
{
|
||||
req.LockInfoList,
|
||||
}
|
||||
};
|
||||
session.Send(ScMsgId.ScItemBagSetItemLock, rsp);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ class Program
|
||||
static void Main(string[] args)
|
||||
{
|
||||
StartServer(args);
|
||||
//FakeClientTester();
|
||||
//FakeClientTester();
|
||||
}
|
||||
public static byte[] ConcatenateByteArrays(byte[] array1, byte[] array2)
|
||||
{
|
||||
@@ -22,7 +22,7 @@ class Program
|
||||
private static void FakeClientTester()
|
||||
{
|
||||
//
|
||||
string serverIp = "beyond-cn.hypergryph.com";
|
||||
string serverIp = "beyond-ric.gryphline.com";
|
||||
int serverPort = 30000;
|
||||
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
|
||||
@@ -32,7 +32,8 @@ class Program
|
||||
|
||||
socket.Connect(new IPEndPoint(ipAddress, serverPort));
|
||||
|
||||
socket.Send(Packet.EncodePacket((int)CsMsgId.CsLogin,new CsLogin() { ClientVersion="0.5.5",Uid= "", Token= "", Env=EnvType.Prod,PlatformId=ClientPlatformType.Windows,Area=AreaType.Oversea,ClientResVersion="", LoginToken= "" }.ToByteArray()));
|
||||
socket.Send(Packet.EncodePacket((int)CsMsgId.CsLogin,new CsLogin() { ClientVersion="0.5.5",Uid= "", Token= "", Env=EnvType.Prod,PlatformId=ClientPlatformType.Windows,Area=AreaType.Oversea,ClientResVersion="", LoginToken= "" }.ToByteArray()));
|
||||
//socket.Send(Packet.EncodePacket((int)CsMsgId.CsFriendListSync, new CsFriendListSync() { }.ToByteArray()));
|
||||
while (true)
|
||||
{
|
||||
byte[] buffer = new byte[3];
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Campofinale
|
||||
public delegate void HandlerDelegate(Player sender, string command, string[] args, Player target);
|
||||
}
|
||||
public static List<Player> clients = new List<Player>();
|
||||
public static string ServerVersion = "1.1.7-dev";
|
||||
public static string ServerVersion = "1.1.8-dev";
|
||||
public static bool Initialized = false;
|
||||
public static bool showLogs = true;
|
||||
public static bool showWarningLogs = true;
|
||||
|
||||
Reference in New Issue
Block a user