Text Emotes - Fix included

Discuss the development of the server, emulator, and related services.
Get the latest updates on new features and upcoming changes to Return of Reckoning.
Forum rules
Before posting on this forum, be sure to read the Terms of Service, Privacy Policy and Code of Conduct
User avatar
chaoscode
Posts: 202

Text Emotes - Fix included

Post#1 » Wed Jan 14, 2015 5:52 pm

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
Last edited by chaoscode on Wed Jan 14, 2015 8:26 pm, edited 2 times in total.

Ads
User avatar
chaoscode
Posts: 202

Re: Text Emotes

Post#2 » Wed Jan 14, 2015 8:03 pm

Patch incomming.

User avatar
chaoscode
Posts: 202

Re: Text Emotes

Post#3 » Wed Jan 14, 2015 8:19 pm

Okay here it is.

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);
        }      
Next in CommandMgr.cs add this line under PlayerSay as shown below

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 ),
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

User avatar
Kragg
Posts: 1788

Re: Text Emotes - Fix included

Post#4 » Wed Jan 14, 2015 11:38 pm

You mean if I typ /emote nods. it will say:

Manfred nods.
Image
Sergeant-Major Drengk Burloksson, RR 85 Sniper
Hulfdan Irongrip, RR 81 Ironbreaker
Rordin Brightrune, RR 70 Runepriest
Proud Founder of the 3rd Bitterstone Thunderers

User avatar
chaoscode
Posts: 202

Re: Text Emotes - Fix included

Post#5 » Thu Jan 15, 2015 12:18 am

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 2 guests