mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11005] Remove unused function from channel code. Some other cleanups.t_id
This commit is contained in:
parent
8d62e9dbf7
commit
c8fe77f8ca
3 changed files with 4 additions and 24 deletions
|
|
@ -579,7 +579,7 @@ void Channel::Say(uint64 p, const char *what, uint32 lang)
|
|||
data << what;
|
||||
data << uint8(plr ? plr->chatTag() : 0);
|
||||
|
||||
SendToAll(&data, !players[p].IsModerator() ? p : false);
|
||||
SendToAll(&data, !players[p].IsModerator() ? p : 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -664,33 +664,14 @@ void Channel::SetOwner(uint64 guid, bool exclaim)
|
|||
void Channel::SendToAll(WorldPacket *data, uint64 p)
|
||||
{
|
||||
for(PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
|
||||
{
|
||||
Player *plr = sObjectMgr.GetPlayer(i->first);
|
||||
if(plr)
|
||||
{
|
||||
if (Player *plr = sObjectMgr.GetPlayer(i->first))
|
||||
if(!p || !plr->GetSocial()->HasIgnore(p))
|
||||
plr->GetSession()->SendPacket(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Channel::SendToAllButOne(WorldPacket *data, uint64 who)
|
||||
{
|
||||
for(PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
|
||||
{
|
||||
if(i->first != who)
|
||||
{
|
||||
Player *plr = sObjectMgr.GetPlayer(i->first);
|
||||
if(plr)
|
||||
plr->GetSession()->SendPacket(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Channel::SendToOne(WorldPacket *data, uint64 who)
|
||||
{
|
||||
Player *plr = sObjectMgr.GetPlayer(who);
|
||||
if(plr)
|
||||
if (Player *plr = sObjectMgr.GetPlayer(who))
|
||||
plr->GetSession()->SendPacket(data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,6 @@ class Channel
|
|||
void MakeVoiceOff(WorldPacket *data, uint64 guid); //+ 0x23
|
||||
|
||||
void SendToAll(WorldPacket *data, uint64 p = 0);
|
||||
void SendToAllButOne(WorldPacket *data, uint64 who);
|
||||
void SendToOne(WorldPacket *data, uint64 who);
|
||||
|
||||
bool IsOn(uint64 who) const { return players.find(who) != players.end(); }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11004"
|
||||
#define REVISION_NR "11005"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue