I have a custom status effect, a.k.a SC_INVASION_E which is customized. Now I want my custom status to detect if a player is in a chatroom/pub. Initially, I edited chat.cpp in the chat_createpcchat function, and it works for detecting when a chatroom is created. However, my problem is that it doesn’t detect when a player joins a chatroom. To avoid modifying chat.cpp further, I want to handle this detection in my custom status function instead. The issue is that I don’t know the correct function for detecting chatrooms; I used SC_NOCHAT
if (sd->sc.getSCE(SC_NOCHAT)) {
status_change_end(&sd->bl, SC_INVASION_E);
clif_displaymessage(sd->fd, "Invasion Spirit Off - close/leave chatroom and activate again");
return 0;
}
Question
Mice
I have a custom status effect, a.k.a SC_INVASION_E which is customized. Now I want my custom status to detect if a player is in a chatroom/pub. Initially, I edited
chat.cpp
in thechat_createpcchat
function, and it works for detecting when a chatroom is created. However, my problem is that it doesn’t detect when a player joins a chatroom. To avoid modifyingchat.cpp
further, I want to handle this detection in my custom status function instead. The issue is that I don’t know the correct function for detecting chatrooms; I usedSC_NOCHAT
if (sd->sc.getSCE(SC_NOCHAT)) { status_change_end(&sd->bl, SC_INVASION_E); clif_displaymessage(sd->fd, "Invasion Spirit Off - close/leave chatroom and activate again"); return 0; }
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.