summaryrefslogtreecommitdiff
path: root/src/beingmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/beingmanager.h')
-rw-r--r--src/beingmanager.h33
1 files changed, 26 insertions, 7 deletions
diff --git a/src/beingmanager.h b/src/beingmanager.h
index d3fb9888..726a73ec 100644
--- a/src/beingmanager.h
+++ b/src/beingmanager.h
@@ -1,31 +1,34 @@
/*
* The Mana World
- * Copyright 2004 The Mana World Development Team
+ * Copyright (C) 2004 The Mana World Development Team
*
* This file is part of The Mana World.
*
- * The Mana World is free software; you can redistribute it and/or modify
+ * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
- * The Mana World is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with The Mana World; if not, write to the Free Software
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef _TMW_BEINGMANAGER_H
-#define _TMW_BEINGMANAGER_H
+#ifndef BEINGMANAGER_H
+#define BEINGMANAGER_H
#include "being.h"
class LocalPlayer;
class Map;
+#ifdef EATHENA_SUPPORT
+class Network;
+#endif
typedef std::list<Being*> Beings;
typedef Beings::iterator BeingIterator;
@@ -33,6 +36,10 @@ typedef Beings::iterator BeingIterator;
class BeingManager
{
public:
+#ifdef EATHENA_SUPPORT
+ BeingManager(Network *network);
+#endif
+
/**
* Sets the map on which beings are created
*/
@@ -46,7 +53,11 @@ class BeingManager
/**
* Create a being and add it to the list of beings.
*/
+#ifdef TMWSERV_SUPPORT
Being *createBeing(int id, int type, int subtype);
+#else
+ Being *createBeing(Uint32 id, Uint16 job);
+#endif
/**
* Remove a Being.
@@ -56,7 +67,7 @@ class BeingManager
/**
* Returns a specific id Being.
*/
- Being* findBeing(Uint16 id);
+ Being* findBeing(Uint32 id);
/**
* Returns a being at specific coordinates.
@@ -77,6 +88,11 @@ class BeingManager
Being::Type type = Being::UNKNOWN);
/**
+ * Finds a being by name and (optionally) by type.
+ */
+ Being* findBeingByName(std::string name, Being::Type type = Being::UNKNOWN);
+
+ /**
* Returns a being nearest to another being.
*
* \param maxdist maximal distance. If minimal distance is larger,
@@ -103,6 +119,9 @@ class BeingManager
protected:
Beings mBeings;
Map *mMap;
+#ifdef EATHENA_SUPPORT
+ Network *mNetwork;
+#endif
};
extern BeingManager *beingManager;