Sync with L2jServer HighFive Dec 21st 2015.
This commit is contained in:
@@ -29,7 +29,6 @@ import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
*/
|
||||
public class GmViewQuestInfo extends L2GameServerPacket
|
||||
{
|
||||
|
||||
private final L2PcInstance _activeChar;
|
||||
|
||||
public GmViewQuestInfo(L2PcInstance cha)
|
||||
@@ -43,18 +42,31 @@ public class GmViewQuestInfo extends L2GameServerPacket
|
||||
writeC(0x99);
|
||||
writeS(_activeChar.getName());
|
||||
|
||||
List<Quest> questList = _activeChar.getAllActiveQuests();
|
||||
final List<Quest> questList = _activeChar.getAllActiveQuests();
|
||||
|
||||
if (questList.size() == 0)
|
||||
{
|
||||
writeC(0);
|
||||
writeH(0);
|
||||
writeH(0);
|
||||
return;
|
||||
}
|
||||
|
||||
writeH(questList.size()); // quest count
|
||||
|
||||
for (Quest q : questList)
|
||||
{
|
||||
final QuestState qs = _activeChar.getQuestState(q.getName());
|
||||
|
||||
writeD(q.getId());
|
||||
writeD(qs == null ? 0 : qs.getInt("cond"));
|
||||
|
||||
QuestState qs = _activeChar.getQuestState(q.getName());
|
||||
|
||||
if (qs == null)
|
||||
{
|
||||
writeD(0);
|
||||
continue;
|
||||
}
|
||||
|
||||
writeD(qs.getInt("cond")); // stage of quest progress
|
||||
}
|
||||
writeH(0x00); // some size
|
||||
// for size; ddQQ
|
||||
}
|
||||
}
|
||||
|
@@ -84,34 +84,26 @@ public class QuestList extends L2GameServerPacket
|
||||
*/
|
||||
|
||||
writeC(0x86);
|
||||
if (_activeQuests != null)
|
||||
writeH(_activeQuests.size());
|
||||
for (Quest q : _activeQuests)
|
||||
{
|
||||
writeH(_activeQuests.size());
|
||||
for (Quest q : _activeQuests)
|
||||
writeD(q.getId());
|
||||
QuestState qs = _activeChar.getQuestState(q.getName());
|
||||
if (qs == null)
|
||||
{
|
||||
writeD(q.getId());
|
||||
QuestState qs = _activeChar.getQuestState(q.getName());
|
||||
if (qs == null)
|
||||
{
|
||||
writeD(0);
|
||||
continue;
|
||||
}
|
||||
|
||||
int states = qs.getInt("__compltdStateFlags");
|
||||
if (states != 0)
|
||||
{
|
||||
writeD(states);
|
||||
}
|
||||
else
|
||||
{
|
||||
writeD(qs.getInt("cond"));
|
||||
}
|
||||
writeD(0);
|
||||
continue;
|
||||
}
|
||||
|
||||
int states = qs.getInt("__compltdStateFlags");
|
||||
if (states != 0)
|
||||
{
|
||||
writeD(states);
|
||||
}
|
||||
else
|
||||
{
|
||||
writeD(qs.getInt("cond"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// write empty size
|
||||
writeH(0x00);
|
||||
}
|
||||
|
||||
for (Quest q : _completedQuests)
|
||||
|
Reference in New Issue
Block a user