From ca042995c00cd6250e039ffc87dd280f318bcfc8 Mon Sep 17 00:00:00 2001 From: Nuno Date: Thu, 21 Jan 2021 15:26:59 +0100 Subject: [PATCH] Merge branch 'fixes' --- .../src/entities_game_service/modules/easter_egg.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ryzom/server/src/entities_game_service/modules/easter_egg.cpp b/ryzom/server/src/entities_game_service/modules/easter_egg.cpp index f04354704..2c4527e26 100644 --- a/ryzom/server/src/entities_game_service/modules/easter_egg.cpp +++ b/ryzom/server/src/entities_game_service/modules/easter_egg.cpp @@ -76,7 +76,8 @@ void CR2EasterEgg::dropMissionItem(std::vector< CGameItemPtr > items, TSessionId if( c != 0 ) { CEntityState &pos = c->getState(); - _SpawnEasterEgg( egg.EasterEggId, CSheetId(EaterEggBagSheet), aiInstanceId, pos.X, pos.Y, pos.Z, pos.Heading ); + CSheetId bagSheet = CSheetId(EaterEggBagSheet.get()); + _SpawnEasterEgg( egg.EasterEggId, bagSheet, aiInstanceId, pos.X, pos.Y, pos.Z, pos.Heading ); } } @@ -203,7 +204,7 @@ void CR2EasterEgg::activateEasterEgg(uint32 easterEggId, TSessionId scenarioId, _EasterEgg.insert( make_pair( egg.EasterEggId, egg ) ); // send message to AIS for spawn the easter egg - _SpawnEasterEgg( egg.EasterEggId, CSheetId(EasterEggChestSheet), aiInstanceId, pos.PosState.X, pos.PosState.Y, pos.PosState.Z, pos.PosState.Heading, name, look ); + _SpawnEasterEgg( egg.EasterEggId, CSheetId(EasterEggChestSheet.get()), aiInstanceId, pos.PosState.X, pos.PosState.Y, pos.PosState.Z, pos.PosState.Heading, name, look ); } //---------------------------------------------------------------------------- @@ -275,7 +276,7 @@ void CR2EasterEgg::easterEggTPActChange(const NLMISC::CEntityId &characterId, co { _UnspawnEasterEgg( easterEggToTP[i].EasterEggId, easterEggToTP[i].InstanceId ); _RemoveEntityEasterAssociation( easterEggToTP[i].CreatureId, easterEggToTP[i].EasterEggId ); - _SpawnEasterEgg(easterEggToTP[i].EasterEggId, CSheetId(EaterEggBagSheet), easterEggToTP[i].InstanceId, pos.PosState.X, pos.PosState.Y,pos.PosState.Z, pos.PosState.Heading, easterEggToTP[i].Name, easterEggToTP[i].Look ); + _SpawnEasterEgg(easterEggToTP[i].EasterEggId, CSheetId(EaterEggBagSheet.get()), easterEggToTP[i].InstanceId, pos.PosState.X, pos.PosState.Y,pos.PosState.Z, pos.PosState.Heading, easterEggToTP[i].Name, easterEggToTP[i].Look ); } easterEggToTP.clear(); }