Skip to content
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

Optimize DELETE statement for phase_area conditions #227

Open
mdX7 opened this issue May 22, 2024 · 0 comments
Open

Optimize DELETE statement for phase_area conditions #227

mdX7 opened this issue May 22, 2024 · 0 comments

Comments

@mdX7
Copy link
Contributor

mdX7 commented May 22, 2024

Is your feature request related to a problem? Please describe.
When generating phase_area entry the output looks like the following sql query:

DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 26) AND (`SourceEntry` IN (9042));
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `Comment`) VALUES 
(26, 12812, 9042, 0, 0, 9, 0, 54721, 0, 0, '', 1, 'Player doesn\'t have quest I\'m Too Old for This Ship (54721) active');

What happens here: We are deleting ALL phase conditions for Area/ZoneId 9042 here.

Describe the solution you'd like
DELETE by SourceTypeOrReferenceId AND SourceGroup AND SourceEntry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant