-
Notifications
You must be signed in to change notification settings - Fork 6k
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/Phases: Fix SetInPhase not honoring zone phase #20156
Conversation
Also update area phases on quest update
if (sConditionMgr->IsObjectMeetToConditions(this, phase.Conditions)) | ||
return false; | ||
PhaseInfo const& phases = sObjectMgr->GetAreaAndZonePhases(); | ||
for (PhaseInfo::const_iterator itr = phases.begin(); itr != phases.end(); ++itr) |
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.
I don't like this - couldn't you make another store in ObjectMgr to lookup phase by id?
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.
Wouldn't that require quite a bit of nearly-duplicate code to construct a similar store? Especially in ConditionMgr::addToPhases
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.
No, I mean something like map<phaseId, vector<PhaseInfoStruct const*>>
in ObjectMgr (constructed in same place as _phases
)
@@ -16005,7 +16005,7 @@ void Player::SendQuestUpdate(uint32 questId) | |||
} | |||
|
|||
UpdateForQuestWorldObjects(); | |||
SendUpdatePhasing(); | |||
UpdateAreaAndZonePhase(); |
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.
This was previously a target of discussion in another PR - by forcing the update here you break quests that should not update phase here
Map by phaseid instead of area. No function actually needed to lookup phases by areaid. Also reverted change in SendQuestUpdate
@Shauren this can be merged? |
/Me summons @Shauren and @joschiwald |
any news? |
Conflicting files |
Hardly any activity from @roc13x since October 2017 (view the user page). |
I started working on a bunch of phase related optimizations that will make this PR obsolete (you can see it here, accidentally pushed new files for this bb718b5#diff-26a3ae191cac89dc294ec6b735af10ba) |
Ok good to know. Saves me reviewing this tonight since 5b90538 happened |
Changes proposed:
Target branch(es):
Tests performed: