# Contains a list of icon graphic filenames. Items that use this icon graphic
# will be replaced with a character graphic of the same name during a dropped
# item event.
# For example, if the enemy drops a Potion (which uses the icon graphic
# "021-Potion01") then, instead of showing this icon graphic on the map, it will
# instead show a character graphic named "021-Potion01" walking.
ANIMATING_ICONS = ['021-Potion01', 'health_globe']
module BlizzABS
#============================================================================
# BlizzABS::Processor
#----------------------------------------------------------------------------
# This class provides methods for Blizz-ABS handling.
#============================================================================
class Processor
#--------------------------------------------------------------------------
# drop_event
# items - array of items which the event contains
# real_x - real x-coordinate
# real_y - real y-coordinate
# dropper - the enemy that dropped the loot
# time - timer setting
# Creates an event that contains loot that can be picked up.
#--------------------------------------------------------------------------
def drop_event(items, real_x, real_y, dropper = nil, time = nil)
# map coordinates
x, y, icon = real_x / 128, real_y / 128, false
# if gold dropped and no corpses used
if dropper == nil && items[0].is_a?(Numeric) &&
!BlizzABS::Config::CORPSES
# set up everything for map display
event = create_drop_event(x, y, BlizzABS::Config::GOLD_DROP)
# setup the event commands
setup_drop_event(event, items, BlizzABS::Config::GOLD_PICKUP_SOUND_FILE)
else
# if not dropped by enemy
if dropper == nil
# create drop event with icon spriteset
event = create_drop_event(x, y, items[0].icon_name)
# event with icon spriteset
#=================================================
# KK20 EDIT
#=================================================
if ANIMATING_ICONS.include?(items[0].icon_name)
icon = false
else
icon = !Items.drop_sprite(items[0].id)
end
# if using corpses
elsif BlizzABS::Config::CORPSES
# create drop event
event = create_drop_event(x, y, dropper.character_name_org +
BlizzABS::SPRCorpse, dropper.character_hue, 0)
else
# create drop event
event = create_drop_event(x, y, dropper.character_name_org,
dropper.character_hue)
end
# setup the event commands
setup_drop_event(event, items)
end
# call superclass method
drop = Game_Event.new($game_map.map_id, event)
# mark created event as icon event
drop.icondrop = icon
# refresh
drop.refresh
# set up drop mode
drop.activate_drop_mode(BlizzABS::Config::DROP_TIME * 40)
# add into map events
$game_map.events[event.id] = drop
# stop if scene not Scene_Map or spriteset doesn't exist
return if !$scene.is_a?(Scene_Map) || $scene.spriteset == nil
# create own sprite as dropped
sprite = Sprite_Character.new($scene.spriteset.viewport1, drop)
# add to spriteset handler
$scene.spriteset.character_sprites.push(sprite)
end
end
end