Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[HELP] RZ:CE - Legend with wrong flag in-game.

Junior Spellweaver
Joined
Jan 6, 2014
Messages
175
Reaction score
7
Hello. Before ANYTHING, try to read and understand.

What I want to mean with FLAG is the "DEV / LEGEND" status on the scoreboard (/tab).
To change this, you have to go find this code: if(gUserProfile.ProfileData.AccountType==0)

after that, you will find:
Code:
if(gUserProfile.ProfileData.AccountType==0)
    {
        flags|=2;
    }
    if(gUserProfile.ProfileData.isDevAccount)
    {
        flags|=3;
    }
    if(gUserProfile.ProfileData.isPunisher)
    {
        flags|=4;
    }


    addChatMessage(currentTabIndex, userName, &s_chatMsg[start_text], flags);


    memset(s_chatMsg, 0, sizeof(s_chatMsg));


After this, find:
void HUDDisplay::addChatMessage(int tabIndex, const char* user, const char* text, uint32_t flags)

You'll find:
Code:
void HUDDisplay::addChatMessage(int tabIndex, const char* user, const char* text, uint32_t flags)
{
    if(!Inited) return;
    Scaleform::GFx::Value var[3];


    char tmpMsg[1024];
    const char* tabNames[] = {"[PROXIMITY]", "[GLOBAL]", "[CLAN]", "[GROUP]"};
    const char* tabNamesColor[] = {"#00A000", "#13bbeb", "#de13eb", "#ffa900"};
    const char* userNameColor[] = {"#ffffff", "#ffa800"};


    bool isUserLegend = (flags&1)?true:false;
    bool isUserPunisher = (flags&2)?true:false;
    bool isUserDev = (flags&3)?true:false;


    const char* userColor = userNameColor[isUserLegend?0:1];
    const char* textColor = "#d0d0d0";
    const char* namePrefix = "";


    if(isUserPunisher && !isUserDev)
    {
        userColor = "#ff0000";
        textColor = "#ff8800";
        namePrefix = "<Punisher>";
    }


    if(isUserDev)
    {
    userColor = "#ffff00";
    textColor = "#ffff00";
    namePrefix = "<DEV>";
    }


    // dirty stl :)
    std::string sUser = user;
    int pos = 0;
    while((pos= sUser.find('<'))!=-1)
        sUser.replace(pos, 1, "<");
    while((pos = sUser.find('>'))!=-1)
        sUser.replace(pos, 1, ">");


    std::string sMsg = text;
    while((pos = sMsg.find('<'))!=-1)
        sMsg.replace(pos, 1, "<");
    while((pos = sMsg.find('>'))!=-1)
        sMsg.replace(pos, 1, ">");


    // really simple profanity filter
    {
        int counter = 0;
        char profanityFilter[2048]={0};
        char clearString[2048]={0};
        r3dscpy(profanityFilter, sMsg.c_str());
        char* word = strtok(profanityFilter, " ");
        while(word)
        {
            if(dictionaryHash_.IsExists(word))
            {
                r3dscpy(&clearString[counter], "*** ");
                counter +=4;
            }
            else
            {
                r3dscpy(&clearString[counter], word);
                counter +=strlen(word);
                clearString[counter++] = ' ';
            }
            word = strtok(NULL, " ");
        }
        clearString[counter++] = 0;


        sMsg = clearString;
    }


    sprintf(tmpMsg, "<font color=\"%s\">%s</font> <font color=\"%s\">%s%s:</font> <font color=\"%s\">%s</font>", tabNamesColor[tabIndex], tabNames[tabIndex], userColor, namePrefix, sUser.c_str(), textColor, sMsg.c_str());


    var[0].SetString(tmpMsg);
    gfxHUD.Invoke("_root.api.receiveChat", var, 1);
}


----- After building the WarZ.SLN in FINAL BUILD and do RSBuild.exe, everything I got is:


in the database -> Setting AccountType to 0 and isDeveloper to 0
this is what happends! - >

in the database -> Setting AccountType to 2 (survivor)
and isDeveloper to 1 this is what happends- >




P.S: I've been trying to fix this thing a long time (5 days, for sure ^^). My server is working fine, I just need this to make it public. By the way, I use the same files as zTime release.




 
Last edited:
Junior Spellweaver
Joined
Jan 6, 2014
Messages
175
Reaction score
7
I have the same problem for his account playing legendary icon dev and account DEV icon DEV and LEGENDARY

With my source, Legendary has: DEV & Legendy Icon and <LEGEND> on the chat.
Untill now I couldn't fix it, and, cuz DNC is out of the section I guess it will be bugged 4 ever.
 
Upvote 0
Newbie Spellweaver
Joined
Sep 29, 2014
Messages
7
Reaction score
2
I don't think so, cuz Punisher is working fine with the Flag = 4.

Hi, with the |= operator (OR) it goes in bits of two... So it has to be to the power of 2. You'll need to set your flags to 1,2 and 4,8. get rid of the flag 3.
 
Upvote 0
Junior Spellweaver
Joined
Jan 6, 2014
Messages
175
Reaction score
7
Hi, with the |= operator (OR) it goes in bits of two... So it has to be to the power of 2. You'll need to set your flags to 1,2 and 4,8. get rid of the flag 3.

I'll be trying this, thanks for helping me.
 
Upvote 0
Junior Spellweaver
Joined
Sep 4, 2013
Messages
153
Reaction score
49
He's providing entertainment to others with the release of his server, do you need more?

I just want to know if what you say about flags worked because if yes him can say and how him changed for people who have that src fix that.
Its like you helped him and him can help other.

Exemple i have my own vps only for test sometimes src's and otherthings i'm thinking to test that src after i test warzthv2 and i want to know how to fix this problem :)



(One thing that people need to know without help you dont go anywhere today you help tomorrow someone help you)
 
Upvote 0
Junior Spellweaver
Joined
Jan 6, 2014
Messages
175
Reaction score
7
Lol John yes, and its not only for me its mostly for people but its ok.

Yep, just do what that guy said and be happy about it. I won't say no more.



do not understand 100% '-_

A better explain: Legend has: Legend and DEV Icon when tab is pressed (scoreboard) it only happends when AccountType = 0 (Legend package)
other else, it is working fine.

Dev has DEV Icon and DEV Prefix in chat
Punisher has Punisher Icon and Pusniher Color Name in chat.

Just Legend is broken.
 
Upvote 0
Newbie Spellweaver
Joined
Sep 29, 2014
Messages
7
Reaction score
2
Yep, just do what that guy said and be happy about it. I won't say no more.






A better explain: Legend has: Legend and DEV Icon when tab is pressed (scoreboard) it only happends when AccountType = 0 (Legend package)
other else, it is working fine.

Dev has DEV Icon and DEV Prefix in chat
Punisher has Punisher Icon and Pusniher Color Name in chat.

Just Legend is broken.

Hi, you should check to make sure your flags match up, you also have to edit the functions in the warz_server.sln to make sure the players recieve the proper flag, since warz.sln is only client sided and doesn't send the flag packet. Also make sure you're using proper flags...1,2,4,8,16 and so on are valid flags, up to 128.
 
Upvote 0
Back
Top