Phases are immediatelly updated on QuestStatus change
Description: Before 91be2332e249147ce3169c46a7da77f0f8c2211d the phases were not updated when QuestStatus changed because the conditions where not checked at all (i think). Phases were updated with spells, scripts, area change or relog. Now phases are updated automatically when QuestStatus changes, which is not correct in some situations. https://youtu.be/_o2i6QtPiLs?t=45s
Current behaviour: When quest becomes complete (possibly also other statuses), the phases are updated.
Expected behaviour: Either phases should not be updated after QuestStatus change, or there should be an option in conditions table to not update phases immediately.
Steps to reproduce the problem:
- complete quest The Missing Driver
- phase 630 (used to see Min Dimwind near destroyed cart) is added immediatelly, but it shouldn't
Branch(es): master
TC rev. hash/commit: TrinityCore rev. 6db2f6abce24 2018-03-30 09:10:34 +0200 (testPhases branch) (Win64, Debug, Dynamic) Using SSL version: OpenSSL 1.0.2l 25 May 2017 (library: OpenSSL 1.0.2l 25 May2017) Using Boost version: 1.65.0 Using MySQL version: 5.6.28 Using CMake version: 3.9.5 Compiled on: Windows 6.1.7601 Automatic database updates are enabled for the following databases: Auth, Characters, World Worldserver listening connections on port 8085 Realmlist (Realm Id: 1) configured in port 8085 VMAPs status: Enabled. LineOfSight: 1, getHeight: 1, indoorCheck: 1 MMAPs status: Disabled maps directory located in ./maps. Total size: 826214003 bytes vmaps directory located in ./vmaps. Total size: 4981383659 bytes Using enUS DBC Locale as default. All available DBC locales: enUS Using World DB: TDB 735.00
Operating system: Win 7 x64
Check if the quest has QUEST_FLAGS_UPDATE_PHASE_SHIFT (atm unhandled)
no it doesn't have this flag. thx for quick explanation
The phasing is handled by what in this case?
conditions + phase_area i guess?
yes
void Player::SendQuestUpdate(uint32 questId)
This sends phaseupdate afaik
EDIT:
void Player::SendQuestUpdate(uint32 questId)
{
uint32 zone = 0, area = 0;
GetZoneAndAreaId(zone, area);
SpellAreaForQuestAreaMapBounds saBounds = sSpellMgr->GetSpellAreaForQuestAreaMapBounds(area, questId);
if (saBounds.first != saBounds.second)
{
for (SpellAreaForQuestAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
{
if (itr->second->flags & SPELL_AREA_FLAG_AUTOREMOVE && !itr->second->IsFitToRequirements(this, zone, area))
RemoveAurasDueToSpell(itr->second->spellId);
else if (itr->second->flags & SPELL_AREA_FLAG_AUTOCAST)
if (!HasAura(itr->second->spellId))
CastSpell(this, itr->second->spellId, true);
}
}
UpdateForQuestWorldObjects();
PhasingHandler::OnConditionChange(this);
}
PhasingHandler::OnConditionChange(this); <--- what does this do ?
Rechecks all phases for area
you should fix the phases + conditions in db, updating/checking phases on every status change is fine, however that specific phase should only be active if the quest is rewarded and not when completed, lots of people confound rewarded vs completed
no. that phase should be active when quest is complete - after an event where NPC walks to his destination. when you relog with quest complete, NOT REWARDED, you already have phase 630. i tested it milion times. what Shauren said should be the solution - implement QUEST_FLAGS_UPDATE_PHASE_SHIFT
I believe that updating/checking phaes on every status change should be handled (if needed) by special effect (SPELL_EFFECT_UPDATE_PLAYER_PHASE). You can see it e.g. doing Farm quests in Halfhill.
No, because not every phase update is related to a spell.
Okay - so can you check in your sniffs if there is any spell with this effect on this specific quest?
This is tricky because WotLK content doesn't use any spells for this and instead relies on quest status
Yeah, but I don't remember any Northrend quest that updates phasing on quest status change in the same area immediately (when you change area, everything works okay).
There’s a quest turn in event in sholazar basin which I scripted previously I’ve forgotten name of quest but turning in this quest causes phase change and currently you only see event if you have gm mode on because of this
maybe the quest A hero's Burden (Oracles / Frenzyheart Rep Swapping) ? Possibly related to issues with Forced Hand / The Mist Isn't Listening.
Nope only present in camp there which hides flight master until 2 quests done. There’s no phasing related to area where Artruis is. Phasing works differently on retail to tc though if you leave area you get about 5 seconds before auras are removed if you move back into correct area within this then auras don’t get removed
Maybe we could have a way of delaying aura applied/removed via spell area for specific spells/area and now remembered what issue was there spirit of gnomeregan appears as soon as quest is completed rather than after quest end script has completed
For the quest "Have a Part, Give a Part" https://youtu.be/Kg7d8tv17Ps?t=106 the spell area is cast on quest rewarded. I don't know any case in wotlk where this issue is valid.
Ok but theres still the issue of when moving between different areas phase changes should be delayed for a few seconds.
and Illfated rememberd what issue is with those quests now. theres issue about it its because of oracles/frenzyheart forcing peace forced until a rep change is made then you can attack them until you leave zone but upon returning or relogging you will find cant attack again thats why if you do and return daily where you dont have to kill opposite mobs first then the other dailies work fine as long as you dont leave zone.
Its the same with the intro quest chain if you do all in one go without relogging or leaving zone then all work as intended but if you relog then ye forced hand and the mist isnt listening cause issues with attacking mobs,
the quest the missing driver is fixed in master, is just some weird blizz stuff that adds the phase and gets removed immediately and then added again when min dimwind reaches last wp