public override int GetHashCode() { int hash = 1; if (Uid != 0UL) { hash ^= Uid.GetHashCode(); } if (Recharge != 0) { hash ^= Recharge.GetHashCode(); } if (Diamonds != 0) { hash ^= Diamonds.GetHashCode(); } if (VipLevel != 0) { hash ^= VipLevel.GetHashCode(); } if (Username.Length != 0) { hash ^= Username.GetHashCode(); } return(hash); }
public void willGetACardWithKings() { var validString = "K-D"; var ExpectedCard = new Diamonds(Card.KING); var ActualCard = CardBuilder.fromString(validString); Assert.AreEqual(ExpectedCard, ActualCard); }
private void Start() { _uiManager = UIManager.instance; _uiManager.winDiamondsText.text = PlayerPrefs.GetInt("Diamonds", 0).ToString(); _uiManager.currentLevelText.text = Level.ToString(); _uiManager.nextLevelText.text = Level == levels.Length ? "1" : (Level + 1).ToString(); _uiManager.startDiamondsText.text = Diamonds.ToString(); _soundManager = SoundManager.instance; }
public override int GetHashCode() { int hash = 1; if (AccountId != 0UL) { hash ^= AccountId.GetHashCode(); } if (PlayerId != 0UL) { hash ^= PlayerId.GetHashCode(); } if (Diamonds != 0) { hash ^= Diamonds.GetHashCode(); } if (OldLevel != 0) { hash ^= OldLevel.GetHashCode(); } if (OldExp != 0) { hash ^= OldExp.GetHashCode(); } if (AddedExp != 0) { hash ^= AddedExp.GetHashCode(); } if (Hp != 0) { hash ^= Hp.GetHashCode(); } if (Mp != 0) { hash ^= Mp.GetHashCode(); } if (Food != 0) { hash ^= Food.GetHashCode(); } if (Gold != 0) { hash ^= Gold.GetHashCode(); } hash ^= cards_.GetHashCode(); hash ^= cardTemps_.GetHashCode(); hash ^= items_.GetHashCode(); hash ^= itemTemps_.GetHashCode(); hash ^= buffs_.GetHashCode(); hash ^= buffTemps_.GetHashCode(); hash ^= equips_.GetHashCode(); hash ^= equipTemps_.GetHashCode(); return(hash); }
private bool IsPositionEmpty(Position position) { var positionHasBot = Bots.Any(b => b.Position.Equals(position)); var positionHasBase = Bots.Any(b => b.Base.Equals(position)); var positionHasDiamond = Diamonds.Contains(position); var positionHasGameObject = GameObjects.Any(gi => gi.Position.Equals(position)); return(positionHasBot == false && positionHasBase == false && positionHasDiamond == false && positionHasGameObject == false); }
public override int GetHashCode() { int hash = 1; if (AccountId != 0UL) { hash ^= AccountId.GetHashCode(); } if (PlayerId != 0UL) { hash ^= PlayerId.GetHashCode(); } if (Reason != 0) { hash ^= Reason.GetHashCode(); } if (Diamonds != 0) { hash ^= Diamonds.GetHashCode(); } if (Level != 0) { hash ^= Level.GetHashCode(); } if (Exp != 0) { hash ^= Exp.GetHashCode(); } if (Hp != 0) { hash ^= Hp.GetHashCode(); } if (Mp != 0) { hash ^= Mp.GetHashCode(); } if (Food != 0) { hash ^= Food.GetHashCode(); } if (Gold != 0) { hash ^= Gold.GetHashCode(); } hash ^= cards_.GetHashCode(); hash ^= items_.GetHashCode(); hash ^= buffs_.GetHashCode(); hash ^= equips_.GetHashCode(); return(hash); }
private void CheckOnlineTime() { try { if (OnlineTimeStopwatch.ElapsedMilliseconds >= 60000) { foreach (GameClient client in clients.Values) { if (client == null || client.GetHabbo() == null) { continue; } OtanixEnvironment.GetGame().GetAchievementManager().ProgressUserAchievement(client.GetHabbo().Id, "ACH_AllTimeHotelPresence", 1); if (client.GetHabbo().AlfaServiceEnabled) { OtanixEnvironment.GetGame().GetAchievementManager().ProgressUserAchievement(client.GetHabbo().Id, "ACH_GuideOnDutyPresence", 1); } if (client.GetHabbo().CitizenshipLevel == 1 || client.GetHabbo().CitizenshipLevel == 2 || client.GetHabbo().CitizenshipLevel == 3) { OtanixEnvironment.GetGame().GetTalentManager().UpdateTalentTravel(client, "citizenship"); } else if (client.GetHabbo().HelperLevel == 3 || client.GetHabbo().HelperLevel == 4 || client.GetHabbo().HelperLevel == 5 || client.GetHabbo().HelperLevel == 6 || client.GetHabbo().HelperLevel == 7) { OtanixEnvironment.GetGame().GetTalentManager().UpdateTalentTravel(client, "helper"); } Diamonds.GiveCycleDiamonds(client); Moedas.GiveCycleMoedas(client); MensagensAutomaticas.MostraNotificacaoUser(client); Club.UpdateClubCycleExpiration(client); } OnlineTimeStopwatch.Restart(); } } catch { } }