/* $Id: MakeupArtist.java,v 1.1 2010/09/23 20:47:43 nhnb Exp $ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.maps.quests.revivalweeks;
import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.core.engine.StendhalRPZone;
import games.stendhal.server.core.rp.StendhalQuestSystem;
import games.stendhal.server.entity.npc.NPCList;
import games.stendhal.server.entity.npc.SpeakerNPC;
import games.stendhal.server.maps.ados.city.MakeupArtistNPC;
import games.stendhal.server.maps.quests.PaperChase;
/**
* Susi's father during the Semos Mine Town Revival Weeks
*/
public class MakeupArtist implements LoadableContent {
/**
* removes an NPC from the world and NPC list
*
* @param name name of NPC
*/
private void removeNPC(String name) {
SpeakerNPC npc = NPCList.get().get(name);
if (npc == null) {
return;
}
npc.getZone().remove(npc);
}
public void addToWorld() {
removeNPC("Fidorea");
final StendhalRPZone zone = SingletonRepository.getRPWorld().getZone("0_semos_mountain_n2");
new MakeupArtistNPC().buildFidorea(zone, 96, 109);
PaperChase paperChase = (PaperChase) StendhalQuestSystem.get().getQuest("PaperChase");
if (paperChase != null) {
paperChase.addToStarterNPCs();
}
}
/**
* removes Susi from the Mine Town and places her back into her home in Ados.
*
* @return <code>true</code>, if the content was removed, <code>false</code> otherwise
*/
public boolean removeFromWorld() {
removeNPC("Fidorea");
final StendhalRPZone zone = SingletonRepository.getRPWorld().getZone("0_ados_city_n");
new MakeupArtistNPC().buildFidorea(zone, 20, 13);
return true;
}
}