diff --git a/.classpath b/.classpath
index d40ed68..cbb12c3 100644
--- a/.classpath
+++ b/.classpath
@@ -14,5 +14,6 @@
+
diff --git a/bin/.gitignore b/bin/.gitignore
new file mode 100644
index 0000000..a8e1bdd
--- /dev/null
+++ b/bin/.gitignore
@@ -0,0 +1 @@
+/name/
diff --git a/bin/config.properties b/bin/config.properties
deleted file mode 100644
index f5fc85c..0000000
--- a/bin/config.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-username=admin@yumao.name
-password=65617875
-base64_password=
-pokemon_lang=CN
-latitude=37.807297
-longitude=-122.429535
-api_loop_await=500
-bot_thread_max=3
-bot_thread_await=6000
-bot_update_profile=true
-bot_upprofile_await=300000
-bot_hatch_egg=true
-bot_keepalive=true
-bot_loot_pokestop=true
-bot_walk_speed=1.78
-bot_cold_time=60000
-bot_catch_pokemon=true
-bot_release_pokemon=true
-bot_drop_item=true
-item_revive=20
-item_max_revive=10
-item_potion=0
-item_super_potion=10
-item_hyper_potion=30
-item_max_potion=50
-item_poke_ball=30
-item_great_ball=50
-item_ultra_ball=70
-item_master_ball=90
-item_razz_berry=50
-transfer_iv_threshold=90
-transfer_cp_threshold=-1
-ignored_pokemon=MEWTWO,MEW
-obligatory_transfer=DODUO,RATTATA,CATERPIE,PIDGEY,ZUBAT
\ No newline at end of file
diff --git a/bin/name/teemo/pogo/PokemonGoBot$ComparatorPM.class b/bin/name/teemo/pogo/PokemonGoBot$ComparatorPM.class
index f31cac8..3c6aefe 100644
Binary files a/bin/name/teemo/pogo/PokemonGoBot$ComparatorPM.class and b/bin/name/teemo/pogo/PokemonGoBot$ComparatorPM.class differ
diff --git a/bin/name/teemo/pogo/PokemonGoBot.class b/bin/name/teemo/pogo/PokemonGoBot.class
index 84a9421..dfe1c2c 100644
Binary files a/bin/name/teemo/pogo/PokemonGoBot.class and b/bin/name/teemo/pogo/PokemonGoBot.class differ
diff --git a/bin/name/teemo/pogo/PokemonGoBotMain.class b/bin/name/teemo/pogo/PokemonGoBotMain.class
index 1a1629b..f15a9cb 100644
Binary files a/bin/name/teemo/pogo/PokemonGoBotMain.class and b/bin/name/teemo/pogo/PokemonGoBotMain.class differ
diff --git a/resource/config.properties b/config.properties
similarity index 94%
rename from resource/config.properties
rename to config.properties
index 22a1926..3e98b62 100644
--- a/resource/config.properties
+++ b/config.properties
@@ -5,6 +5,7 @@ pokemon_lang=CN
latitude=37.807297
longitude=-122.429535
api_loop_await=500
+rename_to_iv=false
bot_thread_max=3
bot_thread_await=6000
bot_update_profile=true
@@ -16,7 +17,7 @@ bot_walk_speed=1.78
bot_cold_time=60000
bot_catch_pokemon=true
bot_release_pokemon=true
-bot_drop_item=true
+bot_drop_item=false
item_revive=20
item_max_revive=10
item_potion=0
diff --git a/lib/moshi-1.2.0.jar b/lib/moshi-1.2.0.jar
new file mode 100644
index 0000000..7797c9c
Binary files /dev/null and b/lib/moshi-1.2.0.jar differ
diff --git a/src/name/teemo/pogo/PokemonGoBot.java b/src/name/teemo/pogo/PokemonGoBot.java
index 9dd03d0..36bbef0 100644
--- a/src/name/teemo/pogo/PokemonGoBot.java
+++ b/src/name/teemo/pogo/PokemonGoBot.java
@@ -78,6 +78,15 @@ public void run() {
logger.info("持有宝可梦:");
}
for(Pokemon pokemon : pokemons){
+ try{
+ if(Boolean.parseBoolean(Config.getProperty("rename_to_iv"))){
+ if(!pokemon.getNickname().equals(decimalFormat.format(pokemon.getIvRatio()))){
+ pokemon.renamePokemon(decimalFormat.format(pokemon.getIvRatio()));
+ Thread.sleep(Long.parseLong(Config.getProperty("api_loop_await")));
+ }
+ }
+ }catch (Exception e) {
+ }
logger.info("名称:" + PokemonName.getPokemonName(pokemon.getPokemonId().name(), Config.getProperty("pokemon_lang")) + " / CP:" + pokemon.getCp() + " / IV:" + Double.parseDouble(decimalFormat.format(pokemon.getIvRatio()))*100 + "%");
}
diff --git a/src/name/teemo/pogo/PokemonGoBotMain.java b/src/name/teemo/pogo/PokemonGoBotMain.java
index acbda38..ca70abc 100644
--- a/src/name/teemo/pogo/PokemonGoBotMain.java
+++ b/src/name/teemo/pogo/PokemonGoBotMain.java
@@ -26,7 +26,7 @@ public static void main(String[] args) throws Exception {
httpBuilder.writeTimeout(60, TimeUnit.SECONDS);
OkHttpClient httpClient = httpBuilder.build();
- Config.setConfigResource(Class.class.getClass().getResource("/").getPath() + "config.properties");
+ Config.setConfigResource("config.properties");
logger.info("正在登录服务器...");