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:
MobiusDev
2016-12-06 21:56:50 +00:00
parent e4d77a1f2f
commit c78d4dc065
2 changed files with 41 additions and 43 deletions

View File

@ -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;
}