From 1f1844185ce75b6522354e00b1d9963390df6f48 Mon Sep 17 00:00:00 2001 From: Dogan Date: Sun, 2 Jun 2019 23:21:03 +0200 Subject: [PATCH] Preparation for Happy Hour --- .../BossHP/scripting/BossHP_Ranking.sp | 9 ++++----- .../PlaytimeReward/scripting/PlaytimeReward.sp | 10 ++-------- .../TriggerRewards/scripting/TriggerRewards.sp | 14 +++----------- 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/_CleanupRequired/BossHP/scripting/BossHP_Ranking.sp b/_CleanupRequired/BossHP/scripting/BossHP_Ranking.sp index 74d04708..091d01dd 100644 --- a/_CleanupRequired/BossHP/scripting/BossHP_Ranking.sp +++ b/_CleanupRequired/BossHP/scripting/BossHP_Ranking.sp @@ -1,8 +1,7 @@ #include #include #include - -#include "loghelper.inc" +#include #include #include "CConfig.inc" @@ -210,19 +209,19 @@ public void OnBossKilled(any Boss, any Config, int reason) { Format(sBuffer, sizeof(sBuffer), "%s\n1. %N - %d %s", sBuffer, iSortedList[0][0], iSortedList[0][1], sType); - LogPlayerEvent(iSortedList[0][0], "triggered", "ze_boss_damage_first"); + LH_LogPlayerEvent(iSortedList[0][0], "triggered", "ze_boss_damage_first", true); } if (iSortedList[1][0]) { Format(sBuffer, sizeof(sBuffer), "%s\n2. %N - %d %s", sBuffer, iSortedList[1][0], iSortedList[1][1], sType); - LogPlayerEvent(iSortedList[1][0], "triggered", "ze_boss_damage_second"); + LH_LogPlayerEvent(iSortedList[1][0], "triggered", "ze_boss_damage_second", true); } if (iSortedList[2][0]) { Format(sBuffer, sizeof(sBuffer), "%s\n3. %N - %d %s", sBuffer, iSortedList[2][0], iSortedList[2][1], sType); - LogPlayerEvent(iSortedList[2][0], "triggered", "ze_boss_damage_third"); + LH_LogPlayerEvent(iSortedList[2][0], "triggered", "ze_boss_damage_third"); } Format(sBuffer, sizeof(sBuffer), "%s\n*************************", sBuffer); diff --git a/_CleanupRequired/PlaytimeReward/scripting/PlaytimeReward.sp b/_CleanupRequired/PlaytimeReward/scripting/PlaytimeReward.sp index 2b88fd9a..3537ce18 100644 --- a/_CleanupRequired/PlaytimeReward/scripting/PlaytimeReward.sp +++ b/_CleanupRequired/PlaytimeReward/scripting/PlaytimeReward.sp @@ -1,8 +1,7 @@ #pragma semicolon 1 #include - -#include "loghelper.inc" +#include #pragma newdecls required @@ -28,11 +27,6 @@ public void OnPluginEnd() UnhookEvent("player_disconnect", EventHook_PlayerDisconnect, EventHookMode_Post); } -public void OnMapStart() -{ - GetTeams(); -} - public void EventHook_PlayerDisconnect(Event hEvent, const char[] sName, bool bDontBroadcast) { bool bIsBot = view_as(hEvent.GetInt("bot")); @@ -66,7 +60,7 @@ public Action Timer_CheckConnectionTime(Handle hThis) char sPlayerEvent[32]; Format(sPlayerEvent, sizeof(sPlayerEvent), "staying_server_%d", iConnectionTimeClamped / 60); - LogPlayerEvent(i, "triggered", sPlayerEvent); + LH_LogPlayerEvent(i, "triggered", sPlayerEvent, true); break; } } diff --git a/_CleanupRequired/TriggerRewards/scripting/TriggerRewards.sp b/_CleanupRequired/TriggerRewards/scripting/TriggerRewards.sp index 2f4d823c..b6b539e0 100644 --- a/_CleanupRequired/TriggerRewards/scripting/TriggerRewards.sp +++ b/_CleanupRequired/TriggerRewards/scripting/TriggerRewards.sp @@ -3,7 +3,7 @@ #include #include #include -#include "loghelper.inc" +#include #pragma semicolon 1 #pragma newdecls required @@ -38,14 +38,6 @@ public void OnPluginStart() HookEntityOutput("func_button", "OnPressed", OnPressed); } -//---------------------------------------------------------------------------------------------------- -// Purpose: -//---------------------------------------------------------------------------------------------------- -public void OnMapStart() -{ - GetTeams(); -} - //---------------------------------------------------------------------------------------------------- // Purpose: //---------------------------------------------------------------------------------------------------- @@ -74,7 +66,7 @@ public void OnStartTouch(const char[] sOutput, int iCaller, int iActivator, floa CreateTimer(g_cCD.FloatValue, ResetCD); - LogPlayerEvent(iActivator, "triggered", "trigger"); + LH_LogPlayerEvent(iActivator, "triggered", "trigger", true); } //---------------------------------------------------------------------------------------------------- @@ -106,7 +98,7 @@ public void OnPressed(const char[] sOutput, int iCaller, int iActivator, float f CreateTimer(g_cCD.FloatValue, ResetCD); - LogPlayerEvent(iActivator, "triggered", "trigger"); + LH_LogPlayerEvent(iActivator, "triggered", "trigger", true); } //----------------------------------------------------------------------------------------------------