diff --git a/src/scripts/common/aethernet/Aetheryte.cpp b/src/scripts/common/aethernet/Aetheryte.cpp index d4c1c68c..64acd0c5 100644 --- a/src/scripts/common/aethernet/Aetheryte.cpp +++ b/src/scripts/common/aethernet/Aetheryte.cpp @@ -108,7 +108,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref(); + auto& exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref(); auto aetherInfo = exdData.get< Sapphire::Data::Aetheryte >( eventId & 0xFFFF ); if( !aetherInfo ) diff --git a/src/scripts/common/warptaxi/WarpTaxi.cpp b/src/scripts/common/warptaxi/WarpTaxi.cpp index c4eb8907..8d88f6f4 100644 --- a/src/scripts/common/warptaxi/WarpTaxi.cpp +++ b/src/scripts/common/warptaxi/WarpTaxi.cpp @@ -75,7 +75,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref(); + auto& exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref(); auto warp = exdData.get< Sapphire::Data::Warp >( eventId ); if( !warp ) diff --git a/src/scripts/quest/ManFst001.cpp b/src/scripts/quest/ManFst001.cpp index d21feff1..684b77f8 100644 --- a/src/scripts/quest/ManFst001.cpp +++ b/src/scripts/quest/ManFst001.cpp @@ -96,7 +96,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) diff --git a/src/scripts/quest/ManFst002.cpp b/src/scripts/quest/ManFst002.cpp index a12c0929..0d0a114a 100644 --- a/src/scripts/quest/ManFst002.cpp +++ b/src/scripts/quest/ManFst002.cpp @@ -193,7 +193,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) diff --git a/src/scripts/quest/ManFst003.cpp b/src/scripts/quest/ManFst003.cpp index 5cb09efc..e3bc085e 100644 --- a/src/scripts/quest/ManFst003.cpp +++ b/src/scripts/quest/ManFst003.cpp @@ -82,7 +82,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/ManFst004.cpp b/src/scripts/quest/ManFst004.cpp index cbb04d36..79168cb3 100644 --- a/src/scripts/quest/ManFst004.cpp +++ b/src/scripts/quest/ManFst004.cpp @@ -80,7 +80,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ManFst004::Actor0 ) diff --git a/src/scripts/quest/ManFst005.cpp b/src/scripts/quest/ManFst005.cpp index d98391ce..f9177bf8 100644 --- a/src/scripts/quest/ManFst005.cpp +++ b/src/scripts/quest/ManFst005.cpp @@ -61,7 +61,7 @@ class ManFst005 : public Sapphire::ScriptAPI::EventScript // Event Handlers void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/ManSea001.cpp b/src/scripts/quest/ManSea001.cpp index b86751cb..ddad3d00 100644 --- a/src/scripts/quest/ManSea001.cpp +++ b/src/scripts/quest/ManSea001.cpp @@ -142,7 +142,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) diff --git a/src/scripts/quest/ManSea002.cpp b/src/scripts/quest/ManSea002.cpp index 02e1be2e..a072b62f 100644 --- a/src/scripts/quest/ManSea002.cpp +++ b/src/scripts/quest/ManSea002.cpp @@ -48,7 +48,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) diff --git a/src/scripts/quest/ManSea003.cpp b/src/scripts/quest/ManSea003.cpp index 4b65a1a9..2032d990 100644 --- a/src/scripts/quest/ManSea003.cpp +++ b/src/scripts/quest/ManSea003.cpp @@ -64,7 +64,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/ManWil001.cpp b/src/scripts/quest/ManWil001.cpp index db4e804b..20735575 100644 --- a/src/scripts/quest/ManWil001.cpp +++ b/src/scripts/quest/ManWil001.cpp @@ -174,7 +174,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) diff --git a/src/scripts/quest/ManWil002.cpp b/src/scripts/quest/ManWil002.cpp index bb8cdae2..d340329c 100644 --- a/src/scripts/quest/ManWil002.cpp +++ b/src/scripts/quest/ManWil002.cpp @@ -70,7 +70,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/ManWil003.cpp b/src/scripts/quest/ManWil003.cpp index 3b577cdd..c32b2d7a 100644 --- a/src/scripts/quest/ManWil003.cpp +++ b/src/scripts/quest/ManWil003.cpp @@ -70,7 +70,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/ManWil004.cpp b/src/scripts/quest/ManWil004.cpp index 4d3e006f..acbb5a53 100644 --- a/src/scripts/quest/ManWil004.cpp +++ b/src/scripts/quest/ManWil004.cpp @@ -70,7 +70,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/gridania/SubFst002.cpp b/src/scripts/quest/subquest/gridania/SubFst002.cpp index 630f2c31..1ed0fc15 100644 --- a/src/scripts/quest/subquest/gridania/SubFst002.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst002.cpp @@ -59,7 +59,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 && !player.hasQuest( getId() ) ) diff --git a/src/scripts/quest/subquest/gridania/SubFst004.cpp b/src/scripts/quest/subquest/gridania/SubFst004.cpp index ce559431..506b7cf9 100644 --- a/src/scripts/quest/subquest/gridania/SubFst004.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst004.cpp @@ -56,7 +56,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/gridania/SubFst009.cpp b/src/scripts/quest/subquest/gridania/SubFst009.cpp index baaf7420..424d4151 100644 --- a/src/scripts/quest/subquest/gridania/SubFst009.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst009.cpp @@ -52,7 +52,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/gridania/SubFst010.cpp b/src/scripts/quest/subquest/gridania/SubFst010.cpp index 395095f4..9af037f8 100644 --- a/src/scripts/quest/subquest/gridania/SubFst010.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst010.cpp @@ -55,7 +55,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) diff --git a/src/scripts/quest/subquest/gridania/SubFst013.cpp b/src/scripts/quest/subquest/gridania/SubFst013.cpp index febe937a..f373eb69 100644 --- a/src/scripts/quest/subquest/gridania/SubFst013.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst013.cpp @@ -161,7 +161,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( !player.hasQuest( getId() ) ) @@ -182,7 +182,7 @@ public: void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR1 && emoteId == 5 && player.getQuestSeq( getId() ) == SEQ_1 ) diff --git a/src/scripts/quest/subquest/gridania/SubFst014.cpp b/src/scripts/quest/subquest/gridania/SubFst014.cpp index 28f77dce..02908da6 100644 --- a/src/scripts/quest/subquest/gridania/SubFst014.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst014.cpp @@ -56,7 +56,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 && !player.hasQuest( getId() ) ) diff --git a/src/scripts/quest/subquest/gridania/SubFst019.cpp b/src/scripts/quest/subquest/gridania/SubFst019.cpp index 954e7376..5dd015a5 100644 --- a/src/scripts/quest/subquest/gridania/SubFst019.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst019.cpp @@ -49,7 +49,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/gridania/SubFst029.cpp b/src/scripts/quest/subquest/gridania/SubFst029.cpp index 74044a7b..b22ee88a 100644 --- a/src/scripts/quest/subquest/gridania/SubFst029.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst029.cpp @@ -47,7 +47,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == SubFst029::Actor0 && !player.hasQuest( getId() ) ) diff --git a/src/scripts/quest/subquest/gridania/SubFst039.cpp b/src/scripts/quest/subquest/gridania/SubFst039.cpp index 1159c434..f7ca9a56 100644 --- a/src/scripts/quest/subquest/gridania/SubFst039.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst039.cpp @@ -42,7 +42,7 @@ class SubFst039 : public Sapphire::ScriptAPI::EventScript // Event Handlers void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 && !player.hasQuest( getId() ) ) diff --git a/src/scripts/quest/subquest/limsa/SubSea001.cpp b/src/scripts/quest/subquest/limsa/SubSea001.cpp index 24c141a9..8f198f34 100644 --- a/src/scripts/quest/subquest/limsa/SubSea001.cpp +++ b/src/scripts/quest/subquest/limsa/SubSea001.cpp @@ -65,7 +65,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/limsa/SubSea012.cpp b/src/scripts/quest/subquest/limsa/SubSea012.cpp index d65979bb..4dad6132 100644 --- a/src/scripts/quest/subquest/limsa/SubSea012.cpp +++ b/src/scripts/quest/subquest/limsa/SubSea012.cpp @@ -48,7 +48,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/uldah/SubWil000.cpp b/src/scripts/quest/subquest/uldah/SubWil000.cpp index 5516b841..37f1adbc 100644 --- a/src/scripts/quest/subquest/uldah/SubWil000.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil000.cpp @@ -48,7 +48,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/uldah/SubWil001.cpp b/src/scripts/quest/subquest/uldah/SubWil001.cpp index d6197905..e34a38e1 100644 --- a/src/scripts/quest/subquest/uldah/SubWil001.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil001.cpp @@ -49,7 +49,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/uldah/SubWil002.cpp b/src/scripts/quest/subquest/uldah/SubWil002.cpp index ba22f96b..d59112ef 100644 --- a/src/scripts/quest/subquest/uldah/SubWil002.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil002.cpp @@ -53,7 +53,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/uldah/SubWil004.cpp b/src/scripts/quest/subquest/uldah/SubWil004.cpp index dfabd64f..abd78646 100644 --- a/src/scripts/quest/subquest/uldah/SubWil004.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil004.cpp @@ -58,7 +58,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/uldah/SubWil006.cpp b/src/scripts/quest/subquest/uldah/SubWil006.cpp index 9125a3db..1ce3fa26 100644 --- a/src/scripts/quest/subquest/uldah/SubWil006.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil006.cpp @@ -51,7 +51,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/uldah/SubWil007.cpp b/src/scripts/quest/subquest/uldah/SubWil007.cpp index 46ff82c8..c11572c5 100644 --- a/src/scripts/quest/subquest/uldah/SubWil007.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil007.cpp @@ -55,7 +55,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 && !player.hasQuest( getId() ) ) @@ -90,7 +90,7 @@ public: void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq1 ) diff --git a/src/scripts/quest/subquest/uldah/SubWil018.cpp b/src/scripts/quest/subquest/uldah/SubWil018.cpp index 7618fd2f..f237a068 100644 --- a/src/scripts/quest/subquest/uldah/SubWil018.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil018.cpp @@ -55,7 +55,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 && !player.hasQuest( getId() ) ) diff --git a/src/scripts/quest/subquest/uldah/SubWil019.cpp b/src/scripts/quest/subquest/uldah/SubWil019.cpp index c04ff9a2..257ca62d 100644 --- a/src/scripts/quest/subquest/uldah/SubWil019.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil019.cpp @@ -47,7 +47,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/uldah/SubWil020.cpp b/src/scripts/quest/subquest/uldah/SubWil020.cpp index 7ea1a93f..588dfefe 100644 --- a/src/scripts/quest/subquest/uldah/SubWil020.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil020.cpp @@ -63,7 +63,7 @@ class SubWil020 : public Sapphire::ScriptAPI::EventScript // Event Handlers void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); /*player.setQuestUI8BH( getId(), 0 ); diff --git a/src/scripts/quest/subquest/uldah/SubWil021.cpp b/src/scripts/quest/subquest/uldah/SubWil021.cpp index 8e17059d..f4c73c11 100644 --- a/src/scripts/quest/subquest/uldah/SubWil021.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil021.cpp @@ -52,7 +52,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/uldah/SubWil022.cpp b/src/scripts/quest/subquest/uldah/SubWil022.cpp index 4d274987..a852601d 100644 --- a/src/scripts/quest/subquest/uldah/SubWil022.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil022.cpp @@ -52,7 +52,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/uldah/SubWil027.cpp b/src/scripts/quest/subquest/uldah/SubWil027.cpp index 66dc4843..a19f7c2c 100644 --- a/src/scripts/quest/subquest/uldah/SubWil027.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil027.cpp @@ -46,7 +46,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/uldah/SubWil028.cpp b/src/scripts/quest/subquest/uldah/SubWil028.cpp index 57222790..f52a9e63 100644 --- a/src/scripts/quest/subquest/uldah/SubWil028.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil028.cpp @@ -48,7 +48,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/scripts/quest/subquest/uldah/SubWil029.cpp b/src/scripts/quest/subquest/uldah/SubWil029.cpp index ec09773a..f5734318 100644 --- a/src/scripts/quest/subquest/uldah/SubWil029.cpp +++ b/src/scripts/quest/subquest/uldah/SubWil029.cpp @@ -51,7 +51,7 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); + auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref(); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) diff --git a/src/tools/quest_parser/main.cpp b/src/tools/quest_parser/main.cpp index 069e213e..44d60f05 100644 --- a/src/tools/quest_parser/main.cpp +++ b/src/tools/quest_parser/main.cpp @@ -27,8 +27,8 @@ using namespace Sapphire; const std::string onTalkStr( " void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override\n" " {\n" - " auto pEventMgr = m_framework->get< World::Manager::EventMgr >();\n" - " auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );\n" + " auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();\n" + " auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );\n" " }\n\n" ); @@ -41,8 +41,8 @@ const std::string onWithinRangeStr( const std::string onEmoteStr( " void onEmote( uint32_t eventId, Entity::Player& player, uint64_t actorId, uint32_t emoteId ) override\n" " {\n" - " auto pEventMgr = m_framework->get< World::Manager::EventMgr >();\n" - " auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );\n" + " auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();\n" + " auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );\n" " }\n\n" ); diff --git a/src/world/Actor/PlayerInventory.cpp b/src/world/Actor/PlayerInventory.cpp index e6406c5f..d10c7c66 100644 --- a/src/world/Actor/PlayerInventory.cpp +++ b/src/world/Actor/PlayerInventory.cpp @@ -131,7 +131,7 @@ void Sapphire::Entity::Player::equipWeapon( ItemPtr pItem, bool updateClass ) void Sapphire::Entity::Player::equipSoulCrystal( ItemPtr pItem, bool updateJob ) { - auto exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref(); + auto& exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref(); auto itemInfo = exdData.get< Sapphire::Data::Item >( pItem->getId() ); auto itemClassJob = itemInfo->classJobUse; diff --git a/src/world/Manager/DebugCommandMgr.cpp b/src/world/Manager/DebugCommandMgr.cpp index 515bf228..54be2fdb 100644 --- a/src/world/Manager/DebugCommandMgr.cpp +++ b/src/world/Manager/DebugCommandMgr.cpp @@ -535,7 +535,7 @@ void Sapphire::World::Manager::DebugCommandMgr::add( char* data, Entity::Player& void Sapphire::World::Manager::DebugCommandMgr::get( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) { - auto exdData = Common::Service< Data::ExdDataGenerated >::ref(); + auto& exdData = Common::Service< Data::ExdDataGenerated >::ref(); std::string subCommand; std::string params = ""; diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index f2a559b5..9cd612bb 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -869,7 +869,7 @@ void Sapphire::World::Manager::HousingMgr::sendEstateInventory( Entity::Player& if( it == containers.end() ) return; - auto invMgr = Common::Service< Manager::InventoryMgr >::ref(); + auto& invMgr = Common::Service< Manager::InventoryMgr >::ref(); invMgr.sendInventoryContainer( player, it->second ); } diff --git a/src/world/Network/Handlers/ClientTriggerHandler.cpp b/src/world/Network/Handlers/ClientTriggerHandler.cpp index 7af8215e..e8ca0481 100644 --- a/src/world/Network/Handlers/ClientTriggerHandler.cpp +++ b/src/world/Network/Handlers/ClientTriggerHandler.cpp @@ -190,7 +190,7 @@ void Sapphire::Network::GameConnection::clientTriggerHandler( const Packets::FFX uint32_t emoteId = param11; bool isSilent = param2 == 1; - auto exdData = Common::Service< Data::ExdDataGenerated >::ref(); + auto& exdData = Common::Service< Data::ExdDataGenerated >::ref(); auto emoteData = exdData.get< Data::Emote >( emoteId ); if( !emoteData ) diff --git a/src/world/Territory/HousingZone.cpp b/src/world/Territory/HousingZone.cpp index e2ee9cf6..8443da8e 100644 --- a/src/world/Territory/HousingZone.cpp +++ b/src/world/Territory/HousingZone.cpp @@ -63,7 +63,7 @@ bool Sapphire::HousingZone::init() else if( m_territoryTypeId == 641 ) housingIndex = 3; - auto exdData = Common::Service< Data::ExdDataGenerated >::ref(); + auto& exdData = Common::Service< Data::ExdDataGenerated >::ref(); auto info = exdData.get< Sapphire::Data::HousingLandSet >( housingIndex ); // build yard objects array indices