One time quest mask calculation.
Based on malyelfik's quest rework shared on l2junity forum. Note: Used modified L2S getCond() method because I could not get the original diff. xD
This commit is contained in:
@ -459,7 +459,21 @@ public final class QuestState
|
||||
{
|
||||
if (isStarted())
|
||||
{
|
||||
return getInt("cond");
|
||||
int val = getInt("cond");
|
||||
if ((val & 0x80000000) != 0)
|
||||
{
|
||||
val &= 0x7fffffff;
|
||||
for (int i = 1; i < 32; i++)
|
||||
{
|
||||
val = (val >> 1);
|
||||
if (val == 0)
|
||||
{
|
||||
val = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return val;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user