Fixes fighting expert crash

This commit is contained in:
infinitefusion
2024-12-30 19:55:38 -05:00
parent 39d3c159b1
commit d1c0e4eaf9
3 changed files with 14 additions and 14 deletions

View File

@@ -5,7 +5,7 @@ class BushBitmap
@isTile = isTile
@isBitmap = @bitmap.is_a?(Bitmap)
@depth = depth
@manual_refresh=false
@manual_refresh = false
end
def dispose
@@ -91,14 +91,15 @@ class Sprite_Character < RPG::Sprite
end
end
def setSpriteToAppearance(trainerAppearance)
#return if !@charbitmap || !@charbitmap.bitmap
new_bitmap = AnimatedBitmap.new(getBaseOverworldSpriteFilename())#@charbitmap
begin
new_bitmap = AnimatedBitmap.new(getBaseOverworldSpriteFilename()) #@charbitmap
new_bitmap.bitmap = generateNPCClothedBitmapStatic(trainerAppearance)
@bitmap_override = new_bitmap
updateBitmap
rescue
end
end
def clearBitmapOverride()
@@ -133,7 +134,7 @@ class Sprite_Character < RPG::Sprite
end
def updateBitmap
@manual_refresh=true
@manual_refresh = true
end
def pbLoadOutfitBitmap(outfitFileName)
@@ -149,7 +150,6 @@ class Sprite_Character < RPG::Sprite
end
end
def generateClothedBitmap()
return
end
@@ -186,7 +186,7 @@ class Sprite_Character < RPG::Sprite
return if @character.is_a?(Game_Event) && !@character.should_update?
super
if should_update?
@manual_refresh=false
@manual_refresh = false
@tile_id = @character.tile_id
@character_name = @character.character_name
@character_hue = @character.character_hue
@@ -209,7 +209,7 @@ class Sprite_Character < RPG::Sprite
@charbitmap.dispose if @charbitmap
@charbitmap = updateCharacterBitmap()
@charbitmap= @bitmap_override.clone if @bitmap_override
@charbitmap = @bitmap_override.clone if @bitmap_override
RPG::Cache.retain('Graphics/Characters/', @character_name, @character_hue) if @charbitmapAnimated = true
@bushbitmap.dispose if @bushbitmap
@@ -226,7 +226,7 @@ class Sprite_Character < RPG::Sprite
bushdepth = @character.bush_depth
if bushdepth == 0
if @character == $game_player
self.bitmap = getClothedPlayerSprite()#generateClothedBitmap()
self.bitmap = getClothedPlayerSprite() #generateClothedBitmap()
else
self.bitmap = (@charbitmapAnimated) ? @charbitmap.bitmap : @charbitmap
end

View File

@@ -25,7 +25,7 @@ end
TYPE_EXPERTS_APPEARANCES = {
:TYPE_EXPERT_NORMAL => TrainerAppearance.new(5, "snorlaxhat", "normal", "1_painter", 0, 0, 0), #todo TEAM
:TYPE_EXPERT_FIGHTING => TrainerAppearance.new(1, "karateHeadband", "figthing", "4_samurai", 0, 0, 0), #OK
:TYPE_EXPERT_FIGHTING => TrainerAppearance.new(1, "karateHeadband", "fighting", "4_samurai", 0, 0, 0), #OK
# TYPE_EXPERT_FLYING =>#TODO NEEDS OUTFIT, LOCATION, TEAM
:TYPE_EXPERT_POISON => TrainerAppearance.new(5, "parashroom", "deadlypoisondanger", "3_lowbraids", 270, 0, 0), #todo TEAM
:TYPE_EXPERT_GROUND => TrainerAppearance.new(5, "sandshrewbeanie", "groundcowboy", "3_shortspike", 0, 0, 0), #todo TEAM

Binary file not shown.