diff --git a/Data/Map029.rxdata b/Data/Map029.rxdata index d0d8dd716..5b0b3d3a3 100644 Binary files a/Data/Map029.rxdata and b/Data/Map029.rxdata differ diff --git a/Data/Map462.rxdata b/Data/Map462.rxdata index 5f60188ad..c021a24fd 100644 Binary files a/Data/Map462.rxdata and b/Data/Map462.rxdata differ diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata index e8655f08c..c40290a30 100644 Binary files a/Data/MapInfos.rxdata and b/Data/MapInfos.rxdata differ diff --git a/Data/Scripts/003_Game processing/002_Scene_Map.rb b/Data/Scripts/003_Game processing/002_Scene_Map.rb index cdae11475..63bec0c5f 100644 --- a/Data/Scripts/003_Game processing/002_Scene_Map.rb +++ b/Data/Scripts/003_Game processing/002_Scene_Map.rb @@ -81,6 +81,14 @@ class Scene_Map $game_switches[SWITCH_ILEX_FOREST_SPOOKED_POKEMON] = false end + def clear_quest_icons() + for sprite in $scene.spriteset.character_sprites + if sprite.is_a?(Sprite_Character) && sprite.questIcon + sprite.removeQuestIcon + end + end + end + def transfer_player(cancelVehicles = true) reset_switches_for_map_transfer() $game_temp.player_transferring = false @@ -88,6 +96,7 @@ class Scene_Map autofade($game_temp.player_new_map_id) pbBridgeOff @spritesetGlobal.playersprite.clearShadows + clear_quest_icons() if $game_map.map_id != $game_temp.player_new_map_id $MapFactory.setup($game_temp.player_new_map_id) end diff --git a/Data/Scripts/052_AddOns/GeneralUtils.rb b/Data/Scripts/052_AddOns/GeneralUtils.rb index 700c2cfc0..867f199d7 100644 --- a/Data/Scripts/052_AddOns/GeneralUtils.rb +++ b/Data/Scripts/052_AddOns/GeneralUtils.rb @@ -507,4 +507,14 @@ def new_spritepack_was_released() return true end return false -end \ No newline at end of file +end + + +def get_spritecharacter_for_event(event_id) + for sprite in $scene.spriteset.character_sprites + if sprite.character.id == event_id + return sprite + end + end +end + diff --git a/Data/Scripts/052_AddOns/QuestLogScript.rb b/Data/Scripts/052_AddOns/QuestLogScript.rb index 6ad0c8841..b74184d29 100644 --- a/Data/Scripts/052_AddOns/QuestLogScript.rb +++ b/Data/Scripts/052_AddOns/QuestLogScript.rb @@ -107,7 +107,7 @@ QUESTS = { 11 => Quest.new(11, "Powering the Lighthouse", "Catch some Voltorb to power up the lighthouse", QuestBranchHotels, "BW (43)", "Vermillion City", HotelQuestColor), "vermillion_3" => Quest.new("vermillion_3", "Seafood Cocktail ", "Get some steamed Krabby legs from the S.S. Anne's kitchen and bring them back to the hotel before they get cold", QuestBranchHotels, "BW (36)", "Vermillion City", HotelQuestColor), "vermillion_field_1" => Quest.new("vermillion_field_1", "Building Materials ", "Get some wooden planks from Viridian City and some Bricks from Pewter City.", QuestBranchField, "BW (36)", "Vermillion City", FieldQuestColor), - 64 => Quest.new(64, "Waiter on the Water", "The S.S. Anne waiter wants you to take restaurant orders while he went to get a replacement cake.", QuestBranchField, "BW (53)", "S.S. Anne", FieldQuestColor), + "vermillion_field_2" => Quest.new("vermillion_field_2", "Waiter on the Water", "The S.S. Anne waiter wants you to take restaurant orders while he went to get a replacement cake.", QuestBranchField, "BW (53)", "S.S. Anne", FieldQuestColor), #Celadon City 14 => Quest.new(14, "Sun or Moon", "Show the Pokémon that Eevee evolves when exposed to a Moon or Sun stone to help the scientist with her research.", QuestBranchHotels, "BW (82)", "Celadon City", HotelQuestColor), @@ -203,6 +203,8 @@ def pbAcceptNewQuest(id, bubblePosition = 20, show_description=true) title = QUESTS[id].name description = QUESTS[id].desc showNewQuestMessage(title,description,show_description) + character_sprite = get_spritecharacter_for_event(@event_id) + character_sprite.removeQuestIcon if character_sprite pbAddQuest(id) end @@ -238,6 +240,9 @@ def finishQuest(id, silent=false) pbSetQuest(id, true) + character_sprite = get_spritecharacter_for_event(@event_id) + character_sprite.removeQuestIcon if character_sprite + # character_sprite = $scene.spriteset.character_sprites[@event_id] # echoln character_sprite # if character_sprite diff --git a/Data/Scripts/052_AddOns/quest_icons.rb b/Data/Scripts/052_AddOns/quest_icons.rb index 6577c3044..120cad38a 100644 --- a/Data/Scripts/052_AddOns/quest_icons.rb +++ b/Data/Scripts/052_AddOns/quest_icons.rb @@ -9,9 +9,9 @@ class Sprite_Character alias questIcon_init initialize def initialize(viewport, character = nil) questIcon_init(viewport,character) - @quest_switch = detectQuestSwitch(character) - if @quest_switch - echoln "balablbi #{@quest_switch}" + quest_id = detectQuestSwitch(character) + if quest_id + echoln "balablbi #{quest_id}" addQuestMarkerToSprite end end @@ -20,7 +20,7 @@ class Sprite_Character def update questIcon_update positionQuestIndicator if @questIcon - removeQuestIcon if @questIcon && isQuestAlreadyAccepted?(@quest_switch) + #removeQuestIcon if @questIcon && isQuestAlreadyAccepted?(@quest_switch) end # Event name must contain questNPC(x) for a quest icon to be displayed diff --git a/Data/System.rxdata b/Data/System.rxdata index 97eecde40..f2a895c1c 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ