Skip to content

Commit 1247b74

Browse files
committed
separate conditions into their own files
1 parent a76dd02 commit 1247b74

24 files changed

+294
-253
lines changed
Lines changed: 1 addition & 253 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using Intersect.Enums;
2-
31
namespace Intersect.GameObjects.Events;
42

53
public partial class Condition
@@ -12,254 +10,4 @@ public partial class Condition
1210
/// Configures whether or not this condition does or does not have an else branch.
1311
/// </summary>
1412
public bool ElseEnabled { get; set; } = true;
15-
}
16-
17-
public partial class VariableIsCondition : Condition
18-
{
19-
public override ConditionType Type { get; } = ConditionType.VariableIs;
20-
21-
public VariableType VariableType { get; set; } = VariableType.PlayerVariable;
22-
23-
public Guid VariableId { get; set; }
24-
25-
public VariableComparison Comparison { get; set; } = new();
26-
}
27-
28-
public partial class HasItemCondition : Condition
29-
{
30-
public override ConditionType Type { get; } = ConditionType.HasItem;
31-
32-
public Guid ItemId { get; set; }
33-
34-
public int Quantity { get; set; }
35-
36-
/// <summary>
37-
/// Defines whether this event command will use a variable for processing or not.
38-
/// </summary>
39-
public bool UseVariable { get; set; } = false;
40-
41-
/// <summary>
42-
/// Defines whether the variable used is a Player or Global variable.
43-
/// </summary>
44-
public VariableType VariableType { get; set; } = VariableType.PlayerVariable;
45-
46-
/// <summary>
47-
/// The Variable Id to use.
48-
/// </summary>
49-
public Guid VariableId { get; set; }
50-
51-
public bool CheckBank { get; set; }
52-
}
53-
54-
public partial class ClassIsCondition : Condition
55-
{
56-
public override ConditionType Type { get; } = ConditionType.ClassIs;
57-
58-
public Guid ClassId { get; set; }
59-
}
60-
61-
public partial class KnowsSpellCondition : Condition
62-
{
63-
public override ConditionType Type { get; } = ConditionType.KnowsSpell;
64-
65-
public Guid SpellId { get; set; }
66-
}
67-
68-
public partial class LevelOrStatCondition : Condition
69-
{
70-
public override ConditionType Type { get; } = ConditionType.LevelOrStat;
71-
72-
public bool ComparingLevel { get; set; }
73-
74-
public Stat Stat { get; set; }
75-
76-
public VariableComparator Comparator { get; set; } = VariableComparator.Equal;
77-
78-
public int Value { get; set; }
79-
80-
public bool IgnoreBuffs { get; set; }
81-
}
82-
83-
public partial class SelfSwitchCondition : Condition
84-
{
85-
public override ConditionType Type { get; } = ConditionType.SelfSwitch;
86-
87-
public int SwitchIndex { get; set; } //0 through 3
88-
89-
public bool Value { get; set; }
90-
}
91-
92-
public partial class AccessIsCondition : Condition
93-
{
94-
public override ConditionType Type { get; } = ConditionType.AccessIs;
95-
96-
public Access Access { get; set; }
97-
}
98-
99-
public partial class TimeBetweenCondition : Condition
100-
{
101-
public override ConditionType Type { get; } = ConditionType.TimeBetween;
102-
103-
public int[] Ranges { get; set; } = new int[2];
104-
}
105-
106-
public partial class CanStartQuestCondition : Condition
107-
{
108-
public override ConditionType Type { get; } = ConditionType.CanStartQuest;
109-
110-
public Guid QuestId { get; set; }
111-
}
112-
113-
public partial class QuestInProgressCondition : Condition
114-
{
115-
public override ConditionType Type { get; } = ConditionType.QuestInProgress;
116-
117-
public Guid QuestId { get; set; }
118-
119-
public QuestProgressState Progress { get; set; } = QuestProgressState.OnAnyTask;
120-
121-
public Guid TaskId { get; set; }
122-
}
123-
124-
public partial class QuestCompletedCondition : Condition
125-
{
126-
public override ConditionType Type { get; } = ConditionType.QuestCompleted;
127-
128-
public Guid QuestId { get; set; }
129-
}
130-
131-
public partial class NoNpcsOnMapCondition : Condition
132-
{
133-
public override ConditionType Type { get; } = ConditionType.NoNpcsOnMap;
134-
135-
public bool SpecificNpc { get; set; }
136-
137-
public Guid NpcId { get; set; }
138-
}
139-
140-
public partial class GenderIsCondition : Condition
141-
{
142-
public override ConditionType Type { get; } = ConditionType.GenderIs;
143-
144-
public Gender Gender { get; set; } = Gender.Male;
145-
}
146-
147-
public partial class MapIsCondition : Condition
148-
{
149-
public override ConditionType Type { get; } = ConditionType.MapIs;
150-
151-
public Guid MapId { get; set; }
152-
}
153-
154-
public partial class IsItemEquippedCondition : Condition
155-
{
156-
public override ConditionType Type { get; } = ConditionType.IsItemEquipped;
157-
158-
public Guid ItemId { get; set; }
159-
}
160-
161-
/// <summary>
162-
/// Defines the condition class used when checking for a player's free inventory slots.
163-
/// </summary>
164-
public partial class HasFreeInventorySlots : Condition
165-
{
166-
/// <summary>
167-
/// Defines the type of condition.
168-
/// </summary>
169-
public override ConditionType Type { get; } = ConditionType.HasFreeInventorySlots;
170-
171-
/// <summary>
172-
/// Defines the amount of inventory slots that need to be free to clear this condition.
173-
/// </summary>
174-
public int Quantity { get; set; }
175-
176-
/// <summary>
177-
/// Defines whether this event command will use a variable for processing or not.
178-
/// </summary>
179-
public bool UseVariable { get; set; } = false;
180-
181-
/// <summary>
182-
/// Defines whether the variable used is a Player or Global variable.
183-
/// </summary>
184-
public VariableType VariableType { get; set; } = VariableType.PlayerVariable;
185-
186-
/// <summary>
187-
/// The Variable Id to use.
188-
/// </summary>
189-
public Guid VariableId { get; set; }
190-
}
191-
192-
/// <summary>
193-
/// Defines the condition class used when checking whether a player is in a guild with at least a specified rank
194-
/// </summary>
195-
public partial class InGuildWithRank : Condition
196-
{
197-
/// <summary>
198-
/// Defines the type of condition
199-
/// </summary>
200-
public override ConditionType Type { get; } = ConditionType.InGuildWithRank;
201-
202-
/// <summary>
203-
/// The guild rank the condition checks for as a minimum
204-
/// </summary>
205-
public int Rank { get; set; }
206-
}
207-
208-
/// <summary>
209-
/// Defines the condition class used when checking whether a player is on a specific map zone type.
210-
/// </summary>
211-
public partial class MapZoneTypeIs : Condition
212-
{
213-
/// <summary>
214-
/// Defines the type of condition.
215-
/// </summary>
216-
public override ConditionType Type { get; } = ConditionType.MapZoneTypeIs;
217-
218-
/// <summary>
219-
/// Defines the map Zone Type to compare to.
220-
/// </summary>
221-
public MapZone ZoneType { get; set; }
222-
}
223-
224-
public partial class VariableComparison
225-
{
226-
227-
}
228-
229-
public partial class BooleanVariableComparison : VariableComparison
230-
{
231-
public VariableType CompareVariableType { get; set; } = VariableType.PlayerVariable;
232-
233-
public Guid CompareVariableId { get; set; }
234-
235-
public bool ComparingEqual { get; set; }
236-
237-
public bool Value { get; set; }
238-
}
239-
240-
public partial class IntegerVariableComparison : VariableComparison
241-
{
242-
public VariableComparator Comparator { get; set; } = VariableComparator.Equal;
243-
244-
public VariableType CompareVariableType { get; set; } = VariableType.PlayerVariable;
245-
246-
public Guid CompareVariableId { get; set; }
247-
248-
public long Value { get; set; }
249-
250-
public bool TimeSystem { get; set; }
251-
}
252-
253-
public partial class StringVariableComparison : VariableComparison
254-
{
255-
public StringVariableComparator Comparator { get; set; } = StringVariableComparator.Equal;
256-
257-
public string Value { get; set; }
258-
}
259-
260-
public partial class CheckEquippedSlot : Condition
261-
{
262-
public override ConditionType Type { get; } = ConditionType.CheckEquipment;
263-
264-
public string Name { get; set; }
265-
}
13+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Intersect.Enums;
2+
3+
namespace Intersect.GameObjects.Events;
4+
5+
public partial class AccessIsCondition : Condition
6+
{
7+
public override ConditionType Type { get; } = ConditionType.AccessIs;
8+
9+
public Access Access { get; set; }
10+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using Intersect.Enums;
2+
3+
namespace Intersect.GameObjects.Events;
4+
5+
public partial class BooleanVariableComparison : VariableComparison
6+
{
7+
public VariableType CompareVariableType { get; set; } = VariableType.PlayerVariable;
8+
9+
public Guid CompareVariableId { get; set; }
10+
11+
public bool ComparingEqual { get; set; }
12+
13+
public bool Value { get; set; }
14+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace Intersect.GameObjects.Events;
2+
3+
public partial class CanStartQuestCondition : Condition
4+
{
5+
public override ConditionType Type { get; } = ConditionType.CanStartQuest;
6+
7+
public Guid QuestId { get; set; }
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace Intersect.GameObjects.Events;
2+
3+
public partial class CheckEquippedSlot : Condition
4+
{
5+
public override ConditionType Type { get; } = ConditionType.CheckEquipment;
6+
7+
public string Name { get; set; }
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace Intersect.GameObjects.Events;
2+
3+
public partial class ClassIsCondition : Condition
4+
{
5+
public override ConditionType Type { get; } = ConditionType.ClassIs;
6+
7+
public Guid ClassId { get; set; }
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Intersect.Enums;
2+
3+
namespace Intersect.GameObjects.Events;
4+
5+
public partial class GenderIsCondition : Condition
6+
{
7+
public override ConditionType Type { get; } = ConditionType.GenderIs;
8+
9+
public Gender Gender { get; set; } = Gender.Male;
10+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using Intersect.Enums;
2+
3+
namespace Intersect.GameObjects.Events;
4+
5+
/// <summary>
6+
/// Defines the condition class used when checking for a player's free inventory slots.
7+
/// </summary>
8+
public partial class HasFreeInventorySlots : Condition
9+
{
10+
/// <summary>
11+
/// Defines the type of condition.
12+
/// </summary>
13+
public override ConditionType Type { get; } = ConditionType.HasFreeInventorySlots;
14+
15+
/// <summary>
16+
/// Defines the amount of inventory slots that need to be free to clear this condition.
17+
/// </summary>
18+
public int Quantity { get; set; }
19+
20+
/// <summary>
21+
/// Defines whether this event command will use a variable for processing or not.
22+
/// </summary>
23+
public bool UseVariable { get; set; } = false;
24+
25+
/// <summary>
26+
/// Defines whether the variable used is a Player or Global variable.
27+
/// </summary>
28+
public VariableType VariableType { get; set; } = VariableType.PlayerVariable;
29+
30+
/// <summary>
31+
/// The Variable Id to use.
32+
/// </summary>
33+
public Guid VariableId { get; set; }
34+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using Intersect.Enums;
2+
3+
namespace Intersect.GameObjects.Events;
4+
5+
public partial class HasItemCondition : Condition
6+
{
7+
public override ConditionType Type { get; } = ConditionType.HasItem;
8+
9+
public Guid ItemId { get; set; }
10+
11+
public int Quantity { get; set; }
12+
13+
/// <summary>
14+
/// Defines whether this event command will use a variable for processing or not.
15+
/// </summary>
16+
public bool UseVariable { get; set; } = false;
17+
18+
/// <summary>
19+
/// Defines whether the variable used is a Player or Global variable.
20+
/// </summary>
21+
public VariableType VariableType { get; set; } = VariableType.PlayerVariable;
22+
23+
/// <summary>
24+
/// The Variable Id to use.
25+
/// </summary>
26+
public Guid VariableId { get; set; }
27+
28+
public bool CheckBank { get; set; }
29+
}

0 commit comments

Comments
 (0)