诸暨麻将添加redis
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

44 行
1.0 KiB

  1. #include "StdAfx.h"
  2. #include "GamePropertyManager.h"
  3. //////////////////////////////////////////////////////////////////////////////////
  4. //构造函数
  5. CGamePropertyManager::CGamePropertyManager()
  6. {
  7. }
  8. //析构函数
  9. CGamePropertyManager::~CGamePropertyManager()
  10. {
  11. }
  12. //设置道具
  13. bool CGamePropertyManager::SetGamePropertyInfo(tagPropertyInfo PropertyInfo[], WORD wPropertyCount)
  14. {
  15. //设置变量
  16. m_PropertyInfoArray.SetSize(wPropertyCount);
  17. //拷贝数组
  18. CopyMemory(m_PropertyInfoArray.GetData(), PropertyInfo, sizeof(tagPropertyInfo)*wPropertyCount);
  19. return true;
  20. }
  21. //查找道具
  22. tagPropertyInfo * CGamePropertyManager::SearchPropertyItem(WORD wPropertyIndex)
  23. {
  24. //查找道具
  25. for (INT_PTR i = 0; i < m_PropertyInfoArray.GetCount(); i++)
  26. {
  27. if (m_PropertyInfoArray[i].wIndex == wPropertyIndex)
  28. {
  29. return &m_PropertyInfoArray[i];
  30. }
  31. }
  32. return NULL;
  33. }
  34. //////////////////////////////////////////////////////////////////////////////////