mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-23 21:27:45 +00:00
update
This commit is contained in:
parent
7716fe8f54
commit
72500b83c7
3 changed files with 115 additions and 131 deletions
|
@ -1,7 +1,6 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <Actor/Player.h>
|
||||
#include "Event/EventHelper.h"
|
||||
#include "../ScriptObject.h"
|
||||
#include <ScriptObject.h>
|
||||
|
||||
// Quest Script: ManSea002_00108
|
||||
// Quest Name: Close to Home
|
||||
|
@ -57,9 +56,7 @@ public:
|
|||
player.learnAction( 1 );
|
||||
Scene00002( player );
|
||||
},
|
||||
[&]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{},
|
||||
eventId );
|
||||
nullptr, eventId );
|
||||
}
|
||||
else if( actor == ACTOR1 )
|
||||
{
|
||||
|
@ -109,8 +106,10 @@ private:
|
|||
player.playScene( getId(), 0, HIDE_HOTBAR,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if( result.param2 == 1 ) // accept quest
|
||||
Scene00001( player );
|
||||
if (result.param2 == 1)
|
||||
{
|
||||
Scene00001(player);
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
|
@ -119,9 +118,8 @@ private:
|
|||
player.playScene( getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
// on quest accept
|
||||
player.updateQuest( getId(), 1 );
|
||||
player.setQuestUI8CH( getId(), 1 ); // receive key item
|
||||
player.setQuestUI8CH( getId(), 1 );
|
||||
} );
|
||||
}
|
||||
|
||||
|
@ -162,7 +160,7 @@ private:
|
|||
player.playScene( getId(), 5, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, 0, 0,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
player.setQuestUI8CH( getId(), 0 ); // remove key item, since we have just traded it
|
||||
player.setQuestUI8CH( getId(), 0 );
|
||||
player.setQuestUI8BH( getId(), 1 );
|
||||
checkQuestCompletion( player, 1 );
|
||||
} );
|
||||
|
@ -183,7 +181,7 @@ private:
|
|||
player.playScene( getId(), 7, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, 0, 0,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if ( result.param2 == 1 ) // finish quest
|
||||
if ( result.param2 == 1 )
|
||||
{
|
||||
if (player.giveQuestRewards( getId(), 0 ) )
|
||||
{
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <Script/NativeScriptApi.h>
|
||||
#include <Actor/Player.h>
|
||||
#include "Event/EventHelper.h"
|
||||
#include <ScriptObject.h>
|
||||
|
@ -72,9 +71,7 @@ class ManSea003 : public EventScript
|
|||
player.learnAction( 1 );
|
||||
Scene00002( player );
|
||||
},
|
||||
[&]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{},
|
||||
eventId );
|
||||
nullptr, eventId );
|
||||
}
|
||||
else if( actor == Actor1 )
|
||||
{
|
||||
|
@ -124,8 +121,10 @@ class ManSea003 : public EventScript
|
|||
player.playScene( getId(), 0, HIDE_HOTBAR,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if( result.param2 == 1 ) // accept quest
|
||||
Scene00001( player );
|
||||
if (result.param2 == 1)
|
||||
{
|
||||
Scene00001(player);
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
|
@ -134,9 +133,8 @@ class ManSea003 : public EventScript
|
|||
player.playScene( getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
// on quest accept
|
||||
player.updateQuest( getId(), 1 );
|
||||
player.setQuestUI8CH( getId(), 1 ); // receive key item
|
||||
player.setQuestUI8CH( getId(), 1 );
|
||||
} );
|
||||
}
|
||||
|
||||
|
@ -177,7 +175,7 @@ class ManSea003 : public EventScript
|
|||
player.playScene( getId(), 5, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, 0, 0,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
player.setQuestUI8CH( getId(), 0 ); // remove key item, since we have just traded it
|
||||
player.setQuestUI8CH( getId(), 0 );
|
||||
player.setQuestUI8BH( getId(), 1 );
|
||||
checkQuestCompletion( player, 1 );
|
||||
} );
|
||||
|
@ -198,7 +196,7 @@ class ManSea003 : public EventScript
|
|||
player.playScene( getId(), 7, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, 0, 0,
|
||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if( result.param2 == 1 ) // finish quest
|
||||
if( result.param2 == 1 )
|
||||
{
|
||||
if(player.giveQuestRewards( getId(), 0 ) )
|
||||
{
|
||||
|
|
|
@ -79,9 +79,7 @@ public:
|
|||
{
|
||||
Scene00003( player );
|
||||
},
|
||||
[&]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{},
|
||||
eventId );
|
||||
nullptr, eventId );
|
||||
}
|
||||
else if(actor == Eobject1 )
|
||||
{
|
||||
|
@ -90,9 +88,7 @@ public:
|
|||
{
|
||||
Scene00005( player );
|
||||
},
|
||||
[&]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{},
|
||||
eventId );
|
||||
nullptr, eventId );
|
||||
}
|
||||
else if( actor == Eobject2 )
|
||||
{
|
||||
|
@ -101,9 +97,7 @@ public:
|
|||
{
|
||||
Scene00007( player );
|
||||
},
|
||||
[&]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{},
|
||||
eventId );
|
||||
nullptr, eventId );
|
||||
}
|
||||
else if( actor == Eobject3 )
|
||||
{
|
||||
|
@ -112,9 +106,7 @@ public:
|
|||
{
|
||||
Scene00009( player );
|
||||
},
|
||||
[&]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{},
|
||||
eventId );
|
||||
nullptr, eventId );
|
||||
}
|
||||
else if( actor == Eobject4 )
|
||||
{
|
||||
|
@ -123,9 +115,7 @@ public:
|
|||
{
|
||||
Scene00011( player );
|
||||
},
|
||||
[&]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{},
|
||||
eventId );
|
||||
nullptr, eventId );
|
||||
}
|
||||
else if( actor == Eobject5 )
|
||||
{
|
||||
|
@ -134,9 +124,7 @@ public:
|
|||
{
|
||||
Scene00013( player );
|
||||
},
|
||||
[&]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{},
|
||||
eventId );
|
||||
nullptr, eventId );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue