inter.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
  2. // For more information, see LICENCE in the main folder
  3. #ifndef INTER_HPP
  4. #define INTER_HPP
  5. #include <memory>
  6. #include <string>
  7. #include <unordered_map>
  8. #include "../common/cbasetypes.hpp"
  9. #include "../common/database.hpp"
  10. #include "../common/sql.hpp"
  11. struct s_storage_table;
  12. class InterServerDatabase : public TypesafeYamlDatabase<uint32, s_storage_table>{
  13. public:
  14. InterServerDatabase() : TypesafeYamlDatabase( "INTER_SERVER_DB", 1 ){
  15. }
  16. const std::string getDefaultLocation();
  17. uint64 parseBodyNode( const YAML::Node& node );
  18. };
  19. extern InterServerDatabase interServerDb;
  20. int inter_init_sql(const char *file);
  21. void inter_final(void);
  22. int inter_parse_frommap(int fd);
  23. int inter_mapif_init(int fd);
  24. int mapif_disconnectplayer(int fd, uint32 account_id, uint32 char_id, int reason);
  25. void mapif_accinfo_ack(bool success, int map_fd, int u_fd, int u_aid, int account_id, int8 type,
  26. int group_id, int logincount, int state, const char *email, const char *last_ip, const char *lastlogin,
  27. const char *birthdate, const char *userid);
  28. int inter_log(const char *fmt,...);
  29. extern unsigned int party_share_level;
  30. extern Sql* sql_handle;
  31. extern Sql* lsql_handle;
  32. void inter_savereg(uint32 account_id, uint32 char_id, const char *key, unsigned int index, intptr_t val, bool is_string);
  33. int inter_accreg_fromsql(uint32 account_id, uint32 char_id, int fd, int type);
  34. #endif /* INTER_HPP */