sapiensanatis / dawnshard Goto Github PK
View Code? Open in Web Editor NEWServer emulator for Dragalia Lost
Home Page: https://dawnshard.co.uk
License: MIT License
Server emulator for Dragalia Lost
Home Page: https://dawnshard.co.uk
License: MIT License
Instead of throwing an internal server error and returning HTTP 500 on encountering an unhandled exception, the API should return a 200 with a response such as
{
"data_headers": {
"result_code": 122
},
"data": {
"result_code": 122
}
}
This will cause the end user to see a server error message rather than the 'Failed to connect. Try again' message which will often be shown when trying to access functionality that is not implemented yet, and so will allow reporting of genuine errors.
The logging set up should be improved (Serilog?) so that we are logging all errors and potentially also all 4xx status codes issued. Logs should also be written to the VPS host and not just within the container.
Players should be given a selection of maxed out weapons and wyrmprints plus some upgrading materials to enhance the playtesting experience. Perhaps these should be initialized with the savefile
Currently we have a hack in place to skip the rest of the tutorial after reaching a certain stage, due to required functionality being missing -- i.e. the tutorial would ask you to upgrade a wyrmprint, but you couldn't.
https://github.com/SapiensAnatis/Dawnshard/blob/develop/DragaliaAPI/Services/StoryService.cs#L210
We should now have the endpoints needed to complete the tutorial, so this should be removed and the full tutorial reimplemented.
Additionally, this will solve #118 if the halidom is granted to new saves when they finish Chapter 1.
This covers the groups of missions in the main story which block you from progressing until you complete certain tasks. Currently when reaching these tasks you are blocked from progressing the story further as the relevant endpoints will 404.
From the API docs it appears there are only two
The functionality relates to the SQLite table MissionMainStoryData
and this section in the save
"current_main_story_mission": {
"main_story_mission_group_id": 11,
"main_story_mission_state_list": [
{
"main_story_mission_id": 10110101,
"state": 2
},
{
"main_story_mission_id": 10110201,
"state": 2
},
{
"main_story_mission_id": 10110301,
"state": 2
},
{
"main_story_mission_id": 10110401,
"state": 2
},
{
"main_story_mission_id": 10110501,
"state": 2
}
]
},
We will have to track these ids in the database and return them from /load/index, although there is a slightly complexity from the fact that only missions in the current group appear to be returned (there are 64 in the DB which presumably the above save has done, but only ones from group 11 are shown).
DungeonStartController needs to be modified to handle the case where two parties are sent in the request, as for e.g. Master/Legend Sinister Dominion.
Currently the API will 404 if you try to give up on a quest. That's one way of encouraging players to not die!
Need to add support for /dungeon/fail
Describe the bug
After using omnicite, a characters stats are not the maximum. Consider halloween odetta:
Expected max stats (per wiki):
On branch
develop live 27/12/2022
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Max stats correct
Additional context
Looks like we're missing the last 70MC bonus
Currently, the server fixes everyone's stamina and getherwings at 999/99 respectively.
This should be replaced with a system that:
Describe the bug
Stat gain ain't right
On branch
dev-steelgram
To Reproduce
Unlock mananodes
Expected behavior
Correct stat gain
Additional context
Probably broke during one of the adjustments
The server does not currently implement daily login bonuses.
These are sent from /login/index
There is already some logic to handle 'daily resets' for dragon gifts, although this may need to be reworked.
It is fine for the gifts to be given directly to users rather than going in the gift box, until this functionality is added.
It is not currently possible to interact with epithets (localized name) / emblems (internal name) on the server, due to the functionality being missing.
Tasks required to add support:
This will require creating a new database table to store emblem information.
To follow once other infrastructure is in place:
The same concurrency issue fixed by #102 for save imports can also happen when making a new save.
Perhaps a locking system should be added for this as well, though the issue isn't as prevelant since duplicate requests are less common here -- it's usually quicker to create a new save than import one
Units currently don't level up after quests. This should be added as a way to upgrade units without crystals.
Should also involve refactoring CharaController to pull out unit levelup logic into a service, so that this can be called from the dungeon finish endpoint.
Sub-task of #77
This endpoint should be implemented in FortController to allow players to move buildings and update the database with their new location.
Describe the bug
The wyrmprints Dragon's Nest and Dragon Arcanum don't seem to have any effect at the beginning of a quest. However, dragons with such abilities, Bahamut/Ramiel/Elysium/Pbrun, as well as character abilities like Alberius' A1 work as expected when in the main party.
On branch
Develop live 06/01/2023
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The dragon gauge should start at a boosted amount depending on how many copies the team has equipped.
Add support for item summons via the shop:
There will be no other way to obtain them other than importing a save, but it should be possible to use the ones you have.
Describe the bug
When you summon, every character has an eldwater value and is marked as a dupe
On branch
quest-clearing
To Reproduce
Summon
Expected behavior
Dupes marked correctly
Additional context
I probably broke this when attempting to refactor summoning
Describe the bug
When setting an adventurer loadout, wyrmprints are not saved.
On branch
quest-clearing
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Wyrmprints should be updated
Additional context
Probably an automapper issue as the request contains the right ID but it is not mapped correctly. ReverseMap() is not validating the members so it may be failing without saying why
[Found by Green Gobliño Gamer#8175, description based on their report]
Describe the bug
DY!Nevin missing initial burst attack and skill levels when acquired
On branch
master
To Reproduce
Literally just get him somehow
Expected behavior
Defaults respected
Additional context
Can't really reproduce the skill level thing, it's not unlocked by default either according to our data or the wiki. The burst attack is a very real and reproducable bug though.
It is not currently possible to access the event compendium. Support for this should be added so that old events can be replayed.
Relevant endpoints (may be more):
For each of /raid_event/
, /earn_event/
, /build_event/
, /combat_event/
, /clb_01_event/
:
Sub-task of #77
Requires the following endpoints:
The upgrading info (next facility, rupie cost, mat cost, time) is contained in the FortPlantDetail object in MasterAsset. These endpoints should use that data to update the database accordingly
According to Seq, drop retrieval is failing for the following quests
Quest id | Quest name |
---|---|
100260108 | The Consummate Creator |
100260308 | The Consummate Creator (another difficulty? co-op?) |
100260109 | Fight for Humanity |
301010103 | Scalding Shroom Strike |
301020102 | Violet Ghost Strike |
301020104 | Cerulean Ghost Strike |
(query used: select distinct(quest) from stream where @EventType = 0x70401AF4
)
Describe the bug
Exception about insufficient materials when unlocking edit skill
On branch
prod
To Reproduce
I guess unlocking an edit skill?
Expected behavior
Honestly, the client should've stopped this.
Additional context
My guess is the material counts between server and client got sorta desynced.
There is validation when setting a party to check you own all the dragon_key_ids and chara_ids you have chosen.
Currently there are errors seen with this, which should not be happening unless external clients are being used to make requests
Seq events:
@Id = 'event-86fe4c93fe6e08dadacc050000000000'
@Id = 'event-dc2ff97cfda108dad29a010000000000'
Possibly the client is getting an idea that it has stuff which it does not, which may be related to #90
This issue appears to happen very rarely and reproduction steps need to be found
Is your feature request related to a problem? Please describe.
We have relational structures (i.e. a user has dragons, dragonreliabilities, ...) but no navigation properties and misconfigured foreign keys
Describe the solution you'd like
Sub-task of #77
Building a facility for the first time uses the following endpoints:
Currently it is not possible to level up on the server and player XP is not modified. All quests give 1 XP which is not applied.
Players should be able to complete quests to level up. On levelling up, all stamina and getherwings would be restored -- although these are currently not tracked and always set to the max values anyway.
I am stupid and forgot to do that.
Currently there is a legacy auth system from pre-BaaS used in the development environment which is left there so that local setups do not contact the BaaS. Maintaining two auth flows makes AuthService unecessarily complicated and makes it hard to manually test the actual auth code that is deployed.
The legacy auth flow should be replaced with a mocked-out BaaS implementation which issues a token for whatever account ID the client sends. Should have customizeable save import and expiry too. Ideally it won't make any API calls to the actual BaaS.
For the following endpoints:
Requests will rarely cause a TaskCancelledException e.g.
[2023-01-08 05:50:15 ERR DragaliaAPI.Middleware.ExceptionHandlerMiddleware][0HMNH4TT5AF8G:0000000C][] Encountered unhandled exception: MessagePack.MessagePackSerializationException: Failed to serialize DragaliaAPI.Models.DragaliaResponse`1[[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] value.
---> System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at MessagePack.Formatters.CollectionFormatterBase`4.Serialize(MessagePackWriter& writer, TCollection value, MessagePackSerializerOptions options)
at MessagePack.Formatters.DragaliaAPI_Models_Generated_LoadIndexDataFormatter13.Serialize(MessagePackWriter& writer, LoadIndexData value, MessagePackSerializerOptions options)
at MessagePack.Formatters.DynamicObjectTypeFallbackFormatter.Serialize(MessagePackWriter& writer, Object value, MessagePackSerializerOptions options)
at MessagePack.Formatters.DragaliaAPI_Models_DragaliaResponse`1\[\[System_Object\, System_Private_CoreLib\]\]Formatter1.Serialize(MessagePackWriter& writer, DragaliaResponse`1 value, MessagePackSerializerOptions options)
at MessagePack.MessagePackSerializer.Serialize[T](MessagePackWriter& writer, T value, MessagePackSerializerOptions options)
--- End of inner exception stack trace ---
at MessagePack.MessagePackSerializer.Serialize[T](MessagePackWriter& writer, T value, MessagePackSerializerOptions options)
at lambda_method33(Closure, IBufferWriter`1, Object, MessagePackSerializerOptions, CancellationToken)
at MessagePack.AspNetCoreMvcFormatter.MessagePackOutputFormatter.WriteResponseBodyAsync(OutputFormatterWriteContext context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor.ExecuteAsyncCore(ActionContext context, ObjectResult result, Type objectType, Object value)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextResultFilterAsync[TFilter,TFilterAsync]()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at DragaliaAPI.Middleware.ExceptionHandlerMiddleware.InvokeAsync(HttpContext context) in /src/DragaliaAPI/Middleware/ExceptionHandlerMiddleware.cs:line 58
[2023-01-08 05:50:15 INF Serilog.AspNetCore.RequestLoggingMiddleware][0HMNH4TT5AF8G:0000000C][Xyu+EpX5zQrEaV6Z] HTTP POST /2.19.0_20220714193707/load/index responded 200 in 16353.0808 ms
Suspect there is a timeout of 15 seconds somewhere.
Need to look at optimizing the DB queries in these endpoints to improve the speed
Omnicite should also max out and return already used augments for adventurers.
Wyrmprints should be able to be upgraded and the database updated with these changes.
Should also add ability to buy wyrmprints as part of these changes.
May optionally add wyrmprint sets, but this is lower priority.
Related endpoints:
Sub-task of #77
This endpoint governs collecting resources (rupies, dragonfruit, mana) from the halidom. The last collection time and time since then exists in the DbFortBuild entity, and the maximum resource count and time taken to reach this exists in the MasterAsset data class.
Describe the bug
The halidom appears to be inaccessible due to a UI lockup on new/fresh savefiles
On branch
Develop
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Halidom should be accessible though you probably cannot interact with it as you are not meant to be able to access it at this stage of the tutorial
Additional context
Adb logcat to follow
Describe the bug
Database exceptions are being thrown when upgrading nodes
On branch
develop live 27/12/2022
To Reproduce
Seems to occur when using omnicite or regular nodes
Expected behavior
No exceptions
Additional context
Appears to alternate working/throwing
Describe the bug
A soft lock can occur when notte tries to introduce you to the Royal Regimen
On branch
live (develop) on 24/12/2022
To Reproduce
Unknown, this didn’t happen in testing but the person reporting the bug closed the app in between completing the tutorial and restarting
Expected behavior
You should be able to open the royal regimen menu and proceed with gameplay
Additional context
ViewerId = 3 (savefile since cleared)
TutorialStatus = 10302
TutorialFlag = 0
This is not an exhaustive list and more may need to be added
Looks like it happens for when you gift but it's not enough to grant a bond level. First() will find an empty sequence when getting the level reward gifts.
According to the logs, people seem to be getting in long loops of token refresh requests, getting kicked out of /tool/auth or /tool/signup with a SecurityTokenExpiredException, which is meant to send them back to login, but they come back with the same token.
Need to investigate how to force token refresh.
Describe the bug
After using omnicite:
Skill levels can be set to 6 and 7
Coabilities disappear
Passives downgrade
On branch
Develop live 27/12/2022
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Skill levels should be 4 and 3
Coabilities should not disappear
Passives should be expected level
Additional context
query result of the character from the db:
DeviceAccountId | CharaId | Rarity | Exp | Level | AddMaxLevel | HpPlusCount | AtkPlusCount | IsNew | Skill1Lvl | Skill2Lvl | Abil1Lvl | Abil2Lvl | Abil3Lvl | BurstAtkLvl | ComboBuildupCount | HpBase |HpNode | AtkBase | AtkNode | ExAbility1Lvl | ExAbility2Lvl | IsTemp | IsUnlockEditSkill | ManaNodeUnlockCount | ListViewFlag | GetTime
------------------+----------+--------+---------+-------+-------------+-------------+--------------+-------+-----------+-----------+----------+----------+----------+-------------+-------------------+--------+--------+---------+---------+---------------+---------------+--------+-------------------+---------------------+--------------+------------------------
REDACTED | 10850502 | 5 | 8866950 | 100 | 35 | 100 | 100 | t | 7 | 6 | 6 | 6 | 6 | 4 | 1 | 578 | 749 | 337 | 444 | 9 | 9 | f | t | 7168 | t | 2019-11-28 07:07:36+00
Describe the bug
If a device is left to idle overnight, and opened after 'reset', a message will appear stating 'a new day has dawned' and kick the player to the home screen (not the title screen). This is despite the server not giving any indication of a daily reset and not even having any concept of one -- perhaps it's based on the client's stored last login time.
Upon returning to the home screen, the user is UI locked with the following screen, softlocked with a glitched endeavour list
On branch
develop / deployed server 25/12/2022
To Reproduce
Steps to reproduce the behavior:
Expected behavior
At the very least it shouldn't softlock, but it looks like it's expecting an item in an UpdateDataList somewhere, so maybe we need to fix this by implementing login bonuses.
Additional context
ADB logcat:
12-25 18:16:39.943 24600 24645 E Unity : NullReferenceException: Object reference not set to an instance of an object.
12-25 18:16:39.943 24600 24645 E Unity : at Gluon.DataManager.UpdateByUpdateDataList (Gluon.Http.UpdateDataList updateDataList) [0x00000] in <00000000000000000000000000000000>:0
12-25 18:16:39.943 24600 24645 E Unity : at Gluon.DataManager.UpdateByResponse (Gluon.Http.MypageInfoResponse res) [0x00000] in <00000000000000000000000000000000>:0
12-25 18:16:39.943 24600 24645 E Unity : at Gluon.MyPageScene.OnMyPageInfoSuccess (Gluon.Http.MypageInfoResponse response) [0x00000] in <00000000000000000000000000000000>:0
12-25 18:16:39.943 24600 24645 E Unity : at System.Action`1[T].Invoke (T obj) [0x00000] in <00000000000000000000000000000000>:0
12-25 18:16:39.943 24600 24645 E Unity : at System.Action`1[T].Invoke (T obj) [0x00000] in <00000000000000000000000000000000>:0
12-25 18:16:39.943 24600 24645 E Unity : at Gluon.Http.MypageInfoTask.Deserialize (System.Byte[] body) [0x00000] in <00000000000000000000000000000000>:0
12-25 18:16:39.943 24600 24645 E Unity : at Cute.Http.HttpManager.Cute.Core.IUpdatable.FastUpdate () [0x00000] in <00000000000000000000000000000000>:0
12-25 18:16:39.943 24600 24645 E Unity : at Cute.Core.UpdateDispatcher.Update () [0x00000] in <00000000000000000000000000000000>:0
12-25 18:16:39.943 24600 24645 E Unity :
12-25 18:16:39.943 24600 24645 E Unity : (Filename: currently not available on il
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.