Batch #3715 by Yommy: 0 byte-identical, 5 confirmed by peer review. - fn_18007 CTownInfoMgr::AddTownInfo: logic confirmed by peer review - fn_18010 CTownInfoMgr::LoadScript: logic confirmed by peer review - fn_18011 FormatTownInfoString: logic confirmed by peer review - fn_18018 CTownInfoMgr::GetTownInfo: logic confirmed by peer review - fn_18020 CTownInfoMgr::L_AddTownInfo: logic confirmed by peer review Peer-reviewed-by: eAthena, youko Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
46 lines
1,007 B
C++
46 lines
1,007 B
C++
#ifndef RAGNAROK_SOURCE_CONTENTS_TOWNINFOMGR_H
|
|
#define RAGNAROK_SOURCE_CONTENTS_TOWNINFOMGR_H
|
|
|
|
#include <map>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
struct lua_State;
|
|
|
|
struct TownInfo {
|
|
TownInfo();
|
|
TownInfo(int type, std::string name, int x, int y, std::string image);
|
|
|
|
/* 0000 */ int type;
|
|
/* 0004 */ std::string name;
|
|
/* 001C */ int x;
|
|
/* 0020 */ int y;
|
|
/* 0024 */ std::string image;
|
|
};
|
|
|
|
// VTABLE: vt_01617
|
|
class CTownInfoMgr {
|
|
public:
|
|
// INLINED
|
|
CTownInfoMgr() : m_isValid(true) {
|
|
}
|
|
// INLINED
|
|
virtual ~CTownInfoMgr() {
|
|
}
|
|
|
|
static bool Create();
|
|
static void Destroy();
|
|
static int L_AddTownInfo(lua_State* state);
|
|
|
|
/* 0004 */ bool m_isValid;
|
|
/* 0008 */ std::map<std::string, std::vector<TownInfo>> m_towns;
|
|
/* 0010 */ std::vector<TownInfo> m_current;
|
|
|
|
void AddTownInfo(std::string mapName, std::string name, int x, int y, int type);
|
|
bool LoadScript();
|
|
TownInfo GetTownInfo(std::string mapName, unsigned int index);
|
|
};
|
|
|
|
extern CTownInfoMgr* g_townInfoMgr;
|
|
|
|
#endif
|