Skip to content

Commit

Permalink
renamed setSystemActionUnlock to setRewardFlag
Browse files Browse the repository at this point in the history
  • Loading branch information
SapphireMordred committed Feb 28, 2022
1 parent 83517ec commit 50fbdbf
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 16 deletions.
29 changes: 29 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
os:
- Visual Studio 2019

configuration:
- Debug

platform:
- Win64

environment:
MSVC_DEFAULT_OPTIONS: ON
MYSQL_PWD: "Password12!"

services:
- mysql

before_build:
- set PATH="C:\\Program Files\\MySQL\\MySQL Server 5.7\\bin";%PATH%
- cd c:\projects\sapphire
- git submodule update --init
- mkdir build
- cd build
- cmake .. -G "Visual Studio 16 2019" -A x64
- cmake --build . --target ALL_BUILD --config RelWithDebInfo

build_script:
- cd bin
- copy "C:\Program Files\MySQL\MySQL Server 5.7\lib\libmysql.dll" libmysql.dll
- sh sql_import.sh
2 changes: 1 addition & 1 deletion src/common/Network/CommonActorControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace Sapphire::Network::ActorControl
SpawnEffect = 0x25,
ToggleInvisible = 0x26,
DeadFadeOut = 0x27,
SetSystemActionUnlocked = 0x29,
SetRewardFlag = 0x29,

UpdateUiExp = 0x2B,
SetFallDamage = 0x2D,
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/common/aethernet/Aetheryte.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class Aetheryte :
else
{
eventMgr().sendEventNotice( player, eventId, 0, 1, 1, 0 );
player.setSystemActionUnlocked( Common::UnlockEntry::Teleport );
player.setRewardFlag( Common::UnlockEntry::Teleport );
}
},
[]( Entity::Player& player, uint32_t eventId, uint64_t additional )
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/quest/ManFst002.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class ManFst002 : public Sapphire::ScriptAPI::QuestScript
{
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
player.registerAetheryte( 2 );
player.setSystemActionUnlocked( Common::UnlockEntry::Return );
player.setRewardFlag( Common::UnlockEntry::Return );

Scene00051( quest, player );
};
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/quest/ManFst003.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ManFst003 : public Sapphire::ScriptAPI::QuestScript
{
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
player.registerAetheryte( 2 );
player.setSystemActionUnlocked( Common::UnlockEntry::Return );
player.setRewardFlag( Common::UnlockEntry::Return );
Scene00051( quest, player );
},
nullptr, quest.getId() );
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/quest/ManFst004.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class ManFst004 : public Sapphire::ScriptAPI::QuestScript
{
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
player.registerAetheryte( 2 );
player.setSystemActionUnlocked( Common::UnlockEntry::Return );
player.setRewardFlag( Common::UnlockEntry::Return );
Scene00051( quest, player );
},
nullptr, quest.getId() );
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/quest/ManSea002.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ManSea002 : public Sapphire::ScriptAPI::QuestScript
{
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
player.registerAetheryte( 2 );
player.setSystemActionUnlocked( Common::UnlockEntry::Return );
player.setRewardFlag( Common::UnlockEntry::Return );
Scene00002( player );
},
nullptr, getId() );
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/quest/ManSea003.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ManSea003 : public Sapphire::ScriptAPI::QuestScript
{
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
player.registerAetheryte( 2 );
player.setSystemActionUnlocked( Common::UnlockEntry::Return );
player.setRewardFlag( Common::UnlockEntry::Return );
Scene00002( player );
},
nullptr, getId() );
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/quest/ManWil002.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ManWil002 : public Sapphire::ScriptAPI::QuestScript
{
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
player.registerAetheryte( 2 );
player.setSystemActionUnlocked( Common::UnlockEntry::Return );
player.setRewardFlag( Common::UnlockEntry::Return );
Scene00001( quest, player );
},
nullptr, getId() );
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/quest/ManWil003.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ManWil003 : public Sapphire::ScriptAPI::QuestScript
{
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
player.registerAetheryte( 2 );
player.setSystemActionUnlocked( Common::UnlockEntry::Return );
player.setRewardFlag( Common::UnlockEntry::Return );
Scene00001( player );
},
nullptr, getId() );
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/quest/ManWil004.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ManWil004 : public Sapphire::ScriptAPI::QuestScript
{
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
player.registerAetheryte( 2 );
player.setSystemActionUnlocked( Common::UnlockEntry::Return );
player.setRewardFlag( Common::UnlockEntry::Return );
Scene00001( player );
},
nullptr, getId() );
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/quest/classquest/ARC/ClsArc000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class ClsArc000 : public Sapphire::ScriptAPI::QuestScript

if( result.getResult( 0 ) == 1 )
{
player.setSystemActionUnlocked( Sapphire::Common::UnlockEntry::HuntingLog );
player.setRewardFlag( Sapphire::Common::UnlockEntry::HuntingLog );
player.finishQuest( getId(), result.getResult( 1 ) );
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/quest/subquest/mordhona/GaiUsc602.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class GaiUsc602 : public Sapphire::ScriptAPI::QuestScript

if( result.getResult( 0 ) == 1 )
{
player.setSystemActionUnlocked( Common::UnlockEntry::EmoteImperialSalute );
player.setRewardFlag( Common::UnlockEntry::EmoteImperialSalute );
player.finishQuest( getId(), result.getResult( 1 ) );
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/world/Actor/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ void Player::changePosition( float x, float y, float z, float o )
warpMgr.requestWarp( *this, Common::WARP_TYPE_NORMAL, pos, getRot() );
}

void Player::setSystemActionUnlocked( Common::UnlockEntry unlockId )
void Player::setRewardFlag( Common::UnlockEntry unlockId )
{
uint16_t index;
uint8_t value;
Expand All @@ -658,7 +658,7 @@ void Player::setSystemActionUnlocked( Common::UnlockEntry unlockId )

m_unlocks[ index ] |= value;

queuePacket( makeActorControlSelf( getId(), SetSystemActionUnlocked, unlock, 1 ) );
queuePacket( makeActorControlSelf( getId(), SetRewardFlag, unlock, 1 ) );
}

void Player::learnSong( uint8_t songId, uint32_t itemId )
Expand Down
2 changes: 1 addition & 1 deletion src/world/Actor/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ namespace Sapphire::Entity
void updateHowtosSeen( uint32_t howToId );

/*! learn an action / update the unlock bitmask. */
void setSystemActionUnlocked( Common::UnlockEntry unlockId );
void setRewardFlag( Common::UnlockEntry unlockId );

/*! learn a song / update the unlock bitmask. */
void learnSong( uint8_t songId, uint32_t itemId );
Expand Down
2 changes: 1 addition & 1 deletion src/world/Manager/DebugCommandMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ void DebugCommandMgr::add( char* data, Entity::Player& player, std::shared_ptr<
uint32_t id;

sscanf( params.c_str(), "%d", &id );
player.setSystemActionUnlocked( static_cast< Common::UnlockEntry >( id ) );
player.setRewardFlag( static_cast< Common::UnlockEntry >( id ) );
}
else if ( subCommand == "effect")
{
Expand Down

0 comments on commit 50fbdbf

Please sign in to comment.