Skip to content

Instantly share code, notes, and snippets.

@SymbolixDEV
Created May 14, 2013 15:52
Show Gist options
  • Save SymbolixDEV/5577047 to your computer and use it in GitHub Desktop.
Save SymbolixDEV/5577047 to your computer and use it in GitHub Desktop.
Channel Faction
//by SymbolixDEV
//Fixed Error : Elflock
#include "ScriptPCH.h"
#include "Channel.h"
#include "Player.h"
#include <sstream>
class channel_factions : public PlayerScript
{
public:
channel_factions() : PlayerScript("channel_factions"){}
void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Channel* channel )
{
if (!player || !channel)
return;
std::stringstream ssMsg;
ssMsg << ((player->GetTeam() == HORDE) ? "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18:-3:-3|t" : "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18:-3:-3|t") << msg;
msg = ssMsg.str();
}
};
void AddSC_channel_factions()
{
new channel_factions();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment