mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[11468] Finally remove all uses Object::GetGUID from core sources.
GetGUID() is now depricted function and will removed soon. Still exist just for give time for update patches/scripts.
This commit is contained in:
parent
1e38db574a
commit
5ff698f53a
7 changed files with 214 additions and 215 deletions
|
|
@ -22,7 +22,7 @@
|
||||||
#include "SocialMgr.h"
|
#include "SocialMgr.h"
|
||||||
|
|
||||||
Channel::Channel(const std::string& name, uint32 channel_id)
|
Channel::Channel(const std::string& name, uint32 channel_id)
|
||||||
: m_announce(true), m_moderate(false), m_name(name), m_flags(0), m_channelId(channel_id), m_ownerGUID(0)
|
: m_announce(true), m_moderate(false), m_name(name), m_flags(0), m_channelId(channel_id)
|
||||||
{
|
{
|
||||||
// set special flags if built-in channel
|
// set special flags if built-in channel
|
||||||
ChatChannelsEntry const* ch = GetChannelEntryFor(channel_id);
|
ChatChannelsEntry const* ch = GetChannelEntryFor(channel_id);
|
||||||
|
|
@ -50,7 +50,7 @@ Channel::Channel(const std::string& name, uint32 channel_id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::Join(uint64 p, const char *pass)
|
void Channel::Join(ObjectGuid p, const char *pass)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
if (IsOn(p))
|
if (IsOn(p))
|
||||||
|
|
@ -102,10 +102,9 @@ void Channel::Join(uint64 p, const char *pass)
|
||||||
|
|
||||||
data.clear();
|
data.clear();
|
||||||
|
|
||||||
PlayerInfo pinfo;
|
PlayerInfo& pinfo = m_players[p];
|
||||||
pinfo.player = p;
|
pinfo.player = p;
|
||||||
pinfo.flags = 0;
|
pinfo.flags = 0;
|
||||||
players[p] = pinfo;
|
|
||||||
|
|
||||||
MakeYouJoined(&data);
|
MakeYouJoined(&data);
|
||||||
SendToOne(&data, p);
|
SendToOne(&data, p);
|
||||||
|
|
@ -113,14 +112,14 @@ void Channel::Join(uint64 p, const char *pass)
|
||||||
JoinNotify(p);
|
JoinNotify(p);
|
||||||
|
|
||||||
// if no owner first logged will become
|
// if no owner first logged will become
|
||||||
if(!IsConstant() && !m_ownerGUID)
|
if(!IsConstant() && m_ownerGuid.IsEmpty())
|
||||||
{
|
{
|
||||||
SetOwner(p, (players.size() > 1 ? true : false));
|
SetOwner(p, (m_players.size() > 1 ? true : false));
|
||||||
players[p].SetModerator(true);
|
m_players[p].SetModerator(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::Leave(uint64 p, bool send)
|
void Channel::Leave(ObjectGuid p, bool send)
|
||||||
{
|
{
|
||||||
if (!IsOn(p))
|
if (!IsOn(p))
|
||||||
{
|
{
|
||||||
|
|
@ -145,9 +144,9 @@ void Channel::Leave(uint64 p, bool send)
|
||||||
data.clear();
|
data.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool changeowner = players[p].IsOwner();
|
bool changeowner = m_players[p].IsOwner();
|
||||||
|
|
||||||
players.erase(p);
|
m_players.erase(p);
|
||||||
if(m_announce && (!plr || plr->GetSession()->GetSecurity() < SEC_GAMEMASTER || !sWorld.getConfig(CONFIG_BOOL_SILENTLY_GM_JOIN_TO_CHANNEL) ))
|
if(m_announce && (!plr || plr->GetSession()->GetSecurity() < SEC_GAMEMASTER || !sWorld.getConfig(CONFIG_BOOL_SILENTLY_GM_JOIN_TO_CHANNEL) ))
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
|
|
@ -159,13 +158,13 @@ void Channel::Leave(uint64 p, bool send)
|
||||||
|
|
||||||
if(changeowner)
|
if(changeowner)
|
||||||
{
|
{
|
||||||
uint64 newowner = !players.empty() ? players.begin()->second.player : 0;
|
ObjectGuid newowner = !m_players.empty() ? m_players.begin()->second.player : ObjectGuid();
|
||||||
SetOwner(newowner);
|
SetOwner(newowner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::KickOrBan(uint64 good, const char *badname, bool ban)
|
void Channel::KickOrBan(ObjectGuid good, const char *badname, bool ban)
|
||||||
{
|
{
|
||||||
AccountTypes sec = SEC_PLAYER;
|
AccountTypes sec = SEC_PLAYER;
|
||||||
Player *gplr = sObjectMgr.GetPlayer(good);
|
Player *gplr = sObjectMgr.GetPlayer(good);
|
||||||
|
|
@ -178,7 +177,7 @@ void Channel::KickOrBan(uint64 good, const char *badname, bool ban)
|
||||||
MakeNotMember(&data);
|
MakeNotMember(&data);
|
||||||
SendToOne(&data, good);
|
SendToOne(&data, good);
|
||||||
}
|
}
|
||||||
else if(!players[good].IsModerator() && sec < SEC_GAMEMASTER)
|
else if (!m_players[good].IsModerator() && sec < SEC_GAMEMASTER)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeNotModerator(&data);
|
MakeNotModerator(&data);
|
||||||
|
|
@ -187,13 +186,13 @@ void Channel::KickOrBan(uint64 good, const char *badname, bool ban)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Player *bad = sObjectMgr.GetPlayer(badname);
|
Player *bad = sObjectMgr.GetPlayer(badname);
|
||||||
if(bad == NULL || !IsOn(bad->GetGUID()))
|
if (bad == NULL || !IsOn(bad->GetObjectGuid()))
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakePlayerNotFound(&data, badname);
|
MakePlayerNotFound(&data, badname);
|
||||||
SendToOne(&data, good);
|
SendToOne(&data, good);
|
||||||
}
|
}
|
||||||
else if(sec < SEC_GAMEMASTER && bad->GetGUID() == m_ownerGUID && good != m_ownerGUID)
|
else if (sec < SEC_GAMEMASTER && bad->GetObjectGuid() == m_ownerGuid && good != m_ownerGuid)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeNotOwner(&data);
|
MakeNotOwner(&data);
|
||||||
|
|
@ -201,32 +200,32 @@ void Channel::KickOrBan(uint64 good, const char *badname, bool ban)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool changeowner = (m_ownerGUID == bad->GetGUID());
|
bool changeowner = (m_ownerGuid == bad->GetObjectGuid());
|
||||||
|
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
|
|
||||||
if(ban && !IsBanned(bad->GetGUID()))
|
if(ban && !IsBanned(bad->GetObjectGuid()))
|
||||||
{
|
{
|
||||||
banned.insert(bad->GetGUID());
|
m_banned.insert(bad->GetObjectGuid());
|
||||||
MakePlayerBanned(&data, bad->GetGUID(), good);
|
MakePlayerBanned(&data, bad->GetObjectGuid(), good);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MakePlayerKicked(&data, bad->GetGUID(), good);
|
MakePlayerKicked(&data, bad->GetObjectGuid(), good);
|
||||||
|
|
||||||
SendToAll(&data);
|
SendToAll(&data);
|
||||||
players.erase(bad->GetGUID());
|
m_players.erase(bad->GetObjectGuid());
|
||||||
bad->LeftChannel(this);
|
bad->LeftChannel(this);
|
||||||
|
|
||||||
if(changeowner)
|
if(changeowner)
|
||||||
{
|
{
|
||||||
uint64 newowner = !players.empty() ? good : false;
|
ObjectGuid newowner = !m_players.empty() ? good : ObjectGuid();
|
||||||
SetOwner(newowner);
|
SetOwner(newowner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::UnBan(uint64 good, const char *badname)
|
void Channel::UnBan(ObjectGuid good, const char *badname)
|
||||||
{
|
{
|
||||||
uint32 sec = 0;
|
uint32 sec = 0;
|
||||||
Player *gplr = sObjectMgr.GetPlayer(good);
|
Player *gplr = sObjectMgr.GetPlayer(good);
|
||||||
|
|
@ -239,7 +238,7 @@ void Channel::UnBan(uint64 good, const char *badname)
|
||||||
MakeNotMember(&data);
|
MakeNotMember(&data);
|
||||||
SendToOne(&data, good);
|
SendToOne(&data, good);
|
||||||
}
|
}
|
||||||
else if(!players[good].IsModerator() && sec < SEC_GAMEMASTER)
|
else if(!m_players[good].IsModerator() && sec < SEC_GAMEMASTER)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeNotModerator(&data);
|
MakeNotModerator(&data);
|
||||||
|
|
@ -248,7 +247,7 @@ void Channel::UnBan(uint64 good, const char *badname)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Player *bad = sObjectMgr.GetPlayer(badname);
|
Player *bad = sObjectMgr.GetPlayer(badname);
|
||||||
if(bad == NULL || !IsBanned(bad->GetGUID()))
|
if(bad == NULL || !IsBanned(bad->GetObjectGuid()))
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakePlayerNotFound(&data, badname);
|
MakePlayerNotFound(&data, badname);
|
||||||
|
|
@ -256,16 +255,16 @@ void Channel::UnBan(uint64 good, const char *badname)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
banned.erase(bad->GetGUID());
|
m_banned.erase(bad->GetObjectGuid());
|
||||||
|
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakePlayerUnbanned(&data, bad->GetGUID(), good);
|
MakePlayerUnbanned(&data, bad->GetObjectGuid(), good);
|
||||||
SendToAll(&data);
|
SendToAll(&data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::Password(uint64 p, const char *pass)
|
void Channel::Password(ObjectGuid p, const char *pass)
|
||||||
{
|
{
|
||||||
uint32 sec = 0;
|
uint32 sec = 0;
|
||||||
Player *plr = sObjectMgr.GetPlayer(p);
|
Player *plr = sObjectMgr.GetPlayer(p);
|
||||||
|
|
@ -278,7 +277,7 @@ void Channel::Password(uint64 p, const char *pass)
|
||||||
MakeNotMember(&data);
|
MakeNotMember(&data);
|
||||||
SendToOne(&data, p);
|
SendToOne(&data, p);
|
||||||
}
|
}
|
||||||
else if(!players[p].IsModerator() && sec < SEC_GAMEMASTER)
|
else if(!m_players[p].IsModerator() && sec < SEC_GAMEMASTER)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeNotModerator(&data);
|
MakeNotModerator(&data);
|
||||||
|
|
@ -294,7 +293,7 @@ void Channel::Password(uint64 p, const char *pass)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
|
void Channel::SetMode(ObjectGuid p, const char *p2n, bool mod, bool set)
|
||||||
{
|
{
|
||||||
Player *plr = sObjectMgr.GetPlayer(p);
|
Player *plr = sObjectMgr.GetPlayer(p);
|
||||||
if (!plr)
|
if (!plr)
|
||||||
|
|
@ -308,7 +307,7 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
|
||||||
MakeNotMember(&data);
|
MakeNotMember(&data);
|
||||||
SendToOne(&data, p);
|
SendToOne(&data, p);
|
||||||
}
|
}
|
||||||
else if(!players[p].IsModerator() && sec < SEC_GAMEMASTER)
|
else if(!m_players[p].IsModerator() && sec < SEC_GAMEMASTER)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeNotModerator(&data);
|
MakeNotModerator(&data);
|
||||||
|
|
@ -325,11 +324,11 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerInfo inf = players[newp->GetGUID()];
|
PlayerInfo inf = m_players[newp->GetObjectGuid()];
|
||||||
if(p == m_ownerGUID && newp->GetGUID() == m_ownerGUID && mod)
|
if(p == m_ownerGuid && newp->GetObjectGuid() == m_ownerGuid && mod)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(!IsOn(newp->GetGUID()))
|
if (!IsOn(newp->GetObjectGuid()))
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakePlayerNotFound(&data, p2n);
|
MakePlayerNotFound(&data, p2n);
|
||||||
|
|
@ -348,7 +347,7 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_ownerGUID == newp->GetGUID() && m_ownerGUID != p)
|
if(m_ownerGuid == newp->GetObjectGuid() && m_ownerGuid != p)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeNotOwner(&data);
|
MakeNotOwner(&data);
|
||||||
|
|
@ -357,13 +356,13 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mod)
|
if(mod)
|
||||||
SetModerator(newp->GetGUID(), set);
|
SetModerator(newp->GetObjectGuid(), set);
|
||||||
else
|
else
|
||||||
SetMute(newp->GetGUID(), set);
|
SetMute(newp->GetObjectGuid(), set);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::SetOwner(uint64 p, const char *newname)
|
void Channel::SetOwner(ObjectGuid p, const char *newname)
|
||||||
{
|
{
|
||||||
Player *plr = sObjectMgr.GetPlayer(p);
|
Player *plr = sObjectMgr.GetPlayer(p);
|
||||||
if (!plr)
|
if (!plr)
|
||||||
|
|
@ -379,7 +378,7 @@ void Channel::SetOwner(uint64 p, const char *newname)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sec < SEC_GAMEMASTER && p != m_ownerGUID)
|
if(sec < SEC_GAMEMASTER && p != m_ownerGuid)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeNotOwner(&data);
|
MakeNotOwner(&data);
|
||||||
|
|
@ -388,7 +387,7 @@ void Channel::SetOwner(uint64 p, const char *newname)
|
||||||
}
|
}
|
||||||
|
|
||||||
Player *newp = sObjectMgr.GetPlayer(newname);
|
Player *newp = sObjectMgr.GetPlayer(newname);
|
||||||
if(newp == NULL || !IsOn(newp->GetGUID()))
|
if (newp == NULL || !IsOn(newp->GetObjectGuid()))
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakePlayerNotFound(&data, newname);
|
MakePlayerNotFound(&data, newname);
|
||||||
|
|
@ -404,11 +403,11 @@ void Channel::SetOwner(uint64 p, const char *newname)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
players[newp->GetGUID()].SetModerator(true);
|
m_players[newp->GetObjectGuid()].SetModerator(true);
|
||||||
SetOwner(newp->GetGUID());
|
SetOwner(newp->GetObjectGuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::SendWhoOwner(uint64 p)
|
void Channel::SendWhoOwner(ObjectGuid p)
|
||||||
{
|
{
|
||||||
if (!IsOn(p))
|
if (!IsOn(p))
|
||||||
{
|
{
|
||||||
|
|
@ -426,7 +425,7 @@ void Channel::SendWhoOwner(uint64 p)
|
||||||
|
|
||||||
void Channel::List(Player* player)
|
void Channel::List(Player* player)
|
||||||
{
|
{
|
||||||
uint64 p = player->GetGUID();
|
ObjectGuid p = player->GetObjectGuid();
|
||||||
|
|
||||||
if (!IsOn(p))
|
if (!IsOn(p))
|
||||||
{
|
{
|
||||||
|
|
@ -436,7 +435,7 @@ void Channel::List(Player* player)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_CHANNEL_LIST, 1+(GetName().size()+1)+1+4+players.size()*(8+1));
|
WorldPacket data(SMSG_CHANNEL_LIST, 1+(GetName().size()+1)+1+4+m_players.size()*(8+1));
|
||||||
data << uint8(1); // channel type?
|
data << uint8(1); // channel type?
|
||||||
data << GetName(); // channel name
|
data << GetName(); // channel name
|
||||||
data << uint8(GetFlags()); // channel flags?
|
data << uint8(GetFlags()); // channel flags?
|
||||||
|
|
@ -447,7 +446,7 @@ void Channel::List(Player* player)
|
||||||
AccountTypes gmLevelInWhoList = (AccountTypes)sWorld.getConfig(CONFIG_UINT32_GM_LEVEL_IN_WHO_LIST);
|
AccountTypes gmLevelInWhoList = (AccountTypes)sWorld.getConfig(CONFIG_UINT32_GM_LEVEL_IN_WHO_LIST);
|
||||||
|
|
||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
for(PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
|
for(PlayerList::const_iterator i = m_players.begin(); i != m_players.end(); ++i)
|
||||||
{
|
{
|
||||||
Player *plr = sObjectMgr.GetPlayer(i->first);
|
Player *plr = sObjectMgr.GetPlayer(i->first);
|
||||||
|
|
||||||
|
|
@ -456,7 +455,7 @@ void Channel::List(Player* player)
|
||||||
if (plr && (player->GetSession()->GetSecurity() > SEC_PLAYER || plr->GetSession()->GetSecurity() <= gmLevelInWhoList) &&
|
if (plr && (player->GetSession()->GetSecurity() > SEC_PLAYER || plr->GetSession()->GetSecurity() <= gmLevelInWhoList) &&
|
||||||
plr->IsVisibleGloballyFor(player))
|
plr->IsVisibleGloballyFor(player))
|
||||||
{
|
{
|
||||||
data << uint64(i->first);
|
data << ObjectGuid(i->first);
|
||||||
data << uint8(i->second.flags); // flags seems to be changed...
|
data << uint8(i->second.flags); // flags seems to be changed...
|
||||||
++count;
|
++count;
|
||||||
}
|
}
|
||||||
|
|
@ -468,7 +467,7 @@ void Channel::List(Player* player)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::Announce(uint64 p)
|
void Channel::Announce(ObjectGuid p)
|
||||||
{
|
{
|
||||||
uint32 sec = 0;
|
uint32 sec = 0;
|
||||||
Player *plr = sObjectMgr.GetPlayer(p);
|
Player *plr = sObjectMgr.GetPlayer(p);
|
||||||
|
|
@ -481,7 +480,7 @@ void Channel::Announce(uint64 p)
|
||||||
MakeNotMember(&data);
|
MakeNotMember(&data);
|
||||||
SendToOne(&data, p);
|
SendToOne(&data, p);
|
||||||
}
|
}
|
||||||
else if(!players[p].IsModerator() && sec < SEC_GAMEMASTER)
|
else if (!m_players[p].IsModerator() && sec < SEC_GAMEMASTER)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeNotModerator(&data);
|
MakeNotModerator(&data);
|
||||||
|
|
@ -500,7 +499,7 @@ void Channel::Announce(uint64 p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::Moderate(uint64 p)
|
void Channel::Moderate(ObjectGuid p)
|
||||||
{
|
{
|
||||||
uint32 sec = 0;
|
uint32 sec = 0;
|
||||||
Player *plr = sObjectMgr.GetPlayer(p);
|
Player *plr = sObjectMgr.GetPlayer(p);
|
||||||
|
|
@ -513,7 +512,7 @@ void Channel::Moderate(uint64 p)
|
||||||
MakeNotMember(&data);
|
MakeNotMember(&data);
|
||||||
SendToOne(&data, p);
|
SendToOne(&data, p);
|
||||||
}
|
}
|
||||||
else if(!players[p].IsModerator() && sec < SEC_GAMEMASTER)
|
else if (!m_players[p].IsModerator() && sec < SEC_GAMEMASTER)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeNotModerator(&data);
|
MakeNotModerator(&data);
|
||||||
|
|
@ -532,7 +531,7 @@ void Channel::Moderate(uint64 p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::Say(uint64 p, const char *what, uint32 lang)
|
void Channel::Say(ObjectGuid p, const char *what, uint32 lang)
|
||||||
{
|
{
|
||||||
if (!what)
|
if (!what)
|
||||||
return;
|
return;
|
||||||
|
|
@ -550,13 +549,13 @@ void Channel::Say(uint64 p, const char *what, uint32 lang)
|
||||||
MakeNotMember(&data);
|
MakeNotMember(&data);
|
||||||
SendToOne(&data, p);
|
SendToOne(&data, p);
|
||||||
}
|
}
|
||||||
else if(players[p].IsMuted())
|
else if (m_players[p].IsMuted())
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeMuted(&data);
|
MakeMuted(&data);
|
||||||
SendToOne(&data, p);
|
SendToOne(&data, p);
|
||||||
}
|
}
|
||||||
else if(m_moderate && !players[p].IsModerator() && sec < SEC_GAMEMASTER)
|
else if (m_moderate && !m_players[p].IsModerator() && sec < SEC_GAMEMASTER)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeNotModerator(&data);
|
MakeNotModerator(&data);
|
||||||
|
|
@ -567,21 +566,21 @@ void Channel::Say(uint64 p, const char *what, uint32 lang)
|
||||||
uint32 messageLength = strlen(what) + 1;
|
uint32 messageLength = strlen(what) + 1;
|
||||||
|
|
||||||
WorldPacket data(SMSG_MESSAGECHAT, 1+4+8+4+m_name.size()+1+8+4+messageLength+1);
|
WorldPacket data(SMSG_MESSAGECHAT, 1+4+8+4+m_name.size()+1+8+4+messageLength+1);
|
||||||
data << (uint8)CHAT_MSG_CHANNEL;
|
data << uint8(CHAT_MSG_CHANNEL);
|
||||||
data << (uint32)lang;
|
data << uint32(lang);
|
||||||
data << p; // 2.1.0
|
data << ObjectGuid(p); // 2.1.0
|
||||||
data << uint32(0); // 2.1.0
|
data << uint32(0); // 2.1.0
|
||||||
data << m_name;
|
data << m_name;
|
||||||
data << p;
|
data << ObjectGuid(p);
|
||||||
data << messageLength;
|
data << uint32(messageLength);
|
||||||
data << what;
|
data << what;
|
||||||
data << uint8(plr ? plr->chatTag() : 0);
|
data << uint8(plr ? plr->chatTag() : 0);
|
||||||
|
|
||||||
SendToAll(&data, !players[p].IsModerator() ? p : 0);
|
SendToAll(&data, !m_players[p].IsModerator() ? p : ObjectGuid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::Invite(uint64 p, const char *newname)
|
void Channel::Invite(ObjectGuid p, const char *newname)
|
||||||
{
|
{
|
||||||
if (!IsOn(p))
|
if (!IsOn(p))
|
||||||
{
|
{
|
||||||
|
|
@ -612,10 +611,10 @@ void Channel::Invite(uint64 p, const char *newname)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(IsOn(newp->GetGUID()))
|
if (IsOn(newp->GetObjectGuid()))
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakePlayerAlreadyMember(&data, newp->GetGUID());
|
MakePlayerAlreadyMember(&data, newp->GetObjectGuid());
|
||||||
SendToOne(&data, p);
|
SendToOne(&data, p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -631,39 +630,39 @@ void Channel::Invite(uint64 p, const char *newname)
|
||||||
SendToOne(&data, p);
|
SendToOne(&data, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::SetOwner(uint64 guid, bool exclaim)
|
void Channel::SetOwner(ObjectGuid guid, bool exclaim)
|
||||||
{
|
{
|
||||||
if(m_ownerGUID)
|
if (!m_ownerGuid.IsEmpty())
|
||||||
{
|
{
|
||||||
// [] will re-add player after it possible removed
|
// [] will re-add player after it possible removed
|
||||||
PlayerList::iterator p_itr = players.find(m_ownerGUID);
|
PlayerList::iterator p_itr = m_players.find(m_ownerGuid);
|
||||||
if(p_itr != players.end())
|
if (p_itr != m_players.end())
|
||||||
p_itr->second.SetOwner(false);
|
p_itr->second.SetOwner(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ownerGUID = guid;
|
m_ownerGuid = guid;
|
||||||
if(m_ownerGUID)
|
if (!m_ownerGuid.IsEmpty())
|
||||||
{
|
{
|
||||||
uint8 oldFlag = GetPlayerFlags(m_ownerGUID);
|
uint8 oldFlag = GetPlayerFlags(m_ownerGuid);
|
||||||
players[m_ownerGUID].SetOwner(true);
|
m_players[m_ownerGuid].SetOwner(true);
|
||||||
|
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeModeChange(&data, m_ownerGUID, oldFlag);
|
MakeModeChange(&data, m_ownerGuid, oldFlag);
|
||||||
SendToAll(&data);
|
SendToAll(&data);
|
||||||
|
|
||||||
if(exclaim)
|
if(exclaim)
|
||||||
{
|
{
|
||||||
MakeOwnerChanged(&data, m_ownerGUID);
|
MakeOwnerChanged(&data, m_ownerGuid);
|
||||||
SendToAll(&data);
|
SendToAll(&data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::SendToAll(WorldPacket *data, uint64 p)
|
void Channel::SendToAll(WorldPacket *data, ObjectGuid p)
|
||||||
{
|
{
|
||||||
for(PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
|
for(PlayerList::const_iterator i = m_players.begin(); i != m_players.end(); ++i)
|
||||||
if (Player *plr = sObjectMgr.GetPlayer(i->first))
|
if (Player *plr = sObjectMgr.GetPlayer(i->first))
|
||||||
if(!p || !plr->GetSocial()->HasIgnore(p))
|
if (p.IsEmpty() || !plr->GetSocial()->HasIgnore(p))
|
||||||
plr->GetSession()->SendPacket(data);
|
plr->GetSession()->SendPacket(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -692,17 +691,17 @@ void Channel::MakeNotifyPacket(WorldPacket *data, uint8 notify_type)
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x00
|
// done 0x00
|
||||||
void Channel::MakeJoined(WorldPacket *data, uint64 guid)
|
void Channel::MakeJoined(WorldPacket *data, ObjectGuid guid)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_JOINED_NOTICE);
|
MakeNotifyPacket(data, CHAT_JOINED_NOTICE);
|
||||||
*data << uint64(guid);
|
*data << ObjectGuid(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x01
|
// done 0x01
|
||||||
void Channel::MakeLeft(WorldPacket *data, uint64 guid)
|
void Channel::MakeLeft(WorldPacket *data, ObjectGuid guid)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_LEFT_NOTICE);
|
MakeNotifyPacket(data, CHAT_LEFT_NOTICE);
|
||||||
*data << uint64(guid);
|
*data << ObjectGuid(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x02
|
// done 0x02
|
||||||
|
|
@ -741,17 +740,17 @@ void Channel::MakeNotModerator(WorldPacket *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x07
|
// done 0x07
|
||||||
void Channel::MakePasswordChanged(WorldPacket *data, uint64 guid)
|
void Channel::MakePasswordChanged(WorldPacket *data, ObjectGuid guid)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_PASSWORD_CHANGED_NOTICE);
|
MakeNotifyPacket(data, CHAT_PASSWORD_CHANGED_NOTICE);
|
||||||
*data << uint64(guid);
|
*data << ObjectGuid(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x08
|
// done 0x08
|
||||||
void Channel::MakeOwnerChanged(WorldPacket *data, uint64 guid)
|
void Channel::MakeOwnerChanged(WorldPacket *data, ObjectGuid guid)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_OWNER_CHANGED_NOTICE);
|
MakeNotifyPacket(data, CHAT_OWNER_CHANGED_NOTICE);
|
||||||
*data << uint64(guid);
|
*data << ObjectGuid(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x09
|
// done 0x09
|
||||||
|
|
@ -772,48 +771,48 @@ void Channel::MakeChannelOwner(WorldPacket *data)
|
||||||
{
|
{
|
||||||
std::string name = "";
|
std::string name = "";
|
||||||
|
|
||||||
if(!sObjectMgr.GetPlayerNameByGUID(m_ownerGUID, name) || name.empty())
|
if (!sObjectMgr.GetPlayerNameByGUID(m_ownerGuid, name) || name.empty())
|
||||||
name = "PLAYER_NOT_FOUND";
|
name = "PLAYER_NOT_FOUND";
|
||||||
|
|
||||||
MakeNotifyPacket(data, CHAT_CHANNEL_OWNER_NOTICE);
|
MakeNotifyPacket(data, CHAT_CHANNEL_OWNER_NOTICE);
|
||||||
*data << ((IsConstant() || !m_ownerGUID) ? "Nobody" : name);
|
*data << ((IsConstant() || m_ownerGuid.IsEmpty()) ? "Nobody" : name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x0C
|
// done 0x0C
|
||||||
void Channel::MakeModeChange(WorldPacket *data, uint64 guid, uint8 oldflags)
|
void Channel::MakeModeChange(WorldPacket *data, ObjectGuid guid, uint8 oldflags)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_MODE_CHANGE_NOTICE);
|
MakeNotifyPacket(data, CHAT_MODE_CHANGE_NOTICE);
|
||||||
*data << uint64(guid);
|
*data << ObjectGuid(guid);
|
||||||
*data << uint8(oldflags);
|
*data << uint8(oldflags);
|
||||||
*data << uint8(GetPlayerFlags(guid));
|
*data << uint8(GetPlayerFlags(guid));
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x0D
|
// done 0x0D
|
||||||
void Channel::MakeAnnouncementsOn(WorldPacket *data, uint64 guid)
|
void Channel::MakeAnnouncementsOn(WorldPacket *data, ObjectGuid guid)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_ANNOUNCEMENTS_ON_NOTICE);
|
MakeNotifyPacket(data, CHAT_ANNOUNCEMENTS_ON_NOTICE);
|
||||||
*data << uint64(guid);
|
*data << ObjectGuid(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x0E
|
// done 0x0E
|
||||||
void Channel::MakeAnnouncementsOff(WorldPacket *data, uint64 guid)
|
void Channel::MakeAnnouncementsOff(WorldPacket *data, ObjectGuid guid)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_ANNOUNCEMENTS_OFF_NOTICE);
|
MakeNotifyPacket(data, CHAT_ANNOUNCEMENTS_OFF_NOTICE);
|
||||||
*data << uint64(guid);
|
*data << ObjectGuid(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x0F
|
// done 0x0F
|
||||||
void Channel::MakeModerationOn(WorldPacket *data, uint64 guid)
|
void Channel::MakeModerationOn(WorldPacket *data, ObjectGuid guid)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_MODERATION_ON_NOTICE);
|
MakeNotifyPacket(data, CHAT_MODERATION_ON_NOTICE);
|
||||||
*data << uint64(guid);
|
*data << ObjectGuid(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x10
|
// done 0x10
|
||||||
void Channel::MakeModerationOff(WorldPacket *data, uint64 guid)
|
void Channel::MakeModerationOff(WorldPacket *data, ObjectGuid guid)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_MODERATION_OFF_NOTICE);
|
MakeNotifyPacket(data, CHAT_MODERATION_OFF_NOTICE);
|
||||||
*data << uint64(guid);
|
*data << ObjectGuid(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x11
|
// done 0x11
|
||||||
|
|
@ -823,11 +822,11 @@ void Channel::MakeMuted(WorldPacket *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x12
|
// done 0x12
|
||||||
void Channel::MakePlayerKicked(WorldPacket *data, uint64 bad, uint64 good)
|
void Channel::MakePlayerKicked(WorldPacket *data, ObjectGuid bad, ObjectGuid good)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_PLAYER_KICKED_NOTICE);
|
MakeNotifyPacket(data, CHAT_PLAYER_KICKED_NOTICE);
|
||||||
*data << uint64(bad);
|
*data << ObjectGuid(bad);
|
||||||
*data << uint64(good);
|
*data << ObjectGuid(good);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x13
|
// done 0x13
|
||||||
|
|
@ -837,40 +836,40 @@ void Channel::MakeBanned(WorldPacket *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x14
|
// done 0x14
|
||||||
void Channel::MakePlayerBanned(WorldPacket *data, uint64 bad, uint64 good)
|
void Channel::MakePlayerBanned(WorldPacket *data, ObjectGuid bad, ObjectGuid good)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_PLAYER_BANNED_NOTICE);
|
MakeNotifyPacket(data, CHAT_PLAYER_BANNED_NOTICE);
|
||||||
*data << uint64(bad);
|
*data << ObjectGuid(bad);
|
||||||
*data << uint64(good);
|
*data << ObjectGuid(good);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x15
|
// done 0x15
|
||||||
void Channel::MakePlayerUnbanned(WorldPacket *data, uint64 bad, uint64 good)
|
void Channel::MakePlayerUnbanned(WorldPacket *data, ObjectGuid bad, ObjectGuid good)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_PLAYER_UNBANNED_NOTICE);
|
MakeNotifyPacket(data, CHAT_PLAYER_UNBANNED_NOTICE);
|
||||||
*data << uint64(bad);
|
*data << ObjectGuid(bad);
|
||||||
*data << uint64(good);
|
*data << ObjectGuid(good);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x16
|
// done 0x16
|
||||||
void Channel::MakePlayerNotBanned(WorldPacket *data, uint64 guid)
|
void Channel::MakePlayerNotBanned(WorldPacket *data, ObjectGuid guid)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_PLAYER_NOT_BANNED_NOTICE);
|
MakeNotifyPacket(data, CHAT_PLAYER_NOT_BANNED_NOTICE);
|
||||||
*data << uint64(guid); // should be string!!
|
*data << ObjectGuid(guid); // should be string!!
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x17
|
// done 0x17
|
||||||
void Channel::MakePlayerAlreadyMember(WorldPacket *data, uint64 guid)
|
void Channel::MakePlayerAlreadyMember(WorldPacket *data, ObjectGuid guid)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_PLAYER_ALREADY_MEMBER_NOTICE);
|
MakeNotifyPacket(data, CHAT_PLAYER_ALREADY_MEMBER_NOTICE);
|
||||||
*data << uint64(guid);
|
*data << ObjectGuid(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x18
|
// done 0x18
|
||||||
void Channel::MakeInvite(WorldPacket *data, uint64 guid)
|
void Channel::MakeInvite(WorldPacket *data, ObjectGuid guid)
|
||||||
{
|
{
|
||||||
MakeNotifyPacket(data, CHAT_INVITE_NOTICE);
|
MakeNotifyPacket(data, CHAT_INVITE_NOTICE);
|
||||||
*data << uint64(guid);
|
*data << ObjectGuid(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x19
|
// done 0x19
|
||||||
|
|
@ -943,7 +942,7 @@ void Channel::MakeVoiceOff(WorldPacket *data, uint64 guid)
|
||||||
*data << uint64(guid);
|
*data << uint64(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::JoinNotify(uint64 guid)
|
void Channel::JoinNotify(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
|
|
||||||
|
|
@ -952,7 +951,7 @@ void Channel::JoinNotify(uint64 guid)
|
||||||
else
|
else
|
||||||
data.Initialize(SMSG_USERLIST_UPDATE, 8+1+1+4+GetName().size()+1);
|
data.Initialize(SMSG_USERLIST_UPDATE, 8+1+1+4+GetName().size()+1);
|
||||||
|
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
data << uint8(GetPlayerFlags(guid));
|
data << uint8(GetPlayerFlags(guid));
|
||||||
data << uint8(GetFlags());
|
data << uint8(GetFlags());
|
||||||
data << uint32(GetNumPlayers());
|
data << uint32(GetNumPlayers());
|
||||||
|
|
@ -960,10 +959,10 @@ void Channel::JoinNotify(uint64 guid)
|
||||||
SendToAll(&data);
|
SendToAll(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::LeaveNotify(uint64 guid)
|
void Channel::LeaveNotify(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_USERLIST_REMOVE, 8+1+4+GetName().size()+1);
|
WorldPacket data(SMSG_USERLIST_REMOVE, 8+1+4+GetName().size()+1);
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
data << uint8(GetFlags());
|
data << uint8(GetFlags());
|
||||||
data << uint32(GetNumPlayers());
|
data << uint32(GetNumPlayers());
|
||||||
data << GetName();
|
data << GetName();
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ class Channel
|
||||||
|
|
||||||
struct PlayerInfo
|
struct PlayerInfo
|
||||||
{
|
{
|
||||||
uint64 player;
|
ObjectGuid player;
|
||||||
uint8 flags;
|
uint8 flags;
|
||||||
|
|
||||||
bool HasFlag(uint8 flag) { return flags & flag; }
|
bool HasFlag(uint8 flag) { return flags & flag; }
|
||||||
|
|
@ -156,64 +156,64 @@ class Channel
|
||||||
std::string GetPassword() const { return m_password; }
|
std::string GetPassword() const { return m_password; }
|
||||||
void SetPassword(const std::string& npassword) { m_password = npassword; }
|
void SetPassword(const std::string& npassword) { m_password = npassword; }
|
||||||
void SetAnnounce(bool nannounce) { m_announce = nannounce; }
|
void SetAnnounce(bool nannounce) { m_announce = nannounce; }
|
||||||
uint32 GetNumPlayers() const { return players.size(); }
|
uint32 GetNumPlayers() const { return m_players.size(); }
|
||||||
uint8 GetFlags() const { return m_flags; }
|
uint8 GetFlags() const { return m_flags; }
|
||||||
bool HasFlag(uint8 flag) { return m_flags & flag; }
|
bool HasFlag(uint8 flag) { return m_flags & flag; }
|
||||||
|
|
||||||
void Join(uint64 p, const char *pass);
|
void Join(ObjectGuid p, const char *pass);
|
||||||
void Leave(uint64 p, bool send = true);
|
void Leave(ObjectGuid p, bool send = true);
|
||||||
void KickOrBan(uint64 good, const char *badname, bool ban);
|
void KickOrBan(ObjectGuid good, const char *badname, bool ban);
|
||||||
void Kick(uint64 good, const char *badname) { KickOrBan(good, badname, false); }
|
void Kick(ObjectGuid good, const char *badname) { KickOrBan(good, badname, false); }
|
||||||
void Ban(uint64 good, const char *badname) { KickOrBan(good, badname, true); }
|
void Ban(ObjectGuid good, const char *badname) { KickOrBan(good, badname, true); }
|
||||||
void UnBan(uint64 good, const char *badname);
|
void UnBan(ObjectGuid good, const char *badname);
|
||||||
void Password(uint64 p, const char *pass);
|
void Password(ObjectGuid p, const char *pass);
|
||||||
void SetMode(uint64 p, const char *p2n, bool mod, bool set);
|
void SetMode(ObjectGuid p, const char *p2n, bool mod, bool set);
|
||||||
void SetOwner(uint64 p, bool exclaim = true);
|
void SetOwner(ObjectGuid p, bool exclaim = true);
|
||||||
void SetOwner(uint64 p, const char *newname);
|
void SetOwner(ObjectGuid p, const char *newname);
|
||||||
void SendWhoOwner(uint64 p);
|
void SendWhoOwner(ObjectGuid p);
|
||||||
void SetModerator(uint64 p, const char *newname) { SetMode(p, newname, true, true); }
|
void SetModerator(ObjectGuid p, const char *newname) { SetMode(p, newname, true, true); }
|
||||||
void UnsetModerator(uint64 p, const char *newname) { SetMode(p, newname, true, false); }
|
void UnsetModerator(ObjectGuid p, const char *newname) { SetMode(p, newname, true, false); }
|
||||||
void SetMute(uint64 p, const char *newname) { SetMode(p, newname, false, true); }
|
void SetMute(ObjectGuid p, const char *newname) { SetMode(p, newname, false, true); }
|
||||||
void UnsetMute(uint64 p, const char *newname) { SetMode(p, newname, false, false); }
|
void UnsetMute(ObjectGuid p, const char *newname) { SetMode(p, newname, false, false); }
|
||||||
void List(Player* p);
|
void List(Player* p);
|
||||||
void Announce(uint64 p);
|
void Announce(ObjectGuid p);
|
||||||
void Moderate(uint64 p);
|
void Moderate(ObjectGuid p);
|
||||||
void Say(uint64 p, const char *what, uint32 lang);
|
void Say(ObjectGuid p, const char *what, uint32 lang);
|
||||||
void Invite(uint64 p, const char *newp);
|
void Invite(ObjectGuid p, const char *newp);
|
||||||
void Voice(uint64 guid1, uint64 guid2);
|
void Voice(uint64 guid1, uint64 guid2);
|
||||||
void DeVoice(uint64 guid1, uint64 guid2);
|
void DeVoice(uint64 guid1, uint64 guid2);
|
||||||
void JoinNotify(uint64 guid); // invisible notify
|
void JoinNotify(ObjectGuid guid); // invisible notify
|
||||||
void LeaveNotify(uint64 guid); // invisible notify
|
void LeaveNotify(ObjectGuid guid); // invisible notify
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// initial packet data (notify type and channel name)
|
// initial packet data (notify type and channel name)
|
||||||
void MakeNotifyPacket(WorldPacket *data, uint8 notify_type);
|
void MakeNotifyPacket(WorldPacket *data, uint8 notify_type);
|
||||||
// type specific packet data
|
// type specific packet data
|
||||||
void MakeJoined(WorldPacket *data, uint64 guid); //+ 0x00
|
void MakeJoined(WorldPacket *data, ObjectGuid guid); //+ 0x00
|
||||||
void MakeLeft(WorldPacket *data, uint64 guid); //+ 0x01
|
void MakeLeft(WorldPacket *data, ObjectGuid guid); //+ 0x01
|
||||||
void MakeYouJoined(WorldPacket *data); //+ 0x02
|
void MakeYouJoined(WorldPacket *data); //+ 0x02
|
||||||
void MakeYouLeft(WorldPacket *data); //+ 0x03
|
void MakeYouLeft(WorldPacket *data); //+ 0x03
|
||||||
void MakeWrongPassword(WorldPacket *data); //? 0x04
|
void MakeWrongPassword(WorldPacket *data); //? 0x04
|
||||||
void MakeNotMember(WorldPacket *data); //? 0x05
|
void MakeNotMember(WorldPacket *data); //? 0x05
|
||||||
void MakeNotModerator(WorldPacket *data); //? 0x06
|
void MakeNotModerator(WorldPacket *data); //? 0x06
|
||||||
void MakePasswordChanged(WorldPacket *data, uint64 guid); //+ 0x07
|
void MakePasswordChanged(WorldPacket *data, ObjectGuid guid); //+ 0x07
|
||||||
void MakeOwnerChanged(WorldPacket *data, uint64 guid); //? 0x08
|
void MakeOwnerChanged(WorldPacket *data, ObjectGuid guid); //? 0x08
|
||||||
void MakePlayerNotFound(WorldPacket *data, const std::string& name); //+ 0x09
|
void MakePlayerNotFound(WorldPacket *data, const std::string& name); //+ 0x09
|
||||||
void MakeNotOwner(WorldPacket *data); //? 0x0A
|
void MakeNotOwner(WorldPacket *data); //? 0x0A
|
||||||
void MakeChannelOwner(WorldPacket *data); //? 0x0B
|
void MakeChannelOwner(WorldPacket *data); //? 0x0B
|
||||||
void MakeModeChange(WorldPacket *data, uint64 guid, uint8 oldflags); //+ 0x0C
|
void MakeModeChange(WorldPacket *data, ObjectGuid guid, uint8 oldflags);//+ 0x0C
|
||||||
void MakeAnnouncementsOn(WorldPacket *data, uint64 guid); //+ 0x0D
|
void MakeAnnouncementsOn(WorldPacket *data, ObjectGuid guid); //+ 0x0D
|
||||||
void MakeAnnouncementsOff(WorldPacket *data, uint64 guid); //+ 0x0E
|
void MakeAnnouncementsOff(WorldPacket *data, ObjectGuid guid); //+ 0x0E
|
||||||
void MakeModerationOn(WorldPacket *data, uint64 guid); //+ 0x0F
|
void MakeModerationOn(WorldPacket *data, ObjectGuid guid); //+ 0x0F
|
||||||
void MakeModerationOff(WorldPacket *data, uint64 guid); //+ 0x10
|
void MakeModerationOff(WorldPacket *data, ObjectGuid guid); //+ 0x10
|
||||||
void MakeMuted(WorldPacket *data); //? 0x11
|
void MakeMuted(WorldPacket *data); //? 0x11
|
||||||
void MakePlayerKicked(WorldPacket *data, uint64 bad, uint64 good); //? 0x12
|
void MakePlayerKicked(WorldPacket *data, ObjectGuid bad, ObjectGuid good);//? 0x12
|
||||||
void MakeBanned(WorldPacket *data); //? 0x13
|
void MakeBanned(WorldPacket *data); //? 0x13
|
||||||
void MakePlayerBanned(WorldPacket *data, uint64 bad, uint64 good); //? 0x14
|
void MakePlayerBanned(WorldPacket *data, ObjectGuid bad, ObjectGuid good);//? 0x14
|
||||||
void MakePlayerUnbanned(WorldPacket *data, uint64 bad, uint64 good); //? 0x15
|
void MakePlayerUnbanned(WorldPacket *data, ObjectGuid bad, ObjectGuid good);//? 0x15
|
||||||
void MakePlayerNotBanned(WorldPacket *data, uint64 guid); //? 0x16
|
void MakePlayerNotBanned(WorldPacket *data, ObjectGuid guid); //? 0x16
|
||||||
void MakePlayerAlreadyMember(WorldPacket *data, uint64 guid); //+ 0x17
|
void MakePlayerAlreadyMember(WorldPacket *data, ObjectGuid guid); //+ 0x17
|
||||||
void MakeInvite(WorldPacket *data, uint64 guid); //? 0x18
|
void MakeInvite(WorldPacket *data, ObjectGuid guid); //? 0x18
|
||||||
void MakeInviteWrongFaction(WorldPacket *data); //? 0x19
|
void MakeInviteWrongFaction(WorldPacket *data); //? 0x19
|
||||||
void MakeWrongFaction(WorldPacket *data); //? 0x1A
|
void MakeWrongFaction(WorldPacket *data); //? 0x1A
|
||||||
void MakeInvalidName(WorldPacket *data); //? 0x1B
|
void MakeInvalidName(WorldPacket *data); //? 0x1B
|
||||||
|
|
@ -226,27 +226,27 @@ class Channel
|
||||||
void MakeVoiceOn(WorldPacket *data, uint64 guid); //+ 0x22
|
void MakeVoiceOn(WorldPacket *data, uint64 guid); //+ 0x22
|
||||||
void MakeVoiceOff(WorldPacket *data, uint64 guid); //+ 0x23
|
void MakeVoiceOff(WorldPacket *data, uint64 guid); //+ 0x23
|
||||||
|
|
||||||
void SendToAll(WorldPacket *data, uint64 p = 0);
|
void SendToAll(WorldPacket *data, ObjectGuid p = ObjectGuid());
|
||||||
void SendToOne(WorldPacket *data, ObjectGuid who);
|
void SendToOne(WorldPacket *data, ObjectGuid who);
|
||||||
|
|
||||||
bool IsOn(uint64 who) const { return players.find(who) != players.end(); }
|
bool IsOn(ObjectGuid who) const { return m_players.find(who) != m_players.end(); }
|
||||||
bool IsBanned(uint64 guid) const { return banned.find(guid) != banned.end(); }
|
bool IsBanned(ObjectGuid guid) const { return m_banned.find(guid) != m_banned.end(); }
|
||||||
|
|
||||||
uint8 GetPlayerFlags(uint64 p) const
|
uint8 GetPlayerFlags(ObjectGuid p) const
|
||||||
{
|
{
|
||||||
PlayerList::const_iterator p_itr = players.find(p);
|
PlayerList::const_iterator p_itr = m_players.find(p);
|
||||||
if(p_itr == players.end())
|
if (p_itr == m_players.end())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return p_itr->second.flags;
|
return p_itr->second.flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetModerator(uint64 p, bool set)
|
void SetModerator(ObjectGuid p, bool set)
|
||||||
{
|
{
|
||||||
if(players[p].IsModerator() != set)
|
if (m_players[p].IsModerator() != set)
|
||||||
{
|
{
|
||||||
uint8 oldFlag = GetPlayerFlags(p);
|
uint8 oldFlag = GetPlayerFlags(p);
|
||||||
players[p].SetModerator(set);
|
m_players[p].SetModerator(set);
|
||||||
|
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeModeChange(&data, p, oldFlag);
|
MakeModeChange(&data, p, oldFlag);
|
||||||
|
|
@ -254,12 +254,12 @@ class Channel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMute(uint64 p, bool set)
|
void SetMute(ObjectGuid p, bool set)
|
||||||
{
|
{
|
||||||
if(players[p].IsMuted() != set)
|
if (m_players[p].IsMuted() != set)
|
||||||
{
|
{
|
||||||
uint8 oldFlag = GetPlayerFlags(p);
|
uint8 oldFlag = GetPlayerFlags(p);
|
||||||
players[p].SetMuted(set);
|
m_players[p].SetMuted(set);
|
||||||
|
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
MakeModeChange(&data, p, oldFlag);
|
MakeModeChange(&data, p, oldFlag);
|
||||||
|
|
@ -274,11 +274,11 @@ class Channel
|
||||||
std::string m_password;
|
std::string m_password;
|
||||||
uint8 m_flags;
|
uint8 m_flags;
|
||||||
uint32 m_channelId;
|
uint32 m_channelId;
|
||||||
uint64 m_ownerGUID;
|
ObjectGuid m_ownerGuid;
|
||||||
|
|
||||||
typedef std::map<uint64, PlayerInfo> PlayerList;
|
typedef std::map<ObjectGuid, PlayerInfo> PlayerList;
|
||||||
PlayerList players;
|
PlayerList m_players;
|
||||||
typedef std::set<uint64> BannedList;
|
typedef std::set<ObjectGuid> BannedList;
|
||||||
BannedList banned;
|
BannedList m_banned;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ void WorldSession::HandleJoinChannelOpcode(WorldPacket& recvPacket)
|
||||||
recvPacket >> pass;
|
recvPacket >> pass;
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetJoinChannel(channelname, channel_id))
|
if(Channel *chn = cMgr->GetJoinChannel(channelname, channel_id))
|
||||||
chn->Join(_player->GetGUID(), pass.c_str());
|
chn->Join(_player->GetObjectGuid(), pass.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleLeaveChannelOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleLeaveChannelOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -55,7 +55,7 @@ void WorldSession::HandleLeaveChannelOpcode(WorldPacket& recvPacket)
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
{
|
{
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->Leave(_player->GetGUID(), true);
|
chn->Leave(_player->GetObjectGuid(), true);
|
||||||
cMgr->LeftChannel(channelname);
|
cMgr->LeftChannel(channelname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -83,7 +83,7 @@ void WorldSession::HandleChannelPasswordOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->Password(_player->GetGUID(), pass.c_str());
|
chn->Password(_player->GetObjectGuid(), pass.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelSetOwnerOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleChannelSetOwnerOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -100,7 +100,7 @@ void WorldSession::HandleChannelSetOwnerOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->SetOwner(_player->GetGUID(), newp.c_str());
|
chn->SetOwner(_player->GetObjectGuid(), newp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelOwnerOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleChannelOwnerOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -111,7 +111,7 @@ void WorldSession::HandleChannelOwnerOpcode(WorldPacket& recvPacket)
|
||||||
recvPacket >> channelname;
|
recvPacket >> channelname;
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->SendWhoOwner(_player->GetGUID());
|
chn->SendWhoOwner(_player->GetObjectGuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelModeratorOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleChannelModeratorOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -128,7 +128,7 @@ void WorldSession::HandleChannelModeratorOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->SetModerator(_player->GetGUID(), otp.c_str());
|
chn->SetModerator(_player->GetObjectGuid(), otp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelUnmoderatorOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleChannelUnmoderatorOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -145,7 +145,7 @@ void WorldSession::HandleChannelUnmoderatorOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->UnsetModerator(_player->GetGUID(), otp.c_str());
|
chn->UnsetModerator(_player->GetObjectGuid(), otp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelMuteOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleChannelMuteOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -162,7 +162,7 @@ void WorldSession::HandleChannelMuteOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->SetMute(_player->GetGUID(), otp.c_str());
|
chn->SetMute(_player->GetObjectGuid(), otp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelUnmuteOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleChannelUnmuteOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -180,7 +180,7 @@ void WorldSession::HandleChannelUnmuteOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->UnsetMute(_player->GetGUID(), otp.c_str());
|
chn->UnsetMute(_player->GetObjectGuid(), otp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelInviteOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleChannelInviteOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -197,7 +197,7 @@ void WorldSession::HandleChannelInviteOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->Invite(_player->GetGUID(), otp.c_str());
|
chn->Invite(_player->GetObjectGuid(), otp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelKickOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleChannelKickOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -213,7 +213,7 @@ void WorldSession::HandleChannelKickOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->Kick(_player->GetGUID(), otp.c_str());
|
chn->Kick(_player->GetObjectGuid(), otp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelBanOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleChannelBanOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -230,7 +230,7 @@ void WorldSession::HandleChannelBanOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->Ban(_player->GetGUID(), otp.c_str());
|
chn->Ban(_player->GetObjectGuid(), otp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelUnbanOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleChannelUnbanOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -248,7 +248,7 @@ void WorldSession::HandleChannelUnbanOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->UnBan(_player->GetGUID(), otp.c_str());
|
chn->UnBan(_player->GetObjectGuid(), otp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelAnnouncementsOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleChannelAnnouncementsOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -259,7 +259,7 @@ void WorldSession::HandleChannelAnnouncementsOpcode(WorldPacket& recvPacket)
|
||||||
recvPacket >> channelname;
|
recvPacket >> channelname;
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->Announce(_player->GetGUID());
|
chn->Announce(_player->GetObjectGuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelModerateOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleChannelModerateOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -270,7 +270,7 @@ void WorldSession::HandleChannelModerateOpcode(WorldPacket& recvPacket)
|
||||||
recvPacket >> channelname;
|
recvPacket >> channelname;
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
if(Channel *chn = cMgr->GetChannel(channelname, _player))
|
||||||
chn->Moderate(_player->GetGUID());
|
chn->Moderate(_player->GetObjectGuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleChannelDisplayListQueryOpcode(WorldPacket &recvPacket)
|
void WorldSession::HandleChannelDisplayListQueryOpcode(WorldPacket &recvPacket)
|
||||||
|
|
|
||||||
|
|
@ -444,7 +444,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
||||||
|
|
||||||
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
if(ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
|
||||||
if(Channel *chn = cMgr->GetChannel(channel, _player))
|
if(Channel *chn = cMgr->GetChannel(channel, _player))
|
||||||
chn->Say(_player->GetGUID(), msg.c_str(), lang);
|
chn->Say(_player->GetObjectGuid(), msg.c_str(), lang);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case CHAT_MSG_AFK:
|
case CHAT_MSG_AFK:
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ class MANGOS_DLL_SPEC Object
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectGuid const& GetObjectGuid() const { return GetGuidValue(OBJECT_FIELD_GUID); }
|
ObjectGuid const& GetObjectGuid() const { return GetGuidValue(OBJECT_FIELD_GUID); }
|
||||||
const uint64& GetGUID() const { return GetUInt64Value(OBJECT_FIELD_GUID); }
|
const uint64& GetGUID() const { return GetUInt64Value(OBJECT_FIELD_GUID); } // DEPRICATED, not use, will removed soon
|
||||||
uint32 GetGUIDLow() const { return GetObjectGuid().GetCounter(); }
|
uint32 GetGUIDLow() const { return GetObjectGuid().GetCounter(); }
|
||||||
PackedGuid const& GetPackGUID() const { return m_PackGUID; }
|
PackedGuid const& GetPackGUID() const { return m_PackGUID; }
|
||||||
std::string GetGuidStr() const { return GetObjectGuid().GetString(); }
|
std::string GetGuidStr() const { return GetObjectGuid().GetString(); }
|
||||||
|
|
|
||||||
|
|
@ -4925,7 +4925,7 @@ void Player::CleanupChannels()
|
||||||
{
|
{
|
||||||
Channel* ch = *m_channels.begin();
|
Channel* ch = *m_channels.begin();
|
||||||
m_channels.erase(m_channels.begin()); // remove from player's channel list
|
m_channels.erase(m_channels.begin()); // remove from player's channel list
|
||||||
ch->Leave(GetGUID(), false); // not send to client, not remove from player's channel list
|
ch->Leave(GetObjectGuid(), false); // not send to client, not remove from player's channel list
|
||||||
if (ChannelMgr* cMgr = channelMgr(GetTeam()))
|
if (ChannelMgr* cMgr = channelMgr(GetTeam()))
|
||||||
cMgr->LeftChannel(ch->GetName()); // deleted channel if empty
|
cMgr->LeftChannel(ch->GetName()); // deleted channel if empty
|
||||||
|
|
||||||
|
|
@ -4970,10 +4970,10 @@ void Player::UpdateLocalChannels(uint32 newZone )
|
||||||
|
|
||||||
if ((*i)!=new_channel)
|
if ((*i)!=new_channel)
|
||||||
{
|
{
|
||||||
new_channel->Join(GetGUID(),""); // will output Changed Channel: N. Name
|
new_channel->Join(GetObjectGuid(),""); // will output Changed Channel: N. Name
|
||||||
|
|
||||||
// leave old channel
|
// leave old channel
|
||||||
(*i)->Leave(GetGUID(),false); // not send leave channel, it already replaced at client
|
(*i)->Leave(GetObjectGuid(),false); // not send leave channel, it already replaced at client
|
||||||
std::string name = (*i)->GetName(); // store name, (*i)erase in LeftChannel
|
std::string name = (*i)->GetName(); // store name, (*i)erase in LeftChannel
|
||||||
LeftChannel(*i); // remove from player's channel list
|
LeftChannel(*i); // remove from player's channel list
|
||||||
cMgr->LeftChannel(name); // delete if empty
|
cMgr->LeftChannel(name); // delete if empty
|
||||||
|
|
@ -4988,7 +4988,7 @@ void Player::LeaveLFGChannel()
|
||||||
{
|
{
|
||||||
if ((*i)->IsLFG())
|
if ((*i)->IsLFG())
|
||||||
{
|
{
|
||||||
(*i)->Leave(GetGUID());
|
(*i)->Leave(GetObjectGuid());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -19907,7 +19907,7 @@ void Player::UpdateVisibilityOf(WorldObject const* viewPoint, WorldObject* targe
|
||||||
template<class T>
|
template<class T>
|
||||||
inline void UpdateVisibilityOf_helper(ObjectGuidSet& s64, T* target)
|
inline void UpdateVisibilityOf_helper(ObjectGuidSet& s64, T* target)
|
||||||
{
|
{
|
||||||
s64.insert(target->GetGUID());
|
s64.insert(target->GetObjectGuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11467"
|
#define REVISION_NR "11468"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue