-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathFlaggedRegion.cs
More file actions
156 lines (140 loc) · 3.54 KB
/
Copy pathFlaggedRegion.cs
File metadata and controls
156 lines (140 loc) · 3.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TShockAPI.DB;
using Terraria;
using TShockAPI;
namespace RegionFlags
{
class FlaggedRegion
{
private int flags = 0;
private Region region;
private int dps = 0;
private int hps = 0;
private List<string> bannedItems = new List<string>();
private Group tempGroup = null;
public FlaggedRegion(Region r )
{
region = r;
}
public FlaggedRegion(Region r, int f )
{
region = r;
flags = f;
}
public Region getRegion()
{
return region;
}
public void setFlags(Flags f)
{
if (f == Flags.NONE)
flags = 0;
else
flags |= (int)f;
}
public void removeFlags(Flags f)
{
flags &= (int)(~f);
}
public List<Flags> getFlags()
{
List<Flags> f = new List<Flags>();
if ((flags & (int)Flags.PRIVATE) == (int)Flags.PRIVATE)
{
f.Add(Flags.PRIVATE);
}
if ((flags & (int)Flags.DEATH) == (int)Flags.DEATH)
{
f.Add(Flags.DEATH);
}
if ((flags & (int)Flags.PVP) == (int)Flags.PVP)
{
f.Add(Flags.PVP);
}
if ((flags & (int)Flags.PVP) == (int)Flags.PVP)
{
f.Add(Flags.PVP);
}
if ((flags & (int)Flags.HURT) == (int)Flags.HURT)
{
f.Add(Flags.HURT);
}
if ((flags & (int)Flags.NOITEM) == (int)Flags.NOITEM)
{
f.Add(Flags.NOITEM);
}
if ((flags & (int)Flags.NOMOB) == (int)Flags.NOMOB)
{
f.Add(Flags.NOMOB);
}
if ((flags & (int)Flags.MOBKILL) == (int)Flags.MOBKILL)
{
f.Add(Flags.MOBKILL);
}
if ((flags & (int)Flags.HEALONDAMAGE) == (int)Flags.HEALONDAMAGE)
{
f.Add(Flags.HEALONDAMAGE);
}
if((flags & (int)Flags.GODMOB) == (int)Flags.GODMOB)
{
f.Add( Flags.GODMOB);
}
if ((flags & (int)Flags.HEAL) == (int)Flags.HEAL)
{
f.Add(Flags.HEAL);
}
if ((flags & (int)Flags.NOPVP) == (int)Flags.NOPVP)
{
f.Add(Flags.NOPVP);
}
if ((flags & (int) Flags.ITEMBAN) == (int) Flags.ITEMBAN)
{
f.Add(Flags.ITEMBAN);
}
if ((flags & (int) Flags.TEMPGROUP) == (int) Flags.TEMPGROUP)
{
f.Add(Flags.TEMPGROUP);
}
return f;
}
public int getIntFlags()
{
return flags;
}
public int getDPS()
{
return dps;
}
public void setDPS( int s )
{
dps = s;
}
public int getHPS()
{
return hps;
}
public void setHPS(int s)
{
hps = s;
}
public void setBannedItems(List<string> items)
{
bannedItems = items;
}
public List<String> getItembans()
{
return bannedItems;
}
public Group getTempGroup()
{
return tempGroup;
}
public void setTempGroup(Group group)
{
tempGroup = group;
}
}
}