From 50fbdbfa1288c6fb790552673fd134173a0af16f Mon Sep 17 00:00:00 2001 From: Mordred Date: Mon, 28 Feb 2022 08:40:57 +0100 Subject: [PATCH] renamed setSystemActionUnlock to setRewardFlag --- .appveyor.yml | 29 +++++++++++++++++++ src/common/Network/CommonActorControl.h | 2 +- src/scripts/common/aethernet/Aetheryte.cpp | 2 +- src/scripts/quest/ManFst002.cpp | 2 +- src/scripts/quest/ManFst003.cpp | 2 +- src/scripts/quest/ManFst004.cpp | 2 +- src/scripts/quest/ManSea002.cpp | 2 +- src/scripts/quest/ManSea003.cpp | 2 +- src/scripts/quest/ManWil002.cpp | 2 +- src/scripts/quest/ManWil003.cpp | 2 +- src/scripts/quest/ManWil004.cpp | 2 +- .../quest/classquest/ARC/ClsArc000.cpp | 2 +- .../quest/subquest/mordhona/GaiUsc602.cpp | 2 +- src/world/Actor/Player.cpp | 4 +-- src/world/Actor/Player.h | 2 +- src/world/Manager/DebugCommandMgr.cpp | 2 +- 16 files changed, 45 insertions(+), 16 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index e69de29bb..9990a1125 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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 diff --git a/src/common/Network/CommonActorControl.h b/src/common/Network/CommonActorControl.h index efed3b317..6f385093d 100644 --- a/src/common/Network/CommonActorControl.h +++ b/src/common/Network/CommonActorControl.h @@ -64,7 +64,7 @@ namespace Sapphire::Network::ActorControl SpawnEffect = 0x25, ToggleInvisible = 0x26, DeadFadeOut = 0x27, - SetSystemActionUnlocked = 0x29, + SetRewardFlag = 0x29, UpdateUiExp = 0x2B, SetFallDamage = 0x2D, diff --git a/src/scripts/common/aethernet/Aetheryte.cpp b/src/scripts/common/aethernet/Aetheryte.cpp index 80e509c21..342944cc1 100644 --- a/src/scripts/common/aethernet/Aetheryte.cpp +++ b/src/scripts/common/aethernet/Aetheryte.cpp @@ -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 ) diff --git a/src/scripts/quest/ManFst002.cpp b/src/scripts/quest/ManFst002.cpp index 96efe03b7..1f6fe2869 100644 --- a/src/scripts/quest/ManFst002.cpp +++ b/src/scripts/quest/ManFst002.cpp @@ -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 ); }; diff --git a/src/scripts/quest/ManFst003.cpp b/src/scripts/quest/ManFst003.cpp index a79eb0320..446a4882b 100644 --- a/src/scripts/quest/ManFst003.cpp +++ b/src/scripts/quest/ManFst003.cpp @@ -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() ); diff --git a/src/scripts/quest/ManFst004.cpp b/src/scripts/quest/ManFst004.cpp index 0b49789e3..6b0857be1 100644 --- a/src/scripts/quest/ManFst004.cpp +++ b/src/scripts/quest/ManFst004.cpp @@ -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() ); diff --git a/src/scripts/quest/ManSea002.cpp b/src/scripts/quest/ManSea002.cpp index 43bee9dff..3ad696138 100644 --- a/src/scripts/quest/ManSea002.cpp +++ b/src/scripts/quest/ManSea002.cpp @@ -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() ); diff --git a/src/scripts/quest/ManSea003.cpp b/src/scripts/quest/ManSea003.cpp index d253909c9..fe2618cea 100644 --- a/src/scripts/quest/ManSea003.cpp +++ b/src/scripts/quest/ManSea003.cpp @@ -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() ); diff --git a/src/scripts/quest/ManWil002.cpp b/src/scripts/quest/ManWil002.cpp index 53fc973ec..9983348f6 100644 --- a/src/scripts/quest/ManWil002.cpp +++ b/src/scripts/quest/ManWil002.cpp @@ -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() ); diff --git a/src/scripts/quest/ManWil003.cpp b/src/scripts/quest/ManWil003.cpp index c9ac7123d..5ec411f62 100644 --- a/src/scripts/quest/ManWil003.cpp +++ b/src/scripts/quest/ManWil003.cpp @@ -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() ); diff --git a/src/scripts/quest/ManWil004.cpp b/src/scripts/quest/ManWil004.cpp index 78b8d22c1..8a893bf0e 100644 --- a/src/scripts/quest/ManWil004.cpp +++ b/src/scripts/quest/ManWil004.cpp @@ -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() ); diff --git a/src/scripts/quest/classquest/ARC/ClsArc000.cpp b/src/scripts/quest/classquest/ARC/ClsArc000.cpp index 7af58efec..2ec1372cb 100644 --- a/src/scripts/quest/classquest/ARC/ClsArc000.cpp +++ b/src/scripts/quest/classquest/ARC/ClsArc000.cpp @@ -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 ) ); } } diff --git a/src/scripts/quest/subquest/mordhona/GaiUsc602.cpp b/src/scripts/quest/subquest/mordhona/GaiUsc602.cpp index 8a4a92af8..efd272ae2 100644 --- a/src/scripts/quest/subquest/mordhona/GaiUsc602.cpp +++ b/src/scripts/quest/subquest/mordhona/GaiUsc602.cpp @@ -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 ) ); } } diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index 7b2016890..33bd50a2f 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -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; @@ -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 ) diff --git a/src/world/Actor/Player.h b/src/world/Actor/Player.h index c5f05dfed..5595d194a 100644 --- a/src/world/Actor/Player.h +++ b/src/world/Actor/Player.h @@ -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 ); diff --git a/src/world/Manager/DebugCommandMgr.cpp b/src/world/Manager/DebugCommandMgr.cpp index 613932801..7d08bc8d4 100644 --- a/src/world/Manager/DebugCommandMgr.cpp +++ b/src/world/Manager/DebugCommandMgr.cpp @@ -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") {