This commit is contained in:
cyw
2026-02-13 14:34:15 +08:00
parent 6ed1953e24
commit f36e3f9df2
5206 changed files with 573757 additions and 16 deletions

View File

@@ -0,0 +1,43 @@
#include "StdAfx.h"
#include "GamePropertyManager.h"
//////////////////////////////////////////////////////////////////////////////////
//构造函数
CGamePropertyManager::CGamePropertyManager()
{
}
//析构函数
CGamePropertyManager::~CGamePropertyManager()
{
}
//设置道具
bool CGamePropertyManager::SetGamePropertyInfo(tagPropertyInfo PropertyInfo[], WORD wPropertyCount)
{
//设置变量
m_PropertyInfoArray.SetSize(wPropertyCount);
//拷贝数组
CopyMemory(m_PropertyInfoArray.GetData(),PropertyInfo,sizeof(tagPropertyInfo)*wPropertyCount);
return true;
}
//查找道具
tagPropertyInfo * CGamePropertyManager::SearchPropertyItem(WORD wPropertyIndex)
{
//查找道具
for (INT_PTR i=0;i<m_PropertyInfoArray.GetCount();i++)
{
if (m_PropertyInfoArray[i].wIndex==wPropertyIndex)
{
return &m_PropertyInfoArray[i];
}
}
return NULL;
}
//////////////////////////////////////////////////////////////////////////////////