diff --git a/engine/server/library/serverGame/src/shared/core/ReportManager.cpp b/engine/server/library/serverGame/src/shared/core/ReportManager.cpp index b73e89ff..843373c7 100755 --- a/engine/server/library/serverGame/src/shared/core/ReportManager.cpp +++ b/engine/server/library/serverGame/src/shared/core/ReportManager.cpp @@ -18,6 +18,10 @@ #include "sharedFoundation/FormattedString.h" #include "sharedGame/ProsePackage.h" #include "sharedGame/ProsePackageParticipant.h" +#include "serverScript/GameScriptObject.h" +#include "serverScript/ScriptDictionary.h" +#include "serverScript/ScriptFunctionTable.h" +#include "serverScript/ScriptParameters.h" #include "sharedLog/Log.h" #include "sharedNetworkMessages/ChatAvatarId.h" #include "sharedNetworkMessages/ChatOnRequestLog.h" @@ -331,10 +335,18 @@ void ReportManager::handleMessage(ChatOnRequestLog const &chatOnRequestLog) report.append(reportData.m_clientData); } - if (!reportData.m_reportLogChannel.empty()) - LOGU("CustomerService", (reportData.m_reportLogChannel.c_str()), report); - else - LOGU("CustomerService", ("Report:"), report); + //if (!reportData.m_reportLogChannel.empty()) + // LOGU("CustomerService", (reportData.m_reportLogChannel.c_str()), report); + //else + // LOGU("CustomerService", ("Report:"), report); + + if(reportingCreatureObject->getScriptObject()) + { + ScriptParams p; + p.addParam(reportData.m_harassingNetworkId); + p.addParam(report); + IGNORE_RETURN(reportingCreatureObject->getScriptObject()->trigAllScripts(Scripting::TRIG_ON_PLAYER_REPORTED_CHAT, p)); + } // System message for success diff --git a/engine/server/library/serverScript/src/shared/ScriptFunctionTable.cpp b/engine/server/library/serverScript/src/shared/ScriptFunctionTable.cpp index 3a56b674..48f8bdbe 100755 --- a/engine/server/library/serverScript/src/shared/ScriptFunctionTable.cpp +++ b/engine/server/library/serverScript/src/shared/ScriptFunctionTable.cpp @@ -330,6 +330,7 @@ static const Scripting::ScriptFuncTable ScriptFuncList[] = {Scripting::TRIG_ENTER_REGION, "OnEnterRegion", "ss"}, {Scripting::TRIG_EXIT_REGION, "OnExitRegion", "ss"}, + {Scripting::TRIG_ON_PLAYER_REPORTED_CHAT, "OnPlayerReportedChat", "Ou"}, //---------------------------------------------------------------------- {Scripting::TRIG_VENDOR_ITEM_COUNT_REPLY, "OnVendorItemCountReply", "ii"}, diff --git a/engine/server/library/serverScript/src/shared/ScriptFunctionTable.h b/engine/server/library/serverScript/src/shared/ScriptFunctionTable.h index 63b508c0..262233eb 100755 --- a/engine/server/library/serverScript/src/shared/ScriptFunctionTable.h +++ b/engine/server/library/serverScript/src/shared/ScriptFunctionTable.h @@ -480,6 +480,7 @@ enum TrigId TRIG_ON_ABANDON_PLAYER_QUEST = 302, TRIG_ON_GCW_SCORE_CATEGORY_PERCENTILE_CHANGE = 303, TRIG_WAYPOINT_WARP = 304, + TRIG_ON_PLAYER_REPORTED_CHAT = 305, TRIG_LAST_TRIGGER };