mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Deprecate Pokemon#trainerID and Pokemon#publicID
This commit is contained in:
@@ -77,10 +77,6 @@ class Pokemon
|
||||
attr_accessor :pokerus
|
||||
# @return [Integer] this Pokémon's personal ID
|
||||
attr_accessor :personalID
|
||||
# The 32-bit ID of this Pokémon's trainer. The secret ID is in the
|
||||
# upper 16 bits.
|
||||
# @return [Integer] the ID of this Pokémon's trainer
|
||||
attr_accessor :trainerID
|
||||
# @return [Integer] the manner this Pokémon was obtained:
|
||||
# 0 (met), 1 (as egg), 2 (traded), 4 (fateful encounter)
|
||||
attr_accessor :obtainMode
|
||||
@@ -198,11 +194,6 @@ class Pokemon
|
||||
@owner = new_owner
|
||||
end
|
||||
|
||||
# @return [Integer] the public portion of the original trainer's ID
|
||||
def publicID
|
||||
return @trainerID & 0xFFFF
|
||||
end
|
||||
|
||||
# @param trainer [PokeBattle_Trainer] the trainer to compare to the OT
|
||||
# @return [Boolean] whether the given trainer and this Pokémon's original trainer don't match
|
||||
def foreign?(trainer)
|
||||
|
||||
@@ -12,6 +12,24 @@ PokeBattle_Pokemon = Pokemon
|
||||
class Pokemon
|
||||
# @deprecated Use {MAX_NAME_SIZE} instead. This alias is slated to be removed in vXX.
|
||||
MAX_POKEMON_NAME_SIZE = MAX_NAME_SIZE
|
||||
|
||||
# @deprecated Use {Owner#public_id} instead. This alias is slated to be removed in vXX.
|
||||
def publicID
|
||||
Deprecation.warn_method('Pokemon#publicID', 'vXX', 'Pokemon::Owner#public_id')
|
||||
return @owner.public_id
|
||||
end
|
||||
|
||||
# @deprecated Use {Owner#id} instead. This alias is slated to be removed in vXX.
|
||||
def trainerID
|
||||
Deprecation.warn_method('Pokemon#trainerID', 'vXX', 'Pokemon::Owner#id')
|
||||
return @owner.id
|
||||
end
|
||||
|
||||
# @deprecated Use {Owner#id=} instead. This alias is slated to be removed in vXX.
|
||||
def trainerID=(value)
|
||||
Deprecation.warn_method('Pokemon#trainerID=', 'vXX', 'Pokemon::Owner#id=')
|
||||
@owner.id = value
|
||||
end
|
||||
end
|
||||
|
||||
# (see Pokemon#initialize)
|
||||
|
||||
Reference in New Issue
Block a user