summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/session.c10
-rw-r--r--src/map/session.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/src/map/session.c b/src/map/session.c
index a96cbe9..942da0b 100644
--- a/src/map/session.c
+++ b/src/map/session.c
@@ -10,7 +10,7 @@
#include "../../../common/mmo.h"
#include "../../../common/socket.h"
#include "../../../common/strlib.h"
-#include "../../../login/login.h"
+#include "../../../map/pc.h"
#include "map/session.h"
#include "map/sessionext.h"
@@ -26,6 +26,14 @@ struct SessionExt *session_get(int fd)
return data;
}
+struct SessionExt *session_get_bysd(struct map_session_data *sd)
+{
+ if (!sd)
+ return NULL;
+
+ return session_get(sd->fd);
+}
+
struct SessionExt *session_create(void)
{
struct SessionExt *data = NULL;
diff --git a/src/map/session.h b/src/map/session.h
index 24a82d3..40b05e6 100644
--- a/src/map/session.h
+++ b/src/map/session.h
@@ -7,6 +7,7 @@
struct SessionExt;
struct SessionExt *session_get(int fd);
+struct SessionExt *session_get_bysd(struct map_session_data *sd);
struct SessionExt *session_create(void);
#endif // EVOL_MAP_SESSION