Example #1
0
  /**
   * Constructor<?> of the QuestState : save the quest in the list of quests of the player.<br>
   * <br>
   *
   * <p><U><I>Actions :</U></I><br>
   * <LI>Save informations in the object QuestState created (Quest, Player, Completion, State)
   * <LI>Add the QuestState in the player's list of quests by using setQuestState()
   * <LI>Add drops gotten by the quest <br>
   *
   * @param quest : quest associated with the QuestState
   * @param player : L2Player pointing out the player
   * @param state : state of the quest
   */
  public QuestState(Quest quest, Player player, int state) {
    _quest = quest;
    _player = player;

    // Save the state of the quest for the player in the player's list of quest onwed
    player.setQuestState(this);

    // set the state of the quest
    _state = state;
    quest.notifyCreate(this);
  }