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
[7.x] Conditions for phase area under zone are not executed #18190
Comments
For me the condition doesn't fit with the phase_area entry. INSERT INTO `phase_area` (`AreaId`, `PhaseId`, `Comment`) VALUES
(**5736**, 1329, 'The Wandering Isle - see creatures');
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(26, 1329, **5848**, 0, 0, 9, 0, 29414, 0, 0, 1, 0, 0, '', 'Cave of Meditation Phase 1329 when Quest 29414 not taken'); |
@funjoker ... 5736 is zone ID of wandering isle, 5848 is area ID within wandering isle - Cave of Meditation. Condition is OK. |
Condition needs an Entry in phase_area too. Actually you should be allways in Phase 1329 no matter if quest is taken or not. Add this and tell me what happens. INSERT INTO `phase_area` (`AreaId`, `PhaseId`, `Comment`) VALUES
(5848, 1329, 'Cave of Meditation - Phase 1329'); |
Exactly, thas't how it works now. And it's wrong. |
Well i keep working with old Phasing logic. |
I would also change phase_area column areaid to AreaOrZoneId. |
Column name change might be helpful for others I agree, but making positive and negative numbers was not necessary since areaId and zoneId are unique numbers. |
It's not because of unique problem. It's about to see directly that this phase is for Zone or Area only. |
root cause found, description updated |
…ding of database phase conditions (TrinityCore#21214) Closes TrinityCore#18190 Closes TrinityCore#21196
Description: conditions for area phases are ignored when there is a phase for whole zone
Current behaviour: phase area conditions are not checked at all, when there is an entry in phase_area for whole zone and you make condition only for specific area under that zone. Even if you have condition in DB, the core evaluates it always like following:
Function
void WorldObject::UpdateAreaAndZonePhase()
is not passing any phase.Conditions argument hereif (sConditionMgr->IsObjectMeetToConditions(this, phase.Conditions))
EDIT: I have found out in DBErrors.log that this kind of condition is not even loaded on server startup
[Condition SourceType: 26 (Phase), SourceGroup: 1329, SourceEntry: 5848] Area 5848 does not have phase 1329.
Expected behaviour: evaluate every existing phase_area condition when you have zoneId (not areaId) in phase_area and condition only for area within that zone.
Below code needs to be changed, so it checks also areas within entered zoneId.
Aditionally, switch
cond->SourceGroup, cond->SourceEntry
tocond->SourceEntry, cond->SourceGroup
inTC_LOG_ERROR("sql.sql", "%s Area %u does not have phase %u.", cond->ToString().c_str(), cond->SourceGroup, cond->SourceEntry);
because it is now vice-versa.Steps to reproduce the problem:
Sample SQL:
.go xyz 1189 3452 103
Branch(es): master
TC rev. hash/commit: 725208d
TDB version: 703.00
Operating system: Windows 7 x64
The text was updated successfully, but these errors were encountered: