mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-13 21:01:08 -04:00
Add ReportManager Script Trigger Support
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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"},
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user