291 Commits

Author SHA1 Message Date
Robert Paciorek
ea75d182a6 user data export and import interfce (enhance)
* update items and dragons id on import
* check for viking name unique
* add unique constraints in database
* add simple import/export html form for localhosted srvers
2025-08-11 16:54:16 +02:00
Robert Paciorek
74b24d8ff5 user data export and import interfce (WIP) 2025-08-11 16:54:16 +02:00
Robert Paciorek
fb6c935e7e fix upcoming missions in GetUserMissionState
* this is bugfix for upcoming missions issue in SoD 2.9 after 60cc00d
* also removed TODO because ProductGroupID is not related to mission.GroupID and ProductGroupID filtering is covered by gameVersion
2025-07-27 10:34:28 +00:00
Robert Paciorek
278f04d381 disable null-related warnings 2025-07-27 10:32:55 +00:00
Spirtix
1a6db72d7a downgrade ef to 7
There's a performance regression for synchronous insert/update in npgsql
ef adapter, we'll have to switch to asynchronous db calls before
updating
2025-07-02 21:28:53 +02:00
Spirtix
0923b80cdf lock CreatePet and SetImage 2025-07-01 16:40:56 +02:00
Spirtix
1b22c9c3dd remove async query 2025-06-30 22:21:10 +02:00
Spirtix
7dbcc456b9 async locking for VikingSession 2025-06-30 19:33:49 +02:00
Spirtix
bca383c4d0 remove PairData.Update
this is expensive and unnecessary because the entity is already tracked
2025-06-30 15:26:47 +02:00
Robert Paciorek
12bb663076 fix null exception in LoginParent 2025-06-27 22:37:58 +02:00
Robert Paciorek
a3db9c2bcf update dotnet version in Dockerfile 2025-06-27 22:37:58 +02:00
Spirtix
2aac24c37e fix indent 2025-06-27 22:37:58 +02:00
Spirtix
06daf21d8c update dependencies 2025-06-27 22:37:58 +02:00
Spirtix
dc303d871e mission deep copy
.net 8 deprecated BinaryFormatter serialization
apart from that proper deep copies are ~10x faster
2025-06-27 22:37:58 +02:00
Spirtix
3ffced2b60 password rehashing
asp net identity v3 uses a new hashing algorithm (hmac-sha256)
2025-06-27 22:37:58 +02:00
Spirtix
640d7ba664 switch to .net 9 2025-06-27 22:37:58 +02:00
ABrokenTV
3877a8ba37
Fix spawn for Skulder in "Boneknapper, Kidnapped? [2020]" (#23) 2025-06-23 10:51:11 +02:00
Robert Paciorek
00d4aa146a ClientVersion.GetGameID to get internal game id
(without version / sub-app info)
2025-06-22 14:58:03 +00:00
Robert Paciorek
bdf7707019 store and rewards update
* add anniversary items to store
* remove "new" mark for most items
* reorder event quest experience ticket items (to keep the chronological order in the store)
* add Light Fury Dragon Armor to DT rewards
2025-06-11 10:32:49 +00:00
Spirtix
8e141ab43d better upcoming mission filtering 2025-04-18 15:18:13 +02:00
Spirtix
d9d35c47a8 autofill common payload instead of saving to db 2025-04-14 12:06:37 +02:00
Spirtix
60cc00dc66 don't create upcoming missions upfront 2025-04-14 11:29:41 +02:00
Robert Paciorek
db795d93a4 bugfixes
- allow to add items to store while using replace action in server-side mods
- fixed wrong (inverted) logic for LastLevelCompleted
- fixed 'already an open DataReader' isse on GetTopRated* endpoints
- disabled AchievementTaskID 37 (WoJS) due to causing bug
2025-03-09 08:27:49 +00:00
Robert Paciorek
3222c63fa6 fix reward for "Photo Mode - Sunset (Back)"
set reward like for other photo missions (500 dragon XP, 100 viking XP)
to avoid wrong client side reward calculation while repeat this missions
2025-02-22 19:31:14 +00:00
Robert Paciorek
3229464c02 correct handling adding XP in child->titan levelup
(this can happen with a quick conversion child->adult->titan, wrong order of `SetRaisedPet` requests or missed request)
2025-02-19 18:37:08 +00:00
Robert Paciorek
4b2fefc492 multiple SoD small fixes
* add night lights hats and cropped hair to store
* re-add dragon nip to play tools menu
* add axe as reward from 1.x tutorial (fixes "lost axe" issue while leave game during wilderness training mission)
2025-02-13 23:10:08 +00:00
YoshiCraft64
cecaa50610
support for old ("steps") missions (#20)
* add support for old missions API (aka "steps missions")
* config option to disable loading non SoD Data (used only for missions and achievements for now)
* make AuthenticateUser endpoint compatible with games that use e-mail as login
* add api keys for lands
* add GetGameCurrency endpoint
* allow create empty stores and add store "8" (empty)

---------

Co-authored-by: Robert Paciorek <robert@opcode.eu.org>
2025-02-13 22:58:19 +01:00
Robert Paciorek
13df822608 rework achievements system + minor cleanup
rework achievements system:
    - support for Achievements page in journal
    - register achievement tasks in database to avoid duplicate rewards and to register progress (achievement levels)
    - better achievement tasks xml database (for multiple games)
    - support for older games SetUserAchievementTask (V1)
    - add some missed achievement IDs
    - move achievement data to Resources/achievements/

additionally:
    - add mmo zones for MaM and some additional mmo zones for EMD
    - move missions Resources into Resources/missions/
    - split SoD/MaM missions into separte files
    - move rank data to Resources/ranks/
    - cleanup sodoff.csproj

SQLite database schema changes:

```
CREATE TABLE "AchievementTaskState" (
	"VikingId"	INTEGER NOT NULL,
	"TaskId"	INTEGER NOT NULL,
	"Points"	INTEGER NOT NULL,
	CONSTRAINT "PK_AchievementTaskState" PRIMARY KEY("TaskId","VikingId"),
	CONSTRAINT "FK_AchievementTaskState_Vikings_VikingId" FOREIGN KEY("VikingId") REFERENCES "Vikings"("Id") ON DELETE CASCADE
);
```
2025-02-08 10:29:56 +00:00
Hipposgrumm
24695583b3
Rating for Pods, Games, and (probably) other stuff (#16)
Implements the rating system.

Shipwreck Lagoon tracks theoretically work, but there's currently no way of testing them.
There is a hack to make the ranked pods section of the blaster party board work. Don't know if that'll cause any issues (but I don't think so).

SQLite database schema changes:

```sql
CREATE TABLE "RatingRanks" (
	"Id"	INTEGER NOT NULL,
	"CategoryID"	INTEGER NOT NULL,
	"RatedEntityID"	INTEGER,
	"RatedUserID"	TEXT,
	"Rank"	INTEGER NOT NULL,
	"RatingAverage"	REAL NOT NULL,
	"UpdateDate"	TEXT NOT NULL,
	CONSTRAINT "PK_RatingRanks" PRIMARY KEY("Id" AUTOINCREMENT)
);
CREATE TABLE "Ratings" (
	"Id"	INTEGER NOT NULL,
	"VikingId"	INTEGER NOT NULL,
	"RankId"	INTEGER NOT NULL,
	"Value"	INTEGER NOT NULL,
	"Date"	TEXT NOT NULL,
	CONSTRAINT "FK_Ratings_RatingRanks_RankId" FOREIGN KEY("RankId") REFERENCES "RatingRanks"("Id") ON DELETE CASCADE,
	CONSTRAINT "PK_Ratings" PRIMARY KEY("Id" AUTOINCREMENT),
	CONSTRAINT "FK_Ratings_Vikings_VikingId" FOREIGN KEY("VikingId") REFERENCES "Vikings"("Id") ON DELETE CASCADE
);
```

---------

Co-authored-by: Robert Paciorek <robert@opcode.eu.org>
2025-02-08 10:19:43 +01:00
ABrokenTV
c1d6850867
Add "Land" Payouts to RatingController.cs (#17)
Added payouts for Adventureland, Marineland, and Futureland, from "Lost Island Training" standalone port.
2025-02-07 17:12:07 +01:00
YesntSoup
1f3b5386e6
Add separate Ridez and Petz stores for old WoJS
... and add all Ridez to that store (#18)
2025-02-07 17:10:40 +01:00
Robert Paciorek
0127aab379 more complete wojs missions data file
it include Valentine's missions

thanks to YesntSoup and spectershade
2024-12-30 11:28:44 +01:00
Robert Paciorek
65aa1fecb5 add MaM missions data, fix old clients mission api
- added MaM missions xml data (thanks to spectershade)
- send completed task to old client via GetUserMissionState API
2024-12-30 11:28:44 +01:00
HaiFire3344
d56c492eb1
Prevent logging into accounts from different games (#13)
[Originally authored by AlanMoonbase](1e9ca7e19c (diff-bb10d4643a2fa54d983a574662f579e09c056f29837397a10cd9300a98fbcc7cR171))
2024-12-29 17:15:42 +01:00
Hipposgrumm
4b6f782e21
Eat My Dust support (#12)
DB MODEL CHANGES! I don't know how to deal with those.
Support for EMD's MMO rooms and API token.
Groundwork for group/clan system (hence schema changes). Only functional for EMD right now (if I implemented it correctly).

* Removed debug logged messages.
* Update comments in GroupController.cs
* Fixed position of parenthesis in ConfigurationController.cs
* Noted changes in README
* Amendment to previous commit, these are supposed to be alphabetical.
* Changed unnecessary extra check for EMD ClientVersion.
2024-12-29 17:00:21 +01:00
HaiFire3344
dcefeb5fc3
Add unused levels to World of JumpStart zone list in MMO config (#10)
This also removes `CoconutMall`, which was not present in the original game at all.
2024-11-24 19:19:54 +01:00
HaiFire3344
9a9ab186fd
Remove custom names from displaynames.xml (#7)
Thanks to YesntSoup
2024-11-24 19:18:50 +01:00
ABrokenTV
5fd9fb9994
removes the Terrible Terror from the mail stall in 2989 3043 missions
Adds a setup script that removes the terrible terror perched on the stall at the School for Mission 2989 (Age of the Night Lights) and Mission 3043 task 6547 (Friendship Festival 2022).

For Friendship Festival 2022, the removal of the terrible terror is intended by the developers themselves, as evidenced by an ObMissionActivate monobehavior located in pathID 14489 in HubSchoolDO. I've tried the quest, and yet the terrible terror is still there, phasing through Harold's Terrible Terror during a cutscene. This pull request fixes that.

For Interception, a quest in Age of the Night Lights, users are getting confused when asked to click on Leopold. They think they need to click on the Terrible Terror perched on the stall, when instead they need to click on Leopold, Harald's Terrible Terror, that is flying in the air. This pull request removes the terror to help alleviate the confusion.
2024-11-24 19:17:32 +01:00
YesntSoup
2c4d99a84c
Change AddAchievementPoints to account for overflow and underflow (#8)
This is for minisaurs in WoJ, but I think it would be a good idea in general, so I didn't limit it to WoJ.

The issue happens because if you buy medicine for minisaurs. It takes away one coin, and so if you already have 0 coins, the server currently returns your coin count as int.MaxValue.

This is tested in WoJ 1.1.0 and 1.21.0. I tested buying, overflowing, underflowing, using commands with big and negative values and playing games.
2024-11-19 22:50:19 +01:00
Robert Paciorek
6423fec54f add female Desert Sand Wraith Mask to store 2024-10-25 10:25:09 +00:00
Robert Paciorek
a514daa0b7 add battleship reward achievements for events 2024-10-12 17:55:27 +00:00
YesntSoup
ca951d78e8
Change automatic RaisedPet name to not happen for WoJS (#6)
* Change automatic RaisedPet name to not happen for WoJS

This is because Voltage Dragons get a name later, so this placeholder name currently gets assigned first. 

I've never done this before, so let me know if I did it wrong lol

* Added Max_OldJS to the previous PR
* Added HaiFire's suggestion
* Added [FromForm] string apiKey

Ty HaiFire again!
2024-09-03 22:48:06 +02:00
2f5a589bd4 Support for WoJS and SS in GetAnnouncementsByUser
* Add Announcement To Send Player To SanctuaryBabySS In SuperSecret
* Add Announcement for Amphitheater in WoJS
* Announcements are send based on per game resources file

Co-authored-by: Robert Paciorek <robert@opcode.eu.org>
2024-08-19 21:45:43 +00:00
Hipposgrumm
6a9f2722e1 Added saving support for Ice Cubed. (#15)
Saving support now exists for Ice Cubed and any other games using the system.
2024-08-12 09:06:13 +00:00
YoshiCraft64
757392d4d5 GetPayout update (#14)
Update RatingController.cs for an update to GetPayout
Updates GetPayout to have a different payout system for each minigame.
2024-08-12 09:06:13 +00:00
Hipposgrumm
9ca4dfc7ae Added rank names and colors for MB. (#13) 2024-08-12 09:06:13 +00:00
HaiFire3344
76767b5f39 Update displaynames.xml (#11)
* Add pre-public beta tester name submissions, plus a bonus third name
* Remove Kidori
* Add Doc and Document
2024-08-12 09:06:13 +00:00
Hipposgrumm
4e02ee19b4 Fix Mutt Textures not immediately Updating (#12)
* Math Blaster Mutts will now correctly have their textures changed immediately out of the incubator.
2024-08-12 09:06:13 +00:00
rpaciorek
8336e16fec
Merge pull request #4 from ABrokenTV/dreadfall-mission-mildew-spawn-fix
"Best Maze Ever [2021]" Mildew Spawn Fix

In Misison 3024, Task 6411, in "Best Maze Ever [2021]" when players are asked to talk to Mildew, Mildew is spawned in just beneath New Berk. This change adds the following setup script to Task 6411 so he spawns in one of his previous task locations in New Berk so that players can continue the mission without going to Icestorm Island, or using cheats.
2024-08-08 20:01:47 +02:00
ABrokenTV
7aad7b4895
Changed Mission 3024 Task 6411 to spawn Mildew in correctely by adding Setup script. 2024-08-04 13:42:37 -05:00