From 2d648c5dc29a1ceae154194c23c799c7076894b4 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Wed, 14 May 2008 18:57:32 +0000 Subject: 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. --- src/beingmanager.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/beingmanager.cpp') 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; -- cgit v1.2.3-70-g09d2