12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct M_monsterData
- {
- //ID
- int64_t mID;
- //怪物名称
- std::string mname;
- //怪物类型
- int mtype;
- //击杀倍数
- int mmultiple;
- //怪物图标
- std::string micon;
- //怪物形象
- std::string maspect;
- //移动速度
- float mspeed;
- //鱼阵移动速度
- float msuper_speed;
- //缩放倍数
- float mzoom_factor;
- //经验掉落(道具ID)
- int mexp_value;
- };
- class M_monster
- {
- public:
- private:
- static std::auto_ptr<M_monster> msSingleton;
- public:
- int GetCount();
- const M_monsterData* GetData(int64_t ID);
- boost::unordered_map<int64_t, M_monsterData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static M_monster* GetSingleton();
- private:
- boost::unordered_map<int64_t, M_monsterData> mMapData;
- };
|