• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ Cast Description

Blade33711

Member
Joined
Aug 6, 2012
Messages
133
Solutions
1
Reaction score
5
Location
Poland
I'm using tfs 0.4
How can i change this line to not see the nickname?
C++:
sendCreatureSay(player, SPEAK_PRIVATE, (player->getCastDescription()) );
I mean:
nhfxwt.png
 
Solution
protocolgame.cpp
C++:
switch(type)
        {
            case SPEAK_CHANNEL_RA:
                msg->putString("");
                break;
            case SPEAK_RVR_ANSWER:
                msg->putString("Gamemaster");
                break;
            default:
                msg->putString(!creature->getHideName() ? pname: "");
                break;
        }

C++:
switch(type)
        {
            case SPEAK_CHANNEL_RA:
                msg->putString("");
                break;
            case SPEAK_RVR_ANSWER:
                msg->putString("Gamemaster");
                break;
            case SPEAK_PRIVATE:
                if(isCast)
                    msg->putString("");
                else...
I don't think it's sendCreatureSay but sendPrivateMessage and if I am right you should be able to do it by passing NULL as speaker (1st argument) like:
Code:
sendPrivateMessage(NULL, TALKTYPE_PRIVATE_TO, (player->getCastDescription()) );


@Edit: I didn't actually notice you are using tfs 0.4 so it might actually not work since I have no idea how 0.4 API looks like.
 
I don't think it's sendCreatureSay but sendPrivateMessage and if I am right you should be able to do it by passing NULL as speaker (1st argument) like:
Code:
sendPrivateMessage(NULL, TALKTYPE_PRIVATE_TO, (player->getCastDescription()) );


@Edit: I didn't actually notice you are using tfs 0.4 so it might actually not work since I have no idea how 0.4 API looks like.

Error :/
tmqfzn.png
 
protocolgame.cpp
C++:
switch(type)
        {
            case SPEAK_CHANNEL_RA:
                msg->putString("");
                break;
            case SPEAK_RVR_ANSWER:
                msg->putString("Gamemaster");
                break;
            default:
                msg->putString(!creature->getHideName() ? pname: "");
                break;
        }

C++:
switch(type)
        {
            case SPEAK_CHANNEL_RA:
                msg->putString("");
                break;
            case SPEAK_RVR_ANSWER:
                msg->putString("Gamemaster");
                break;
            case SPEAK_PRIVATE:
                if(isCast)
                    msg->putString("");
                else
                    msg->putString(!creature->getHideName() ? pname: "");
                    break;
            default:
                msg->putString(!creature->getHideName() ? pname: "");
                break;
        }
 
Solution
Back
Top