mirror of
https://github.com/sebastian-heinz/Arrowgene.DragonsDogmaOnline
synced 2026-08-03 11:12:41 -04:00
* Fix bug where appraising certain items in BBM while you had a copy of that item in your regular character's storage chest would throw an error. Fix bugs where SQLite would occasionally have a DB lock conflict due to poor connection management. * Be more aggressive when clearing out invalid priority quests. * Fix bug where the Beauty Shop would sometimes complain about PRICE_NO_MATCH when trying to pay with Silver Tickets. * Fix bugs where pawn search wouldn't display craft levels, and didn't support filtering by craft level. * Migrate 58 > 59. Store character_id in the connections table so we can use it for player tracking. Adjust player tracking to be driven by the DB. * Fix bugs where bazaar processes could sometimes delete items if the storage was full. * Add feature where you can sell special items (like PP crystals) to consume them, instead of having to spam use them. * Fix bug where deleting pawns would badly mangle the equipment entries of other pawns owned by the same character. * Add support for LightQuestRepeatsPerDay, limiting the number of times a board quest can be offered to a single player per day. * Research for EquipStatId. * Maybe fix bug where base game augments were secretly applying even in BBM? Maybe fix bug where certain alt-pallet skills wouldn't work in multiplayer due to missing context information. * Update database migration version. * Automatically promote localhost players to admin when running in debug mode. Adjust /finishquesttype to clear progress when finishing quests. * Fix bug where hired pawns wearing job emblems weren't benefiting from the stats on them. Hired pawns now reflect the hiring character's job emblems entirely.
78 lines
2.8 KiB
C#
78 lines
2.8 KiB
C#
using Arrowgene.Ddon.Database.Model;
|
|
using Arrowgene.Ddon.Server;
|
|
using Arrowgene.Ddon.Shared.Entity.PacketStructure;
|
|
using Arrowgene.Ddon.Shared.Model;
|
|
using Arrowgene.Logging;
|
|
using System;
|
|
|
|
namespace Arrowgene.Ddon.GameServer.Handler
|
|
{
|
|
public class ConnectionMoveInServerHandler : GameRequestPacketHandler<C2SConnectionMoveInServerReq, S2CConnectionMoveInServerRes>
|
|
{
|
|
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(ConnectionMoveInServerHandler));
|
|
|
|
public ConnectionMoveInServerHandler(DdonGameServer server) : base(server)
|
|
{
|
|
}
|
|
|
|
public override S2CConnectionMoveInServerRes Handle(GameClient client, C2SConnectionMoveInServerReq request)
|
|
{
|
|
Logger.Debug(client, $"Received SessionKey:{request.SessionKey}");
|
|
GameToken token = Database.SelectToken(request.SessionKey);
|
|
if (token == null)
|
|
{
|
|
Logger.Error(client, $"SessionKey:{request.SessionKey} not found");
|
|
// TODO reply error
|
|
// return;
|
|
}
|
|
|
|
Database.DeleteTokenByAccountId(token.AccountId);
|
|
|
|
Account account = Database.SelectAccountById(token.AccountId);
|
|
if (account == null)
|
|
{
|
|
Logger.Error(client, $"AccountId:{token.AccountId} not found");
|
|
throw new ResponseErrorException(ErrorCode.ERROR_CODE_FAIL);
|
|
}
|
|
client.Account = account;
|
|
|
|
#if DEBUG
|
|
if (client.Identity.Contains("127.0.0.1"))
|
|
{
|
|
client.Account.State = AccountStateType.GameMaster;
|
|
}
|
|
#endif
|
|
|
|
Character character = Server.CharacterManager.SelectCharacter(client, token.CharacterId);
|
|
if (character == null)
|
|
{
|
|
Logger.Error(client, $"CharacterId:{token.CharacterId} not found");
|
|
throw new ResponseErrorException(ErrorCode.ERROR_CODE_CHARACTER_DATA_INVALID_CHARACTER_ID);
|
|
}
|
|
|
|
Logger.Info(client, "Moved Into GameServer");
|
|
|
|
|
|
// NTC
|
|
client.Send(new S2CItemExtendItemSlotNtc());
|
|
// client.Send(GameFull.Dump_5);
|
|
// client.Send(GameFull.Dump_6);
|
|
|
|
ulong now = (ulong)DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
|
foreach (var (id, course) in Server.AssetRepository.GPCourseInfoAsset.ValidCourses)
|
|
{
|
|
if (now >= course.StartTime && now <= course.EndTime)
|
|
{
|
|
S2CGPCourseExtendNtc courseExtendNtc = new S2CGPCourseExtendNtc()
|
|
{
|
|
CourseID = course.Id,
|
|
ExpiryTimestamp = course.EndTime
|
|
};
|
|
client.Send(courseExtendNtc);
|
|
}
|
|
}
|
|
|
|
return new S2CConnectionMoveInServerRes();
|
|
}
|
|
}
|
|
}
|