summaryrefslogtreecommitdiff
path: root/src/guild.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guild.cpp')
-rw-r--r--src/guild.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/guild.cpp b/src/guild.cpp
index 35349e5d3..b188bf864 100644
--- a/src/guild.cpp
+++ b/src/guild.cpp
@@ -169,6 +169,23 @@ GuildMember *Guild::getMember(const BeingId accountId,
return nullptr;
}
+GuildMember *Guild::getMemberByCharId(const int charId) const
+{
+ MemberList::const_iterator itr = mMembers.begin();
+ const MemberList::const_iterator itr_end = mMembers.end();
+ while (itr != itr_end)
+ {
+ if ((*itr) != nullptr &&
+ (*itr)->mCharId == charId)
+ {
+ return (*itr);
+ }
+ ++itr;
+ }
+
+ return nullptr;
+}
+
GuildMember *Guild::getMember(const std::string &name) const
{
MemberList::const_iterator itr = mMembers.begin();