blob: 81a5ad936f047973069ffe5178ec8834faaa1412 (
plain) (
blame)
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
|
#include "range.h"
Range::Range()
{
}
void Range::setValue(qint64 s,qint64 e)
{
m_start = s;
m_end=e;
}
qint64 Range::hasValid(Die* m,bool recursive) const
{
if(recursive)
{
qint64 i = 0;
foreach(qint64 value, m->getListValue())
{
if((value>=m_start)&&(value<=m_end))
{
++i;
}
}
return i;
}
else if((m->getLastRolledValue()>=m_start)&&(m->getLastRolledValue()<=m_end))
{
return 1;
}
return 0;
}
|