mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixes fighting expert crash
This commit is contained in:
@@ -5,7 +5,7 @@ class BushBitmap
|
|||||||
@isTile = isTile
|
@isTile = isTile
|
||||||
@isBitmap = @bitmap.is_a?(Bitmap)
|
@isBitmap = @bitmap.is_a?(Bitmap)
|
||||||
@depth = depth
|
@depth = depth
|
||||||
@manual_refresh=false
|
@manual_refresh = false
|
||||||
end
|
end
|
||||||
|
|
||||||
def dispose
|
def dispose
|
||||||
@@ -91,14 +91,15 @@ class Sprite_Character < RPG::Sprite
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def setSpriteToAppearance(trainerAppearance)
|
def setSpriteToAppearance(trainerAppearance)
|
||||||
#return if !@charbitmap || !@charbitmap.bitmap
|
#return if !@charbitmap || !@charbitmap.bitmap
|
||||||
new_bitmap = AnimatedBitmap.new(getBaseOverworldSpriteFilename())#@charbitmap
|
begin
|
||||||
|
new_bitmap = AnimatedBitmap.new(getBaseOverworldSpriteFilename()) #@charbitmap
|
||||||
new_bitmap.bitmap = generateNPCClothedBitmapStatic(trainerAppearance)
|
new_bitmap.bitmap = generateNPCClothedBitmapStatic(trainerAppearance)
|
||||||
@bitmap_override = new_bitmap
|
@bitmap_override = new_bitmap
|
||||||
updateBitmap
|
updateBitmap
|
||||||
|
rescue
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def clearBitmapOverride()
|
def clearBitmapOverride()
|
||||||
@@ -133,7 +134,7 @@ class Sprite_Character < RPG::Sprite
|
|||||||
end
|
end
|
||||||
|
|
||||||
def updateBitmap
|
def updateBitmap
|
||||||
@manual_refresh=true
|
@manual_refresh = true
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbLoadOutfitBitmap(outfitFileName)
|
def pbLoadOutfitBitmap(outfitFileName)
|
||||||
@@ -149,7 +150,6 @@ class Sprite_Character < RPG::Sprite
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def generateClothedBitmap()
|
def generateClothedBitmap()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -186,7 +186,7 @@ class Sprite_Character < RPG::Sprite
|
|||||||
return if @character.is_a?(Game_Event) && !@character.should_update?
|
return if @character.is_a?(Game_Event) && !@character.should_update?
|
||||||
super
|
super
|
||||||
if should_update?
|
if should_update?
|
||||||
@manual_refresh=false
|
@manual_refresh = false
|
||||||
@tile_id = @character.tile_id
|
@tile_id = @character.tile_id
|
||||||
@character_name = @character.character_name
|
@character_name = @character.character_name
|
||||||
@character_hue = @character.character_hue
|
@character_hue = @character.character_hue
|
||||||
@@ -209,7 +209,7 @@ class Sprite_Character < RPG::Sprite
|
|||||||
@charbitmap.dispose if @charbitmap
|
@charbitmap.dispose if @charbitmap
|
||||||
|
|
||||||
@charbitmap = updateCharacterBitmap()
|
@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
|
RPG::Cache.retain('Graphics/Characters/', @character_name, @character_hue) if @charbitmapAnimated = true
|
||||||
@bushbitmap.dispose if @bushbitmap
|
@bushbitmap.dispose if @bushbitmap
|
||||||
@@ -226,7 +226,7 @@ class Sprite_Character < RPG::Sprite
|
|||||||
bushdepth = @character.bush_depth
|
bushdepth = @character.bush_depth
|
||||||
if bushdepth == 0
|
if bushdepth == 0
|
||||||
if @character == $game_player
|
if @character == $game_player
|
||||||
self.bitmap = getClothedPlayerSprite()#generateClothedBitmap()
|
self.bitmap = getClothedPlayerSprite() #generateClothedBitmap()
|
||||||
else
|
else
|
||||||
self.bitmap = (@charbitmapAnimated) ? @charbitmap.bitmap : @charbitmap
|
self.bitmap = (@charbitmapAnimated) ? @charbitmap.bitmap : @charbitmap
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ end
|
|||||||
|
|
||||||
TYPE_EXPERTS_APPEARANCES = {
|
TYPE_EXPERTS_APPEARANCES = {
|
||||||
:TYPE_EXPERT_NORMAL => TrainerAppearance.new(5, "snorlaxhat", "normal", "1_painter", 0, 0, 0), #todo TEAM
|
: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_FLYING =>#TODO NEEDS OUTFIT, LOCATION, TEAM
|
||||||
:TYPE_EXPERT_POISON => TrainerAppearance.new(5, "parashroom", "deadlypoisondanger", "3_lowbraids", 270, 0, 0), #todo 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
|
:TYPE_EXPERT_GROUND => TrainerAppearance.new(5, "sandshrewbeanie", "groundcowboy", "3_shortspike", 0, 0, 0), #todo TEAM
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user