mail.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
  2. // For more information, see LICENCE in the main folder
  3. #ifndef MAIL_HPP
  4. #define MAIL_HPP
  5. #include <common/mmo.hpp>
  6. enum mail_attach_result {
  7. MAIL_ATTACH_SUCCESS = 0,
  8. #if PACKETVER >= 20150513
  9. MAIL_ATTACH_WEIGHT = 1,
  10. MAIL_ATTACH_ERROR = 2,
  11. MAIL_ATTACH_SPACE = 3,
  12. MAIL_ATTACH_UNTRADEABLE = 4,
  13. #else
  14. MAIL_ATTACH_WEIGHT = 1,
  15. MAIL_ATTACH_ERROR = 1,
  16. MAIL_ATTACH_SPACE = 1,
  17. MAIL_ATTACH_UNTRADEABLE = 1,
  18. #endif
  19. // Unofficial
  20. MAIL_ATTACH_EQUIPSWITCH = 99,
  21. };
  22. void mail_clear(map_session_data *sd);
  23. int mail_removeitem(map_session_data *sd, short flag, int idx, int amount);
  24. bool mail_removezeny(map_session_data *sd, bool flag);
  25. enum mail_attach_result mail_setitem(map_session_data *sd, short idx, uint32 amount);
  26. bool mail_setattachment(map_session_data *sd, struct mail_message *msg);
  27. void mail_getattachment(map_session_data* sd, struct mail_message* msg, int zeny, struct item* item);
  28. int mail_openmail(map_session_data *sd);
  29. void mail_deliveryfail(map_session_data *sd, struct mail_message *msg);
  30. bool mail_invalid_operation(map_session_data *sd);
  31. void mail_send(map_session_data *sd, const char *dest_name, const char *title, const char *body_msg, int body_len);
  32. void mail_refresh_remaining_amount( map_session_data* sd );
  33. #endif /* MAIL_HPP */