kill message to server

Newbie Spellweaver
Joined
Dec 31, 2013
Messages
26
Reaction score
1
Hi, how can I integrate who killed whom into the server? I want everyone to be able to see it in the bottom right corner of the game screen.
 
You probably have to edit the void CFieldIOCPSocket::CharacterDeadRoutine function. An idea can be to check how world messages are sent like for SP ends and then add a helper function which does does something like this

Code:
this->SendString128(STRING_128_USER_NOTICE, STRMSG_061107_0000, SendArenaCharacterName);
to active clients (check sp ending code for example or outpost war start messages/ms messages).

I just looked into it, i did not test it myself but seems that could work fine - just check sp/outpost/ms message sending to clients.
 
FieldIOCPSocket2.cpp between 19753.line
Code:
    const char* killer = (i_pAttackUser && i_pAttackUser->GetCharacter() && i_pAttackUser->GetCharacter()->CharacterName) // Emir, global kill message 2022
        ? i_pAttackUser->GetCharacter()->CharacterName : "Unknown";
    const char* victim = (this->GetCharacter() && this->GetCharacter()->CharacterName)
        ? this->GetCharacter()->CharacterName : "Unknown";

    char buf[128];
    _snprintf_s(buf, sizeof(buf), _TRUNCATE, "\\m[%s]\\m \\ykilled\\y \\c[%s]\\c", killer, victim);

    ms_pFieldIOCP->SendString128ToAllClients(
        STRING_128_USER_NOTICE,
        buf,
        FALSE,                    // for global message must FALSE
        INFLUENCE_TYPE_ALL_MASK
    );

Cheers!
 
FieldIOCPSocket2.cpp between 19753.line
Code:
    const char* killer = (i_pAttackUser && i_pAttackUser->GetCharacter() && i_pAttackUser->GetCharacter()->CharacterName) // Emir, global kill message 2022
        ? i_pAttackUser->GetCharacter()->CharacterName : "Unknown";
    const char* victim = (this->GetCharacter() && this->GetCharacter()->CharacterName)
        ? this->GetCharacter()->CharacterName : "Unknown";

    char buf[128];
    _snprintf_s(buf, sizeof(buf), _TRUNCATE, "\\m[%s]\\m \\ykilled\\y \\c[%s]\\c", killer, victim);

    ms_pFieldIOCP->SendString128ToAllClients(
        STRING_128_USER_NOTICE,
        buf,
        FALSE,                    // for global message must FALSE
        INFLUENCE_TYPE_ALL_MASK
    );

Cheers!
i get the identifier error when I add this (i_pAttackUser)
 
Back