summaryrefslogtreecommitdiff
path: root/src/beingmanager.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-05-14 18:57:32 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-05-14 18:57:32 +0000
commit2d648c5dc29a1ceae154194c23c799c7076894b4 (patch)
treef6c31a30260b80713257be211b139263b3291098 /src/beingmanager.cpp
parent41906acb990895831e3b2c39102f41c9b580ae10 (diff)
downloadmana-2d648c5dc29a1ceae154194c23c799c7076894b4.tar.gz
mana-2d648c5dc29a1ceae154194c23c799c7076894b4.tar.bz2
mana-2d648c5dc29a1ceae154194c23c799c7076894b4.tar.xz
mana-2d648c5dc29a1ceae154194c23c799c7076894b4.zip
Added ability to define friends, players you want to ignore or disregard and
configure whether trading is allowed. Based on new popup code, configuration improvements to store hierarchical data and a table model.
Diffstat (limited to 'src/beingmanager.cpp')
-rw-r--r--src/beingmanager.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp
index 11fc1c6d..b683b1bd 100644
--- a/src/beingmanager.cpp
+++ b/src/beingmanager.cpp
@@ -146,6 +146,21 @@ Being* BeingManager::findBeingByPixel(Uint16 x, Uint16 y)
return NULL;
}
+Being* BeingManager::findBeingByName(std::string name, Being::Type type)
+{
+ for (BeingIterator i = mBeings.begin(); i != mBeings.end(); i++)
+ {
+ Being *being = (*i);
+ if (being->getName() == name
+ && (type == Being::UNKNOWN
+ || type == being->getType()))
+ return being;
+ }
+ return NULL;
+}
+
+
+
Beings& BeingManager::getAll()
{
return mBeings;