*/
public void showQuestWindow(L2PcInstance player, String questId)
{
String content;
Quest q = QuestManager.getInstance().getQuest(questId);
if (player.getWeightPenalty()>=3 && q.getQuestIntId() >= 1 && q.getQuestIntId() < 1000 ){
player.sendPacket(new SystemMessage(SystemMessageId.INVENTORY_LESS_THAN_80_PERCENT));
return;
}
//FileInputStream fis = null;
// Get the state of the selected quest
QuestState qs = player.getQuestState(questId);
if (qs != null)
{
// If the quest is alreday started, no need to show a window
if (!qs.getQuest().notifyTalk(this, qs))
return;
}
else
{
if (q != null)
{
// check for start point
Quest[] qlst = getTemplate().getEventQuests(Quest.QuestEventType.QUEST_START);
if (qlst != null && qlst.length > 0)
{
for (int i=0; i < qlst.length; i++)
{
if (qlst[i] == q)
{
qs = q.newQuestState(player);
//disabled by mr. becouse quest dialog only show on second click.
//if(qs.getState().getName().equalsIgnoreCase("completed"))
//{
if (!qs.getQuest().notifyTalk(this, qs))
return; // no need to show a window