Active Member Mind Rapist 180 Posted August 4, 2016 Active Member Share Posted August 4, 2016 Hi devs, today I need a function that blocks GMs to join players' party and guild. So a GM cannot invite a player to party, a player cannot invite a GM to a party, only player can invite player and GM can invite GM. Same goes for guild invitations. Thanks in advance Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 180 Posted August 7, 2016 Author Active Member Share Posted August 7, 2016 #KUSH Link to comment Share on other sites More sharing options...
VegaS 1062 Posted August 17, 2016 Share Posted August 17, 2016 (edited) [File: /src/Server/game/src/char.cpp] ..//1.) Search: else if (pchInvitee->IsBlockMode(BLOCK_PARTY_INVITE)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<파티> %s 님이 파티 거부 상태입니다."), pchInvitee->GetName()); return; } ..//2.) Add bellow: #ifdef ENABLE_EXTRA_BLOCK_PARTY #define ERROR_PARTY(argument) ChatPacket(CHAT_TYPE_INFO, argument); //me_vegas_func183 else if (GetGMLevel() > GM_PLAYER && pchInvitee->GetGMLevel() == GM_PLAYER) { ERROR_PARTY("<<Party>> You can not send a request to a player!"); return; } else if (GetGMLevel() == GM_PLAYER && pchInvitee->GetGMLevel() > GM_PLAYER) { ERROR_PARTY("<<Party>> You can not send a request to a staff member!"); return; } #endif [File: /src/Server/game/src/guild.cpp] ..//1.) Search: else if ( pchInvitee->GetEmpire() != pchInviter->GetEmpire() ) { pchInviter->ChatPacket( CHAT_TYPE_INFO, LC_TEXT("<길드> 다른 제국 사람을 길드에 초대할 수 없습니다.") ); return; } ..//2.) Add bellow: #ifdef ENABLE_EXTRA_BLOCK_GUILD #define ERROR_GUILD(argument) pchInviter->ChatPacket(CHAT_TYPE_INFO, argument); //me_vegas_func184 else if (pchInviter->GetGMLevel() > GM_PLAYER && pchInvitee->GetGMLevel() == GM_PLAYER) { ERROR_GUILD("<<Party>> You can not send a request to a player!"); return; } else if (pchInviter->GetGMLevel() == GM_PLAYER && pchInvitee->GetGMLevel() > GM_PLAYER) { ERROR_GUILD("<<Party>> You can not send a request to a staff member!"); return; } #endif [File: /src/Server/game/common/service.h] #define ENABLE_EXTRA_BLOCK_GUILD #define ENABLE_EXTRA_BLOCK_PARTY Edited August 17, 2016 by VegaS fix 3 Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 180 Posted August 17, 2016 Author Active Member Share Posted August 17, 2016 1 hour ago, VegaS said: [File: /src/Server/game/src/char.cpp] ..//1.) Search: else if (pchInvitee->IsBlockMode(BLOCK_PARTY_INVITE)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<파티> %s 님이 파티 거부 상태입니다."), pchInvitee->GetName()); return; } ..//2.) Add bellow: #ifdef ENABLE_EXTRA_BLOCK_PARTY #define ERROR_PARTY(argument) ChatPacket(CHAT_TYPE_INFO, argument); //me_vegas_func183 else if (GetGMLevel() > GM_PLAYER && pchInvitee->GetGMLevel() == GM_PLAYER) { ERROR_PARTY("<<Party>> You can not send a request to a player!"); return; } else if (GetGMLevel() == GM_PLAYER && pchInvitee->GetGMLevel() > GM_PLAYER) { ERROR_PARTY("<<Party>> You can not send a request to a staff member!"); return; } #endif [File: /src/Server/game/src/guild.cpp] ..//1.) Search: else if ( pchInvitee->GetEmpire() != pchInviter->GetEmpire() ) { pchInviter->ChatPacket( CHAT_TYPE_INFO, LC_TEXT("<길드> 다른 제국 사람을 길드에 초대할 수 없습니다.") ); return; } ..//2.) Add bellow: #ifdef ENABLE_EXTRA_BLOCK_GUILD #define ERROR_GUILD(argument) pchInviter->ChatPacket(CHAT_TYPE_INFO, argument); //me_vegas_func184 else if (pchInviter->GetGMLevel() > GM_PLAYER && pchInvitee->GetGMLevel() == GM_PLAYER) { ERROR_GUILD("<<Party>> You can not send a request to a player!"); return; } else if (pchInviter->GetGMLevel() == GM_PLAYER && pchInvitee->GetGMLevel() > GM_PLAYER) { ERROR_GUILD("<<Party>> You can not send a request to a staff member!"); return; } #endif [File: /src/Server/game/common/service.h] #define ENABLE_EXTRA_BLOCK_GUILD #define ENABLE_EXTRA_BLOCK_PARTY Thank you so much, exactly what I needed 1 Link to comment Share on other sites More sharing options...
VegaS 1062 Posted August 17, 2016 Share Posted August 17, 2016 7 hours ago, Mind Rapist said: Thank you so much, exactly what I needed 1 Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 180 Posted August 17, 2016 Author Active Member Share Posted August 17, 2016 2 minutes ago, VegaS said: Hahah Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now