Add track to Shavit_OnWRDeleted.

This commit is contained in:
shavitush 2017-07-29 08:55:33 +03:00
parent 17c3c2c2db
commit e903614ca0
2 changed files with 14 additions and 9 deletions

View File

@ -384,9 +384,10 @@ forward void Shavit_OnWorldRecord(int client, int style, float time, int jumps,
*
* @param style Style the record was done on.
* @param id Record ID. -1 if mass deletion.
* @param track Timer track.
* @noreturn
*/
forward void Shavit_OnWRDeleted(int style, int id);
forward void Shavit_OnWRDeleted(int style, int id, int track);
/**
* Called when a player's timer paused.

View File

@ -123,7 +123,7 @@ public void OnPluginStart()
// forwards
gH_OnWorldRecord = CreateGlobalForward("Shavit_OnWorldRecord", ET_Event, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell);
gH_OnFinish_Post = CreateGlobalForward("Shavit_OnFinish_Post", ET_Event, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell);
gH_OnWRDeleted = CreateGlobalForward("Shavit_OnWRDeleted", ET_Event, Param_Cell, Param_Cell);
gH_OnWRDeleted = CreateGlobalForward("Shavit_OnWRDeleted", ET_Event, Param_Cell, Param_Cell, Param_Cell);
gH_OnWorstRecord = CreateGlobalForward("Shavit_OnWorstRecord", ET_Event, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell);
// player commands
@ -1051,7 +1051,7 @@ public int DeleteConfirm_Handler(Menu menu, MenuAction action, int param1, int p
Call_StartForward(gH_OnWRDeleted);
Call_PushCell(i);
Call_PushCell(iRecordID);
// Call_PushCell(j); // TODO: TRACK
Call_PushCell(j);
Call_Finish();
}
}
@ -1119,10 +1119,14 @@ public void DeleteAll_Callback(Database db, DBResultSet results, const char[] er
continue;
}
Call_StartForward(gH_OnWRDeleted);
Call_PushCell(i);
Call_PushCell(-1);
Call_Finish();
for(int j = 0; j < TRACKS_SIZE; j++)
{
Call_StartForward(gH_OnWRDeleted);
Call_PushCell(i);
Call_PushCell(-1);
Call_PushCell(j);
Call_Finish();
}
}
int client = GetClientFromSerial(data);
@ -1719,13 +1723,13 @@ public int SubMenu_Handler(Menu m, MenuAction action, int param1, int param2)
else
{
StartWRMenu(param1, gS_ClientMap[param1], gBS_LastWR[param1], Track_Main); // TODO: use client's cached track
StartWRMenu(param1, gS_ClientMap[param1], gBS_LastWR[param1], Track_Main);
}
}
else if(action == MenuAction_Cancel && param2 == MenuCancel_ExitBack)
{
StartWRMenu(param1, gS_ClientMap[param1], gBS_LastWR[param1], Track_Main); // TODO: use client's cached track
StartWRMenu(param1, gS_ClientMap[param1], gBS_LastWR[param1], Track_Main);
}
else if(action == MenuAction_End)