Clone of PhatAC @ https://github.com/floaterxk/PhatAC

ClientEvents.h 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #pragma once
  2. #include "BinaryReader.h"
  3. class CBasePlayer;
  4. const float sidestep_factor = 0.5f;
  5. const float backwards_factor = 0.64999998f;
  6. const float run_turn_factor = 1.5f;
  7. const float run_anim_speed = 4.0f;
  8. const float walk_anim_speed = 3.1199999f;
  9. const float sidestep_anim_speed = 1.25f;
  10. const float max_sidestep_anim_rate = 3.0f;
  11. // Client/World interaction
  12. class CClientEvents
  13. {
  14. public:
  15. CClientEvents(CClient *);
  16. ~CClientEvents();
  17. void Think();
  18. void DetachPlayer();
  19. DWORD GetPlayerID();
  20. CBasePlayer* GetPlayer();
  21. void LoginError(int iError);
  22. void LoginCharacter(DWORD dwGUID, const char *szAccount);
  23. void BeginLogout();
  24. void ExitWorld();
  25. void ActionComplete();
  26. void SendText(const char *szText, long lColor);
  27. void UpdateBurdenUI();
  28. // Network events
  29. void ActionText(char* szText);
  30. void Attack(DWORD dwTarget, DWORD dwHeight, float flPower);
  31. void ChangeCombatStance(DWORD dwStance);
  32. void ChannelText(DWORD dwChannel, const char* szText);
  33. void ClientText(char* szText);
  34. void DropItem(DWORD dwGUID);
  35. void EmoteText(char* szText);
  36. void EquipItem(DWORD dwItemID, DWORD dwCoverage);
  37. void ExitPortal();
  38. void Identify(DWORD dwObjectID);
  39. void LifestoneRecall();
  40. void MarketplaceRecall();
  41. void Ping();
  42. void RequestHealthUpdate(DWORD dwGUID);
  43. void SendTellByGUID(const char* szText, DWORD dwGUID);
  44. void SendTellByName(const char* szText, const char* szName);
  45. void SpendAttributeXP(DWORD dwAttribute, DWORD dwXP);
  46. void SpendVitalXP(DWORD dwVital, DWORD dwXP);
  47. void SpendSkillXP(DWORD dwSkill, DWORD dwXP);
  48. void StoreItem(DWORD dwItemID, DWORD dwContainer, char cSlot);
  49. void UseItemEx(DWORD dwSourceID, DWORD dwDestID);
  50. void UseObject(DWORD dwEID);
  51. void ProcessEvent(BinaryReader *);
  52. private:
  53. CClient *m_pClient;
  54. CBasePlayer *m_pPlayer;
  55. double m_fLogout;
  56. };