diff --git a/src/world/Event/EventHandler.h b/src/world/Event/EventHandler.h index 86c0856a..0990ec87 100644 --- a/src/world/Event/EventHandler.h +++ b/src/world/Event/EventHandler.h @@ -85,7 +85,7 @@ namespace Sapphire::Event QuestBattleDirector = 0x8006, }; - enum class EventState : uint8_t + enum class QuestAvailability : uint8_t { Invisible, Available, diff --git a/src/world/Manager/MapMgr.cpp b/src/world/Manager/MapMgr.cpp index 29ae7684..462f9b3d 100644 --- a/src/world/Manager/MapMgr.cpp +++ b/src/world/Manager/MapMgr.cpp @@ -279,11 +279,11 @@ void Sapphire::World::Manager::MapMgr::insertQuest( Entity::Player& player, uint EventData eventData; eventData.eventId = questId; - auto eventState = script->checkExtraConditions( player, questId ); + auto eventState = script->getQuestAvailability( player, questId ); - if( eventState == Event::EventHandler::EventState::Available || eventState == Event::EventHandler::EventState::Locked ) + if( eventState == Event::EventHandler::QuestAvailability::Available || eventState == Event::EventHandler::QuestAvailability::Locked ) { - if( eventState == Event::EventHandler::EventState::Available && isQuestAvailable( player, questId, quest ) ) + if( eventState == Event::EventHandler::QuestAvailability::Available && isQuestAvailable( player, questId, quest ) ) { eventData.iconId = exdData.get< Data::EventIconType >( quest->eventIconType )->mapIconAvailable + 1 + quest->isRepeatable; eventData.levelId = quest->issuerLocation; diff --git a/src/world/Script/NativeScriptApi.cpp b/src/world/Script/NativeScriptApi.cpp index de8dbf22..1702e733 100644 --- a/src/world/Script/NativeScriptApi.cpp +++ b/src/world/Script/NativeScriptApi.cpp @@ -137,9 +137,9 @@ namespace Sapphire::ScriptAPI { } - Event::EventHandler::EventState EventScript::checkExtraConditions( Sapphire::Entity::Player& player, uint32_t eventId ) + Event::EventHandler::QuestAvailability EventScript::getQuestAvailability( Sapphire::Entity::Player& player, uint32_t eventId ) { - return Event::EventHandler::EventState::Available; + return Event::EventHandler::QuestAvailability::Available; } /////////////////////////////////////////////////////////////////// diff --git a/src/world/Script/NativeScriptApi.h b/src/world/Script/NativeScriptApi.h index 6d07c617..315bdad2 100644 --- a/src/world/Script/NativeScriptApi.h +++ b/src/world/Script/NativeScriptApi.h @@ -170,7 +170,7 @@ namespace Sapphire::ScriptAPI virtual void onEventYield( Sapphire::Entity::Player& player, uint16_t scene, std::vector< uint32_t > param ); - virtual Event::EventHandler::EventState checkExtraConditions( Sapphire::Entity::Player& player, uint32_t eventId ); + virtual Event::EventHandler::QuestAvailability getQuestAvailability( Sapphire::Entity::Player& player, uint32_t eventId ); }; /*!