Skip to content

Commit

Permalink
Removed commonRelease from NiceEventCooltimeReward. Use `releaseC…
Browse files Browse the repository at this point in the history
…onditions` instead
  • Loading branch information
squaresmile committed Apr 26, 2024
1 parent 8be6f34 commit b8ac2b7
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- `FieldIndividuality` dataval is `list[int]` instead of `int`
- `SHORTEN_SKILL` and `EXTEND_SKILL` function uses `Rate`/`Value`/`Value2` dataval instead of `Rate`/`Value`/`Target`
- Removed `commonConsume` from `NiceEventTreasureBox` and `NiceEventDiggingBlock`. Use `consumes` instead.
-
- Removed `commonRelease` from `NiceEventCooltimeReward`. Use `releaseConditions` instead.

## 5.78.0 - 2022-04-23
### Added
Expand Down
2 changes: 0 additions & 2 deletions app/core/nice/event/cooltime.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ def get_nice_event_cooltime(
region: Region,
cooltime: MstEventCooltimeReward,
gift_data: GiftData,
common_release: MstCommonRelease,
raw_releases: list[MstCommonRelease],
) -> NiceEventCooltimeReward:
return NiceEventCooltimeReward(
spotId=cooltime.spotId,
lv=cooltime.lv,
name=cooltime.name,
commonRelease=get_nice_common_release(common_release),
releaseConditions=[
get_nice_common_release(release)
for release in raw_releases
Expand Down
3 changes: 0 additions & 3 deletions app/core/nice/event/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ async def get_nice_event(
for item in raw_event.mstItem
}

common_releases = {release.id: release for release in raw_event.mstCommonRelease}

gift_data = GiftData(raw_event.mstGiftAdd, gift_maps)

missions = get_nice_missions(
Expand Down Expand Up @@ -361,7 +359,6 @@ async def get_nice_event(
region,
cooltime,
gift_data,
common_releases[cooltime.commonReleaseId],
raw_releases=raw_event.mstCommonRelease,
)
for cooltime in raw_event.mstEventCooltimeReward
Expand Down
1 change: 0 additions & 1 deletion app/schemas/nice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,6 @@ class NiceEventCooltimeReward(BaseModelORJson):
spotId: int
lv: int
name: str
commonRelease: NiceCommonRelease
releaseConditions: list[NiceCommonRelease]
cooltime: int
addEventPointRate: int
Expand Down

0 comments on commit b8ac2b7

Please sign in to comment.