pettypeinfo.h
来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 56 行
H
56 行
#ifndef __PET_TYPE_INFO_H__#define __PET_TYPE_INFO_H__#include "Types.h"#include "types/PetTypes.h"#include "Exception.h"#include <vector>const uint PetTypeNum = 5;class PetTypeInfoManager;class PetTypeInfo{public: PetTypeInfo( PetType_t PetType ) : m_PetType(PetType) { } PetType_t getPetType() const { return m_PetType; } MonsterType_t getOriginalMonsterType() const { return m_OriginalMonsterType; } MonsterType_t getPetCreatureTypeByIndex(uint index) const { return m_PetCreatureType[index]; } MonsterType_t getPetCreatureType(PetLevel_t petLevel) const; int getFoodType() const { return m_FoodType; }private: PetType_t m_PetType; MonsterType_t m_OriginalMonsterType; MonsterType_t m_PetCreatureType[PetTypeNum]; int m_FoodType; friend class PetTypeInfoManager;};class PetTypeInfoManager{public: PetTypeInfoManager() { m_PetTypeInfos.clear(); } ~PetTypeInfoManager() { clear(); } void clear(); void load(); void addPetTypeInfo( PetTypeInfo* pPetTypeInfo ); PetTypeInfo* getPetTypeInfo( PetType_t PetType ); static PetTypeInfoManager* getInstance() { static PetTypeInfoManager theInstance; return &theInstance; }private: vector<PetTypeInfo*> m_PetTypeInfos;};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?