forked from UNLOZE/sm-plugins
BossHP: General Kenobi cleans house.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user