mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 22:23:20 +08:00
Use the player's selected main character when setOwner
is called
This commit is contained in:
parent
7bdcf4e0d2
commit
e93175621b
@ -204,7 +204,7 @@ public class Avatar {
|
|||||||
this.ownerId = player.getUid();
|
this.ownerId = player.getUid();
|
||||||
this.guid = player.getNextGameGuid();
|
this.guid = player.getNextGameGuid();
|
||||||
|
|
||||||
if (this.isMainCharacter()) {
|
if (this.getAvatarId() == player.getMainCharacterId()) {
|
||||||
// Apply skill depot based on player resonance.
|
// Apply skill depot based on player resonance.
|
||||||
this.changeElement(player.getMainCharacterElement(), false);
|
this.changeElement(player.getMainCharacterElement(), false);
|
||||||
}
|
}
|
||||||
@ -308,8 +308,6 @@ public class Avatar {
|
|||||||
* @return True if the element was changed, false otherwise.
|
* @return True if the element was changed, false otherwise.
|
||||||
*/
|
*/
|
||||||
public boolean changeElement(@Nonnull ElementType elementTypeToChange, boolean notify) {
|
public boolean changeElement(@Nonnull ElementType elementTypeToChange, boolean notify) {
|
||||||
if (elementTypeToChange == ElementType.None) return true;
|
|
||||||
|
|
||||||
var candSkillDepotIdsList = this.getAvatarData().getCandSkillDepotIds();
|
var candSkillDepotIdsList = this.getAvatarData().getCandSkillDepotIds();
|
||||||
var candSkillDepotIndex = elementTypeToChange.getDepotIndex();
|
var candSkillDepotIndex = elementTypeToChange.getDepotIndex();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user