public override int GetHashCode() { int hash = 1; if (UserId != 0) { hash ^= UserId.GetHashCode(); } if (MissionId != 0) { hash ^= MissionId.GetHashCode(); } if (Status != 0) { hash ^= Status.GetHashCode(); } if (Progress != 0L) { hash ^= Progress.GetHashCode(); } if (Finish != 0L) { hash ^= Finish.GetHashCode(); } return(hash); }
/// <summary> /// Adds a mission id to the filter, if a player has this mission active the game object will be hidden /// </summary> /// <param name="missionId"></param> public void AddMissionIdToFilter(MissionId missionId) { lock (MissionIdFilter) { MissionIdFilter.Add(missionId); } }
public override int GetHashCode() { int hash = 1; if (MissionId != 0) { hash ^= MissionId.GetHashCode(); } if (MissionGroupId != 0) { hash ^= MissionGroupId.GetHashCode(); } if (U3 != 0) { hash ^= U3.GetHashCode(); } hash ^= parameters_.GetHashCode(); hash ^= objectives_.GetHashCode(); if (ScheduleId.Length != 0) { hash ^= ScheduleId.GetHashCode(); } if (U7 != 0) { hash ^= U7.GetHashCode(); } if (U8 != 0) { hash ^= U8.GetHashCode(); } if (U9 != 0) { hash ^= U9.GetHashCode(); } hash ^= itemSetIds_.GetHashCode(); if (Number != 0) { hash ^= Number.GetHashCode(); } if (RequirementId != 0) { hash ^= RequirementId.GetHashCode(); } if (U13.Length != 0) { hash ^= U13.GetHashCode(); } if (U14.Length != 0) { hash ^= U14.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { unchecked { int hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (CoopStats?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (FlexibleStats?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ MissionId.GetHashCode(); hashCode = (hashCode * 397) ^ (SoloStats?.GetHashCode() ?? 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = ContentId.GetHashCode(); hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ Id; hashCode = (hashCode * 397) ^ (ImageUrl?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ MissionId.GetHashCode(); hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0); return(hashCode); } }
public bool Equals(CampaignMissionStat other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(base.Equals(other) && CoopStats.OrderBy(cs => cs.Key).SequenceEqual(other.CoopStats.OrderBy(cs => cs.Key)) && Equals(FlexibleStats, other.FlexibleStats) && MissionId.Equals(other.MissionId) && SoloStats.OrderBy(ss => ss.Key).SequenceEqual(other.SoloStats.OrderBy(ss => ss.Key))); }
public override int GetHashCode() { int hash = 1; if (MissionId != 0) { hash ^= MissionId.GetHashCode(); } if (MissionName.Length != 0) { hash ^= MissionName.GetHashCode(); } if (MissionType != 0) { hash ^= MissionType.GetHashCode(); } hash ^= award_.GetHashCode(); if (MissionDesc.Length != 0) { hash ^= MissionDesc.GetHashCode(); } if (JumpTo.Length != 0) { hash ^= JumpTo.GetHashCode(); } if (Weight != 0) { hash ^= Weight.GetHashCode(); } if (Player != 0) { hash ^= Player.GetHashCode(); } if (PopUps != 0) { hash ^= PopUps.GetHashCode(); } if (extra_ != null) { hash ^= Extra.GetHashCode(); } return(hash); }
public bool Equals(Skull other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(ContentId.Equals(other.ContentId) && string.Equals(Description, other.Description) && Id == other.Id && string.Equals(ImageUrl, other.ImageUrl) && MissionId.Equals(other.MissionId) && string.Equals(Name, other.Name)); }
public override int GetHashCode() { int hash = 1; if (MissionId != 0) { hash ^= MissionId.GetHashCode(); } if (ItemRandom != 0) { hash ^= ItemRandom.GetHashCode(); } hash ^= award_.GetHashCode(); if (MissionDesc.Length != 0) { hash ^= MissionDesc.GetHashCode(); } return(hash); }
/* void Utils.FindGame(GameType gameType, MissionId missionId, [optional]long deckId, [optional] long aiDeckId) * Finds Game */ public static void FindGame(GameType gameType, MissionId missionId, long deckId = 0, long aiDeckId = 0) { GameMgr.Get().FindGame((PegasusShared.GameType)gameType, (int)missionId, deckId, aiDeckId); GameMgr.Get().UpdatePresence(); }
/// <summary> /// Returns the mission with a given id from the mission inventory. /// </summary> /// <param name="missionId">The id of the mission to get from the inventory</param> /// <returns>A mission instance if the player has this mission, <c>default</c> otherwise.</returns> public MissionInstance GetMission(MissionId missionId) { return(GetMission((int)missionId)); }
/// <summary> /// Whether a player has an active mission that has the provided id as mission id. /// </summary> /// <param name="id">The id of the mission to find in the mission inventory</param> /// <returns><c>true</c> if the player has an active mission with the given id, <c>false</c> otherwise</returns> public bool HasActive(MissionId id) => HasActive((int)id);
Mission<ArmaGameData, RealVirtualityLaunchGlobalState> FindMission(MissionId id) { return _missionContainers.SelectMany(x => x.List).First(x => x.Id == id.Id); }
public Task Launch(MissionId id, IMediator mediator) { return _controller.Launch(new[] {FindMission(id)}, mediator); }
public Task Verify(MissionId id, IMediator mediator) { return _controller.Install(FindMission(id), mediator); }
public static string GetKey(MissionId id) { return(MissionKey[(int)id]); }