summaryrefslogtreecommitdiff
path: root/src/map/session.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-14 13:12:19 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-14 13:12:19 +0300
commitfd3ff79b70accad28179fdc23049daec0bec9997 (patch)
tree51c4327ca1aeee26ee721e97965235e8e1547b10 /src/map/session.c
parent599ed7c8c7073a41c58489d21bb0586c9059abb4 (diff)
downloadevol-hercules-fd3ff79b70accad28179fdc23049daec0bec9997.tar.gz
evol-hercules-fd3ff79b70accad28179fdc23049daec0bec9997.tar.bz2
evol-hercules-fd3ff79b70accad28179fdc23049daec0bec9997.tar.xz
evol-hercules-fd3ff79b70accad28179fdc23049daec0bec9997.zip
Add function to get session extended data by sd.
Diffstat (limited to 'src/map/session.c')
-rw-r--r--src/map/session.c10
1 files changed, 9 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;