Fix a crash in PokeBattle_Trainer.copy (#95)

This commit is contained in:
Joni Savolainen
2021-02-20 17:51:12 +02:00
committed by GitHub
parent a6b22d5741
commit c16311326c

View File

@@ -45,9 +45,8 @@ class PokeBattle_Trainer
attr_reader :mysterygiftaccess, :mysterygift
def self.copy(trainer)
ret = PlayerTrainer.new
ret.trainer_type = trainer.trainertype
ret.name = trainer.name
validate trainer => self
ret = PlayerTrainer.new(trainer.name, trainer.trainertype)
ret.id = trainer.id
ret.character_ID = trainer.metaID if trainer.metaID
ret.outfit = trainer.outfit if trainer.outfit