mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-30 05:07:46 +00:00
SubFst011, SubFst026 and SubFst029 typo and style
This commit is contained in:
parent
f2923f1069
commit
affe286bd1
3 changed files with 53 additions and 46 deletions
|
@ -35,19 +35,19 @@ private:
|
|||
|
||||
public:
|
||||
SubFst011() : EventScript( 65573 )
|
||||
{ };
|
||||
{};
|
||||
~SubFst011()
|
||||
{ };
|
||||
{};
|
||||
|
||||
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
auto actor = Event::mapEventActorToRealActor( actorId );
|
||||
|
||||
if ( actor == SubFst011::Actor0 && !player.hasQuest( m_id ) )
|
||||
if( actor == SubFst011::Actor0 && !player.hasQuest( getId() ) )
|
||||
{
|
||||
Scene00000( player );
|
||||
}
|
||||
else if ( actor == SubFst011::Actor0 && player.getQuestSeq( m_id ) == SeqFinish )
|
||||
else if( actor == SubFst011::Actor0 && player.getQuestSeq( getId() ) == SeqFinish )
|
||||
{
|
||||
Scene00001( player );
|
||||
}
|
||||
|
@ -55,17 +55,17 @@ public:
|
|||
|
||||
void onMobKill( Entity::Player& player, uint64_t npcId)
|
||||
{
|
||||
if ( npcId != Enemy0 )
|
||||
if( npcId != Enemy0 )
|
||||
return;
|
||||
|
||||
auto currentKC = player.getQuestUI8AL( m_id ) + 1;
|
||||
auto currentKC = player.getQuestUI8AL( getId() ) + 1;
|
||||
|
||||
if ( currentKC >= 6 )
|
||||
player.updateQuest(getId(), 255);
|
||||
if( currentKC >= 6 )
|
||||
player.updateQuest( getId(), 255 );
|
||||
else
|
||||
{
|
||||
player.setQuestUI8AL( m_id, currentKC );
|
||||
player.sendQuestMessage( m_id, 0, 2, currentKC, 6 );
|
||||
player.setQuestUI8AL( getId(), currentKC );
|
||||
player.sendQuestMessage( getId(), 0, 2, currentKC, 6 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,23 +73,23 @@ private:
|
|||
|
||||
void Scene00000( Entity::Player& player )
|
||||
{
|
||||
player.playScene( m_id, 0, 0,
|
||||
player.playScene( getId(), 0, HIDE_HOTBAR,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if ( result.param2 == 1 ) // accept quest
|
||||
player.updateQuest( m_id, 1 );
|
||||
if( result.param2 == 1 ) // accept quest
|
||||
player.updateQuest( getId(), 1 );
|
||||
} );
|
||||
}
|
||||
|
||||
void Scene00001( Entity::Player& player )
|
||||
{
|
||||
player.playScene( m_id, 1, 0,
|
||||
player.playScene( getId(), 1, HIDE_HOTBAR,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if ( result.param2 == 1 ) // finish quest
|
||||
if( result.param2 == 1 ) // finish quest
|
||||
{
|
||||
if ( player.giveQuestRewards( m_id, 0 ) )
|
||||
player.finishQuest( m_id );
|
||||
if( player.giveQuestRewards( getId(), 0 ) )
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
|
|
@ -37,28 +37,37 @@ class SubFst026 : public EventScript
|
|||
|
||||
public:
|
||||
SubFst026() : EventScript( 65706 )
|
||||
{ };
|
||||
{};
|
||||
~SubFst026()
|
||||
{ };
|
||||
{};
|
||||
|
||||
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
auto actor = Event::mapEventActorToRealActor( actorId );
|
||||
|
||||
if( actor == Actor0 && !player.hasQuest( getId() ) )
|
||||
{
|
||||
Scene00000( player );
|
||||
}
|
||||
else if( actor == Actor0 && player.getQuestSeq( getId() ) == 255 )
|
||||
{
|
||||
Scene00001( player );
|
||||
}
|
||||
}
|
||||
|
||||
void onMobKill( Entity::Player& player, uint64_t npcId )
|
||||
{
|
||||
if (npcId != Enemy0)
|
||||
if(npcId != Enemy0)
|
||||
return;
|
||||
|
||||
auto currentKC = player.getQuestUI8AL( m_id ) + 1;
|
||||
auto currentKC = player.getQuestUI8AL( getId() ) + 1;
|
||||
|
||||
if ( currentKC >= 6 )
|
||||
player.updateQuest( m_id, 255 );
|
||||
if( currentKC >= 6 )
|
||||
player.updateQuest( getId(), 255 );
|
||||
else
|
||||
{
|
||||
player.setQuestUI8AL( m_id, currentKC );
|
||||
player.sendQuestMessage( m_id, 0, 2, currentKC, 6 );
|
||||
player.setQuestUI8AL( getId(), currentKC );
|
||||
player.sendQuestMessage( getId(), 0, 2, currentKC, 6 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,26 +75,25 @@ class SubFst026 : public EventScript
|
|||
|
||||
void Scene00000( Entity::Player& player )
|
||||
{
|
||||
player.playScene( m_id, 0, 0,
|
||||
player.playScene( getId(), 0, HIDE_HOTBAR,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if ( result.param2 == 1 )
|
||||
player.updateQuest( m_id, 1 );
|
||||
player.updateQuest( getId(), 1 );
|
||||
} );
|
||||
}
|
||||
|
||||
void Scene00001( Entity::Player& player )
|
||||
{
|
||||
player.playScene( m_id, 1, 0,
|
||||
player.playScene( getId(), 1, HIDE_HOTBAR,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if ( result.param2 == 1 )
|
||||
{
|
||||
if ( player.giveQuestRewards( m_id, 0 ) )
|
||||
player.finishQuest( m_id );
|
||||
if ( player.giveQuestRewards( getId(), 0 ) )
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ class SubFst029 : public EventScript
|
|||
|
||||
public:
|
||||
SubFst029() : EventScript( 65708 )
|
||||
{ };
|
||||
{};
|
||||
~SubFst029()
|
||||
{ };
|
||||
{};
|
||||
|
||||
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
|
@ -46,11 +46,11 @@ class SubFst029 : public EventScript
|
|||
|
||||
//NOT SAFE - CRASH
|
||||
|
||||
/*if (actor == SubFst029::Actor0 && !player.hasQuest( m_id ) )
|
||||
/*if( actor == SubFst029::Actor0 && !player.hasQuest( getId() ) )
|
||||
{
|
||||
Scene00000( player );
|
||||
}
|
||||
if (actor == SubFst029::Actor0 && player.getQuestSeq ( m_id ) == 255 )
|
||||
if( actor == SubFst029::Actor0 && player.getQuestSeq ( getId() ) == 255 )
|
||||
{
|
||||
Scene00001( player );
|
||||
}*/
|
||||
|
@ -60,22 +60,22 @@ class SubFst029 : public EventScript
|
|||
|
||||
void Scene00000( Entity::Player& player )
|
||||
{
|
||||
player.playScene( m_id, 0, 8192,
|
||||
player.playScene( getId(), 0, HIDE_HOTBAR,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if ( result.param2 == 1 )
|
||||
if( result.param2 == 1 )
|
||||
{
|
||||
player.updateQuest( m_id, 255 );
|
||||
player.updateQuest( getId(), 255 );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
void Scene00001( Entity::Player& player )
|
||||
{
|
||||
player.playScene( m_id, 1, 8192,
|
||||
player.playScene( getId(), 1, HIDE_HOTBAR,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if ( result.param2 == 1 )
|
||||
if( result.param2 == 1 )
|
||||
{
|
||||
Scene00100( player );
|
||||
}
|
||||
|
@ -88,24 +88,23 @@ class SubFst029 : public EventScript
|
|||
|
||||
void Scene00099( Entity::Player& player )
|
||||
{
|
||||
player.playScene( m_id, 99, 8192,
|
||||
player.playScene( getId(), 99, HIDE_HOTBAR,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
player.playScene( m_id, 99, 0, 0, 0 );
|
||||
player.playScene( getId(), 99, 0, 0, 0 );
|
||||
} );
|
||||
}
|
||||
|
||||
void Scene00100( Entity::Player& player )
|
||||
{
|
||||
player.playScene( m_id, 100, 8192,
|
||||
player.playScene( getId(), 100, HIDE_HOTBAR,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if (player.giveQuestRewards(m_id, 0))
|
||||
if( player.giveQuestRewards( getId(), 0 ) )
|
||||
{
|
||||
player.finishQuest(m_id);
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue