mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
Fix Death Tracking again (#18181)
* Fixes SQL Death Tracking again Removes the foreign key constraint from the ckeys. -> Ckeys can have different values i.e. when someone dies while aghosted the ckey becomes @ckey Ensurs that the char_id is set to null and not 0 -> To make sure the foreign key constraint there actually works * Simpler changelog --------- Co-authored-by: Werner <Arrow768@users.noreply.github.com>
This commit is contained in:
@@ -259,14 +259,14 @@ GENERAL_PROTECT_DATUM(/datum/controller/subsystem/statistics)
|
||||
if(!query.Execute(list(
|
||||
"name"=H.real_name,
|
||||
"ckey"=H.ckey,
|
||||
"char_id"=H.character_id,
|
||||
"char_id"=H.character_id ? H.character_id : null, //make sure we set the char id to null and not 0 so we dont violate the constraint
|
||||
"job"=H?.mind?.assigned_role,
|
||||
"special"=H?.mind?.special_role,
|
||||
"pod"=podname,
|
||||
"tod"=time2text(world.realtime, "YYYY-MM-DD hh:mm:ss"),
|
||||
"laname"=H?.lastattacker?.real_name,
|
||||
"lackey"=H?.lastattacker?.ckey,
|
||||
"lachar_id"=H?.lastattacker?.character_id,
|
||||
"lachar_id"=H?.lastattacker?.character_id ? H?.lastattacker?.character_id : null, //make sure we set the char id to null and not 0 so we dont violate the constraint
|
||||
"gender"=H.gender,
|
||||
"bruteloss"=H.getBruteLoss(),
|
||||
"fireloss"=H.getFireLoss(),
|
||||
|
||||
Reference in New Issue
Block a user