summaryrefslogtreecommitdiff
path: root/src/net/manaserv
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/manaserv')
-rw-r--r--src/net/manaserv/guildhandler.cpp10
-rw-r--r--src/net/manaserv/guildhandler.h4
-rw-r--r--src/net/manaserv/partyhandler.cpp3
3 files changed, 7 insertions, 10 deletions
diff --git a/src/net/manaserv/guildhandler.cpp b/src/net/manaserv/guildhandler.cpp
index 0dfe8cde..253efb01 100644
--- a/src/net/manaserv/guildhandler.cpp
+++ b/src/net/manaserv/guildhandler.cpp
@@ -131,9 +131,8 @@ void GuildHandler::handleMessage(Net::MessageIn &msg)
online = msg.readInt8();
if (name != "")
{
- member = new GuildMember(guildId, name);
+ member = guild->addMember(name);
member->setOnline(online);
- guild->addMember(member);
}
}
}
@@ -153,9 +152,8 @@ void GuildHandler::handleMessage(Net::MessageIn &msg)
switch(eventId)
{
case GUILD_EVENT_NEW_PLAYER:
- member = new GuildMember(guildId, name);
+ member = guild->addMember(name);
member->setOnline(true);
- guild->addMember(member);
break;
case GUILD_EVENT_LEAVING_PLAYER:
@@ -296,7 +294,7 @@ void GuildHandler::leave(int guildId)
chatServerConnection->send(msg);
}
-void GuildHandler::kick(GuildMember member)
+void GuildHandler::kick(GuildMember *member, std::string reason)
{
// TODO
}
@@ -313,7 +311,7 @@ void GuildHandler::memberList(int guildId)
chatServerConnection->send(msg);
}
-void GuildHandler::changeMemberPostion(GuildMember member, int level)
+void GuildHandler::changeMemberPostion(GuildMember *member, int level)
{
/*MessageOut msg(PCMSG_GUILD_PROMOTE_MEMBER);
msg.writeInt16(guildId);
diff --git a/src/net/manaserv/guildhandler.h b/src/net/manaserv/guildhandler.h
index 8fdd40a4..1b6d51b5 100644
--- a/src/net/manaserv/guildhandler.h
+++ b/src/net/manaserv/guildhandler.h
@@ -45,13 +45,13 @@ public:
void leave(int guildId);
- void kick(GuildMember member);
+ void kick(GuildMember *member, std::string reason = "");
void chat(int guildId, const std::string &text);
void memberList(int guildId);
- void changeMemberPostion(GuildMember member, int level);
+ void changeMemberPostion(GuildMember *member, int level);
void requestAlliance(int guildId, int otherGuildId);
diff --git a/src/net/manaserv/partyhandler.cpp b/src/net/manaserv/partyhandler.cpp
index 9ec8d2b8..ec153fa8 100644
--- a/src/net/manaserv/partyhandler.cpp
+++ b/src/net/manaserv/partyhandler.cpp
@@ -109,8 +109,7 @@ void PartyHandler::handleMessage(Net::MessageIn &msg)
if (id == player_node->getId())
player_node->setParty(mParty);
- PartyMember *member = new PartyMember(PARTY_ID, id, name);
- mParty->addMember(member);
+ mParty->addMember(id, name);
} break;
case CPMSG_PARTY_MEMBER_LEFT: