mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-04 17:57:47 +00:00
better naming
This commit is contained in:
parent
774d16667d
commit
322a7bb4c2
4 changed files with 7 additions and 7 deletions
|
@ -85,7 +85,7 @@ namespace Sapphire::Event
|
||||||
QuestBattleDirector = 0x8006,
|
QuestBattleDirector = 0x8006,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class EventState : uint8_t
|
enum class QuestAvailability : uint8_t
|
||||||
{
|
{
|
||||||
Invisible,
|
Invisible,
|
||||||
Available,
|
Available,
|
||||||
|
|
|
@ -279,11 +279,11 @@ void Sapphire::World::Manager::MapMgr::insertQuest( Entity::Player& player, uint
|
||||||
EventData eventData;
|
EventData eventData;
|
||||||
eventData.eventId = questId;
|
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.iconId = exdData.get< Data::EventIconType >( quest->eventIconType )->mapIconAvailable + 1 + quest->isRepeatable;
|
||||||
eventData.levelId = quest->issuerLocation;
|
eventData.levelId = quest->issuerLocation;
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -170,7 +170,7 @@ namespace Sapphire::ScriptAPI
|
||||||
|
|
||||||
virtual void onEventYield( Sapphire::Entity::Player& player, uint16_t scene, std::vector< uint32_t > param );
|
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 );
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Loading…
Add table
Reference in a new issue