1 /* 2 Copyright © 2011-2012 Clint Bellanger 3 Copyright © 2012-2016 Justin Jacobs 4 5 This file is part of FLARE. 6 7 FLARE is free software: you can redistribute it and/or modify it under the terms 8 of the GNU General Public License as published by the Free Software Foundation, 9 either version 3 of the License, or (at your option) any later version. 10 11 FLARE is distributed in the hope that it will be useful, but WITHOUT ANY 12 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 PARTICULAR PURPOSE. See the GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License along with 16 FLARE. If not, see http://www.gnu.org/licenses/ 17 */ 18 19 /** 20 * class NPCManager 21 * 22 * NPCs which are not combatative enemies are handled by this Manager. 23 * Most commonly this involves vendor and conversation townspeople. 24 */ 25 26 #ifndef NPC_MANAGER_H 27 #define NPC_MANAGER_H 28 29 #include "CommonIncludes.h" 30 #include "TooltipData.h" 31 32 class StatBlock; 33 class NPC; 34 class WidgetTooltip; 35 class Entity; 36 37 class NPCManager { 38 private: 39 WidgetTooltip *tip; 40 TooltipData tip_buf; 41 42 public: 43 explicit NPCManager(); 44 NPCManager(const NPCManager ©); // not implemented 45 ~NPCManager(); 46 47 std::vector<NPC*> npcs; 48 void handleNewMap(); 49 void createMapEvent(const NPC& npc, size_t _npcs); 50 void logic(); 51 void addRenders(std::vector<Renderable> &r); 52 int getID(const std::string& npcName); 53 Entity* npcFocus(const Point& mouse, const FPoint& cam, bool alive_only); 54 Entity* getNearestNPC(const FPoint& pos, bool get_corpse = false); 55 }; 56 57 #endif 58