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
Core/Quest: Quests related to events must be removed when the event ends #23259
Core/Quest: Quests related to events must be removed when the event ends #23259
Conversation
…to 23123-quest-related-events-must-be-removed
I'd just integrate this into quest load/save system |
Can you elaborate more, I am still not at the point where I can understand without giving more specific instructions :/ Where is this quest load/save system and how can I iterate over all online players? |
This seems like a custom thing, i can't remember event quest getting removed when the event ended. |
I don't know if this is blizz or not, but, onLogin seems bad idea for performance. |
well it depends on what code is being run and what impact it has |
Fair point, neither can I (or is this a Mandela Effect, that we remember this incorrectly?). |
When an event starts quests related to this event are reset, and the player can do this quests again. |
Fair point, I didn't notice that the outcome would be that the event quest would be rewarded when removed. |
|
||
enum GameEvents : uint16 | ||
{ | ||
GAME_EVENT_MIDSUMMER_FIRE_FESTIVAL = 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a flag in the db would be better
public: | ||
GameEventQuestCleanupScript() : PlayerScript("GameEventQuestCleanupScript") { } | ||
|
||
void OnLogin(Player* player, bool /*firstLogin*/) override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we choose to keep the OnLogin() PlayerScript (note that each PlayerScript has a lot of hooks and even if empty, they add up), I would like you to profile a bit this code and find the most performant way to achieve the same result.
Maybe iterating the active player quests first, then check the game event mgr ? or maybe that's slow ? I have no clue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any follow up on this ?
@kuskmen : I hope you will be able to look into this PR of yours, now that there are some holidays ahead. |
@illfated hehe quite some holidays ahead I admit, I am gonna have to re-read all the comments and see what this stage was left off. If you guys say we still need this I can do it asap. |
@kuskmen could you check if there is sometnig needed to finish it? |
I think I read somewhere that this is not blizzlike behaviour so I thought it should be canceled? Am I wrong? |
I am thinking maybe it would be better to move it first to the https://github.com/TrinityCore/TrinityCoreCustomChanges repository, let users play with it there for a while, then get it back here on 3.3.5 when it gets some more feedback after actual usage. What do you others think, is that a fair suggestion? |
Closing this PR as it seems abandoned. Feel free to ask here to reopen it if anyone would like to work on it. |
Changes proposed:
Target branch(es): 3.3.5/master
Issues addressed: Closes #23123
Tests performed:
.event start 1
.quest add 11955
.event stop 1
relog twice
Known issues and TODO list: (add/remove lines as needed)
PlayerScript::OnLogin
fires query that removes the quest for a character and only after second login quest is removed.