public bool RegisterGuard(BaseFactionGuard guard) { if (guard == null) { return(false); } GuardList guardList = FindGuardList(guard.GetType()); if (guardList == null) { return(false); } guardList.Guards.Add(guard); return(true); }
public bool UnregisterGuard(BaseFactionGuard guard) { if (guard == null) { return(false); } GuardList guardList = FindGuardList(guard.GetType()); if (guardList == null) { return(false); } if (!guardList.Guards.Contains(guard)) { return(false); } guardList.Guards.Remove(guard); return(true); }