• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[Trinity C++][Core Modification] <GM> <Dev> Tag in Who List

Synth

Exalted Member
Hello Emudevs,today i'm going to share a simple core modification for you can see <GM> <Dev> Tag in Who List,its made by ZeuS.

Script Info:
●When your GM Tag is on(.gm on), in who list you'll have a <GM> prefix before your name. Example: <GM>Tommy
●When your Dev Tag is on(.dev on), in who list you'll have a <Dev> prefix before your name. Example: <Dev>Tommy

Script (Core Modification):

●First browse to src\server\game\Handlers, and open MiscHandler.cpp
●Go to line 305, and try to find something like this:
Code:
std::string pname = target->GetName();
        std::wstring wpname;
●When you find it, try to make it look like this:
Code:
 std::string pname;
if (itr->second->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
{
pname = "|cffff0000<Dev>|r";
pname.append(itr->second->GetName());
}
else
if (itr->second->IsGameMaster())
{
pname = "|cffff0000<GM>|r";
pname.append(itr->second->GetName());
}
else
pname = itr->second->GetName();
std::wstring wpname;
●Re-Compile
●Delete your cache
●Enjoy your new tags on who list

If you find any errors once you are compiling or in-game issue feel free to ask me.

Thank you!
Best regards,
Synth !
 
Last edited:

Tommy

Founder
I believe those credits are wrong, I don't think he originally came up with this. I could be wrong, but that's what I think. Nonetheless, thanks for sharing. :megusta:
 

Synth

Exalted Member
I believe those credits are wrong, I don't think he originally came up with this. I could be wrong, but that's what I think. Nonetheless, thanks for sharing. :megusta:
Well you're right i just saw it on the website posted by this guy without any credits i think he made this,and thank you :smile:
 

Tommy

Founder
Well you're right i just saw it on the website posted by this guy without any credits i think he made this,and thank you :smile:

So technically the credits should go to nobody. Every script you see without credits on other websites and you assume who posted created it, that's wrong. Almost all WoW emulation scripts are ripped, edited and claimed. Either way, just saying.
 

Synth

Exalted Member
So technically the credits should go to nobody. Every script you see without credits on other websites and you assume who posted created it, that's wrong. Almost all WoW emulation scripts are ripped, edited and claimed. Either way, just saying.
I agree,credits removed.
 

Neth

BETA Tester
actually credits belong to stfx, who was the orignal author of the gamemaster part, tho he did it differently ( and this one is bad btw)
 

darksoke

OnTop500
So technically the credits should go to nobody. Every script you see without credits on other websites and you assume who posted created it, that's wrong. Almost all WoW emulation scripts are ripped, edited and claimed. Either way, just saying.

true :| sad but true ... that's why almost all good devs stoped posting theyr scripts .. there are 2 much leechers and most of them replace 2-3 codes in script and they assume all credits :|
 

Carbinfibre

Sexy Member
How would you modify that to make it show your account level all the time in who list.
So regardless GM on/off it still shows GM on who list.
 

ZeuS

Respected Member
Actually This is my script also my friend JCarter helped me on this one ... Unfortunately we didnt share it but some people leeched it from our Repo , BTW at least I'm happy it been shared on EmuDevs , Cause This is my favorite place :)
 

Synth

Exalted Member
Actually This is my script also my friend JCarter helped me on this one ... Unfortunately we didnt share it but some people leeched it from our Repo , BTW at least I'm happy it been shared on EmuDevs , Cause This is my favorite place :)
Glad to hear that credits added :smile:
 

Tommy

Founder
how would I add a name to identify gm rank 4 as <HeadGM> ?

Like this:

Code:
    std::string pname;
    std::wstring wpname;
    if (itr->second->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
    {
        pname = "|cffff0000<Dev>|r";
        pname.append(itr->second->GetName());
    }
    else
    {
        switch(itr->second->GetSession()->GetSecurity())
        {
            case SEC_PLAYER:
                pname = itr->second->GetName();
                break;
            case SEC_MODERATOR:
                pname = "|cffff0000<Mod>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_GAMEMASTER:
                pname = "|cffff0000<GM>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_ADMINISTRATOR:
                pname = "|cffff0000<Admin>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_CONSOLE: // Head GM, etc?
                pname = "|cffff0000<Other>|r";
                pname.append(itr->second->GetName());
                break;
        }
    }

I made the code itself more appealing. Wished I could've done something better that didn't spam 'pname.append(itr->second->GetName())'. Anyway, there you go.
 
Last edited:

slp13at420

Mad Scientist
grrr n I was doing good with mod'n the core lol I got an err...

Code:
8>C:\Users\BlackWolf\Desktop\INST80GvG\INST80GvG\src\server\game\Handlers\MiscHandler.cpp(363): error C2039: 'GetSecurity' : is not a member of 'Player'
8>          C:\Users\BlackWolf\Desktop\INST80GvG\INST80GvG\src\server\game\Entities\Player\Player.h(1062) : see declaration of 'Player'

mischandler.cpp:
Code:
        std::string pname;
        if (itr->second->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
    {
        pname = "|cffff0000<Dev>|r";
        pname.append(itr->second->GetName());
    }
    else
   {
        switch(itr->second->GetSecurity())
        {
            case SEC_PLAYER:
                pname = itr->second->GetName();
                break;
            case SEC_MODERATOR:
                pname = "|cffff0000<Mod>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_GAMEMASTER:
                pname = "|cffff0000<GM>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_ADMINISTRATOR:
                pname = "|cffff0000<ADMIN>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_CONSOLE: // Head GM, etc?
                pname = "|cffff0000<LeadGM>|r";
                pname.append(itr->second->GetName());
                break;
        }
    }
        std::wstring wpname;
 
Last edited:

Tommy

Founder
Whoops.. I had GetSession() in my head, don't know why I didn't write it. XD


Your code is wrong anyway.

Replace all of this:

Code:
        std::string pname;
        if (itr->second->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
    {
        pname = "|cffff0000<Dev>|r";
        pname.append(itr->second->GetName());
    }
    else
        if (itr->second->IsGameMaster())
   {
        switch(itr->second->GetSecurity())
        {
            case SEC_PLAYER:
                pname = itr->second->GetName();
                break;
            case SEC_MODERATOR:
                pname = "|cffff0000<Mod>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_GAMEMASTER:
                pname = "|cffff0000<GM>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_ADMINISTRATOR:
                pname = "|cffff0000<ADMIN>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_CONSOLE: // Head GM, etc?
                pname = "|cffff0000<LeadGM>|r";
                pname.append(itr->second->GetName());
                break;
        }
    }
        else
        pname = itr->second->GetName();
        std::wstring wpname;


With this:

Code:
    std::string pname;
    std::wstring wpname;
    if (itr->second->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
    {
        pname = "|cffff0000<Dev>|r";
        pname.append(itr->second->GetName());
    }
    else
    {
        switch(itr->second->GetSession()->GetSecurity())
        {
            case SEC_PLAYER:
                pname = itr->second->GetName();
                break;
            case SEC_MODERATOR:
                pname = "|cffff0000<Mod>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_GAMEMASTER:
                pname = "|cffff0000<GM>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_ADMINISTRATOR:
                pname = "|cffff0000<Admin>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_CONSOLE: // Head GM, etc?
                pname = "|cffff0000<Other>|r";
                pname.append(itr->second->GetName());
                break;
        }
    }
 

slp13at420

Mad Scientist
Whoops.. I had GetSession() in my head, don't know why I didn't write it. XD


Your code is wrong anyway.

Replace all of this:

Code:
        std::string pname;
        if (itr->second->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
    {
        pname = "|cffff0000<Dev>|r";
        pname.append(itr->second->GetName());
    }
    else
        if (itr->second->IsGameMaster())
   {
        switch(itr->second->GetSecurity())
        {
            case SEC_PLAYER:
                pname = itr->second->GetName();
                break;
            case SEC_MODERATOR:
                pname = "|cffff0000<Mod>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_GAMEMASTER:
                pname = "|cffff0000<GM>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_ADMINISTRATOR:
                pname = "|cffff0000<ADMIN>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_CONSOLE: // Head GM, etc?
                pname = "|cffff0000<LeadGM>|r";
                pname.append(itr->second->GetName());
                break;
        }
    }
        else
        pname = itr->second->GetName();
        std::wstring wpname;


With this:

Code:
    std::string pname;
    std::wstring wpname;
    if (itr->second->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
    {
        pname = "|cffff0000<Dev>|r";
        pname.append(itr->second->GetName());
    }
    else
    {
        switch(itr->second->GetSession()->GetSecurity())
        {
            case SEC_PLAYER:
                pname = itr->second->GetName();
                break;
            case SEC_MODERATOR:
                pname = "|cffff0000<Mod>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_GAMEMASTER:
                pname = "|cffff0000<GM>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_ADMINISTRATOR:
                pname = "|cffff0000<Admin>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_CONSOLE: // Head GM, etc?
                pname = "|cffff0000<Other>|r";
                pname.append(itr->second->GetName());
                break;
        }
    }

ok I did that.

Code:
        std::string pname;
        if (itr->second->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
        {
            pname = "|cffff0000<Dev>|r";
            pname.append(itr->second->GetName());
        }
        else
        if (itr->second->IsGameMaster())
        {
            switch(itr->second->GetSession()->GetSecurity())
            {
                case SEC_PLAYER:
                    pname = itr->second->GetName();
                    break;
                case SEC_MODERATOR:
                    pname = "|cffff0000<Mod>|r";
                    pname.append(itr->second->GetName());
                    break;
                case SEC_GAMEMASTER:
                    pname = "|cffff0000<GM>|r";
                    pname.append(itr->second->GetName());
                    break;
                case SEC_ADMINISTRATOR:
                    pname = "|cffff0000<Admin>|r";
                    pname.append(itr->second->GetName());
                    break;
                case SEC_CONSOLE: // Head GM, etc?
                    pname = "|cffff0000<LeadGM>|r";
                    pname.append(itr->second->GetName());
                    break;
            }
        }
         else
        pname = itr->second->GetName();

now when a gm is un-flagged then they are just a player name but when they turn gm on it tags them <Mod>.
lol admin name doesn't even show rofl
not sure why but its basicly working ... gotta experiment now and get it to post to the proper security level..:D
unless you see why its doing it lol
it may just be how I have the accounts rbac set ... still trying to figure that maze out lol
but I got the jist of it thanx guyz
 

Tommy

Founder
ok I did that.

Code:
        std::string pname;
        if (itr->second->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
        {
            pname = "|cffff0000<Dev>|r";
            pname.append(itr->second->GetName());
        }
        else
        if (itr->second->IsGameMaster())
        {
            switch(itr->second->GetSession()->GetSecurity())
            {
                case SEC_PLAYER:
                    pname = itr->second->GetName();
                    break;
                case SEC_MODERATOR:
                    pname = "|cffff0000<Mod>|r";
                    pname.append(itr->second->GetName());
                    break;
                case SEC_GAMEMASTER:
                    pname = "|cffff0000<GM>|r";
                    pname.append(itr->second->GetName());
                    break;
                case SEC_ADMINISTRATOR:
                    pname = "|cffff0000<Admin>|r";
                    pname.append(itr->second->GetName());
                    break;
                case SEC_CONSOLE: // Head GM, etc?
                    pname = "|cffff0000<LeadGM>|r";
                    pname.append(itr->second->GetName());
                    break;
            }
        }
         else
        pname = itr->second->GetName();

now when a gm is un-flagged then they are just a player name but when they turn gm on it tags them <Mod>.
lol admin name doesn't even show rofl
not sure why but its basicly working ... gotta experiment now and get it to post to the proper security level..:D
unless you see why its doing it lol
it may just be how I have the accounts rbac set ... still trying to figure that maze out lol
but I got the jist of it thanx guyz

No, you didn't do that.

Replace all of this code. All of it, everything, ALL. Everything in color replace it.

Code:
[COLOR="#00FF00"]        std::string pname;
        if (itr->second->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
        {
            pname = "|cffff0000<Dev>|r";
            pname.append(itr->second->GetName());
        }
        else
        if (itr->second->IsGameMaster())
        {
            switch(itr->second->GetSession()->GetSecurity())
            {
                case SEC_PLAYER:
                    pname = itr->second->GetName();
                    break;
                case SEC_MODERATOR:
                    pname = "|cffff0000<Mod>|r";
                    pname.append(itr->second->GetName());
                    break;
                case SEC_GAMEMASTER:
                    pname = "|cffff0000<GM>|r";
                    pname.append(itr->second->GetName());
                    break;
                case SEC_ADMINISTRATOR:
                    pname = "|cffff0000<Admin>|r";
                    pname.append(itr->second->GetName());
                    break;
                case SEC_CONSOLE: // Head GM, etc?
                    pname = "|cffff0000<LeadGM>|r";
                    pname.append(itr->second->GetName());
                    break;
            }
        }
         else
        pname = itr->second->GetName();[/COLOR]


WITH:

Code:
    std::string pname;
    std::wstring wpname;
    if (itr->second->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
    {
        pname = "|cffff0000<Dev>|r";
        pname.append(itr->second->GetName());
    }
    else
    {
        switch(itr->second->GetSession()->GetSecurity())
        {
            case SEC_PLAYER:
                pname = itr->second->GetName();
                break;
            case SEC_MODERATOR:
                pname = "|cffff0000<Mod>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_GAMEMASTER:
                pname = "|cffff0000<GM>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_ADMINISTRATOR:
                pname = "|cffff0000<Admin>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_CONSOLE: // Head GM, etc?
                pname = "|cffff0000<Other>|r";
                pname.append(itr->second->GetName());
                break;
        }
    }

You have no need in this if statement at all:

Code:
        if (itr->second->IsGameMaster())

That's probably why it isn't working correctly.
 

slp13at420

Mad Scientist
the if is cause I started having to experiment. admin acct name wont show and gm's tag is <mod> lol I am pretty sure its this damn rbac maze nitemare on my end.(lol seriously why would any GM1 have the command .additem)

acct 1 with account_access 5, with rbac permission 192 has every admin command

but acct 100 with account access 1, with rbac permission 193 also has every damn command including all server commands.

so I am assuming the trouble with it tagging properly is somewhere in my damn rbac maze lol

Code:
    std::string pname;
    std::wstring wpname;
    if (itr->second->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
    {
        pname = "|cffff0000<Dev>|r";
        pname.append(itr->second->GetName());
    }
    else
    {
        switch(itr->second->GetSession()->GetSecurity())
        {
            case SEC_PLAYER:
                pname = itr->second->GetName();
                break;
            case SEC_MODERATOR:
                pname = "|cffff0000<Mod>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_GAMEMASTER:
                pname = "|cffff0000<GM>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_ADMINISTRATOR:
                pname = "|cffff0000<Admin>|r";
                pname.append(itr->second->GetName());
                break;
            case SEC_CONSOLE: // Head GM, etc?
                pname = "|cffff0000<Other>|r";
                pname.append(itr->second->GetName());
                break;
        }
    }

acct 1 name only shows when I use .dev on. then I see <Dev><name>
but with .dev off and .gm on the name is empty.

acct 100 with .gm on shows <mod><name>
with .gm off it shows <Mod><name>
with .dev on it shows <Dev><name>
 
Last edited:

slp13at420

Mad Scientist
lol yea sry bout pasteing that wrong last nite been a long week .grrrr get up at 4am to get to the site at 830 then frigin turn around 3hrs later frigin get snowed out grrrrrr. then trying to test 2 things at once rofl . but yea everything looks like it should work but I have issues making my ranks recognizable by it
 

equilibriumwow

Enthusiast
Thought it might be beneficial to add a guide to using color codes so you don't mess it up trying to add your own HEX color codes like I did...

|c - This is extremely important! It tells Warcraft that it needs to use the color code after it. Without it your text would look like this: "005599FFOoo! Nice Text|r"

TT - This is less important. This is the transparency of the text. Type FF or 00 or what you want. The game doesn't use it, but it checks to see if its there, if not, then the color code wont work.

RR - This is how much red is in the color you are mixing up.

GG - This is how much green is in the color you are mixing up.

BB - This is how much blue is in the color you are mixing up.

|r - This is important too. It tells Warcraft that the color code is done and to stop coloring text, it is not needed if you want all after the code to be colored.

The format is |cTTRRGGBByour text here|r

Useful links
HEX Code generator
Using Color Codes in Warcraft (information above came from this site)
 
Last edited:
Top