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

[Feature] Unused fields in conditions should be zero #153

Open
mdX7 opened this issue Aug 10, 2022 · 0 comments
Open

[Feature] Unused fields in conditions should be zero #153

mdX7 opened this issue Aug 10, 2022 · 0 comments

Comments

@mdX7
Copy link
Contributor

mdX7 commented Aug 10, 2022

Is your feature request related to a problem? Please describe.
When first creating a quest state condition (e.g. for phase_area) with flags 2|8 and then changing the exact same condition to objective complete and generate SQL the generated data will contain the 2|8 in ConditionValue2 from the previous condition.

Describe the solution you'd like
Zero all unused fields of the used condition on sql generation

Additional context
Setting initial conditions
image
Changing condition type
image
Generating sql results in

DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 26) AND (`SourceEntry` IN (493));
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `Comment`) VALUES
(26, 5950, 493, 0, 0, 48, 0, 12341234, 10, 0, 0, 'Player has completed objective 12341234 (but hasn\'t rewarded quest yet)');

(Notice the 10 for ConditionValue2)

@mdX7 mdX7 changed the title [Feature] Remove zero unused fields in conditions [Feature] Unused fields in conditions should be zero Aug 10, 2022
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