Example #1
0
 public PokemonUiData(BotWindowData ownerBot, ulong id, PokemonId pokemonid, string name, //BitmapSource img,
                      int cp, double iv, PokemonFamilyId family, int candy, ulong stamp, bool fav, bool inGym, double level,
                      PokemonMove move1, PokemonMove move2, PokemonType type1, PokemonType type2, int maxCp, BaseStats baseStats,
                      int stamina, int maxStamina, int possibleCp, int candyToEvolve)
 {
     OwnerBot  = ownerBot;
     Favoured  = fav;
     InGym     = inGym;
     Id        = id;
     PokemonId = pokemonid;
     //Image = img;
     Name          = name;
     Cp            = cp;
     Iv            = iv;
     Candy         = candy;
     Family        = family;
     Timestamp     = stamp;
     Level         = level;
     Move1         = move1;
     Move2         = move2;
     Type1         = type1;
     Type2         = type2;
     MaxCp         = maxCp;
     Stats         = baseStats;
     Stamina       = stamina;
     MaxStamina    = maxStamina;
     CandyToEvolve = candyToEvolve;
     PossibleCp    = possibleCp;
 }
Example #2
0
 public void GotNewPokemon(ulong uid, PokemonId pokemonId, int cp, double iv, PokemonFamilyId family, int candy, bool fav, bool inGym, double level, PokemonMove move1, PokemonMove move2, PokemonType type1, PokemonType type2, int maxCp, int stamina, int maxStamina, int possibleCp, int candyToEvolve)
 {
     PokemonList.Add(new PokemonUiData(
                         this,
                         uid,
                         pokemonId,
                         //pokemonId.ToInventorySource(),
                         pokemonId.ToString(),
                         cp,
                         iv,
                         family,
                         candy,
                         (ulong)DateTime.UtcNow.ToUnixTime(),
                         fav,
                         inGym,
                         level,
                         move1,
                         move2,
                         type1,
                         type2,
                         maxCp,
                         PokemonInfo.GetBaseStats(pokemonId),
                         stamina,
                         maxStamina,
                         possibleCp,
                         candyToEvolve));
     foreach (var pokemon in PokemonList.Where(x => x.Family == family))
     {
         pokemon.Candy = candy;
         pokemon.UpdateTags(Logic);
     }
 }
        public void PokemonUpdated(ulong uid, int cp, double iv, PokemonFamilyId family, int candy, bool favourite, string name, int maxCp, int ivAtk, int ivDef, float cpm, float weight, double level, int stamina, int staminaMax)
        {
            var pokemonToUpdate = PokemonList.FirstOrDefault(x => x.Id == uid);

            if (pokemonToUpdate == null)
            {
                return;
            }
            pokemonToUpdate.Cp         = cp;
            pokemonToUpdate.Iv         = iv;
            pokemonToUpdate.MaxCp      = maxCp;
            pokemonToUpdate.Favoured   = favourite;
            pokemonToUpdate.Name       = name;
            pokemonToUpdate.IvAtk      = ivAtk;
            pokemonToUpdate.IvDef      = ivDef;
            pokemonToUpdate.Cpm        = cpm;
            pokemonToUpdate.Level      = level;
            pokemonToUpdate.Weight     = weight;
            pokemonToUpdate.Stamina    = stamina;
            pokemonToUpdate.MaxStamina = staminaMax;
            foreach (var pokemon in PokemonList.Where(x => x.Family == family))
            {
                pokemon.Candy = candy;
            }
        }
Example #4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PokemonId != 0UL)
            {
                hash ^= PokemonId.GetHashCode();
            }
            if (Item != 0)
            {
                hash ^= Item.GetHashCode();
            }
            if (PokedexEntryId != 0)
            {
                hash ^= PokedexEntryId.GetHashCode();
            }
            if (PlayerStats != false)
            {
                hash ^= PlayerStats.GetHashCode();
            }
            if (PlayerCurrency != false)
            {
                hash ^= PlayerCurrency.GetHashCode();
            }
            if (PlayerCamera != false)
            {
                hash ^= PlayerCamera.GetHashCode();
            }
            if (InventoryUpgrades != false)
            {
                hash ^= InventoryUpgrades.GetHashCode();
            }
            if (AppliedItems != false)
            {
                hash ^= AppliedItems.GetHashCode();
            }
            if (EggIncubators != false)
            {
                hash ^= EggIncubators.GetHashCode();
            }
            if (PokemonFamilyId != 0)
            {
                hash ^= PokemonFamilyId.GetHashCode();
            }
            if (QuestType != 0)
            {
                hash ^= QuestType.GetHashCode();
            }
            if (AvatarTemplateId.Length != 0)
            {
                hash ^= AvatarTemplateId.GetHashCode();
            }
            if (RaidTickets != false)
            {
                hash ^= RaidTickets.GetHashCode();
            }
            return(hash);
        }
Example #5
0
 public void UpdateFamilyCandies(PokemonFamilyId familyCandyId, int candyEarnedCount)
 {
     if (_bot == null)
     {
         return;
     }
     foreach (var poke in _bot.PokemonList.Where(x => x.Family == familyCandyId))
     {
         poke.Candy += candyEarnedCount;
     }
 }
Example #6
0
 public PokemonUiData(ulong id, PokemonId pokemonid, BitmapSource img, string name, int cp, double iv, PokemonFamilyId family, int candy, ulong stamp)
 {
     Id        = id;
     PokemonId = pokemonid;
     Image     = img;
     Name      = name;
     Cp        = cp;
     Iv        = iv;
     Candy     = candy;
     Family    = family;
     Timestamp = stamp;
 }
Example #7
0
        public void PokemonUpdated(ulong uid, int cp, double iv, PokemonFamilyId family, int candy)
        {
            var pokemonToUpdate = PokemonList.FirstOrDefault(x => x.Id == uid);

            if (pokemonToUpdate == null)
            {
                return;
            }
            pokemonToUpdate.Cp = cp;
            pokemonToUpdate.Iv = iv;
            foreach (var pokemon in PokemonList.Where(x => x.Family == family))
            {
                pokemon.Candy = candy;
            }
        }
Example #8
0
 public PokemonUiData(BotWindowData ownerBot, ulong id, PokemonId pokemonid, BitmapSource img, string name, int cp, double iv, PokemonFamilyId family, int candy, ulong stamp, bool fav, bool inGym)
 {
     OwnerBot  = ownerBot;
     Favoured  = fav;
     InGym     = inGym;
     Id        = id;
     PokemonId = pokemonid;
     Image     = img;
     Name      = name;
     Cp        = cp;
     Iv        = iv;
     Candy     = candy;
     Family    = family;
     Timestamp = stamp;
 }
Example #9
0
 public void GotNewPokemon(ulong uid, PokemonId pokemonId, int cp, double iv, PokemonFamilyId family, int candy)
 {
     PokemonList.Add(new PokemonUiData(
                         uid,
                         pokemonId,
                         pokemonId.ToInventorySource(),
                         pokemonId.ToString(),
                         cp,
                         iv,
                         family,
                         candy,
                         (ulong)DateTime.UtcNow.ToUnixTime()));
     foreach (var pokemon in PokemonList.Where(x => x.Family == family))
     {
         pokemon.Candy = candy;
         pokemon.UpdateTags(Logic);
     }
 }
Example #10
0
 public PokemonUiData(BotWindowData ownerBot, ulong id, PokemonId pokemonid, string name, //BitmapSource img,
                      int cp, double iv, PokemonFamilyId family, int candy, ulong stamp, bool fav, bool inGym, double level,
                      PokemonMove move1, PokemonMove move2, PokemonType type1, PokemonType type2, int maxCp, BaseStats baseStats,
                      int stamina, int ivSta, int possibleCp, int candyToEvolve, int ivAtk, int ivDef, float cpm,
                      float weight, int maxStamina, PokemonId[] evolutions, bool buddy)
 {
     OwnerBot  = ownerBot;
     Favoured  = fav;
     InGym     = inGym;
     Id        = id;
     PokemonId = pokemonid;
     //Image = img;
     Name          = name;
     Cp            = cp;
     Iv            = iv;
     Candy         = candy;
     Family        = family;
     Timestamp     = stamp;
     Level         = level;
     Move1         = move1;
     Move2         = move2;
     Type1         = type1;
     Type2         = type2;
     MaxCp         = maxCp;
     Stats         = baseStats;
     Stamina       = stamina;
     IvSta         = ivSta;
     CandyToEvolve = candyToEvolve;
     PossibleCp    = possibleCp;
     IvAtk         = ivAtk;
     IvDef         = ivDef;
     Cpm           = cpm;
     Weight        = weight;
     MaxStamina    = maxStamina;
     Evolutions    = evolutions;
     Buddy         = buddy;
 }