mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-10-27 04:26:27 -04:00
Merge branch 'feature/minor-fixes' into 'main'
fix evs not updating client side Closes #1152 See merge request cable-mc/cobblemon!1267
This commit is contained in:
@@ -942,8 +942,16 @@ open class Pokemon : ShowdownIdentifiable {
|
||||
this.experience = other.experience
|
||||
this.setFriendship(other.friendship)
|
||||
// Applied before current health for calcs to take place
|
||||
this.ivs = other.ivs
|
||||
this.evs = other.evs
|
||||
other.ivs.doWithoutEmitting {
|
||||
this.ivs.forEach {
|
||||
other.ivs[it.key] = it.value
|
||||
}
|
||||
}
|
||||
other.evs.doWithoutEmitting {
|
||||
this.evs.forEach {
|
||||
other.evs[it.key] = it.value
|
||||
}
|
||||
}
|
||||
this.currentHealth = other.currentHealth
|
||||
this.gender = other.gender
|
||||
this.moveSet.copyFrom(other.moveSet)
|
||||
|
||||
+10
-2
@@ -59,8 +59,16 @@ internal class ClientPokemonP1(
|
||||
other.experience = this.experience
|
||||
other.setFriendship(this.friendship)
|
||||
// Applied before current health for calcs to take place
|
||||
other.ivs = this.ivs
|
||||
other.evs = this.evs
|
||||
other.ivs.doWithoutEmitting {
|
||||
this.ivs.forEach {
|
||||
other.ivs[it.key] = it.value
|
||||
}
|
||||
}
|
||||
other.evs.doWithoutEmitting {
|
||||
this.evs.forEach {
|
||||
other.evs[it.key] = it.value
|
||||
}
|
||||
}
|
||||
other.currentHealth = this.currentHealth
|
||||
other.gender = this.gender
|
||||
other.moveSet.copyFrom(this.moveSet)
|
||||
|
||||
@@ -53,8 +53,16 @@ internal class PokemonP1(
|
||||
other.experience = this.experience
|
||||
other.setFriendship(this.friendship)
|
||||
// Applied before current health for calcs to take place
|
||||
other.ivs = this.ivs
|
||||
other.evs = this.evs
|
||||
other.ivs.doWithoutEmitting {
|
||||
this.ivs.forEach {
|
||||
other.ivs[it.key] = it.value
|
||||
}
|
||||
}
|
||||
other.evs.doWithoutEmitting {
|
||||
this.evs.forEach {
|
||||
other.evs[it.key] = it.value
|
||||
}
|
||||
}
|
||||
other.currentHealth = this.currentHealth
|
||||
other.gender = this.gender
|
||||
other.moveSet.copyFrom(this.moveSet)
|
||||
|
||||
Reference in New Issue
Block a user