mirror of
https://git.muiegratis.online/suikoakari/Campofinale
synced 2025-12-23 06:54:41 +01:00
Aggiungere i file di progetto.
This commit is contained in:
42
Campofinale/Packets/Cs/HandleCsCharPotentialUnlock.cs
Normal file
42
Campofinale/Packets/Cs/HandleCsCharPotentialUnlock.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using Campofinale.Game.Character;
|
||||
using Campofinale.Network;
|
||||
using Campofinale.Packets.Sc;
|
||||
using Campofinale.Protocol;
|
||||
using Google.Protobuf;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Campofinale.Packets.Cs
|
||||
{
|
||||
public class HandleCsCharPotentialUnlock
|
||||
{
|
||||
|
||||
[Server.Handler(CsMsgId.CsCharPotentialUnlock)]
|
||||
public static void Handle(Player session, CsMsgId cmdId, Packet packet)
|
||||
{
|
||||
CsCharPotentialUnlock req = packet.DecodeBody<CsCharPotentialUnlock>();
|
||||
|
||||
Character character = session.chars.Find(c => c.guid == req.CharObjId);
|
||||
if (character != null)
|
||||
{
|
||||
character.potential=req.Level;
|
||||
//TODO consume Item ID
|
||||
|
||||
ScCharPotentialUnlock unlock = new()
|
||||
{
|
||||
CharObjId = req.CharObjId,
|
||||
Level = req.Level,
|
||||
};
|
||||
session.Send(ScMsgId.ScCharPotentialUnlock, unlock);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user