public static void SetDeath(List <DeathServerData> deaths, Player player, CHARA_DEATH deathType) { player._life = 0; player.isDead = true; player.LastDie = DateTime.Now; deaths.Add(new DeathServerData { _player = player, _deathType = deathType }); }
public static void SetHitEffect(List <ObjectHitInfo> objs, Player player, CHARA_DEATH deathType, int hitPart) { objs.Add(new ObjectHitInfo(5) { objId = player._slot, killerId = player._slot, deathType = deathType, objLife = hitPart }); }
public static void SimpleDeath(List <DeathServerData> deaths, List <ObjectHitInfo> objs, Player killer, Player victim, int damage, int weapon, int hitPart, CHARA_DEATH deathType) { victim._life -= damage; if (victim._life <= 0) { SetDeath(deaths, victim, deathType); } else { SetHitEffect(objs, victim, killer, deathType, hitPart); } objs.Add(new ObjectHitInfo(2) { objId = victim._slot, objLife = victim._life, hitPart = hitPart, killerId = killer._slot, Position = ((Vector3)victim.Position - killer.Position), deathType = deathType, weaponId = weapon }); }