mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-13 17:44:36 +01:00
Affixes and Equipment (#2)
* Update Equipment.cs Added LVL and EXP params while adding some equipment * Update Equipment.cs changed params to the appropriate type and removed casting * Update Equipment.cs Removed unnecessary changes. * Update RefineStigmataRuneReqHandler.cs Simplified rolling * Update GiveCommand.cs Changed Default behavior of Equipment commands to grant only the max star level versions. Default's to max level as well. * Update GiveCommand.cs Added more command aliases, > valks, valkyries, weap, wep, > weapons-all, weap-all, wep-all, stigmata-all, stigs-all added Avatar ID `316` to the blocked IDs list to prevent buggy behavior. (might add `avatars-all` to get them back) give weap/stigs 0 grants max level items without the `-all` equipment only gives the highest rarity of each weapon. * Update RefineStigmataRuneReqHandler.cs Affixes are now 90% functional * Update SelectNewStigmataRuneReqHandler.cs Should work for any further affix handling changes without needing modifications (might break on 10x but shouldn't) * Update AvatarCommand.cs Blocked Sus-Nya * Update AvatarCommand.cs bitwise -> logical OR * Update GiveCommand.cs bitwise -> logical OR * Update RefineStigmataRuneReqHandler.cs bitwise -> logical AND * Created Personal Abyss Command * Created abyss command * Update User.cs Stores personal Abyss Temperature * Update UltraEndlessGetMainDataReqHandler.cs Uses personal Abyss Temp
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Common.Resources.Proto;
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
@@ -8,14 +8,35 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
SelectNewStigmataRuneReq Data = packet.GetDecodedBody<SelectNewStigmataRuneReq>();
|
||||
SelectNewStigmataRuneRsp Rsp = new() { retcode = SelectNewStigmataRuneRsp.Retcode.Succ };
|
||||
SelectNewStigmataRuneRsp Rsp = new() { retcode = SelectNewStigmataRuneRsp.Retcode.Succ, SelectUniqueId = Data.SelectUniqueId, IsSelect = Data.IsSelect };
|
||||
uint uid = Data.UniqueId;
|
||||
Stigmata? stigmata = session.Player.Equipment.StigmataList.FirstOrDefault(stig => stig.UniqueId == uid);
|
||||
//Packet.c.Log($"SelectNewStigmataRuneReqHandler: {Data.UniqueId} {Data.SelectUniqueId} {Data.IsSelect}");
|
||||
|
||||
Packet.c.Log($"SelectNewStigmataRuneReqHandler: {Data.UniqueId} {Data.SelectUniqueId} {Data.IsSelect}");
|
||||
|
||||
if (Data.IsSelect)
|
||||
if (stigmata is not null)
|
||||
{
|
||||
if(Data.IsSelect)
|
||||
{
|
||||
if(stigmata.WaitSelectRuneGroupLists is not null)
|
||||
{
|
||||
stigmata.RuneLists.Clear();
|
||||
foreach(var groups in stigmata.WaitSelectRuneGroupLists)
|
||||
{
|
||||
if(groups.UniqueId == Data.SelectUniqueId)
|
||||
{
|
||||
for (var i = 0; i < groups.RuneLists.Count; i++)
|
||||
{
|
||||
var group = groups.RuneLists[i];
|
||||
if(group is null) continue;
|
||||
stigmata.RuneLists.Add(group);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stigmata.WaitSelectRuneGroupLists.Clear();
|
||||
}
|
||||
|
||||
session.Player.Equipment.Save();
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.SelectNewStigmataRuneRsp));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user