Skip to content
This repository has been archived by the owner on Jun 16, 2019. It is now read-only.

Conditions #19

Open
DDuarte opened this issue Sep 21, 2015 · 5 comments
Open

Conditions #19

DDuarte opened this issue Sep 21, 2015 · 5 comments

Comments

@DDuarte
Copy link

DDuarte commented Sep 21, 2015

In behalf of Malcrom, I'm feature requesting a page to do conditions in an easier way without having to know what each number means by heart (similar to SAI).

@Helias
Copy link
Owner

Helias commented Sep 22, 2015

We will work on it in the next release, thanks for suggestion ;)

@ghost
Copy link

ghost commented Mar 6, 2016

Here is a suggestion for what the fill-in page could look like, in order to make the overview easier:

SourceTypeOrReferenceId  [     ] ▼  List from https://trinitycore.atlassian.net/wiki/display/tc/conditions#conditions-SourceTypeOrReferenceId
SourceGroup              [   0 ]    Manual input from user. Depends on SourceTypeOrReferenceId. See wiki.
SourceEntry              [   0 ]    Manual input from user. Depends on SourceTypeOrReferenceId. See wiki.
SourceId                 [   0 ]    Default 0 except for CONDITION_SOURCE_TYPE_SMART_EVENT = 22 => SourceType (smart_scripts.source_type)
ElseGroup                [   0 ]    Default 0, user input if other. Allows building grouped conditions. See wiki.
ConditionTypeOrReference [     ] ▼  List from https://trinitycore.atlassian.net/wiki/display/tc/conditions#conditions-ConditionTypeOrReference
ConditionTarget          [   0 ] ▼  Boolean 0 or 1. Depends on SourceType. See wiki.
ConditionValue1          [   0 ]    Manual input from user. Depends on ConditionTypeOrReference. See wiki.
ConditionValue2          [   0 ]    Manual input from user. Depends on ConditionTypeOrReference. See wiki.
ConditionValue3          [   0 ]    Default 0 unless ConditionType = 2 (ITEM), 13 (INSTANCE_INFO), 31 (OBJECT_ENTRY_GUID) (other values available)
NegativeCondition        [   0 ] ▼  Boolean 0 or 1. NegativeCondition ON => ConditionType is NOT true
ErrorType                [   0 ] ▼  Default 0 unless CONDITION_SOURCE_TYPE_SPELL = 17 -> Id from /src/server/game/Miscellaneous/SharedDefines.h:839)
ErrorTextId              [   0 ] ▼  Default 0 unless CONDITION_SOURCE_TYPE_SPELL = 17 -> Id from /src/server/game/Miscellaneous/SharedDefines.h:1033
ScriptName               [  '' ]    Default blank (NUL char) - only used for specific condition scripts
Comment                  [ ' ' ]    Manual text input or JSON generated text

When creating new conditions on my own, I find it easier to use a vertical fill-in
instead of how it looks in the sub-application "Condition-Editor" started from SAI-editor.
Here is the generic text-only table I use just to fill in so I don't forget any of the values to be used:

SourceTypeOrReferenceId  : 
SourceGroup              : 
SourceEntry              : 
SourceId                 : 
ElseGroup                : 
ConditionTypeOrReference : 
ConditionTarget          : 
ConditionValue1          : 
ConditionValue2          : 
ConditionValue3          : 
NegativeCondition        : 
ErrorType                : 
ErrorTextId              : 
ScriptName               : 
Comment                  : 

For me, it would be just as easy to have only a set of blank boxes to fill in for each line, as long as the field names were locked and non-selectable. The advantage of using text-only (in Notepad++) is that I can copy the vertical column (block edit) and convert it to a horizontal line with commas. :)

@LuigiElleBalotta
Copy link

So che è una cagata da fare, ma per fare quegli switch/case ho bestemmiato. Prendete pure spunto da qua:
https://gitlab.com/chester/ConditionCreator/tree/master/ConditionMGR

@ghost
Copy link

ghost commented Feb 17, 2017

... and for those of us who don't read Italian well enough, could you confirm this translation or rewrite it?
From http://translate.google.com/ :

I know it's a piece of shit to do, but to do those I blasphemed switch / case. Well take a cue from here:

@LuigiElleBalotta
Copy link

I know it's very easy to do, but I said some blasphemy to those switch/case functions..
Take examples from the link (you could directly copy/paste and rename variables to fit php language)

Hope my english is good

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

No branches or pull requests

3 participants