Skip to content

Commit

Permalink
[11005] Remove unused function from channel code. Some other cleanups…
Browse files Browse the repository at this point in the history
….t_id
  • Loading branch information
VladimirMangos committed Jan 14, 2011
1 parent 1e5deec commit a9b936e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
25 changes: 3 additions & 22 deletions src/game/Channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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);
}

Expand Down
1 change: 0 additions & 1 deletion src/game/Channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11004"
#define REVISION_NR "11005"
#endif // __REVISION_NR_H__

0 comments on commit a9b936e

Please sign in to comment.