Clone of UAS2 @ https://github.com/drudgedance/uas2

CorpseCleaner.h 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * This file is part of UAS2.
  3. *
  4. * UAS2 is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * UAS2 is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. * You should have received a copy of the GNU General Public License
  14. * along with UASv1; if not, write to the Free Software
  15. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. */
  17. /**
  18. * @file CorpseCleaner.h
  19. */
  20. #if !defined(AFX_ORPSECLEANER_H__DC16D656_DC96_492A_834C_14B0D779C272__INCLUDED_)
  21. #define AFX_ORPSECLEANER_H__DC16D656_DC96_492A_834C_14B0D779C272__INCLUDED_
  22. #if _MSC_VER > 1000
  23. #pragma once
  24. #endif // _MSC_VER > 1000
  25. #include <time.h>
  26. #include "Shared.h"
  27. #include "WorldManager.h"
  28. #include "SimpleAI.h"
  29. class CorpseCleaner
  30. {
  31. public:
  32. CorpseCleaner();
  33. virtual ~CorpseCleaner();
  34. static void Cleanup();
  35. static bool AddCorpse(DWORD dwGUID, DWORD dwDelay = 0,DWORD dwReSpawn = 0);
  36. static bool RemoveCorpse(DWORD dwGUID);
  37. static DWORD Corpses[MAX_CORPSES][4];
  38. static time_t longtime;
  39. static time_t NextCleanTime;
  40. };
  41. #endif // !defined(AFX_ORPSECLEANER_H__DC16D656_DC96_492A_834C_14B0D779C272__INCLUDED_)