Anime-Game-Servers / Grasscutter-Quests

A server software implementation, ineroperable with a certain anime game client. The code in this repository is fully custom made for edyoucational purposes and future preservation, no copyrighted code is allowed in this repository.
https://grasscutters.xyz/grasscutter
GNU Affero General Public License v3.0
133 stars 31 forks source link

Have timers trigger by events with source = "" #122

Closed scooterboo closed 7 months ago

scooterboo commented 7 months ago

Description

Was trying to trigger Boreas, but ran into problems with his pre-battle timer not being created. (group 133002259).

There's some more traditional pyro monuments close by with the same issue (group 133002344)

The old code has several flaws:

Iteration and source checking does not make sense here. You don't need to manually check the source (the source is checked later), you don't need to make the timer multiple times (it's run multiple times later).

Type of changes

Checklist:

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

scooterboo commented 7 months ago

Works great with https://github.com/Hartie95/AnimeGamesLua/commit/f6a8043679d13fd547399d6faa21281a135df37c