Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement event compendium #303

Merged
merged 71 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
144892c
Make AddToStorage do validation before adding
LukeFZ Jul 2, 2023
8703447
rename parameter
LukeFZ Jul 2, 2023
dc20e8b
whoops make quantity start at 0
LukeFZ Jul 2, 2023
ae0865a
Make story rewards data driven, begin support for paid stories
LukeFZ Jul 2, 2023
ed8179d
copy FortPlantDetail again
LukeFZ Jul 2, 2023
d25a60f
fix test
LukeFZ Jul 2, 2023
c55e436
Merge branch 'develop' into ecmp-upstream-2-stories
LukeFZ Jul 9, 2023
76fc36e
Update MasterAsset.cs
LukeFZ Jul 9, 2023
2a3be73
Update StoryServiceTest.cs
LukeFZ Jul 9, 2023
0d86aea
Add ProcessPayment for entities and materials, add primary ctor for s…
LukeFZ Jul 9, 2023
221e437
fix paymentservice price bug
LukeFZ Jul 9, 2023
70babde
(noun) Clinging bits of fiber and fluff; fuzz.
LukeFZ Jul 9, 2023
9b6c8f6
Merge branch 'develop' into ecmp-upstream-2-stories
LukeFZ Jul 10, 2023
d959bb7
fix compilation
LukeFZ Jul 10, 2023
e23ec2e
add pdt tutorial flag and update
LukeFZ Jul 10, 2023
7095507
Add logic for quest endeavors
LukeFZ Jul 10, 2023
25d080f
make mc logic simpler
LukeFZ Jul 10, 2023
9134993
reduce log spam for support viewer id
LukeFZ Jul 10, 2023
d5eef83
add stub score mission handling (todo)
LukeFZ Jul 10, 2023
da5db0c
tweak two SaveChangesAsync calls
LukeFZ Jul 11, 2023
bae1ee6
Add event DB tables and migration
LukeFZ Jul 11, 2023
a20f74f
Add masterasset info for events and score missions
LukeFZ Jul 11, 2023
0b3e310
implement CompleteQuestScoreMissions
LukeFZ Jul 11, 2023
be31881
Add event trade logic
LukeFZ Jul 11, 2023
15799e2
Fix shop service payment type issue
LukeFZ Jul 11, 2023
fe39bb3
Add event repository and support in reward/payment
LukeFZ Jul 11, 2023
89ee820
Add event service
LukeFZ Jul 11, 2023
78f0d53
Stop importing ActiveMemoryEventId
LukeFZ Jul 11, 2023
62bfbfb
Add remaining event item masterassets
LukeFZ Jul 11, 2023
9c9ef91
rename CombatEventItem and fix event tt
LukeFZ Jul 11, 2023
2a8665e
Add build event logic
LukeFZ Jul 11, 2023
e3c7bf4
Add support for PayEntity in dungeon/start
LukeFZ Jul 11, 2023
63df8a5
FIx DUMMY charas on end and fixed stats quests
LukeFZ Jul 11, 2023
a27a5e7
Add (basic) raid event logic
LukeFZ Jul 11, 2023
56ea208
Add clb01 event logic
LukeFZ Jul 12, 2023
dd82283
add combat event logic
LukeFZ Jul 12, 2023
7318b47
Add earn event logic
LukeFZ Jul 12, 2023
f0e6914
Remove UDS modified list since its now not needed
LukeFZ Jul 12, 2023
99ea090
fix dungeon record tests
LukeFZ Jul 12, 2023
aab1560
Merge branch 'develop' into eventual-eventing
LukeFZ Jul 12, 2023
78a4ad6
fix quest repository test
LukeFZ Jul 12, 2023
52ab0f8
Merge branch 'develop' into eventual-eventing
LukeFZ Jul 16, 2023
f239af7
Merge branch 'develop' into eventual-eventing
LukeFZ Jul 17, 2023
900f803
Fix compilation and ctor
LukeFZ Jul 17, 2023
2fc2e15
Add event passive db tables
LukeFZ Jul 17, 2023
a3745ab
Add event passive MasterAsset
LukeFZ Jul 17, 2023
afee4f3
Add initial event passive logic
LukeFZ Jul 17, 2023
8f6f717
fix score missions and add event passive list to PartyList
LukeFZ Jul 17, 2023
2adf7ff
Implement event passive drop logic
LukeFZ Jul 18, 2023
9fed4a4
fix tests
LukeFZ Jul 18, 2023
a18f9f1
remove event data on reimport
LukeFZ Jul 19, 2023
d3ae061
Add event item drops (winging it)
LukeFZ Jul 20, 2023
224b046
Merge branch 'develop' into eventual-eventing
LukeFZ Jul 20, 2023
534be29
Minify jsons to reduce LOCs + small fixes
LukeFZ Jul 20, 2023
31e87ba
make rewardservice not crash on quantity < 0 again
LukeFZ Jul 20, 2023
3d22b10
Merge branch 'develop' into eventual-eventing
LukeFZ Jul 21, 2023
df14c6e
fix quest mat drops for event quests
LukeFZ Jul 21, 2023
810705f
Add BuildEventTest
LukeFZ Jul 22, 2023
4e41bfe
make first clear rewards data driven
LukeFZ Jul 22, 2023
40c6036
fix test
LukeFZ Jul 22, 2023
6abb77d
discard 'None' first clear rewards
LukeFZ Jul 23, 2023
a9e0a63
Tweak evt reward logic and add more tests
LukeFZ Jul 23, 2023
0d61d49
fix raid test
LukeFZ Jul 23, 2023
e882aca
Merge branch 'develop' into eventual-eventing
LukeFZ Jul 23, 2023
d8fe18a
Add facility event crest multipliers (#318)
SapiensAnatis Jul 24, 2023
67077a2
address comments
LukeFZ Jul 24, 2023
e526dd7
fix MasterAssetGroup change
LukeFZ Jul 24, 2023
c4402ff
Make combat event use all trade groups
LukeFZ Jul 24, 2023
6ac0522
make tests more specific
LukeFZ Jul 24, 2023
5e8b3c0
fix build and clb01 test
LukeFZ Jul 24, 2023
a0188a3
Add raid adventurers (#319)
SapiensAnatis Jul 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DragaliaAPI.Database.Test/Repositories/QuestRepositoryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public async Task CompleteQuest_CompletesQuest()
DeviceAccountId = "id",
QuestId = 3,
State = 3,
IsMissionClear1 = true,
IsMissionClear2 = true,
IsMissionClear3 = true,
IsMissionClear1 = false,
IsMissionClear2 = false,
IsMissionClear3 = false,
PlayCount = 1,
DailyPlayCount = 1,
WeeklyPlayCount = 1,
Expand Down
8 changes: 8 additions & 0 deletions DragaliaAPI.Database/ApiContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,13 @@ but EF Core doesn't like this and the client probably stops you anyway?

public DbSet<DbPlayerTrade> PlayerTrades { get; set; }

public DbSet<DbPlayerEventData> PlayerEventData { get; set; }

public DbSet<DbPlayerEventItem> PlayerEventItems { get; set; }

public DbSet<DbPlayerEventReward> PlayerEventRewards { get; set; }

public DbSet<DbPlayerEventPassive> PlayerEventPassives { get; set; }

public DbSet<DbQuestClearPartyUnit> QuestClearPartyUnits { get; set; }
}
23 changes: 23 additions & 0 deletions DragaliaAPI.Database/Entities/DbPlayerEventData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;

namespace DragaliaAPI.Database.Entities;

[Index(nameof(DeviceAccountId))]
[PrimaryKey(nameof(DeviceAccountId), nameof(EventId))]
public class DbPlayerEventData : IDbHasAccountId
{
/// <inheritdoc />
public virtual DbPlayer? Owner { get; set; }

/// <inheritdoc />
[ForeignKey(nameof(Owner))]
public required string DeviceAccountId { get; set; }

[Column("EventId")]
public required int EventId { get; set; }

// Used for daily event bonus, event damage reward, etc.
[Column("CustomEventFlag")]
public bool CustomEventFlag { get; set; }
}
28 changes: 28 additions & 0 deletions DragaliaAPI.Database/Entities/DbPlayerEventItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;

namespace DragaliaAPI.Database.Entities;

[Index(nameof(DeviceAccountId), nameof(EventId))]
[PrimaryKey(nameof(DeviceAccountId), nameof(Id))]
public class DbPlayerEventItem : IDbHasAccountId
{
/// <inheritdoc />
public virtual DbPlayer? Owner { get; set; }

/// <inheritdoc />
[ForeignKey(nameof(Owner))]
public required string DeviceAccountId { get; set; }

[Column("EventId")]
public required int EventId { get; set; }

[Column("Id")]
public required int Id { get; set; }

[Column("Type")]
public required int Type { get; set; }

[Column("Quantity")]
public int Quantity { get; set; }
}
25 changes: 25 additions & 0 deletions DragaliaAPI.Database/Entities/DbPlayerEventPassive.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;

namespace DragaliaAPI.Database.Entities;

[Index(nameof(DeviceAccountId), nameof(EventId))]
[PrimaryKey(nameof(DeviceAccountId), nameof(EventId), nameof(PassiveId))]
public class DbPlayerEventPassive : IDbHasAccountId
{
/// <inheritdoc />
public virtual DbPlayer? Owner { get; set; }

/// <inheritdoc />
[ForeignKey(nameof(Owner))]
public required string DeviceAccountId { get; set; }

[Column("EventId")]
public required int EventId { get; set; }

[Column("PassiveId")]
public required int PassiveId { get; set; }

[Column("Progress")]
public int Progress { get; set; }
}
26 changes: 26 additions & 0 deletions DragaliaAPI.Database/Entities/DbPlayerEventReward.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using DragaliaAPI.Shared.Definitions.Enums;

namespace DragaliaAPI.Database.Entities;

[Index(nameof(DeviceAccountId), nameof(EventId))]
[PrimaryKey(nameof(DeviceAccountId), nameof(EventId), nameof(RewardId))]
public class DbPlayerEventReward : IDbHasAccountId
{
/// <inheritdoc />
public virtual DbPlayer? Owner { get; set; }

/// <inheritdoc />
[ForeignKey(nameof(Owner))]
public required string DeviceAccountId { get; set; }

[Column("EventId")]
public required int EventId { get; set; }

[Column("RewardId")]
public required int RewardId { get; set; }

[NotMapped]
public bool IsLocationReward => RewardId > EventId * 100; // Location rewards use a combined id, meaning they are quite large (EventId | LocationRewardId:00)
}
Loading
Loading