Files
Leviathan/Client/Game/game/Interface/WorldMap/SUIWorldMapMonsterRegion.h
T
2026-06-01 12:46:52 +02:00

96 lines
2.5 KiB
C++

#ifndef _SUIWorldMapMonsterRegion_h_
#define _SUIWorldMapMonsterRegion_h_
/// 2011.08.30 - prodongi
#include "MonsterRespawnRegionExtractor.h"
#include "PropRespawnRegionExtractor.h"
class SUIWorldMapWnd;
class KUIWnd;
class KUIControl;
struct sMonsterRegionInfo
{
public:
sMonsterRegionInfo();
~sMonsterRegionInfo();
void initialize(SUIWorldMapWnd* parentWnd);
bool setQuestCode(int code, SUIWorldMapWnd *parentWnd);
void apply(SUIWorldMapWnd* parentWnd, bool maxList);
void refresh(SUIWorldMapWnd* parentWnd, bool maxList);
void clearChild(SUIWorldMapWnd *parentWnd);
void process(DWORD t);
bool checkValidQuestCode(SUIWorldMapWnd* parentWnd); /// m_questCode가 유효한지 체크
private:
void apply(int monsterId, SUIWorldMapWnd* parentWnd, bool maxList);
bool checkIncludeRegion(KRect const& uiRect, int id);
void setToolTip();
/// 퀘스트의 표시 속성이 npc일 때, npc 마크를 표시해 준다
void setQuestMarkTarget(int code);
/// 완료 npc 리스트 설정
void setNpcList(int code, SUIWorldMapWnd *parentWnd);
template <typename T, typename MAX_T, typename MIN_T>
void apply(int id, SUIWorldMapWnd *parentWnd, bool isMax, MAX_T* maxList, MIN_T* minList, int type);
private:
enum REGION_TYPE { MOB, ITEM };
enum { MIN_RECT_LEN = 20 };
struct sChildWnd
{
sChildWnd() {}
sChildWnd(KUIWnd* wnd, int id, int type)
{
m_wnd = wnd;
m_type = type;
addToolTipList(id);
}
~sChildWnd()
{
m_toolTipList.clear();
}
void addToolTipList(int id)
{
std::vector<int>::iterator it = std::find(m_toolTipList.begin(), m_toolTipList.end(), id);
if (it == m_toolTipList.end())
m_toolTipList.push_back(id);
}
std::vector<int> m_toolTipList;
KUIWnd* m_wnd;
int m_type;
};
/*
*/
struct sNpcList
{
~sNpcList() { clear(); }
void clear();
void clearNpcId();
void hide();
/// m_wnd의 유효한 개수 체크
void checkValidWnd(SUIWorldMapWnd* parentWnd);
void apply(SUIWorldMapWnd* parentWnd);
std::vector<int> m_npcId;
std::vector<KUIControl*> m_wnd;
};
typedef std::vector<sChildWnd> v_childWnd;
typedef cMonsterRespawnRegionExtractor::sMonsterRegion ex_sMonsterRegion;
typedef cPropRespawnRegionExtractor::sItemRegion ex_sItemRegion;
std::map<int, ex_sMonsterRegion> m_monsterMaxRegionList;
std::map<int, ex_sMonsterRegion> m_monsterMinRegionList;
std::map<int, ex_sItemRegion> m_itemMaxRegionList;
std::map<int, ex_sItemRegion> m_itemMinRegionList;
v_childWnd m_childList;
int m_questCode;
std::vector<int> m_mobList;
std::vector<int> m_itemList;
sNpcList m_npcList;
};
#endif