public Assist() { Assistant = String.Empty; Weapon = default; Elapsed = TotalDamage = 0.0; DamageFlags = DamageFlag.None; }
public Assist(string assistant, Weapon weapon, double elapsed, double totalDamage, DamageFlag damageFlags) { Assistant = assistant; Weapon = weapon; Elapsed = elapsed; TotalDamage = totalDamage; DamageFlags = damageFlags; }
public KillAssist(long timeStamp, string assistant, string weapon, double elapsed, double totalDamage, DamageFlag damageFlags) { TimeStamp = timeStamp; Assistant = assistant; Weapon = weapon; Elapsed = elapsed; TotalDamage = totalDamage; DamageFlags = damageFlags; }
public Damage(long timeStamp, string victim, string attacker, string weapon, double damageAmmount, DamageFlag damageFlags) { TimeStamp = timeStamp; Victim = victim; Attacker = attacker; Weapon = weapon; DamageAmmount = damageAmmount; DamageFlags = damageFlags; }
private async void SetGodmode(DamageFlag flag) { bool[] canExecuteFunction = await CanExecuteFunction(); if (!canExecuteFunction[0]) { return; } if (ImHost()) { SelectedPlayer.SetGodmode(flag); } else { SelectedPlayer.RCE.SetGodmode(flag); } }
public bool TryGetEntity( IConsoleShell shell, IPlayerSession?player, string[] args, bool adding, [NotNullWhen(true)] out IEntity?entity, out DamageFlag flag, [NotNullWhen(true)] out IDamageableComponent?damageable) { entity = null; flag = DamageFlag.None; damageable = null; IEntity? parsedEntity; DamageFlag parsedFlag; IDamageableComponent?parsedDamageable; switch (args.Length) { case 1: { if (player == null) { shell.SendText(player, "An entity needs to be specified when the command isn't used by a player."); return(false); } if (player.AttachedEntity == null) { shell.SendText(player, "An entity needs to be specified when you aren't attached to an entity."); return(false); } if (!Enum.TryParse(args[0], true, out parsedFlag)) { shell.SendText(player, $"{args[0]} is not a valid damage flag."); return(false); } parsedEntity = player.AttachedEntity; flag = parsedFlag; break; } case 2: { if (!EntityUid.TryParse(args[0], out var id)) { shell.SendText(player, $"{args[0]} isn't a valid entity id."); return(false); } var entityManager = IoCManager.Resolve <IEntityManager>(); if (!entityManager.TryGetEntity(id, out parsedEntity)) { shell.SendText(player, $"No entity found with id {id}."); return(false); } if (!Enum.TryParse(args[1], true, out parsedFlag)) { shell.SendText(player, $"{args[1]} is not a valid damage flag."); return(false); } break; } default: shell.SendText(player, Help); return(false); } if (!parsedEntity.TryGetComponent(out parsedDamageable)) { shell.SendText(player, $"Entity {parsedEntity.Name} doesn't have a {nameof(IDamageableComponent)}"); return(false); } if (parsedDamageable.HasFlag(parsedFlag) && adding) { shell.SendText(player, $"Entity {parsedEntity.Name} already has damage flag {parsedFlag}."); return(false); } else if (!parsedDamageable.HasFlag(parsedFlag) && !adding) { shell.SendText(player, $"Entity {parsedEntity.Name} doesn't have damage flag {parsedFlag}."); return(false); } entity = parsedEntity; flag = parsedFlag; damageable = parsedDamageable; return(true); }
public DamageableComponentState(Dictionary <DamageType, int> damageList, DamageFlag flags) : base(ContentNetIDs.DAMAGEABLE) { DamageList = damageList; Flags = flags; }
public void SetGodmode(DamageFlag flag) { PS3.Extension.WriteUInt32(G_Entity(Addresses.G_EntityStruct.Godmode), (uint)flag); }
public void SetGodmode(DamageFlag flag) { WriteUInt32(Player.G_Entity(Addresses.G_EntityStruct.Godmode), (uint)flag); }
public void AddDamageFlag(DamageFlag flag) { flags.Add(flag, flag); }