mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Improved usage of Time.now and pbGetTimeNow
This commit is contained in:
@@ -209,7 +209,7 @@ def pbHatch(pokemon)
|
||||
pokemon.name = nil
|
||||
pokemon.owner = Pokemon::Owner.new_from_trainer($player)
|
||||
pokemon.happiness = 120
|
||||
pokemon.timeEggHatched = pbGetTimeNow
|
||||
pokemon.timeEggHatched = Time.now.to_i
|
||||
pokemon.obtain_method = 1 # hatched from egg
|
||||
pokemon.hatched_map = $game_map.map_id
|
||||
pokemon.record_first_moves
|
||||
|
||||
@@ -43,7 +43,7 @@ class PokemonTrainerCard_Scene
|
||||
hour = totalsec / 60 / 60
|
||||
min = totalsec / 60 % 60
|
||||
time = (hour > 0) ? _INTL("{1}h {2}m", hour, min) : _INTL("{1}m", min)
|
||||
$PokemonGlobal.startTime = pbGetTimeNow if !$PokemonGlobal.startTime
|
||||
$PokemonGlobal.startTime = Time.now if !$PokemonGlobal.startTime
|
||||
starttime = _INTL("{1} {2}, {3}",
|
||||
pbGetAbbrevMonthName($PokemonGlobal.startTime.mon),
|
||||
$PokemonGlobal.startTime.day,
|
||||
|
||||
@@ -378,8 +378,7 @@ def pbReceiveMysteryGift(id)
|
||||
if gift[1] == 0 # Pokémon
|
||||
gift[2].personalID = rand(2**16) | (rand(2**16) << 16)
|
||||
gift[2].calc_stats
|
||||
time = pbGetTimeNow
|
||||
gift[2].timeReceived = time.getgm.to_i
|
||||
gift[2].timeReceived = Time.now.to_i
|
||||
gift[2].obtain_method = 4 # Fateful encounter
|
||||
gift[2].record_first_moves
|
||||
gift[2].obtain_level = gift[2].level
|
||||
|
||||
Reference in New Issue
Block a user