Skip to content

Commit f3048ab

Browse files
committed
Fixed bug when getting a partner's back sprite
1 parent 8e2130c commit f3048ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Data/Scripts/010_Data/002_PBS data/012_TrainerType.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def self.check_file(tr_type, path, optional_suffix = "", suffix = "")
2121
tr_type_data = self.try_get(tr_type)
2222
return nil if tr_type_data.nil?
2323
# Check for files
24-
if !optional_suffix.empty?
24+
if optional_suffix && !optional_suffix.empty?
2525
ret = path + tr_type_data.id.to_s + optional_suffix + suffix
2626
return ret if pbResolveBitmap(ret)
2727
end
@@ -49,7 +49,7 @@ def self.player_front_sprite_filename(tr_type)
4949
end
5050

5151
def self.back_sprite_filename(tr_type)
52-
return self.check_file(tr_type, "Graphics/Trainers/", nil, "_back")
52+
return self.check_file(tr_type, "Graphics/Trainers/", "", "_back")
5353
end
5454

5555
def self.player_back_sprite_filename(tr_type)

0 commit comments

Comments
 (0)