BossHP: General Kenobi cleans house.

This commit is contained in:
zaCade
2018-10-15 23:14:54 +02:00
parent 17dfe2f334
commit 2d3c9e1966
3 changed files with 72 additions and 66 deletions
+11 -26
View File
@@ -7,9 +7,6 @@
ArrayList g_hStats[MAXPLAYERS+1];
bool g_bLoadedLate;
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
@@ -21,30 +18,17 @@ public Plugin myinfo =
version = "1.0.0",
};
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public APLRes AskPluginLoad2(Handle hThis, bool bLate, char[] err, int iErrLen)
{
g_bLoadedLate = bLate;
return APLRes_Success;
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnPluginStart()
{
if (g_bLoadedLate)
for (int client = 1; client <= MaxClients; client++)
{
for (int i = 1; i <= MaxClients; i++)
{
if (!IsClientInGame(i) || IsFakeClient(i))
continue;
if (!IsClientInGame(client))
continue;
OnClientPutInServer(i);
}
OnClientPutInServer(client);
}
}
@@ -67,7 +51,7 @@ public void OnClientDisconnect(int client)
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnBossDamaged(any Boss, int client)
public void OnBossDamaged(any Boss, any Config, int client)
{
if (!IsValidClient(client))
return;
@@ -96,7 +80,7 @@ public void OnBossDamaged(any Boss, int client)
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnBossKilled(any Boss, int reason)
public void OnBossKilled(any Boss, any Config, int reason)
{
if (reason != 2)
{
@@ -149,11 +133,12 @@ public void OnBossKilled(any Boss, int reason)
if (iSortedCount)
{
CConfig _Config = view_as<CConfig>(Config);
char sBossName[64];
CBoss _Boss = view_as<CBoss>(Boss);
CConfig Config = _Boss.dConfig;
Config.GetName(sBossName, sizeof(sBossName))
delete Config;
_Config.GetName(sBossName, sizeof(sBossName));
delete _Config;
char sBuffer[512];
Format(sBuffer, sizeof(sBuffer), "BOSS DAMAGE [%s]:", sBossName);