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

SimpleAI.h 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 SimpleAI.h
  19. */
  20. #if !defined(AFX_SIMPLEAI_H__33AB5540_9AF8_405E_9423_B2EC11F51808__INCLUDED_)
  21. #define AFX_SIMPLEAI_H__33AB5540_9AF8_405E_9423_B2EC11F51808__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 "cMonsterServer.h"
  29. class SimpleAI
  30. {
  31. public:
  32. SimpleAI();
  33. virtual ~SimpleAI();
  34. static bool AddMonster ( DWORD dwGUID );
  35. static bool AddPet ( DWORD dwGUID, DWORD dwOGUID );
  36. static bool RemoveMonster ( DWORD dwGUID );
  37. static void ExecuteActions ( );
  38. static void SetAction ( DWORD dwGUID, DWORD dwEvent, WORD wDelay );
  39. static void SetMoving ( DWORD dwGUID );
  40. static void SetMovingComplete ( DWORD dwGUID );
  41. static void SetUnderAttack ( DWORD dwGUID, DWORD dwTarget );
  42. static void SetAttackComplete ( DWORD dwGUID );
  43. static void SetTargetKilled ( DWORD dwTarget );
  44. static void SetAttackEvent ( DWORD dwGUID, DWORD dwTarget, DWORD dwEvent, WORD wDelay );
  45. static void MoveMonsters ( );
  46. static DWORD Monsters[MAX_MONSTERS][8];
  47. static time_t longtime;
  48. static time_t NextActionTime;
  49. };
  50. #endif // !defined(AFX_SIMPLEAI_H__33AB5540_9AF8_405E_9423_B2EC11F51808__INCLUDED_)