mirror of
https://github.com/rafi1212122/BLHX.Server.git
synced 2025-12-12 14:34:39 +01:00
battle, ship boom boom
This commit is contained in:
@@ -31,6 +31,7 @@ namespace BLHX.Server.Game.Handlers
|
||||
if (x.Flag == ChapterAttachFlag.AttachEnemy)
|
||||
{
|
||||
cellInfo.ItemType = (uint)x.Flag;
|
||||
// TODO: Use weigted values
|
||||
cellInfo.ItemId = (uint)chapterTemplate.ExpeditionIdWeightList[Random.Shared.Next(chapterTemplate.ExpeditionIdWeightList.Length)][0];
|
||||
}
|
||||
|
||||
@@ -90,13 +91,14 @@ namespace BLHX.Server.Game.Handlers
|
||||
case ChapterOP.OpMove:
|
||||
rsp.MovePaths.Add(new() { Row = req.ActArg1, Column = req.ActArg2 });
|
||||
break;
|
||||
case ChapterOP.OpEnemyRound:
|
||||
break;
|
||||
case ChapterOP.OpRetreat:
|
||||
case ChapterOP.OpBox:
|
||||
case ChapterOP.OpAmbush:
|
||||
case ChapterOP.OpStrategy:
|
||||
case ChapterOP.OpRepair:
|
||||
case ChapterOP.OpSupply:
|
||||
case ChapterOP.OpEnemyRound:
|
||||
case ChapterOP.OpSubState:
|
||||
case ChapterOP.OpStory:
|
||||
case ChapterOP.OpBarrier:
|
||||
@@ -113,6 +115,12 @@ namespace BLHX.Server.Game.Handlers
|
||||
connection.Send(rsp);
|
||||
}
|
||||
|
||||
[PacketHandler(Command.Cs13106)]
|
||||
static void ChapterBattleResultRequestHandler(Connection connection, Packet packet)
|
||||
{
|
||||
connection.Send(new Sc13105());
|
||||
}
|
||||
|
||||
[PacketHandler(Command.Cs13505)]
|
||||
static void RemasterInfoRequestHandler(Connection connection, Packet packet)
|
||||
{
|
||||
|
||||
28
BLHX.Server.Game/Handlers/P40.cs
Normal file
28
BLHX.Server.Game/Handlers/P40.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using BLHX.Server.Common.Proto;
|
||||
using BLHX.Server.Common.Proto.p40;
|
||||
|
||||
namespace BLHX.Server.Game.Handlers
|
||||
{
|
||||
internal static class P40
|
||||
{
|
||||
[PacketHandler(Command.Cs40001)]
|
||||
static void BeginStageHandler(Connection connection, Packet packet)
|
||||
{
|
||||
// TODO: Check the importance of the request data and calculate oil and gold cost pls
|
||||
connection.Send(new Sc40002());
|
||||
}
|
||||
|
||||
[PacketHandler(Command.Cs40003)]
|
||||
static void FinishStageHandler(Connection connection, Packet packet)
|
||||
{
|
||||
// TODO: Calculate rewarded EXP and drop rewards
|
||||
var req = packet.Decode<Cs40003>();
|
||||
|
||||
connection.Send(new Sc40004()
|
||||
{
|
||||
ShipExpLists = req.Statistics.Select(x => new ShipExp() { ShipId = x.ShipId, Intimacy = 10000 }).ToList(),
|
||||
Mvp = req.Statistics.First().ShipId
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user