Fix wrong replacement in 32c259b1ce (Fixes a minor error msg)

This commit is contained in:
Spp
2012-11-23 12:30:11 +01:00
parent b1ec4b61ac
commit 26006551e2
2 changed files with 12 additions and 5 deletions
+10 -3
View File
@@ -479,7 +479,7 @@ void Channel::SetOwner(Player const* player, std::string const& newname)
uint64 guid = player->GetGUID();
uint32 sec = player->GetSession()->GetSecurity();
if (!IsOn(guid) || (!AccountMgr::IsGMAccount(sec) && guid != _ownerGUID))
if (!IsOn(guid))
{
WorldPacket data;
MakeNotMember(&data);
@@ -487,6 +487,14 @@ void Channel::SetOwner(Player const* player, std::string const& newname)
return;
}
if (!AccountMgr::IsGMAccount(sec) && guid != _ownerGUID)
{
WorldPacket data;
MakeNotOwner(&data);
SendToOne(&data, guid);
return;
}
Player* newp = sObjectAccessor->FindPlayerByName(newname);
uint64 victim = newp ? newp->GetGUID() : 0;
@@ -600,8 +608,6 @@ void Channel::Say(uint64 guid, std::string const& what, uint32 lang)
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
lang = LANG_UNIVERSAL;
Player* player = ObjectAccessor::FindPlayer(guid);
if (!IsOn(guid))
{
WorldPacket data;
@@ -627,6 +633,7 @@ void Channel::Say(uint64 guid, std::string const& what, uint32 lang)
data << uint64(guid);
data << uint32(what.size() + 1);
data << what;
Player* player = ObjectAccessor::FindPlayer(guid);
data << uint8(player ? player->GetChatTag() : 0);
SendToAll(&data, !playersStore[guid].IsModerator() ? guid : false);
+2 -2
View File
@@ -42,7 +42,7 @@ ChannelMgr* ChannelMgr::forTeam(uint32 team)
return NULL;
}
Channel* ChannelMgr::GetJoinChannel(std::string const& name, uint32 channel_id)
Channel* ChannelMgr::GetJoinChannel(std::string const& name, uint32 channelId)
{
std::wstring wname;
Utf8toWStr(name, wname);
@@ -52,7 +52,7 @@ Channel* ChannelMgr::GetJoinChannel(std::string const& name, uint32 channel_id)
if (i == channels.end())
{
Channel* nchan = new Channel(name, channel_id, team);
Channel* nchan = new Channel(name, channelId, team);
channels[wname] = nchan;
return nchan;
}