diff --git a/Core/resources/mapTypes/be.json b/Core/resources/mapTypes/be.json index 3503f9527..9e26dfeeb 100644 --- a/Core/resources/mapTypes/be.json +++ b/Core/resources/mapTypes/be.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDFD6️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/castle_entrance.json b/Core/resources/mapTypes/castle_entrance.json index 79b9169dc..9e26dfeeb 100644 --- a/Core/resources/mapTypes/castle_entrance.json +++ b/Core/resources/mapTypes/castle_entrance.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDFF0" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/castle_throne.json b/Core/resources/mapTypes/castle_throne.json index f3f25814a..9e26dfeeb 100644 --- a/Core/resources/mapTypes/castle_throne.json +++ b/Core/resources/mapTypes/castle_throne.json @@ -1,3 +1 @@ -{ - "emote": "\uD83E\uDE91" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/ci.json b/Core/resources/mapTypes/ci.json index 9604f0514..9e26dfeeb 100644 --- a/Core/resources/mapTypes/ci.json +++ b/Core/resources/mapTypes/ci.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDFD8" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/continent.json b/Core/resources/mapTypes/continent.json index 8eaef5f0a..9e26dfeeb 100644 --- a/Core/resources/mapTypes/continent.json +++ b/Core/resources/mapTypes/continent.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDFDE️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/crystal_cavern.json b/Core/resources/mapTypes/crystal_cavern.json index 2b2b6316b..9e26dfeeb 100644 --- a/Core/resources/mapTypes/crystal_cavern.json +++ b/Core/resources/mapTypes/crystal_cavern.json @@ -1,3 +1 @@ -{ - "emote": "\uD83D\uDC8E️️️️️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/de.json b/Core/resources/mapTypes/de.json index 4160ac404..9e26dfeeb 100644 --- a/Core/resources/mapTypes/de.json +++ b/Core/resources/mapTypes/de.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDFDC️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/fo.json b/Core/resources/mapTypes/fo.json index 8afa49082..9e26dfeeb 100644 --- a/Core/resources/mapTypes/fo.json +++ b/Core/resources/mapTypes/fo.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDF33" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/ice_beach.json b/Core/resources/mapTypes/ice_beach.json index c8b54b868..9e26dfeeb 100644 --- a/Core/resources/mapTypes/ice_beach.json +++ b/Core/resources/mapTypes/ice_beach.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDF28️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/ice_cavern.json b/Core/resources/mapTypes/ice_cavern.json index 9f76986b5..9e26dfeeb 100644 --- a/Core/resources/mapTypes/ice_cavern.json +++ b/Core/resources/mapTypes/ice_cavern.json @@ -1,3 +1 @@ -{ - "emote": "\uD83E\uDDCA️️️️️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/ice_lake.json b/Core/resources/mapTypes/ice_lake.json index 46646d460..9e26dfeeb 100644 --- a/Core/resources/mapTypes/ice_lake.json +++ b/Core/resources/mapTypes/ice_lake.json @@ -1,3 +1 @@ -{ - "emote": "❄️️️️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/la.json b/Core/resources/mapTypes/la.json index 19b664cc2..9e26dfeeb 100644 --- a/Core/resources/mapTypes/la.json +++ b/Core/resources/mapTypes/la.json @@ -1,3 +1 @@ -{ - "emote": "\uD83D\uDEA3\u200D♂️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/mine.json b/Core/resources/mapTypes/mine.json index 66cc9ad85..9e26dfeeb 100644 --- a/Core/resources/mapTypes/mine.json +++ b/Core/resources/mapTypes/mine.json @@ -1,3 +1 @@ -{ - "emote": "\uD83E\uDEA8" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/mo.json b/Core/resources/mapTypes/mo.json index 85265ef94..9e26dfeeb 100644 --- a/Core/resources/mapTypes/mo.json +++ b/Core/resources/mapTypes/mo.json @@ -1,3 +1 @@ -{ - "emote": "⛰️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/pl.json b/Core/resources/mapTypes/pl.json index 02a61aef3..9e26dfeeb 100644 --- a/Core/resources/mapTypes/pl.json +++ b/Core/resources/mapTypes/pl.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDF3A" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/pve_exit.json b/Core/resources/mapTypes/pve_exit.json index e7055d666..9e26dfeeb 100644 --- a/Core/resources/mapTypes/pve_exit.json +++ b/Core/resources/mapTypes/pve_exit.json @@ -1,3 +1 @@ -{ - "emote": "⛴️️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/ri.json b/Core/resources/mapTypes/ri.json index 8eaef5f0a..9e26dfeeb 100644 --- a/Core/resources/mapTypes/ri.json +++ b/Core/resources/mapTypes/ri.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDFDE️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/ro.json b/Core/resources/mapTypes/ro.json index 600de2573..9e26dfeeb 100644 --- a/Core/resources/mapTypes/ro.json +++ b/Core/resources/mapTypes/ro.json @@ -1,3 +1 @@ -{ - "emote": "\uD83D\uDEE3️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/ruins.json b/Core/resources/mapTypes/ruins.json index c774c1e8d..9e26dfeeb 100644 --- a/Core/resources/mapTypes/ruins.json +++ b/Core/resources/mapTypes/ruins.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDFDA" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/snow_mountain.json b/Core/resources/mapTypes/snow_mountain.json index 55b3c6a60..9e26dfeeb 100644 --- a/Core/resources/mapTypes/snow_mountain.json +++ b/Core/resources/mapTypes/snow_mountain.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDFD4️️️️️️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/snowmen_field.json b/Core/resources/mapTypes/snowmen_field.json index dc0cce258..9e26dfeeb 100644 --- a/Core/resources/mapTypes/snowmen_field.json +++ b/Core/resources/mapTypes/snowmen_field.json @@ -1,3 +1 @@ -{ - "emote": "☃️️️️️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/test_zone.json b/Core/resources/mapTypes/test_zone.json index 4e12d8085..9e26dfeeb 100644 --- a/Core/resources/mapTypes/test_zone.json +++ b/Core/resources/mapTypes/test_zone.json @@ -1,3 +1 @@ -{ - "emote": "\uD83D\uDC7E️️️️️️" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/tundra.json b/Core/resources/mapTypes/tundra.json index 7ac920a2f..9e26dfeeb 100644 --- a/Core/resources/mapTypes/tundra.json +++ b/Core/resources/mapTypes/tundra.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDF32" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/vi.json b/Core/resources/mapTypes/vi.json index e51517f6f..9e26dfeeb 100644 --- a/Core/resources/mapTypes/vi.json +++ b/Core/resources/mapTypes/vi.json @@ -1,3 +1 @@ -{ - "emote": "\uD83D\uDED6" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/mapTypes/volcano.json b/Core/resources/mapTypes/volcano.json index 4b7669b02..9e26dfeeb 100644 --- a/Core/resources/mapTypes/volcano.json +++ b/Core/resources/mapTypes/volcano.json @@ -1,3 +1 @@ -{ - "emote": "\uD83C\uDF0B" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/Core/resources/pets/0.json b/Core/resources/pets/0.json index 3c0e009e4..955f580ca 100644 --- a/Core/resources/pets/0.json +++ b/Core/resources/pets/0.json @@ -1,5 +1,3 @@ { - "emoteMale": "❌", - "emoteFemale": "❌", "rarity": 0 } diff --git a/Core/resources/pets/1.json b/Core/resources/pets/1.json index 5e2ad00b6..a3b5f2e2c 100644 --- a/Core/resources/pets/1.json +++ b/Core/resources/pets/1.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐕", - "emoteFemale": "🐕", "rarity": 1, "diet": "carnivorous" } diff --git a/Core/resources/pets/10.json b/Core/resources/pets/10.json index 7c5913d16..cd08b04d9 100644 --- a/Core/resources/pets/10.json +++ b/Core/resources/pets/10.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐓", - "emoteFemale": "🐔", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/resources/pets/11.json b/Core/resources/pets/11.json index 54860a308..cd08b04d9 100644 --- a/Core/resources/pets/11.json +++ b/Core/resources/pets/11.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐦", - "emoteFemale": "🐦", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/resources/pets/12.json b/Core/resources/pets/12.json index 83238d003..cd08b04d9 100644 --- a/Core/resources/pets/12.json +++ b/Core/resources/pets/12.json @@ -1,6 +1,4 @@ { - "emoteMale": "\uD83E\uDD86", - "emoteFemale": "\uD83E\uDD86", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/resources/pets/13.json b/Core/resources/pets/13.json index 04ad6d8ca..cd08b04d9 100644 --- a/Core/resources/pets/13.json +++ b/Core/resources/pets/13.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐎", - "emoteFemale": "🐎", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/resources/pets/14.json b/Core/resources/pets/14.json index 963651ffc..cd08b04d9 100644 --- a/Core/resources/pets/14.json +++ b/Core/resources/pets/14.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐢", - "emoteFemale": "🐢", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/resources/pets/15.json b/Core/resources/pets/15.json index 0e0c74346..a3b5f2e2c 100644 --- a/Core/resources/pets/15.json +++ b/Core/resources/pets/15.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐍", - "emoteFemale": "🐍", "rarity": 1, "diet": "carnivorous" } diff --git a/Core/resources/pets/16.json b/Core/resources/pets/16.json index aa0d308e7..a3b5f2e2c 100644 --- a/Core/resources/pets/16.json +++ b/Core/resources/pets/16.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦎", - "emoteFemale": "🦎", "rarity": 1, "diet": "carnivorous" } diff --git a/Core/resources/pets/17.json b/Core/resources/pets/17.json index d9376e54a..cd08b04d9 100644 --- a/Core/resources/pets/17.json +++ b/Core/resources/pets/17.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐏", - "emoteFemale": "🐑", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/resources/pets/18.json b/Core/resources/pets/18.json index 33bb3973d..cd08b04d9 100644 --- a/Core/resources/pets/18.json +++ b/Core/resources/pets/18.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐐", - "emoteFemale": "🐐", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/resources/pets/19.json b/Core/resources/pets/19.json index a42ca2d95..cd08b04d9 100644 --- a/Core/resources/pets/19.json +++ b/Core/resources/pets/19.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦃", - "emoteFemale": "🦃", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/resources/pets/2.json b/Core/resources/pets/2.json index cdd4e4220..a3b5f2e2c 100644 --- a/Core/resources/pets/2.json +++ b/Core/resources/pets/2.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐩", - "emoteFemale": "🐩", "rarity": 1, "diet": "carnivorous" } diff --git a/Core/resources/pets/20.json b/Core/resources/pets/20.json index 18fe1afd3..e1a1ea35a 100644 --- a/Core/resources/pets/20.json +++ b/Core/resources/pets/20.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦊", - "emoteFemale": "🦊", "rarity": 2, "diet": "carnivorous" } diff --git a/Core/resources/pets/21.json b/Core/resources/pets/21.json index 25d575877..e1a1ea35a 100644 --- a/Core/resources/pets/21.json +++ b/Core/resources/pets/21.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐻", - "emoteFemale": "🐻", "rarity": 2, "diet": "carnivorous" } diff --git a/Core/resources/pets/22.json b/Core/resources/pets/22.json index 2101f1cfc..1e9e80db3 100644 --- a/Core/resources/pets/22.json +++ b/Core/resources/pets/22.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐨", - "emoteFemale": "🐨", "rarity": 2, "diet": "herbivorous" } diff --git a/Core/resources/pets/23.json b/Core/resources/pets/23.json index 1d4ff2d3e..1e9e80db3 100644 --- a/Core/resources/pets/23.json +++ b/Core/resources/pets/23.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐸", - "emoteFemale": "🐸", "rarity": 2, "diet": "herbivorous" } diff --git a/Core/resources/pets/24.json b/Core/resources/pets/24.json index ca1fd5788..1e9e80db3 100644 --- a/Core/resources/pets/24.json +++ b/Core/resources/pets/24.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐒", - "emoteFemale": "🐒", "rarity": 2, "diet": "herbivorous" } diff --git a/Core/resources/pets/25.json b/Core/resources/pets/25.json index 756bc9257..e1a1ea35a 100644 --- a/Core/resources/pets/25.json +++ b/Core/resources/pets/25.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐧", - "emoteFemale": "🐧", "rarity": 2, "diet": "carnivorous" } diff --git a/Core/resources/pets/26.json b/Core/resources/pets/26.json index dcea5fbb0..e1a1ea35a 100644 --- a/Core/resources/pets/26.json +++ b/Core/resources/pets/26.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦉", - "emoteFemale": "🦉", "rarity": 2, "diet": "carnivorous" } diff --git a/Core/resources/pets/27.json b/Core/resources/pets/27.json index 09fa6de09..e1a1ea35a 100644 --- a/Core/resources/pets/27.json +++ b/Core/resources/pets/27.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦇", - "emoteFemale": "🦇", "rarity": 2, "diet": "carnivorous" } diff --git a/Core/resources/pets/28.json b/Core/resources/pets/28.json index 5a9e56d94..e1a1ea35a 100644 --- a/Core/resources/pets/28.json +++ b/Core/resources/pets/28.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐺", - "emoteFemale": "🐺", "rarity": 2, "diet": "carnivorous" } diff --git a/Core/resources/pets/29.json b/Core/resources/pets/29.json index 44cd28612..00c9bb3c3 100644 --- a/Core/resources/pets/29.json +++ b/Core/resources/pets/29.json @@ -1,5 +1,3 @@ { - "emoteMale": "🐗", - "emoteFemale": "🐗", "rarity": 2 } diff --git a/Core/resources/pets/3.json b/Core/resources/pets/3.json index 5c1061a3e..a3b5f2e2c 100644 --- a/Core/resources/pets/3.json +++ b/Core/resources/pets/3.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐈", - "emoteFemale": "🐈", "rarity": 1, "diet": "carnivorous" } diff --git a/Core/resources/pets/30.json b/Core/resources/pets/30.json index ae0e8feaa..e1a1ea35a 100644 --- a/Core/resources/pets/30.json +++ b/Core/resources/pets/30.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦭", - "emoteFemale": "🦭", "rarity": 2, "diet": "carnivorous" } diff --git a/Core/resources/pets/31.json b/Core/resources/pets/31.json index fa4637255..1e9e80db3 100644 --- a/Core/resources/pets/31.json +++ b/Core/resources/pets/31.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦛", - "emoteFemale": "🦛", "rarity": 2, "diet": "herbivorous" } diff --git a/Core/resources/pets/32.json b/Core/resources/pets/32.json index bf51abaca..1e9e80db3 100644 --- a/Core/resources/pets/32.json +++ b/Core/resources/pets/32.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦙", - "emoteFemale": "🦙", "rarity": 2, "diet": "herbivorous" } diff --git a/Core/resources/pets/33.json b/Core/resources/pets/33.json index 0ee751242..1e9e80db3 100644 --- a/Core/resources/pets/33.json +++ b/Core/resources/pets/33.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦢", - "emoteFemale": "🦢", "rarity": 2, "diet": "herbivorous" } diff --git a/Core/resources/pets/34.json b/Core/resources/pets/34.json index 3affb25dd..00c9bb3c3 100644 --- a/Core/resources/pets/34.json +++ b/Core/resources/pets/34.json @@ -1,5 +1,3 @@ { - "emoteMale": "🦩", - "emoteFemale": "🦩", "rarity": 2 } diff --git a/Core/resources/pets/35.json b/Core/resources/pets/35.json index dda2aceae..00c9bb3c3 100644 --- a/Core/resources/pets/35.json +++ b/Core/resources/pets/35.json @@ -1,5 +1,3 @@ { - "emoteMale": "🦝", - "emoteFemale": "🦝", "rarity": 2 } diff --git a/Core/resources/pets/36.json b/Core/resources/pets/36.json index 9ae365bfb..e1a1ea35a 100644 --- a/Core/resources/pets/36.json +++ b/Core/resources/pets/36.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦨", - "emoteFemale": "🦨", "rarity": 2, "diet": "carnivorous" } diff --git a/Core/resources/pets/37.json b/Core/resources/pets/37.json index 7cbab16b4..00c9bb3c3 100644 --- a/Core/resources/pets/37.json +++ b/Core/resources/pets/37.json @@ -1,5 +1,3 @@ { - "emoteMale": "🦡", - "emoteFemale": "🦡", "rarity": 2 } diff --git a/Core/resources/pets/38.json b/Core/resources/pets/38.json index 511d7d500..1e9e80db3 100644 --- a/Core/resources/pets/38.json +++ b/Core/resources/pets/38.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦫", - "emoteFemale": "🦫", "rarity": 2, "diet": "herbivorous" } diff --git a/Core/resources/pets/39.json b/Core/resources/pets/39.json index f0fbdaad6..1e9e80db3 100644 --- a/Core/resources/pets/39.json +++ b/Core/resources/pets/39.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦥", - "emoteFemale": "🦥", "rarity": 2, "diet": "herbivorous" } diff --git a/Core/resources/pets/4.json b/Core/resources/pets/4.json index c8a9477ae..a3b5f2e2c 100644 --- a/Core/resources/pets/4.json +++ b/Core/resources/pets/4.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐈‍⬛", - "emoteFemale": "🐈‍⬛", "rarity": 1, "diet": "carnivorous" } diff --git a/Core/resources/pets/40.json b/Core/resources/pets/40.json index 31a9a97bb..1e9e80db3 100644 --- a/Core/resources/pets/40.json +++ b/Core/resources/pets/40.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐿️", - "emoteFemale": "🐿️", "rarity": 2, "diet": "herbivorous" } diff --git a/Core/resources/pets/41.json b/Core/resources/pets/41.json index 276618003..00c9bb3c3 100644 --- a/Core/resources/pets/41.json +++ b/Core/resources/pets/41.json @@ -1,5 +1,3 @@ { - "emoteMale": "🦔", - "emoteFemale": "🦔️", "rarity": 2 } diff --git a/Core/resources/pets/42.json b/Core/resources/pets/42.json index 5702f8f79..d42dbbca0 100644 --- a/Core/resources/pets/42.json +++ b/Core/resources/pets/42.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐻‍❄️", - "emoteFemale": "🐻‍❄️", "rarity": 3, "diet": "carnivorous" } diff --git a/Core/resources/pets/43.json b/Core/resources/pets/43.json index dd63376d3..142194bc6 100644 --- a/Core/resources/pets/43.json +++ b/Core/resources/pets/43.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐼", - "emoteFemale": "🐼", "rarity": 3, "diet": "herbivorous" } diff --git a/Core/resources/pets/44.json b/Core/resources/pets/44.json index 6123a7abb..d42dbbca0 100644 --- a/Core/resources/pets/44.json +++ b/Core/resources/pets/44.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦂", - "emoteFemale": "🦂", "rarity": 3, "diet": "carnivorous" } diff --git a/Core/resources/pets/45.json b/Core/resources/pets/45.json index 2f20f4af1..d42dbbca0 100644 --- a/Core/resources/pets/45.json +++ b/Core/resources/pets/45.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐊", - "emoteFemale": "🐊", "rarity": 3, "diet": "carnivorous" } diff --git a/Core/resources/pets/46.json b/Core/resources/pets/46.json index 8851f08a2..142194bc6 100644 --- a/Core/resources/pets/46.json +++ b/Core/resources/pets/46.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐘", - "emoteFemale": "🐘", "rarity": 3, "diet": "herbivorous" } diff --git a/Core/resources/pets/47.json b/Core/resources/pets/47.json index c600a48c6..142194bc6 100644 --- a/Core/resources/pets/47.json +++ b/Core/resources/pets/47.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦓", - "emoteFemale": "🦓", "rarity": 3, "diet": "herbivorous" } diff --git a/Core/resources/pets/48.json b/Core/resources/pets/48.json index 1fd62d8b9..142194bc6 100644 --- a/Core/resources/pets/48.json +++ b/Core/resources/pets/48.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦏", - "emoteFemale": "🦏", "rarity": 3, "diet": "herbivorous" } diff --git a/Core/resources/pets/49.json b/Core/resources/pets/49.json index 9cad727a8..142194bc6 100644 --- a/Core/resources/pets/49.json +++ b/Core/resources/pets/49.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐪", - "emoteFemale": "🐪", "rarity": 3, "diet": "herbivorous" } diff --git a/Core/resources/pets/5.json b/Core/resources/pets/5.json index aee60375e..7b5a09d82 100644 --- a/Core/resources/pets/5.json +++ b/Core/resources/pets/5.json @@ -1,5 +1,3 @@ { - "emoteMale": "🐁", - "emoteFemale": "🐁", "rarity": 1 } diff --git a/Core/resources/pets/50.json b/Core/resources/pets/50.json index dae52ce18..142194bc6 100644 --- a/Core/resources/pets/50.json +++ b/Core/resources/pets/50.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐫", - "emoteFemale": "🐫", "rarity": 3, "diet": "herbivorous" } diff --git a/Core/resources/pets/51.json b/Core/resources/pets/51.json index 331f91739..142194bc6 100644 --- a/Core/resources/pets/51.json +++ b/Core/resources/pets/51.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦒", - "emoteFemale": "🦒", "rarity": 3, "diet": "herbivorous" } diff --git a/Core/resources/pets/52.json b/Core/resources/pets/52.json index 89f19c218..142194bc6 100644 --- a/Core/resources/pets/52.json +++ b/Core/resources/pets/52.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦘", - "emoteFemale": "🦘", "rarity": 3, "diet": "herbivorous" } diff --git a/Core/resources/pets/53.json b/Core/resources/pets/53.json index 423dca4fa..142194bc6 100644 --- a/Core/resources/pets/53.json +++ b/Core/resources/pets/53.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦚", - "emoteFemale": "🦚", "rarity": 3, "diet": "herbivorous" } diff --git a/Core/resources/pets/54.json b/Core/resources/pets/54.json index 1d86ab131..b0abf5a22 100644 --- a/Core/resources/pets/54.json +++ b/Core/resources/pets/54.json @@ -1,5 +1,3 @@ { - "emoteMale": "🦜", - "emoteFemale": "🦜", "rarity": 3 } diff --git a/Core/resources/pets/55.json b/Core/resources/pets/55.json index 6a9496ba6..d42dbbca0 100644 --- a/Core/resources/pets/55.json +++ b/Core/resources/pets/55.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦦", - "emoteFemale": "🦦", "rarity": 3, "diet": "carnivorous" } diff --git a/Core/resources/pets/56.json b/Core/resources/pets/56.json index cde2d5868..75b37e1e3 100644 --- a/Core/resources/pets/56.json +++ b/Core/resources/pets/56.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐅", - "emoteFemale": "🐅", "rarity": 4, "diet": "carnivorous" } diff --git a/Core/resources/pets/57.json b/Core/resources/pets/57.json index f830215b5..75b37e1e3 100644 --- a/Core/resources/pets/57.json +++ b/Core/resources/pets/57.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦁", - "emoteFemale": "🦁", "rarity": 4, "diet": "carnivorous" } diff --git a/Core/resources/pets/58.json b/Core/resources/pets/58.json index 28cc20a5f..75b37e1e3 100644 --- a/Core/resources/pets/58.json +++ b/Core/resources/pets/58.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦅", - "emoteFemale": "🦅", "rarity": 4, "diet": "carnivorous" } diff --git a/Core/resources/pets/59.json b/Core/resources/pets/59.json index c8c21eefc..2af40dade 100644 --- a/Core/resources/pets/59.json +++ b/Core/resources/pets/59.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦤", - "emoteFemale": "🦤", "rarity": 4, "diet": "herbivorous" } diff --git a/Core/resources/pets/6.json b/Core/resources/pets/6.json index d8cabd19f..cd08b04d9 100644 --- a/Core/resources/pets/6.json +++ b/Core/resources/pets/6.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐹", - "emoteFemale": "🐹", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/resources/pets/60.json b/Core/resources/pets/60.json index 3e175efc9..75b37e1e3 100644 --- a/Core/resources/pets/60.json +++ b/Core/resources/pets/60.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐆", - "emoteFemale": "🐆", "rarity": 4, "diet": "carnivorous" } diff --git a/Core/resources/pets/61.json b/Core/resources/pets/61.json index e76223fdf..2af40dade 100644 --- a/Core/resources/pets/61.json +++ b/Core/resources/pets/61.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦣", - "emoteFemale": "🦣", "rarity": 4, "diet": "herbivorous" } diff --git a/Core/resources/pets/62.json b/Core/resources/pets/62.json index 9d93453e6..2af40dade 100644 --- a/Core/resources/pets/62.json +++ b/Core/resources/pets/62.json @@ -1,6 +1,4 @@ { - "emoteMale": "🕊️", - "emoteFemale": "🕊️", "rarity": 4, "diet": "herbivorous" } diff --git a/Core/resources/pets/63.json b/Core/resources/pets/63.json index b06a00d96..e46699548 100644 --- a/Core/resources/pets/63.json +++ b/Core/resources/pets/63.json @@ -1,5 +1,3 @@ { - "emoteMale": "🦄️", - "emoteFemale": "🦄️", "rarity": 5 } diff --git a/Core/resources/pets/64.json b/Core/resources/pets/64.json index d3fc491c1..f6a9f306f 100644 --- a/Core/resources/pets/64.json +++ b/Core/resources/pets/64.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐉️", - "emoteFemale": "🐉️", "rarity": 5, "diet": "carnivorous" } diff --git a/Core/resources/pets/65.json b/Core/resources/pets/65.json index a9539bc68..f6a9f306f 100644 --- a/Core/resources/pets/65.json +++ b/Core/resources/pets/65.json @@ -1,6 +1,4 @@ { - "emoteMale": "🦖️", - "emoteFemale": "🦖️", "rarity": 5, "diet": "carnivorous" } diff --git a/Core/resources/pets/66.json b/Core/resources/pets/66.json index c8180005d..e46699548 100644 --- a/Core/resources/pets/66.json +++ b/Core/resources/pets/66.json @@ -1,5 +1,3 @@ { - "emoteMale": "🔵", - "emoteFemale": "🟣", "rarity": 5 } diff --git a/Core/resources/pets/67.json b/Core/resources/pets/67.json index 1ed8446da..cd08b04d9 100644 --- a/Core/resources/pets/67.json +++ b/Core/resources/pets/67.json @@ -1,6 +1,4 @@ { - "emoteMale": "⛄", - "emoteFemale": "⛄", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/resources/pets/68.json b/Core/resources/pets/68.json index 55a40ea7f..352695d8c 100644 --- a/Core/resources/pets/68.json +++ b/Core/resources/pets/68.json @@ -1,6 +1,4 @@ { - "emoteMale": "\uD83E\uDD86", - "emoteFemale": "\uD83E\uDD86", "rarity": 5, "diet": "herbivorous" } diff --git a/Core/resources/pets/69.json b/Core/resources/pets/69.json index 49aa577be..2af40dade 100644 --- a/Core/resources/pets/69.json +++ b/Core/resources/pets/69.json @@ -1,6 +1,4 @@ { - "emoteMale": "☃️", - "emoteFemale": "☃️", "rarity": 4, "diet": "herbivorous" } diff --git a/Core/resources/pets/7.json b/Core/resources/pets/7.json index cc2497a4a..cd08b04d9 100644 --- a/Core/resources/pets/7.json +++ b/Core/resources/pets/7.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐇", - "emoteFemale": "🐇", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/resources/pets/70.json b/Core/resources/pets/70.json index d3a4dbbcb..e46699548 100644 --- a/Core/resources/pets/70.json +++ b/Core/resources/pets/70.json @@ -1,5 +1,3 @@ { - "emoteMale": "\uD83D\uDC7D", - "emoteFemale": "\uD83D\uDC7D", "rarity": 5 } diff --git a/Core/resources/pets/71.json b/Core/resources/pets/71.json index 24a708198..b0abf5a22 100644 --- a/Core/resources/pets/71.json +++ b/Core/resources/pets/71.json @@ -1,5 +1,3 @@ { - "emoteMale": "\uD83D\uDC19", - "emoteFemale": "\uD83D\uDC19", "rarity": 3 } diff --git a/Core/resources/pets/72.json b/Core/resources/pets/72.json index 5ab88e82b..a9bddf385 100644 --- a/Core/resources/pets/72.json +++ b/Core/resources/pets/72.json @@ -1,5 +1,3 @@ { - "emoteMale": "\uD83D\uDC27", - "emoteFemale": "\uD83D\uDC27", "rarity": 4 } diff --git a/Core/resources/pets/8.json b/Core/resources/pets/8.json index 770b7b856..cd08b04d9 100644 --- a/Core/resources/pets/8.json +++ b/Core/resources/pets/8.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐂", - "emoteFemale": "🐄", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/resources/pets/9.json b/Core/resources/pets/9.json index dc53835b5..cd08b04d9 100644 --- a/Core/resources/pets/9.json +++ b/Core/resources/pets/9.json @@ -1,6 +1,4 @@ { - "emoteMale": "🐖", - "emoteFemale": "🐖", "rarity": 1, "diet": "herbivorous" } diff --git a/Core/src/commands/admin/testCommands/Pet/PetTestCommand.ts b/Core/src/commands/admin/testCommands/Pet/PetTestCommand.ts index abde15860..a10ee3cc7 100644 --- a/Core/src/commands/admin/testCommands/Pet/PetTestCommand.ts +++ b/Core/src/commands/admin/testCommands/Pet/PetTestCommand.ts @@ -41,7 +41,7 @@ const petTestCommand: ExecuteTestCommandLike = async (player, args, response) => await MissionsController.update(player, response, {missionId: "havePet"}); pet = await PetEntities.getById(pet.id); // Recall needed to refresh the pet - return `Vous avez un nouveau pet :\n${pet.petId /* TODO : i18n (pet.getPetDisplay(await Pets.getById(pet.petId), language))*/} !`; + return `Vous avez un nouveau pet :\n${pet.typeId /* TODO : i18n (pet.getPetDisplay(await Pets.getById(pet.petId), language))*/} !`; }; commandInfo.execute = petTestCommand; \ No newline at end of file diff --git a/Core/src/commands/pet/PetCommand.ts b/Core/src/commands/pet/PetCommand.ts new file mode 100644 index 000000000..4511ee181 --- /dev/null +++ b/Core/src/commands/pet/PetCommand.ts @@ -0,0 +1,34 @@ +import {packetHandler} from "../../core/packetHandlers/PacketHandler"; +import {WebsocketClient} from "../../../../Lib/src/instances/WebsocketClient"; +import {DraftBotPacket, makePacket, PacketContext} from "../../../../Lib/src/packets/DraftBotPacket"; +import {Players} from "../../core/database/game/models/Player"; +import {CommandPetPacketReq, CommandPetPacketRes} from "../../../../Lib/src/packets/commands/CommandPetPacket"; +import {PetEntities} from "../../core/database/game/models/PetEntity"; +import {PetDataController} from "../../data/Pet"; + +export default class PetCommand { + @packetHandler(CommandPetPacketReq) + async execute(client: WebsocketClient, packet: CommandPetPacketReq, context: PacketContext, response: DraftBotPacket[]): Promise { + + const player = packet.askedPlayer.keycloakId ? await Players.getByKeycloakId(packet.askedPlayer.keycloakId) : await Players.getByRank(packet.askedPlayer.rank); + const pet = await PetEntities.getById(player.petId); + if (!pet) { + response.push(makePacket(CommandPetPacketRes, { + foundPet: false + })); + } + else { + const petModel = PetDataController.instance.getById(pet.typeId); + response.push(makePacket(CommandPetPacketRes, { + foundPet: true, + data: { + nickname: pet.nickname, + typeId: petModel.id, + rarity: petModel.rarity, + sex: pet.sex, + loveLevel: pet.getLoveLevelNumber() + } + })); + } + } +} \ No newline at end of file diff --git a/Core/src/commands/player/ProfileCommand.ts b/Core/src/commands/player/ProfileCommand.ts index 769c9cbe0..abeaaf7c3 100644 --- a/Core/src/commands/player/ProfileCommand.ts +++ b/Core/src/commands/player/ProfileCommand.ts @@ -37,7 +37,7 @@ export default class ProfileCommand { const numberOfPlayers = await Players.getNbPlayersHaveStartedTheAdventure(); const isUnranked = rank > numberOfPlayers; const petEntity = player.petId ? await PetEntities.getById(player.petId) : null; - const petModel = player.petId ? PetDataController.instance.getById(petEntity.id) : null; + const petModel = player.petId ? PetDataController.instance.getById(petEntity.typeId) : null; const missionsInfo = await PlayerMissionsInfos.getOfPlayer(player.id); const playerActiveObjects = await InventorySlots.getMainSlotsItems(player.id); const badges = player.badges === "" || !player.badges ? [] : player.badges.split("-"); @@ -62,7 +62,8 @@ export default class ProfileCommand { class: player.class, color: player.getProfileColor(), pet: petEntity ? { - id: petEntity.id, + typeId: petModel.id, + sex: petEntity.sex, nickname: petEntity.nickname, rarity: petModel.rarity } : null, diff --git a/Core/src/core/database/game/migrations/019-v5.ts b/Core/src/core/database/game/migrations/019-v5.ts index 6ac8b59b4..db30b52c5 100644 --- a/Core/src/core/database/game/migrations/019-v5.ts +++ b/Core/src/core/database/game/migrations/019-v5.ts @@ -43,6 +43,7 @@ clientSecret = "secret" } await context.renameColumn("players", "effect", "effectId"); + await context.renameColumn("pet_entities", "petId", "typeId"); await context.dropTable("armors"); await context.dropTable("classes"); @@ -211,4 +212,6 @@ export async function down({context}: { context: QueryInterface }): Promise= PetEntityConstants.SLOTS; + return guildPets.length >= PetConstants.SLOTS; } /** diff --git a/Core/src/core/database/game/models/PetEntity.ts b/Core/src/core/database/game/models/PetEntity.ts index 7933bbbdb..1247c1cbf 100644 --- a/Core/src/core/database/game/models/PetEntity.ts +++ b/Core/src/core/database/game/models/PetEntity.ts @@ -1,9 +1,8 @@ import {DataTypes, Model, QueryTypes, Sequelize} from "sequelize"; import {RandomUtils} from "../../../utils/RandomUtils"; import {MissionsController} from "../../../missions/MissionsController"; -import {PET_ENTITY_GIVE_RETURN, PetEntityConstants} from "../../../../../../Lib/src/constants/PetEntityConstants"; +import {PET_ENTITY_GIVE_RETURN, PetConstants} from "../../../../../../Lib/src/constants/PetConstants"; import {Player, PlayerEditValueParameters} from "./Player"; -import {PetConstants} from "../../../../../../Lib/src/constants/PetConstants"; import {Guild, Guilds} from "./Guild"; import {GuildPets} from "./GuildPet"; import {Pet, PetDataController} from "../../../../data/Pet"; @@ -15,7 +14,7 @@ import moment = require("moment"); export class PetEntity extends Model { declare readonly id: number; - declare petId: number; + declare typeId: number; declare sex: string; @@ -40,10 +39,6 @@ export class PetEntity extends Model { (new Date().valueOf() - this.hungrySince.valueOf()); } - public getPetEmote(petModel: Pet): string { - return this.sex === "m" ? petModel.emoteMale : petModel.emoteFemale; - } - public getLoveLevelNumber(): number { return this.lovePoints === PetConstants.MAX_LOVE_POINTS ? PetConstants.LOVE_LEVEL.TRAINED : this.lovePoints >= PetConstants.LOVE_LEVELS[2] @@ -78,7 +73,7 @@ export class PetEntity extends Model { /** * Give the pet entity to a player, if no space then in their guild and if no space, don't give it. - * Send an embed only if send generic message is true + * Send an embed only if send a generic message is true * @param player The player * @param response */ @@ -89,7 +84,7 @@ export class PetEntity extends Model { giveInGuild: false, giveInPlayerInv: false, noRoomInGuild: false, - petId: this.petId, + petTypeId: this.typeId, petSex: this.sex }; @@ -136,9 +131,9 @@ export class PetEntities { }); } - static createPet(petId: number, sex: string, nickname: string): PetEntity { + static createPet(typeId: number, sex: string, nickname: string): PetEntity { return PetEntity.build({ - petId, + typeId, sex, nickname, lovePoints: PetConstants.BASE_LOVE @@ -153,14 +148,14 @@ export class PetEntities { // Calculate max probability value for (rarity = minRarity; rarity <= maxRarity; ++rarity) { - totalProbabilities += PetEntityConstants.PROBABILITIES[levelTier][rarity - 1]; + totalProbabilities += PetConstants.PROBABILITIES[levelTier][rarity - 1]; } let randomTier = RandomUtils.draftbotRandom.real(0, totalProbabilities, true); // Remove the rarity probabilities and stop when going under 0 to pick a rarity for (rarity = minRarity; rarity <= maxRarity; ++rarity) { - randomTier -= PetEntityConstants.PROBABILITIES[levelTier][rarity - 1]; + randomTier -= PetConstants.PROBABILITIES[levelTier][rarity - 1]; if (randomTier <= 0) { break; } @@ -172,7 +167,7 @@ export class PetEntities { } const pet = PetDataController.instance.getRandom(rarity); return PetEntity.build({ - petId: pet.id, + typeId: pet.id, sex, nickname: null, lovePoints: PetConstants.BASE_LOVE @@ -237,7 +232,7 @@ export function initModel(sequelize: Sequelize): void { primaryKey: true, autoIncrement: true }, - petId: { + typeId: { type: DataTypes.INTEGER }, sex: { diff --git a/Core/src/core/smallEvents/fightPet/usePlayerPet.ts b/Core/src/core/smallEvents/fightPet/usePlayerPet.ts index 13fe36d21..d9e7de077 100644 --- a/Core/src/core/smallEvents/fightPet/usePlayerPet.ts +++ b/Core/src/core/smallEvents/fightPet/usePlayerPet.ts @@ -2,7 +2,6 @@ import {PetEntities} from "../../database/game/models/PetEntity"; import {FightPetActionFunc} from "../../../data/FightPetAction"; import {PetConstants} from "../../../../../Lib/src/constants/PetConstants"; import {SmallEventConstants} from "../../../../../Lib/src/constants/SmallEventConstants"; -import {PetEntityConstants} from "../../../../../Lib/src/constants/PetEntityConstants"; import {RandomUtils} from "../../utils/RandomUtils"; import {PetDataController} from "../../../data/Pet"; @@ -12,7 +11,7 @@ export const fightPetAction: FightPetActionFunc = async (player, pet) => { return false; // Player doesn't have a pet, so cannot use one in the fight } - const playerPet = PetDataController.instance.getById(playerPetEntity.petId); + const playerPet = PetDataController.instance.getById(playerPetEntity.typeId); const petLoveBonusOrMalus = playerPetEntity.getLoveLevelNumber() === PetConstants.LOVE_LEVEL.TRAINED ? SmallEventConstants.FIGHT_PET.BONUS_FOR_TRAINED_PETS @@ -20,9 +19,9 @@ export const fightPetAction: FightPetActionFunc = async (player, pet) => { ? SmallEventConstants.FIGHT_PET.MALUS_FOR_FEISTY_PETS : 0; - const dietBonusOrMalus = pet.diet === PetEntityConstants.RESTRICTIVES_DIETS.CARNIVOROUS && playerPet.diet === PetEntityConstants.RESTRICTIVES_DIETS.HERBIVOROUS + const dietBonusOrMalus = pet.diet === PetConstants.RESTRICTIVES_DIETS.CARNIVOROUS && playerPet.diet === PetConstants.RESTRICTIVES_DIETS.HERBIVOROUS ? SmallEventConstants.FIGHT_PET.MALUS_FOR_WRONG_DIET - : pet.diet === PetEntityConstants.RESTRICTIVES_DIETS.HERBIVOROUS && playerPet.diet === PetEntityConstants.RESTRICTIVES_DIETS.CARNIVOROUS + : pet.diet === PetConstants.RESTRICTIVES_DIETS.HERBIVOROUS && playerPet.diet === PetConstants.RESTRICTIVES_DIETS.CARNIVOROUS ? SmallEventConstants.FIGHT_PET.BONUS_FOR_RIGHT_DIET : 0; diff --git a/Core/src/data/BigEvent.ts b/Core/src/data/BigEvent.ts index 941f79463..1e89c753e 100644 --- a/Core/src/data/BigEvent.ts +++ b/Core/src/data/BigEvent.ts @@ -23,7 +23,7 @@ export class BigEvent extends Data { public readonly tags: string[]; /** - * The possibilities condition are checked to choose to allow the possibility or not + * The possibility condition is checked to choose to allow the possibility or not * @param player */ public async getPossibilities(player: Player): Promise<[string, Possibility][]> { diff --git a/Core/src/data/MapType.ts b/Core/src/data/MapType.ts index e26030ac3..faa0c3cb6 100644 --- a/Core/src/data/MapType.ts +++ b/Core/src/data/MapType.ts @@ -1,8 +1,6 @@ import {DataControllerString} from "./DataController"; import {Data} from "./Data"; -export class MapType extends Data { - declare readonly emote: string; -} +export class MapType extends Data {} export class MapTypeDataController extends DataControllerString { static readonly instance: MapTypeDataController = new MapTypeDataController("mapTypes"); diff --git a/Core/src/data/Pet.ts b/Core/src/data/Pet.ts index 8975b93f2..8f63d34bf 100644 --- a/Core/src/data/Pet.ts +++ b/Core/src/data/Pet.ts @@ -1,34 +1,30 @@ import {DataControllerNumber} from "./DataController"; import {Data} from "./Data"; -import {PetEntityConstants} from "../../../Lib/src/constants/PetEntityConstants"; +import {PetConstants} from "../../../Lib/src/constants/PetConstants"; import {RandomUtils} from "../core/utils/RandomUtils"; export class Pet extends Data { declare readonly rarity: number; - declare readonly emoteMale: string; - - declare readonly emoteFemale: string; - declare readonly diet: string; public getRarityDisplay(): string { - return PetEntityConstants.EMOTE.RARITY.repeat(this.rarity); + return PetConstants.ICONS.RARITY.repeat(this.rarity); } /** * Returns true if the pet can eat meat */ public canEatMeat(): boolean { - return this.diet === PetEntityConstants.RESTRICTIVES_DIETS.CARNIVOROUS || !this.diet; + return this.diet === PetConstants.RESTRICTIVES_DIETS.CARNIVOROUS || !this.diet; } /** * Returns true if the pet can eat vegetables */ public canEatVegetables(): boolean { - return this.diet === PetEntityConstants.RESTRICTIVES_DIETS.HERBIVOROUS || !this.diet; + return this.diet === PetConstants.RESTRICTIVES_DIETS.HERBIVOROUS || !this.diet; } } diff --git a/Core/src/data/events/BigEventTrigger.ts b/Core/src/data/events/BigEventTrigger.ts index 28953cc3a..297f6d3c5 100644 --- a/Core/src/data/events/BigEventTrigger.ts +++ b/Core/src/data/events/BigEventTrigger.ts @@ -3,7 +3,7 @@ import {LogsReadRequests} from "../../core/database/logs/LogsReadRequests"; import {BigEvent} from "../BigEvent"; function verifyTriggerDate(trigger: BigEventTrigger): boolean { - // Don't do following operations if no date is specified -> save CPU time + // Don't do the following operations if no date is specified -> save CPU time if (!trigger.date) { return true; } @@ -97,7 +97,7 @@ export async function verifyTrigger(bigEvent: BigEvent, trigger: BigEventTrigger } /** - * A big event trigger is a set of condition to trigger a big event (for instance a map id, a minimum level etc...) + * A big event trigger is a set of condition to trigger a big event (for instance, a map id, a minimum level etc...) */ export interface BigEventTrigger { mapId?: number; diff --git a/Discord/src/commands/guild/GuildCommand.ts b/Discord/src/commands/guild/GuildCommand.ts index 8b7a8df88..f6dc18465 100644 --- a/Discord/src/commands/guild/GuildCommand.ts +++ b/Discord/src/commands/guild/GuildCommand.ts @@ -101,18 +101,38 @@ export async function handleCommandGuildPacketRes(packet: CommandGuildPacketRes, return; } + let membersInfos = ""; + for (const member of packet.data!.members) { + membersInfos += i18n.t("commands:guild.memberInfos", { + lng: interaction.userLanguage, + icon: getMemberTypeIcon(member, packet, interaction), + pseudo: (await KeycloakUtils.getUserByKeycloakId(keycloakConfig, member.keycloakId))?.attributes.gameUsername, + ranking: member.rank, + score: member.score, + islandStatusIcon: getIslandStatusIcon(member, interaction) + }); + } + const guildCommandEmbed = new DraftBotEmbed() - .setThumbnail(GuildConstants.ICON); + .setThumbnail(GuildConstants.ICON) + .setTitle(i18n.t("commands:guild.embedTitle", { + lng: interaction.userLanguage, + guildName: packet.data?.name, + level: packet.data?.level + })) + .addFields({ + name: i18n.t("commands:guild.members", { + lng: interaction.userLanguage, + memberCount: packet.data!.members.length, + maxGuildMembers: GuildConstants.MAX_GUILD_MEMBERS + }), + value: membersInfos + }); if (packet.data!.level >= GuildConstants.GOLDEN_GUILD_LEVEL) { guildCommandEmbed.setColor(ColorConstants.GOLD); } - guildCommandEmbed.setTitle(i18n.t("commands:guild.embedTitle", { - lng: interaction.userLanguage, - guildName: packet.data?.name, - level: packet.data?.level - })); if (packet.data!.description) { guildCommandEmbed.setDescription( @@ -123,27 +143,6 @@ export async function handleCommandGuildPacketRes(packet: CommandGuildPacketRes, ); } - let membersInfos = ""; - for (const member of packet.data!.members) { - membersInfos += i18n.t("commands:guild.memberInfos", { - lng: interaction.userLanguage, - icon: getMemberTypeIcon(member, packet, interaction), - pseudo: (await KeycloakUtils.getUserByKeycloakId(keycloakConfig, member.keycloakId))?.attributes.gameUsername, - ranking: member.rank, - score: member.score, - islandStatusIcon: getIslandStatusIcon(member, interaction) - }); - } - - guildCommandEmbed.addFields({ - name: i18n.t("commands:guild.members", { - lng: interaction.userLanguage, - memberCount: packet.data!.members.length, - maxGuildMembers: GuildConstants.MAX_GUILD_MEMBERS - }), - value: membersInfos - }); - const pveIslandInfo = packet.data!.members.some( member => member.keycloakId === context.keycloakId ) ? diff --git a/Discord/src/commands/pet/PetCommand.ts b/Discord/src/commands/pet/PetCommand.ts new file mode 100644 index 000000000..8880df1f7 --- /dev/null +++ b/Discord/src/commands/pet/PetCommand.ts @@ -0,0 +1,99 @@ +import {ICommand} from "../ICommand"; +import {makePacket, PacketContext} from "../../../../Lib/src/packets/DraftBotPacket"; +import {DraftbotInteraction} from "../../messages/DraftbotInteraction"; +import i18n from "../../translations/i18n"; +import {SlashCommandBuilderGenerator} from "../SlashCommandBuilderGenerator"; +import {CommandPetPacketReq, CommandPetPacketRes} from "../../../../Lib/src/packets/commands/CommandPetPacket"; +import {SlashCommandBuilder} from "@discordjs/builders"; +import {DraftBotEmbed} from "../../messages/DraftBotEmbed"; +import {DiscordCache} from "../../bot/DiscordCache"; +import {DraftBotErrorEmbed} from "../../messages/DraftBotErrorEmbed"; +import {KeycloakUser} from "../../../../Lib/src/keycloak/KeycloakUser"; +import {KeycloakUtils} from "../../../../Lib/src/keycloak/KeycloakUtils"; +import {keycloakConfig} from "../../bot/DraftBotShard"; +import {Effect} from "../../../../Lib/src/enums/Effect"; +import {PetData, PetUtils} from "../../utils/PetUtils"; + +/** + * Display all the information about a Pet + */ +async function getPacket(interaction: DraftbotInteraction, keycloakUser: KeycloakUser): Promise { + + let askedPlayer: { keycloakId?: string, rank?: number } = {keycloakId: keycloakUser.id}; + const user = interaction.options.getUser("user"); + if (user) { + const keycloakId = await KeycloakUtils.getKeycloakIdFromDiscordId(keycloakConfig, user.id, user.displayName); + if (!keycloakId) { + await interaction.reply({embeds: [new DraftBotErrorEmbed(interaction.user, interaction, i18n.t("error:playerDoesntExist", {lng: interaction.userLanguage}))]}); + return null; + } + askedPlayer = {keycloakId}; + } + + const rankOption = interaction.options.get("rank"); + if (rankOption) { + askedPlayer = {rank: rankOption.value}; + } + + return makePacket(CommandPetPacketReq, {askedPlayer}); +} + + +export async function handleCommandPetPacketRes(packet: CommandPetPacketRes, context: PacketContext): Promise { + const interaction = DiscordCache.getInteraction(context.discord!.interaction); + + if (interaction) { + if (!packet.foundPet) { + await interaction.reply({ + embeds: [ + new DraftBotErrorEmbed( + interaction.user, + interaction, + i18n.t("error:PetDoesntExist", {lng: interaction.userLanguage}) + ) + ] + }); + return; + } + + const petData: PetData = { + typeId: packet.data!.typeId, + nickname: packet.data!.nickname, + sex: packet.data!.sex, + rarity: packet.data!.rarity, + loveLevel: packet.data!.loveLevel + }; + + const PetCommandEmbed = new DraftBotEmbed() + .formatAuthor( + i18n.t("commands:pet.embedTitle", { + lng: interaction.userLanguage, + pseudo: interaction.user.username + }), + interaction.user + ) + .setDescription( + PetUtils.petToString(interaction.userLanguage, petData) + ); + + await interaction.reply({ + embeds: [PetCommandEmbed], + fetchReply: true + }); + } +} + +export const commandInfo: ICommand = { + slashCommandBuilder: SlashCommandBuilderGenerator.generateBaseCommand("pet") + .addUserOption(option => + SlashCommandBuilderGenerator.generateOption("pet", "user", option) + .setRequired(false)) + .addIntegerOption(option => + SlashCommandBuilderGenerator.generateOption("pet", "rank", option) + .setRequired(false)) as SlashCommandBuilder, + getPacket, + requirements: { + disallowEffects: [Effect.NOT_STARTED] + }, + mainGuildCommand: false +}; \ No newline at end of file diff --git a/Discord/src/commands/player/ProfileCommand.ts b/Discord/src/commands/player/ProfileCommand.ts index cf9ca401d..e8a85be6a 100644 --- a/Discord/src/commands/player/ProfileCommand.ts +++ b/Discord/src/commands/player/ProfileCommand.ts @@ -17,6 +17,7 @@ import {KeycloakUtils} from "../../../../Lib/src/keycloak/KeycloakUtils"; import {keycloakConfig} from "../../bot/DraftBotShard"; import {DraftBotIcons} from "../../../../Lib/src/DraftBotIcons"; import {Effect} from "../../../../Lib/src/enums/Effect"; +import {PetUtils} from "../../utils/PetUtils"; /** * Display the profile of a player @@ -202,9 +203,9 @@ function generateFields(packet: CommandProfilePacketRes, language: Language): Em name: i18n.t("commands:profile.pet.fieldName", {lng: language}), value: i18n.t("commands:profile.pet.fieldValue", { lng: language, - emote: "TODO EMOTE", // Todo - rarity: packet.data.pet.rarity, - nickname: packet.data.pet.nickname ?? i18n.t(`models:pets.${packet.data.pet.id}`, { lng: language }) + emote: PetUtils.getPetIcon(packet.data.pet.typeId, packet.data.pet.sex), + rarity: PetUtils.getRarityDisplay(packet.data.pet.rarity), + nickname: packet.data.pet.nickname ?? PetUtils.getPetTypeName(language, packet.data.pet.typeId, packet.data.pet.sex) }), inline: false }); diff --git a/Discord/src/packetHandlers/handlers/CommandHandlers.ts b/Discord/src/packetHandlers/handlers/CommandHandlers.ts index e6026454f..09eb955fd 100644 --- a/Discord/src/packetHandlers/handlers/CommandHandlers.ts +++ b/Discord/src/packetHandlers/handlers/CommandHandlers.ts @@ -19,6 +19,8 @@ import {handleCommandGuildPacketRes} from "../../commands/guild/GuildCommand"; import {CommandGuildPacketRes} from "../../../../Lib/src/packets/commands/CommandGuildPacket"; import {reportResult} from "../../commands/player/ReportCommand"; import {CommandReportBigEventResultRes} from "../../../../Lib/src/packets/commands/CommandReportPacket"; +import { CommandPetPacketRes } from "../../../../Lib/src/packets/commands/CommandPetPacket"; +import {handleCommandPetPacketRes} from "../../commands/pet/PetCommand"; export default class CommandHandlers { @packetHandler(CommandPingPacketRes) @@ -40,6 +42,11 @@ export default class CommandHandlers { await handleCommandProfilePacketRes(packet, context); } + @packetHandler(CommandPetPacketRes) + async petRes(socket: WebSocket, packet: CommandPetPacketRes, context: PacketContext): Promise { + await handleCommandPetPacketRes(packet, context); + } + @packetHandler(CommandGuildPacketRes) async guildRes(socket: WebSocket, packet: CommandGuildPacketRes, context: PacketContext): Promise { await handleCommandGuildPacketRes(packet, context); diff --git a/Discord/src/utils/PetUtils.ts b/Discord/src/utils/PetUtils.ts new file mode 100644 index 000000000..ee46b8ef9 --- /dev/null +++ b/Discord/src/utils/PetUtils.ts @@ -0,0 +1,93 @@ +import { DraftBotIcons } from "../../../Lib/src/DraftBotIcons"; +import {Language} from "../../../Lib/src/Language"; +import {PetConstants} from "../../../Lib/src/constants/PetConstants"; +import i18n from "../translations/i18n"; + +export type PetData = { + typeId: number, + nickname: string, + sex: string, + rarity: number, + loveLevel: number +}; + +export class PetUtils { + + /** + * Generate the string displaying a pet from the data of the pet + * @param language + * @param petData + */ + static petToString(language: Language, petData: PetData): string { + const sexDisplay = `${ + i18n.t(`commands:pet.sexDisplay.${ + petData.sex === PetConstants.SEX.MALE ? PetConstants.SEX.MALE_FULL : PetConstants.SEX.FEMALE_FULL + }`, {lng: language})} ${ + petData.sex === PetConstants.SEX.MALE ? PetConstants.ICONS.MALE : PetConstants.ICONS.FEMALE + }`; + return i18n.t("commands:pet.petField", { + lng: language, + emote: PetUtils.getPetIcon(petData.typeId, petData.sex), + typeName: PetUtils.getPetTypeName(language, petData.typeId, petData.sex), + nickname: PetUtils.displayNickname(language, petData.nickname), + rarity: PetUtils.getRarityDisplay(petData.rarity), + sex: sexDisplay, + loveLevel: PetUtils.getLoveLevelDisplay(petData.loveLevel, petData.sex, language) + }); + } + + /** + * Get the icon of a pet from its type and sex + * @param typeId + * @param sex + */ + static getPetIcon(typeId: number, sex:string): string { + return sex === PetConstants.SEX.MALE ? DraftBotIcons.pets[typeId].emoteMale : DraftBotIcons.pets[typeId].emoteFemale; + } + + /** + * Display the stars corresponding to the rarity of a pet + * @param rarity + */ + static getRarityDisplay(rarity: number): string { + return PetConstants.ICONS.RARITY.repeat(rarity); + } + + /** + * Display the nickname of a pet or a default message if it has no nickname + * @param language + * @param nickname + */ + static displayNickname(language: Language, nickname: string): string { + return nickname ? nickname : i18n.t("commands:pet.noNickname", {lng: language}); + } + + /** + * Get the name of an animal type linked to a pet in the specified language + * @param language + * @param typeId + * @param sex + */ + static getPetTypeName(language: Language, typeId: number, sex: string): string { + const sexStringContext: string = sex === PetConstants.SEX.MALE ? PetConstants.SEX.MALE_FULL : PetConstants.SEX.FEMALE_FULL; + return i18n.t( + `models:pets:${typeId}`, + {lng: language, context: sexStringContext as unknown} + ); + } + + /** + * Display the adjective corresponding to the love level of a pet + * @param loveLevel + * @param sex + * @param language + */ + static getLoveLevelDisplay(loveLevel: number, sex: string, language: Language): string { + const sexStringContext: string = sex === PetConstants.SEX.MALE ? PetConstants.SEX.MALE_FULL : PetConstants.SEX.FEMALE_FULL; + return i18n.t(`commands:pet.loveLevels.${loveLevel}`, { + context: sexStringContext as unknown, + lng: language + }); + } + +} \ No newline at end of file diff --git a/Lang/en/discordBuilder.json b/Lang/en/discordBuilder.json index e93c233a7..b9766e8fa 100644 --- a/Lang/en/discordBuilder.json +++ b/Lang/en/discordBuilder.json @@ -43,6 +43,20 @@ "description": "Displays the ping of the bot and allow the player to check if the bot is online.", "name": "ping" }, + "pet": { + "description": "Displays information about the pet of a player.", + "name": "pet", + "options": { + "rank": { + "description": "The rank of the player whose pet should be displayed.", + "name": "rank" + }, + "user": { + "description": "The user whose pet should be displayed.", + "name": "user" + } + } + }, "guild": { "description": "Displays information about a guild.", "name": "guild", diff --git a/Lang/fr/commands.json b/Lang/fr/commands.json index d4fcef337..ba554daba 100644 --- a/Lang/fr/commands.json +++ b/Lang/fr/commands.json @@ -3,6 +3,33 @@ "description": "Les badges sont des distinctions difficiles à obtenir qui ont été créées pour récompenser les personnes ayant le plus soutenu le développement du bot. La liste des badges est disponible sur le guide du bot.\n(via ce lien : https://guide.draftbot.com/notions-avancees/badges)", "title": ":military_medal: Informations détaillées :" }, + "pet": { + "embedTitle": "Familier de {{pseudo}} :", + "petField": "**Type :** {{emote}} {{typeName}}\n**Surnom :** {{nickname}}\n\n**Rareté :** {{rarity}}\n**Sexe :** {{sex}}\n**Mentalité :** {{loveLevel}}", + "noNickname": "Aucun surnom", + "loveLevels": { + "0_male": ":smirk_cat: Fielleux", + "0_female": ":smirk_cat: Fielleuse", + "1_male": ":pouting_cat: Sauvage", + "1_female": ":pouting_cat: Sauvage", + "2_male": ":scream_cat: Craintif", + "2_female": ":scream_cat: Craintive", + "3_male": ":smiley_cat: Apprivoisé", + "3_female": ":smiley_cat: Apprivoisée", + "4_male": ":heart_eyes_cat: Dressé", + "4_female": ":heart_eyes_cat: Dressée" + }, + "hungry": "\uD83E\uDD24 affamé", + "diet": { + "diet_null": "\uD83E\uDD6A Omnivore", + "diet_herbivorous": "\uD83E\uDD6C Herbivore", + "diet_carnivorous": "\uD83E\uDD69 Carnivore" + }, + "sexDisplay": { + "female": "Femelle", + "male": "Mâle" + } + }, "guild": { "embedTitle": "Guilde {{guildName}} | Niveau {{level}}", "description": ":scroll: `{{description}}`", diff --git a/Lang/fr/discordBuilder.json b/Lang/fr/discordBuilder.json index 9f40abccf..56779ca46 100644 --- a/Lang/fr/discordBuilder.json +++ b/Lang/fr/discordBuilder.json @@ -43,6 +43,20 @@ "description": "Affiche la latence du bot et permet au joueur de vérifier si le bot est en ligne.", "name": "ping" }, + "pet": { + "description": "Afficher les informations du familier d'un joueur.", + "name": "familier", + "options": { + "rank": { + "description": "Le classement du joueur dont le familier doit être affiché.", + "name": "classement" + }, + "user": { + "description": "L'utilisateur dont le familier doit être affiché.", + "name": "utilisateur" + } + } + }, "guild": { "description": "Affiche des informations sur une guilde.", "name": "guilde", diff --git a/Lang/fr/error.json b/Lang/fr/error.json index d01fdce01..7ed3022d7 100644 --- a/Lang/fr/error.json +++ b/Lang/fr/error.json @@ -44,10 +44,11 @@ "commandDoesntExist": "ERREUR: Commande inconnue", "interactionNotForYou": "Cette interaction n'est pas pour vous !", "playerBlocked": "Vous ne pouvez pas effectuer cela car vous avez une action en attente ({{reasons}}) !", - "playerDoesntExist": "Ce joueur n'existe pas !", + "playerDoesntExist": "Le joueur demandé n'a pas été trouvé !", "titleBlocked": "{{pseudo}}, cette personne est bloquée !", "titleCanceled": "{{pseudo}}, annulation prise en compte !", "titleDidntWork": "{{pseudo}}, hmmm... Cela n'a pas fonctionné !", - "guildDoesntExist": "La guilde demandée n'existe pas", + "guildDoesntExist": "Aucune guilde n'a été trouvée.", + "petDoesntExist": "Aucun familier n'a été trouvé.", "unexpectedError": "Une erreur est survenue :(" } \ No newline at end of file diff --git a/Lang/fr/models.json b/Lang/fr/models.json index d838a0556..b39d43171 100644 --- a/Lang/fr/models.json +++ b/Lang/fr/models.json @@ -942,298 +942,152 @@ "9": "Clé rouillée" }, "pets": { - "0": { - "female": "Aucun familier", - "male": "Aucun familier" - }, - "1": { - "female": "Chienne", - "male": "Chien" - }, - "10": { - "female": "Poule", - "male": "Coq" - }, - "11": { - "female": "Oiseau", - "male": "Oiseau" - }, - "12": { - "female": "Cane", - "male": "Canard" - }, - "13": { - "female": "Jument", - "male": "Étalon" - }, - "14": { - "female": "Tortue", - "male": "Tortue" - }, - "15": { - "female": "Serpent", - "male": "Serpent" - }, - "16": { - "female": "Lézarde", - "male": "Lézard" - }, - "17": { - "female": "Brebis", - "male": "Bélier" - }, - "18": { - "female": "Chèvre", - "male": "Bouc" - }, - "19": { - "female": "Dinde", - "male": "Dindon" - }, - "2": { - "female": "Caniche", - "male": "Caniche" - }, - "20": { - "female": "Renarde", - "male": "Renard" - }, - "21": { - "female": "Ourse", - "male": "Ours" - }, - "22": { - "female": "Koala", - "male": "Koala" - }, - "23": { - "female": "Grenouille", - "male": "Crapaud" - }, - "24": { - "female": "Guenon", - "male": "Singe" - }, - "25": { - "female": "Pingouine", - "male": "Pingouin" - }, - "26": { - "female": "Chouette", - "male": "Hibou" - }, - "27": { - "female": "Chauve-souris", - "male": "Chauve-souris" - }, - "28": { - "female": "Louve", - "male": "Loup" - }, - "29": { - "female": "Laie", - "male": "Sanglier" - }, - "3": { - "female": "Chatte", - "male": "Chat" - }, - "30": { - "female": "Otarie", - "male": "Phoque" - }, - "31": { - "female": "Hippopotame", - "male": "Hippopotame" - }, - "32": { - "female": "Lamate", - "male": "Lama" - }, - "33": { - "female": "Cygne", - "male": "Cygne" - }, - "34": { - "female": "Flamant rose", - "male": "Flamant rose" - }, - "35": { - "female": "Ratonne", - "male": "Raton laveur" - }, - "36": { - "female": "Mouffette", - "male": "Putois" - }, - "37": { - "female": "Blairelle", - "male": "Blaireau" - }, - "38": { - "female": "Castor", - "male": "Castor" - }, - "39": { - "female": "Paresseuse", - "male": "Paresseux" - }, - "4": { - "female": "Chatte noire", - "male": "Chat noir" - }, - "40": { - "female": "Tamia", - "male": "Tamia" - }, - "41": { - "female": "Hérissonne", - "male": "Hérisson" - }, - "42": { - "female": "Ourse polaire", - "male": "Ours polaire" - }, - "43": { - "female": "Panda", - "male": "Panda" - }, - "44": { - "female": "Scorpionne", - "male": "Scorpion" - }, - "45": { - "female": "Crocodile", - "male": "Crocodile" - }, - "46": { - "female": "Éléphante", - "male": "Éléphant" - }, - "47": { - "female": "Zébrelle", - "male": "Zèbre" - }, - "48": { - "female": "Rhinocéros", - "male": "Rhinocéros" - }, - "49": { - "female": "Chamelle", - "male": "Dromadaire" - }, - "5": { - "female": "Souris", - "male": "Rongeur" - }, - "50": { - "female": "Chamelle", - "male": "Chameau" - }, - "51": { - "female": "Girafe", - "male": "Girafe" - }, - "52": { - "female": "Kangourou", - "male": "Kangourou" - }, - "53": { - "female": "Paonne", - "male": "Paon" - }, - "54": { - "female": "Perroquet", - "male": "Perroquet" - }, - "55": { - "female": "Loutre", - "male": "Loutre" - }, - "56": { - "female": "Tigresse", - "male": "Tigre" - }, - "57": { - "female": "Lionne", - "male": "Lion" - }, - "58": { - "female": "Aigle", - "male": "Aigle" - }, - "59": { - "female": "Dodo", - "male": "Dodo" - }, - "6": { - "female": "Hamster", - "male": "Hamster" - }, - "60": { - "female": "Léoparde", - "male": "Léopard" - }, - "61": { - "female": "Mammouth", - "male": "Mammouth" - }, - "62": { - "female": "Colombe", - "male": "Colombe" - }, - "63": { - "female": "Licorne", - "male": "Licorne" - }, - "64": { - "female": "Dragonne", - "male": "Dragon" - }, - "65": { - "female": "T-Rex", - "male": "T-Rex" - }, - "66": { - "female": "Angel", - "male": "Stitch" - }, - "67": { - "female": "Dame de neige", - "male": "Bonhomme de neige" - }, - "68": { - "female": "Cane écarlate", - "male": "Canard écarlate" - }, - "69": { - "female": "Dame de neige", - "male": "Bonhomme de neige" - }, - "7": { - "female": "Lapine", - "male": "Lapin" - }, - "70": { - "female": "Alienne", - "male": "Alien" - }, - "71": { - "female": "Pieuvre", - "male": "Poulpe" - }, - "72": { - "female": "Manchote", - "male": "Manchot" - }, - "8": { - "female": "Vache", - "male": "Bœuf" - }, - "9": { - "female": "Truie", - "male": "Porc" - } + "0_female": "Aucun familier", + "0_male": "Aucun familier", + "1_female": "Chienne", + "1_male": "Chien", + "10_female": "Poule", + "10_male": "Coq", + "11_female": "Oiseau", + "11_male": "Oiseau", + "12_female": "Cane", + "12_male": "Canard", + "13_female": "Jument", + "13_male": "Étalon", + "14_female": "Tortue", + "14_male": "Tortue", + "15_female": "Serpent", + "15_male": "Serpent", + "16_female": "Lézarde", + "16_male": "Lézard", + "17_female": "Brebis", + "17_male": "Bélier", + "18_female": "Chèvre", + "18_male": "Bouc", + "19_female": "Dinde", + "19_male": "Dindon", + "2_female": "Caniche", + "2_male": "Caniche", + "20_female": "Renarde", + "20_male": "Renard", + "21_female": "Ourse", + "21_male": "Ours", + "22_female": "Koala", + "22_male": "Koala", + "23_female": "Grenouille", + "23_male": "Crapaud", + "24_female": "Guenon", + "24_male": "Singe", + "25_female": "Pingouine", + "25_male": "Pingouin", + "26_female": "Chouette", + "26_male": "Hibou", + "27_female": "Chauve-souris", + "27_male": "Chauve-souris", + "28_female": "Louve", + "28_male": "Loup", + "29_female": "Laie", + "29_male": "Sanglier", + "3_female": "Chatte", + "3_male": "Chat", + "30_female": "Otarie", + "30_male": "Phoque", + "31_female": "Hippopotame", + "31_male": "Hippopotame", + "32_female": "Lamate", + "32_male": "Lama", + "33_female": "Cygne", + "33_male": "Cygne", + "34_female": "Flamant rose", + "34_male": "Flamant rose", + "35_female": "Ratonne", + "35_male": "Raton laveur", + "36_female": "Mouffette", + "36_male": "Putois", + "37_female": "Blairelle", + "37_male": "Blaireau", + "38_female": "Castor", + "38_male": "Castor", + "39_female": "Paresseuse", + "39_male": "Paresseux", + "4_female": "Chatte noire", + "4_male": "Chat noir", + "40_female": "Tamia", + "40_male": "Tamia", + "41_female": "Hérissonne", + "41_male": "Hérisson", + "42_female": "Ourse polaire", + "42_male": "Ours polaire", + "43_female": "Panda", + "43_male": "Panda", + "44_female": "Scorpionne", + "44_male": "Scorpion", + "45_female": "Crocodile", + "45_male": "Crocodile", + "46_female": "Éléphante", + "46_male": "Éléphant", + "47_female": "Zébrelle", + "47_male": "Zèbre", + "48_female": "Rhinocéros", + "48_male": "Rhinocéros", + "49_female": "Chamelle", + "49_male": "Dromadaire", + "5_female": "Souris", + "5_male": "Rongeur", + "50_female": "Chamelle", + "50_male": "Chameau", + "51_female": "Girafe", + "51_male": "Girafe", + "52_female": "Kangourou", + "52_male": "Kangourou", + "53_female": "Paonne", + "53_male": "Paon", + "54_female": "Perroquet", + "54_male": "Perroquet", + "55_female": "Loutre", + "55_male": "Loutre", + "56_female": "Tigresse", + "56_male": "Tigre", + "57_female": "Lionne", + "57_male": "Lion", + "58_female": "Aigle", + "58_male": "Aigle", + "59_female": "Dodo", + "59_male": "Dodo", + "6_female": "Hamster", + "6_male": "Hamster", + "60_female": "Léoparde", + "60_male": "Léopard", + "61_female": "Mammouth", + "61_male": "Mammouth", + "62_female": "Colombe", + "62_male": "Colombe", + "63_female": "Licorne", + "63_male": "Licorne", + "64_female": "Dragonne", + "64_male": "Dragon", + "65_female": "T-Rex", + "65_male": "T-Rex", + "66_female": "Angel", + "66_male": "Stitch", + "67_female": "Dame de neige", + "67_male": "Bonhomme de neige", + "68_female": "Cane écarlate", + "68_male": "Canard écarlate", + "69_female": "Dame de neige", + "69_male": "Bonhomme de neige", + "7_female": "Lapine", + "7_male": "Lapin", + "70_female": "Alienne", + "70_male": "Alien", + "71_female": "Pieuvre", + "71_male": "Poulpe", + "72_female": "Manchote", + "72_male": "Manchot", + "8_female": "Vache", + "8_male": "Bœuf", + "9_female": "Truie", + "9_male": "Porc" }, "potions": { "0": "Pas de potion", diff --git a/Lib/resources/icons.json b/Lib/resources/icons.json deleted file mode 100644 index 499b5bba9..000000000 --- a/Lib/resources/icons.json +++ /dev/null @@ -1,663 +0,0 @@ -{ - "events": { - "1": { - "cutTree": "🪓", - "end": { - "0": "🪓" - }, - "otherWay": "🚶" - }, - "10": { - "end": { - "0": "🚶" - }, - "help": "🎣", - "push": "🖐️", - "skip": "🏃" - }, - "11": { - "end": { - "0": "🚶" - }, - "followHint": "👈", - "forest": "🌳", - "oppositeSide": "👉" - }, - "12": { - "craftBoat": "🚣", - "end": { - "0": "🕑" - }, - "otherWay": "🚶", - "searchBridge": "🌉", - "swim": "🏊" - }, - "13": { - "end": { - "0": "🚶" - }, - "goAway": "🚶", - "goForge": "🔨", - "goInn": "🏠", - "goMarket": "🎪" - }, - "14": { - "chatWorker": "🔨", - "end": { - "0": "🚶" - }, - "goAway": "🚶", - "stayNight": "🛏️" - }, - "15": { - "end": { - "0": "🚶" - }, - "skip": "🏃", - "steal": "💰", - "trade": "👥" - }, - "16": { - "end": { - "0": "🚶", - "1": "🚶" - }, - "enterCastle": "🔎", - "skip": "➡️", - "walkAround": "🔁" - }, - "17": { - "end": { - "0": "🚶", - "1": "🚶" - }, - "fruits": "🍎", - "hunt": "🦌", - "mushrooms": "🍄", - "salad": "🥗", - "skip": "🚶" - }, - "18": { - "end": { - "0": "🚶" - }, - "searchScaffolding": "⛓️", - "searchSite": "🔎", - "skip": "🚶" - }, - "19": { - "butch": "🔪", - "cook": "🍽️", - "end": { - "0": "👀" - }, - "skip": "🚶" - }, - "2": { - "end": { - "0": "🐶" - }, - "followDog": "🐕", - "skip": "🏃" - }, - "20": { - "alert": "🤙", - "end": { - "0": "🚶", - "1": "🚶" - }, - "skip": "🚶", - "surpriseAttack": "👊" - }, - "21": { - "crossBridge": "🌉", - "end": { - "0": "🕑", - "1": "🚶" - }, - "otherWay": "🚶" - }, - "22": { - "buy": "💶", - "end": { - "0": "👀", - "1": "👀" - }, - "skip": "🏃", - "steal": "👥" - }, - "23": { - "end": { - "0": "👀" - }, - "help": "🔨", - "skip": "🚶" - }, - "24": { - "end": { - "0": "🚶", - "1": "🚶" - }, - "foodStand": "🍢", - "gameStand": "🎯", - "itemStand": "🎪" - }, - "25": { - "dontHelp": "🚶", - "end": { - "0": "👀", - "1": "👀" - }, - "help": "🤝", - "steal": "🕵️" - }, - "26": { - "end": { - "0": "👀" - }, - "goAway": "🚶", - "steal": "💸", - "trySave": "👊" - }, - "27": { - "end": { - "0": "👀", - "1": "👀" - }, - "goDown": "👇", - "skip": "🚶", - "useBucket": "🤝" - }, - "28": { - "accept": "✅", - "deny": "❌", - "end": { - "0": "🚶" - } - }, - "29": { - "end": { - "0": "👀", - "1": "🚶" - }, - "restHere": "😴", - "restTree": "🌳", - "searchWater": "🔍" - }, - "3": { - "abandon": "▶️", - "end": { - "0": "▶️" - }, - "mineIt": "⛏️", - "searchKey": "🔑" - }, - "30": { - "duke": "🤴", - "end": { - "0": "🚶", - "1": "🚶" - }, - "gift": "🎁", - "party": "🎉", - "steal": "🍌" - }, - "31": { - "end": { - "0": "🚶" - }, - "hide": "🌿", - "keepGoing": "🚶", - "wave": "👋" - }, - "32": { - "end": { - "0": "🚶", - "1": "🚶", - "2": "🚶", - "3": "🚶" - }, - "heal": "💉", - "kill": "🔪", - "yell": "🗣️" - }, - "33": { - "chat": "👄", - "eat": "🍗", - "end": { - "0": "🐐", - "1": "🫕" - }, - "skip": "🚶", - "steal": "🕵️" - }, - "34": { - "end": { - "0": "🚶", - "1": "🚶‍", - "2": "🚶‍" - }, - "food": "🥗", - "health": "😇", - "kind": "🍀", - "money": "💰" - }, - "35": { - "deny": "❌", - "end": { - "0": "🚶" - }, - "steal": "💰", - "test": "🍺" - }, - "36": { - "end": { - "0": "🚶‍", - "1": "🚶" - }, - "goAway": "🚶", - "goInn": "🏡", - "stealJeweler": "💸", - "talkJeweler": "🗣️" - }, - "37": { - "end": { - "0": "🌳", - "1": "🌳" - }, - "run": "🏃", - "walk": "🚶" - }, - "38": { - "buyCheap": "💸", - "buyExpensive": "💰", - "deny": "❌", - "end": { - "0": "🚶", - "1": "👥", - "2": "👥" - }, - "steal": "🕵️" - }, - "39": { - "convoy": "🚶", - "end": { - "0": "🗣️", - "1": "🗣️" - }, - "meal": "🍖", - "steal": "🤑" - }, - "4": { - "end": { - "0": "🏃" - }, - "skip": "🏃", - "wish": "🗣️" - }, - "40": { - "askAdvices": "🗣️", - "breakIn": "🔎", - "end": { - "0": "🚶", - "1": "🚶" - }, - "goBack": "🚶" - }, - "41": { - "corrupt": "🕵️", - "end": { - "0": "🗣️", - "1": "🕑", - "2": "🚶" - }, - "escape": "🔓", - "explain": "🗣️", - "playDead": "💀", - "wait": "🕑" - }, - "42": { - "ask": "🥩", - "end": { - "0": "🚶", - "1": "🚶" - }, - "feign": "😎", - "help": "🏹" - }, - "43": { - "continue": "⬆️", - "end": { - "0": "🚶", - "1": "🚶", - "2": "🚶" - }, - "fight": "⚔️", - "goBack": "⬇️", - "shelter": "⛪" - }, - "44": { - "end": { - "0": "🚶" - }, - "help": "🦸", - "push": "😈", - "watch": "😐" - }, - "45": { - "askJoin": "⤴️", - "end": { - "0": "🕵️", - "1": "🚶" - }, - "goAlone": "🚶", - "skip": "▶️", - "talk": "🔊" - }, - "46": { - "end": { - "0": "🚶", - "1": "🔪", - "2": "💊" - }, - "singCrazyLove": "🤪", - "singHero": "⚔️", - "singLove": "🥰", - "singRoyalty": "👑", - "singWork": "🪕" - }, - "47": { - "end": { - "0": "🚶", - "1": "🏃", - "2": "🕵️" - }, - "goAway": "🚶", - "help": "⚔", - "tell": "🗣️" - }, - "48": { - "end": { - "0": "🚶", - "1": "🤔", - "2": "🌌", - "3": "🫂", - "4": "😕" - }, - "fight": "⚔️", - "meetHim": "🤝" - }, - "49": { - "eatIt": "🍖", - "end": { - "0": "🐚", - "1": "🐚", - "2": "🐚" - }, - "helpIt": "🤝", - "takeIt": "💞" - }, - "5": { - "end": { - "0": "🤑" - }, - "keepGoing": "🚶", - "rest": "💦" - }, - "50": { - "ask": "🗣️", - "end": { - "0": "Vous", - "1": "L'un" - }, - "leave": "🚶", - "nap": "😴" - }, - "51": { - "end": { - "0": "😴", - "1": "💥", - "2": "🦊" - }, - "goBack": "🚶‍♂️", - "search": "🔎", - "stairs": "↗️" - }, - "52": { - "deny": "❌", - "end": { - "0": "🚶", - "1": "👞", - "2": "💸" - }, - "play": "👥", - "playFight": "⚔️", - "teach": "🏹" - }, - "53": { - "accept": "✅", - "deny": "❌", - "end": { - "0": "😶", - "1": "🚶", - "2": "🚶" - }, - "steal": "🕵️" - }, - "54": { - "bet": "🪙", - "end": { - "0": "🗣", - "1": "😵‍💫", - "2": "🚶", - "3": "🪙", - "4": "🍖" - }, - "help": "🤝", - "look": "👥", - "visit": "🚶" - }, - "55": { - "climb": "🧗", - "cut": "🪓", - "end": { - "0": "🤷", - "1": "🤷", - "2": "👥" - }, - "otherWay": "🚶" - }, - "56": { - "": "🏖️", - "end": { - "0": "💥", - "1": "😶", - "2": "🍵" - } - }, - "57": { - "continue": "🌊", - "end": { - "0": "Vous", - "1": "Vous", - "2": "Vous" - }, - "findMeal": "🦀", - "settle": "🌞" - }, - "58": { - "continue": "🚶", - "end": { - "0": "Vous", - "1": "Épuisé," - }, - "goAlchemist": "🍵", - "shortcut": "🏃" - }, - "6": { - "end": { - "0": "🕑" - }, - "goAway": "🏃", - "goDeeper": "🔦", - "search": "🔍" - }, - "60": { - "end": { - "0": "Vous" - }, - "start": "📖" - }, - "61": { - "end": { - "0": "Vous" - }, - "follow": "🚶", - "observe": "👀" - }, - "62": { - "deny": "✖️", - "end": { - "0": "🥓", - "1": "🐕", - "2": "🐝" - }, - "searchPatures": "🍀", - "searchVines": "🍇", - "searchWheat": "🎑" - }, - "63": { - "end": { - "0": "🎆", - "1": "🍺", - "2": "🗯️", - "3": "💡" - }, - "faceThem": "⚔️", - "goAway": "🏃", - "helpThem": "😈", - "warnEveryone": "🔊" - }, - "64": { - "accept": "🏰", - "deny": "❌", - "end": { - "0": "🤔" - } - }, - "65": { - "end": { - "0": "💰", - "1": "❤️", - "2": "💎", - "3": "⭐", - "4": "🏅", - "5": "⚔️", - "6": "🛡️", - "7": "📦" - }, - "hopeArmor": "🛡️", - "hopeGems": "💎", - "hopeGlory": "🏅", - "hopeHealthy": "❤️", - "hopeItem": "📦", - "hopeMoney": "💰", - "hopePet": "🐕‍🦺", - "hopeWeapon": "⚔️", - "hopeXP": "⭐" - }, - "66": { - "end": { - "0": "😖", - "1": "😖" - }, - "hints": "ℹ️", - "run": "🏝️" - }, - "67": { - "accept": "🍺", - "deny": "✋", - "end": { - "0": "🥱" - } - }, - "68": { - "checkDate": "🗓️", - "end": { - "0": "🚶‍", - "1": "👀", - "2": "📓‍" - }, - "read": "📖", - "steal": "📔" - }, - "69": { - "accept": "👍", - "comrpomise": "🤝", - "deny": "👿", - "end": { - "0": "👁️" - } - }, - "7": { - "check": "🚪", - "end": { - "0": "🚶" - }, - "skip": "🚶" - }, - "70": { - "end": { - "0": "💤", - "1": "🌪️", - "2": "🏹" - }, - "explore": "🔍", - "skip": "🚶" - }, - "71": { - "accept": "🍖", - "deny": "❌", - "end": { - "0": "🏃", - "1": "😠" - }, - "steal": "💸" - }, - "72": { - "end": { - "0": "🗣️", - "1": "🧠" - }, - "joinArchery": "🎯", - "joinJoust": "🐴", - "joinMelee": "⚔️", - "joinPoetry": "📜", - "searchFood": "🍴" - }, - "73": { - "end": { - "0": "👤", - "1": "🖌️", - "2": "💼" - }, - "goAway": "🚶‍♂️", - "look": "👀", - "shame": "🗯" - }, - "8": { - "end": { - "0": "🚶" - }, - "forest": "🌲", - "plains": "🏞️" - }, - "9": { - "end": { - "0": "🚶" - }, - "help": "🔎", - "skip": "▶️" - } - } -} \ No newline at end of file diff --git a/Lib/src/DraftBotIcons.ts b/Lib/src/DraftBotIcons.ts index 72bed5fe6..3c03f6f8f 100644 --- a/Lib/src/DraftBotIcons.ts +++ b/Lib/src/DraftBotIcons.ts @@ -10,6 +10,12 @@ export const DraftBotIcons: { map_types: { [mapType: string]: string }, + pets: { + [petId: string]: { + emoteFemale: string, + emoteMale: string + } + } } = { "effects": { "not_started": "👶", @@ -715,5 +721,299 @@ export const DraftBotIcons: { "tundra": "🌲", "vi": "🛖", "volcano": "🌋" + }, + "pets": { + "0": { + "emoteFemale": "❌", + "emoteMale": "❌" + }, + "1": { + "emoteFemale": "🐕", + "emoteMale": "🐕" + }, + "10": { + "emoteFemale": "🐔", + "emoteMale": "🐓" + }, + "11": { + "emoteFemale": "🐦", + "emoteMale": "🐦" + }, + "12": { + "emoteFemale": "🦆", + "emoteMale": "🦆" + }, + "13": { + "emoteFemale": "🐎", + "emoteMale": "🐎" + }, + "14": { + "emoteFemale": "🐢", + "emoteMale": "🐢" + }, + "15": { + "emoteFemale": "🐍", + "emoteMale": "🐍" + }, + "16": { + "emoteFemale": "🦎", + "emoteMale": "🦎" + }, + "17": { + "emoteFemale": "🐑", + "emoteMale": "🐏" + }, + "18": { + "emoteFemale": "🐐", + "emoteMale": "🐐" + }, + "19": { + "emoteFemale": "🦃", + "emoteMale": "🦃" + }, + "2": { + "emoteFemale": "🐩", + "emoteMale": "🐩" + }, + "20": { + "emoteFemale": "🦊", + "emoteMale": "🦊" + }, + "21": { + "emoteFemale": "🐻", + "emoteMale": "🐻" + }, + "22": { + "emoteFemale": "🐨", + "emoteMale": "🐨" + }, + "23": { + "emoteFemale": "🐸", + "emoteMale": "🐸" + }, + "24": { + "emoteFemale": "🐒", + "emoteMale": "🐒" + }, + "25": { + "emoteFemale": "🐧", + "emoteMale": "🐧" + }, + "26": { + "emoteFemale": "🦉", + "emoteMale": "🦉" + }, + "27": { + "emoteFemale": "🦇", + "emoteMale": "🦇" + }, + "28": { + "emoteFemale": "🐺", + "emoteMale": "🐺" + }, + "29": { + "emoteFemale": "🐗", + "emoteMale": "🐗" + }, + "3": { + "emoteFemale": "🐈", + "emoteMale": "🐈" + }, + "30": { + "emoteFemale": "🦭", + "emoteMale": "🦭" + }, + "31": { + "emoteFemale": "🦛", + "emoteMale": "🦛" + }, + "32": { + "emoteFemale": "🦙", + "emoteMale": "🦙" + }, + "33": { + "emoteFemale": "🦢", + "emoteMale": "🦢" + }, + "34": { + "emoteFemale": "🦩", + "emoteMale": "🦩" + }, + "35": { + "emoteFemale": "🦝", + "emoteMale": "🦝" + }, + "36": { + "emoteFemale": "🦨", + "emoteMale": "🦨" + }, + "37": { + "emoteFemale": "🦡", + "emoteMale": "🦡" + }, + "38": { + "emoteFemale": "🦫", + "emoteMale": "🦫" + }, + "39": { + "emoteFemale": "🦥", + "emoteMale": "🦥" + }, + "4": { + "emoteFemale": "🐈‍⬛", + "emoteMale": "🐈‍⬛" + }, + "40": { + "emoteFemale": "🐿️", + "emoteMale": "🐿️" + }, + "41": { + "emoteFemale": "🦔️", + "emoteMale": "🦔" + }, + "42": { + "emoteFemale": "🐻‍❄️", + "emoteMale": "🐻‍❄️" + }, + "43": { + "emoteFemale": "🐼", + "emoteMale": "🐼" + }, + "44": { + "emoteFemale": "🦂", + "emoteMale": "🦂" + }, + "45": { + "emoteFemale": "🐊", + "emoteMale": "🐊" + }, + "46": { + "emoteFemale": "🐘", + "emoteMale": "🐘" + }, + "47": { + "emoteFemale": "🦓", + "emoteMale": "🦓" + }, + "48": { + "emoteFemale": "🦏", + "emoteMale": "🦏" + }, + "49": { + "emoteFemale": "🐪", + "emoteMale": "🐪" + }, + "5": { + "emoteFemale": "🐁", + "emoteMale": "🐁" + }, + "50": { + "emoteFemale": "🐫", + "emoteMale": "🐫" + }, + "51": { + "emoteFemale": "🦒", + "emoteMale": "🦒" + }, + "52": { + "emoteFemale": "🦘", + "emoteMale": "🦘" + }, + "53": { + "emoteFemale": "🦚", + "emoteMale": "🦚" + }, + "54": { + "emoteFemale": "🦜", + "emoteMale": "🦜" + }, + "55": { + "emoteFemale": "🦦", + "emoteMale": "🦦" + }, + "56": { + "emoteFemale": "🐅", + "emoteMale": "🐅" + }, + "57": { + "emoteFemale": "🦁", + "emoteMale": "🦁" + }, + "58": { + "emoteFemale": "🦅", + "emoteMale": "🦅" + }, + "59": { + "emoteFemale": "🦤", + "emoteMale": "🦤" + }, + "6": { + "emoteFemale": "🐹", + "emoteMale": "🐹" + }, + "60": { + "emoteFemale": "🐆", + "emoteMale": "🐆" + }, + "61": { + "emoteFemale": "🦣", + "emoteMale": "🦣" + }, + "62": { + "emoteFemale": "🕊️", + "emoteMale": "🕊️" + }, + "63": { + "emoteFemale": "🦄️", + "emoteMale": "🦄️" + }, + "64": { + "emoteFemale": "🐉️", + "emoteMale": "🐉️" + }, + "65": { + "emoteFemale": "🦖️", + "emoteMale": "🦖️" + }, + "66": { + "emoteFemale": "🟣", + "emoteMale": "🔵" + }, + "67": { + "emoteFemale": "⛄", + "emoteMale": "⛄" + }, + "68": { + "emoteFemale": "🦆", + "emoteMale": "🦆" + }, + "69": { + "emoteFemale": "☃️", + "emoteMale": "☃️" + }, + "7": { + "emoteFemale": "🐇", + "emoteMale": "🐇" + }, + "70": { + "emoteFemale": "👽", + "emoteMale": "👽" + }, + "71": { + "emoteFemale": "🐙", + "emoteMale": "🐙" + }, + "72": { + "emoteFemale": "🐧", + "emoteMale": "🐧" + }, + "8": { + "emoteFemale": "🐄", + "emoteMale": "🐂" + }, + "9": { + "emoteFemale": "🐖", + "emoteMale": "🐖" + } } }; \ No newline at end of file diff --git a/Lib/src/constants/PetConstants.ts b/Lib/src/constants/PetConstants.ts index 35c74cc83..6cf1bbec8 100644 --- a/Lib/src/constants/PetConstants.ts +++ b/Lib/src/constants/PetConstants.ts @@ -8,7 +8,9 @@ export abstract class PetConstants { static readonly SEX = { MALE: "m", - FEMALE: "f" + FEMALE: "f", + MALE_FULL: "male", + FEMALE_FULL: "female" }; static readonly PET_INTERACTIONS = { @@ -50,4 +52,55 @@ export abstract class PetConstants { MIN: 100, MAX: 50000 }; + + static readonly DEFAULT_PET_ID = 0; + + static readonly SLOTS = 6; + + static readonly ICONS = { + MALE: "♂️", + FEMALE: "♀️", + RARITY: "⭐" + }; + + /* + This array defines the probability of looting a pet based on two factors: + - The rarity of the pet (represented by each column in the sub-arrays) + - The level of the guild (represented by each sub-array, with each sub-array corresponding to a range of 10 guild levels) + + Each sub-array contains probabilities for 5 different rarities of pets (from most common to most rare). + The probabilities are designed to sum up to 1 for each sub-array, ensuring that a pet will be looted. + + The array is structured as follows: + - The first element of each sub-array represents the probability of looting the most common pet. + - The second element represents the probability of the next rarer pet, and so on. + - The last element represents the probability of looting the rarest pet. + + For example, a guild at level 1-10 has a 90% chance to loot the most common pet and a 0.01% chance to loot the rarest pet. + */ + // Todo: add unit test to check that each line is summing to 1 + static readonly PROBABILITIES = [ + [0.9000, 0.0900, 0.0090, 0.0009, 0.0001], + [0.8940, 0.0916, 0.0109, 0.0023, 0.0012], + [0.8760, 0.0964, 0.0166, 0.0065, 0.0045], + [0.8460, 0.1044, 0.0262, 0.0135, 0.0099], + [0.8040, 0.1156, 0.0396, 0.0233, 0.0175], + [0.7500, 0.1300, 0.0568, 0.0359, 0.0273], + [0.6840, 0.1476, 0.0778, 0.0513, 0.0393], + [0.6060, 0.1684, 0.1026, 0.0695, 0.0535], + [0.5160, 0.1924, 0.1312, 0.0905, 0.0699], + [0.4140, 0.2196, 0.1637, 0.1143, 0.0884], + [0.3000, 0.2500, 0.2000, 0.1409, 0.1091] // Todo: what happen for guilds lvl > 100 + ]; + + static RESTRICTIVES_DIETS = { + CARNIVOROUS: "carnivorous", + HERBIVOROUS: "herbivorous" + }; +} + +export enum PET_ENTITY_GIVE_RETURN { + NO_SLOT, + GUILD, + PLAYER } \ No newline at end of file diff --git a/Lib/src/constants/PetEntityConstants.ts b/Lib/src/constants/PetEntityConstants.ts deleted file mode 100644 index 43aeea4b1..000000000 --- a/Lib/src/constants/PetEntityConstants.ts +++ /dev/null @@ -1,36 +0,0 @@ -export abstract class PetEntityConstants { - static readonly DEFAULT_PET_ID = 0; - - static readonly SLOTS = 6; - - static readonly EMOTE = { - MALE: "♂️", - FEMALE: "♀️", - RARITY: "⭐" - }; - - static readonly PROBABILITIES = [ - [0.9000, 0.0900, 0.0090, 0.0009, 0.0001], - [0.8940, 0.0916, 0.0109, 0.0023, 0.0012], - [0.8760, 0.0964, 0.0166, 0.0065, 0.0045], - [0.8460, 0.1044, 0.0262, 0.0135, 0.0099], - [0.8040, 0.1156, 0.0396, 0.0233, 0.0175], - [0.7500, 0.1300, 0.0568, 0.0359, 0.0273], - [0.6840, 0.1476, 0.0778, 0.0513, 0.0393], - [0.6060, 0.1684, 0.1026, 0.0695, 0.0535], - [0.5160, 0.1924, 0.1312, 0.0905, 0.0699], - [0.4140, 0.2196, 0.1637, 0.1143, 0.0884], - [0.3000, 0.2500, 0.2000, 0.1409, 0.1091] - ]; - - static RESTRICTIVES_DIETS = { - CARNIVOROUS: "carnivorous", - HERBIVOROUS: "herbivorous" - }; -} - -export enum PET_ENTITY_GIVE_RETURN { - NO_SLOT, - GUILD, - PLAYER -} \ No newline at end of file diff --git a/Lib/src/packets/commands/CommandPetPacket.ts b/Lib/src/packets/commands/CommandPetPacket.ts new file mode 100644 index 000000000..b7816e95a --- /dev/null +++ b/Lib/src/packets/commands/CommandPetPacket.ts @@ -0,0 +1,20 @@ +import {DraftBotPacket} from "../DraftBotPacket"; + +export class CommandPetPacketReq extends DraftBotPacket { + askedPlayer!: { + rank?: number, + keycloakId?: string + }; +} + +export class CommandPetPacketRes extends DraftBotPacket { + foundPet!: boolean; + + data?: { + nickname: string, + typeId: number, + rarity: number, + sex: string, + loveLevel: number + }; +} \ No newline at end of file diff --git a/Lib/src/packets/commands/CommandProfilePacket.ts b/Lib/src/packets/commands/CommandProfilePacket.ts index 0d2623ac5..59cc962de 100644 --- a/Lib/src/packets/commands/CommandProfilePacket.ts +++ b/Lib/src/packets/commands/CommandProfilePacket.ts @@ -50,7 +50,8 @@ export class CommandProfilePacketRes extends DraftBotPacket { guild?: string, destination?: number, pet?: { - id: number, + typeId: number, + sex: string, rarity: number, nickname?: string }, diff --git a/Lib/src/packets/notifications/PlayerReceivePetPacket.ts b/Lib/src/packets/notifications/PlayerReceivePetPacket.ts index 8680d2b43..7b998d6cd 100644 --- a/Lib/src/packets/notifications/PlayerReceivePetPacket.ts +++ b/Lib/src/packets/notifications/PlayerReceivePetPacket.ts @@ -4,6 +4,6 @@ export interface PlayerReceivePetPacket extends DraftBotPacket { noRoomInGuild: boolean, giveInGuild: boolean, giveInPlayerInv: boolean, - petId: number, + petTypeId: number, petSex: string } \ No newline at end of file