From 8c6677dba6ecbc16c3822c1f873b005bb2eae3b0 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 18 Nov 2019 07:55:57 +0800 Subject: [PATCH] Disable pet name since it's only accessible through admin and web --- code/ryzom/server/src/entities_game_service/admin.cpp | 2 ++ .../src/entities_game_service/player_manager/character.cpp | 2 ++ .../src/entities_game_service/player_manager/character.h | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/code/ryzom/server/src/entities_game_service/admin.cpp b/code/ryzom/server/src/entities_game_service/admin.cpp index d259140ae..20826d2f3 100644 --- a/code/ryzom/server/src/entities_game_service/admin.cpp +++ b/code/ryzom/server/src/entities_game_service/admin.cpp @@ -2476,6 +2476,7 @@ NLMISC_COMMAND(getPetAnimalSatiety,"Get the satiety of pet animal (petIndex in 0 return true; } +#ifdef RYZOM_FORGE_PET_NAME NLMISC_COMMAND(setPetAnimalName, "Set the name of a pet animal"," []") { if (args.size () < 2) return false; @@ -2493,6 +2494,7 @@ NLMISC_COMMAND(setPetAnimalName, "Set the name of a pet animal"," ") { diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character.cpp index 873670929..552925498 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/character.cpp @@ -6876,6 +6876,7 @@ void CCharacter::sendAnimalCommand( uint8 petIndexCode, uint8 command ) } } +#ifdef RYZOM_FORGE_PET_NAME void CCharacter::setAnimalName( uint8 petIndex, ucstring customName ) { if (petIndex < 0 || petIndex >= MAX_INVENTORY_ANIMAL) @@ -6911,6 +6912,7 @@ void CCharacter::sendPetCustomNameToClient(uint8 petIndex) } CBankAccessor_PLR::getPACK_ANIMAL().getBEAST(petIndex).setNAME(_PropertyDatabase, textId); } +#endif //----------------------------------------------- diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character.h b/code/ryzom/server/src/entities_game_service/player_manager/character.h index 7c7b69fb7..51976339b 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/character.h @@ -298,7 +298,9 @@ struct CPetAnimal bool IsMounted; bool IsTpAllowed; bool spawnFlag; +#ifdef RYZOM_FORGE_PET_NAME ucstring CustomName; +#endif // ctor CPetAnimal(); @@ -1016,10 +1018,12 @@ public: // return the index of a player pet, or -1 if not found sint32 getPlayerPet( const TDataSetRow& petRowId ) const; +#ifdef RYZOM_FORGE_PET_NAME // Set the name of the animal void setAnimalName( uint8 petIndex, ucstring customName ); void sendPetCustomNameToClient(uint8 petIndex); +#endif // near character's pets are TP with player (continent tp) void allowNearPetTp();