Hi all,
Took a little work but I got it working. Also, allows for all the other channels to be supported when the server is ready.
Chris - Phyasoft.com
Text Emotes - Fix included
Forum rules
Before posting on this forum, be sure to read the Terms of Use
Before posting on this forum, be sure to read the Terms of Use
Text Emotes - Fix included
Last edited by chaoscode on Wed Jan 14, 2015 8:26 pm, edited 2 times in total.
Ads
Re: Text Emotes
Okay here it is.
In Objects.cs rename the function Say to SendText as shown below
Next in CommandMgr.cs add this line under PlayerSay as shown below
Next you want to edit CommandMgr.cs again and edit the line with "/emote" in it and change the first null to the name of the function that handles the /emote command as shown below
Finally update All the calls from .Say to .SendText
This also fixes ALL the other chat types, they just need to be addedin the CommandMgr.cs
In Objects.cs rename the function Say to SendText as shown below
Code: Select all
public virtual void SendText(string Msg, SystemData.ChatLogFilters Filter)
{
if (Msg == null || Msg.Length == 0)
return;
foreach (Player Plr in _PlayerRanged.ToArray())
{
if (Plr.GmLevel != 0 || GetPlayer().GmLevel != 0 || Program.Config.ChatBetweenRealms || Plr.Realm == GetPlayer().Realm)
Plr.SendMessage(this, Msg, Filter);
}
if (IsPlayer())
GetPlayer().SendMessage(this, Msg, Filter);
}
Code: Select all
#region Tchat
static public void PlayerSay(Player Plr, string Text) { if (!Plr.IsDead) Plr.SendText(Text, SystemData.ChatLogFilters.CHATLOGFILTERS_SAY); }
static public void PlayerEmote(Player Plr, string Text) { if (!Plr.IsDead) Plr.SendText(Text, SystemData.ChatLogFilters.CHATLOGFILTERS_EMOTE); }
static public void PlayerWisp(Player Plr, string Text)
Next you want to edit CommandMgr.cs again and edit the line with "/emote" in it and change the first null to the name of the function that handles the /emote command as shown below
Code: Select all
new CommandHandler("/duelcancel", null, null ),
new CommandHandler("/duelsurrender", null, null ),
new CommandHandler("/emote", PlayerEmote,null),
new CommandHandler("::", null, null ),
new CommandHandler("/emotelist", null, null ),
This also fixes ALL the other chat types, they just need to be addedin the CommandMgr.cs
Re: Text Emotes - Fix included
You mean if I typ /emote nods. it will say:
Manfred nods.
Manfred nods.
Sergeant-Major Drengk Burloksson, RR 85 Sniper
Hulfdan Irongrip, RR 81 Ironbreaker
Proud Founder of the 3rd Bitterstone Thunderers
Alliance officer of the Grand Alliance
Re: Text Emotes - Fix included
Kragg wrote:You mean if I typ /emote nods. it will say:
Manfred nods.
Correct
Who is online
Users browsing this forum: No registered users and 31 guests