aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/Chat/Channels/ChannelMgr.cpp8
-rw-r--r--src/server/game/Chat/Channels/ChannelMgr.h11
2 files changed, 6 insertions, 13 deletions
diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp
index 00824ae2056..95ed8834010 100644
--- a/src/server/game/Chat/Channels/ChannelMgr.cpp
+++ b/src/server/game/Chat/Channels/ChannelMgr.cpp
@@ -28,14 +28,16 @@ ChannelMgr::~ChannelMgr()
ChannelMgr* ChannelMgr::forTeam(uint32 team)
{
+ static ChannelMgr allianceChannelMgr;
+ static ChannelMgr hordeChannelMgr;
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
- return AllianceChannelMgr::instance(); // cross-faction
+ return &allianceChannelMgr; // cross-faction
if (team == ALLIANCE)
- return AllianceChannelMgr::instance();
+ return &allianceChannelMgr;
if (team == HORDE)
- return HordeChannelMgr::instance();
+ return &hordeChannelMgr;
return NULL;
}
diff --git a/src/server/game/Chat/Channels/ChannelMgr.h b/src/server/game/Chat/Channels/ChannelMgr.h
index f3ca9694176..fb93af2c310 100644
--- a/src/server/game/Chat/Channels/ChannelMgr.h
+++ b/src/server/game/Chat/Channels/ChannelMgr.h
@@ -35,13 +35,7 @@ class ChannelMgr
~ChannelMgr();
public:
- static ChannelMgr* instance()
- {
- static ChannelMgr instance;
- return &instance;
- }
-
- static ChannelMgr * forTeam(uint32 team);
+ static ChannelMgr* forTeam(uint32 team);
void setTeam(uint32 newTeam) { team = newTeam; }
Channel* GetJoinChannel(std::string const& name, uint32 channel_id);
@@ -55,7 +49,4 @@ class ChannelMgr
void MakeNotOnPacket(WorldPacket* data, std::string const& name);
};
-class AllianceChannelMgr : public ChannelMgr { };
-class HordeChannelMgr : public ChannelMgr { };
-
#endif