Disable more of the pet name code

ryzomclassic-develop
kaetemi 5 years ago
parent ba3c008767
commit e0a14d79ac

@ -291,10 +291,12 @@ void CPetSpawnMsgImp::callback(std::string const& name, NLNET::TServiceId id)
botPet->setSheet(sheet); botPet->setSheet(sheet);
#ifdef RYZOM_FORGE_PET_NAME
if (!CustomName.empty()) if (!CustomName.empty())
{ {
botPet->setCustomName(CustomName); botPet->setCustomName(CustomName);
} }
#endif
if (!botPet->spawn()) if (!botPet->spawn())
{ {

@ -2904,7 +2904,9 @@ void CCharacter::postLoadTreatment()
_PlayerPets[ i ].Slot = INVENTORIES::INVALID_INVENTORY_SLOT; _PlayerPets[ i ].Slot = INVENTORIES::INVALID_INVENTORY_SLOT;
} }
#ifdef RYZOM_FORGE_PET_NAME
sendPetCustomNameToClient(i); sendPetCustomNameToClient(i);
#endif
uint32 slot = _PlayerPets[ i ].initLinkAnimalToTicket( this, i ); uint32 slot = _PlayerPets[ i ].initLinkAnimalToTicket( this, i );
if( slot < INVENTORIES::NbPackerSlots ) if( slot < INVENTORIES::NbPackerSlots )
{ {
@ -5584,7 +5586,9 @@ bool CCharacter::spawnWaitingCharacterAnimalNear( uint index, const SGameCoordin
msg.CharacterMirrorRow = _EntityRowId; msg.CharacterMirrorRow = _EntityRowId;
msg.PetSheetId = _PlayerPets[ index ].PetSheetId; msg.PetSheetId = _PlayerPets[ index ].PetSheetId;
msg.PetIdx = index; msg.PetIdx = index;
#ifdef RYZOM_FORGE_PET_NAME
msg.CustomName = _PlayerPets[ index ].CustomName; msg.CustomName = _PlayerPets[ index ].CustomName;
#endif
msg.AIInstanceId = (uint16)destAIInstance; msg.AIInstanceId = (uint16)destAIInstance;
CWorldInstances::instance().msgToAIInstance( msg.AIInstanceId, msg); CWorldInstances::instance().msgToAIInstance( msg.AIInstanceId, msg);
// The row will be received in AnimalSpawned() // The row will be received in AnimalSpawned()
@ -5696,7 +5700,9 @@ bool CCharacter::spawnCharacterAnimal(uint index )
msg.CharacterMirrorRow = _EntityRowId; msg.CharacterMirrorRow = _EntityRowId;
msg.PetSheetId = _PlayerPets[ index ].PetSheetId; msg.PetSheetId = _PlayerPets[ index ].PetSheetId;
msg.PetIdx = index; msg.PetIdx = index;
#ifdef RYZOM_FORGE_PET_NAME
msg.CustomName = _PlayerPets[ index ].CustomName; msg.CustomName = _PlayerPets[ index ].CustomName;
#endif
CVector pos; CVector pos;
pos.x = msg.Coordinate_X * 0.001f; pos.x = msg.Coordinate_X * 0.001f;
@ -18716,7 +18722,9 @@ uint32 CPetAnimal::initLinkAnimalToTicket( CCharacter * c, uint8 index )
{ {
// Slot = ItemPtr->getLocSlot(); // Slot = ItemPtr->getLocSlot();
ItemPtr->setPetIndex(index); ItemPtr->setPetIndex(index);
#ifdef RYZOM_FORGE_PET_NAME
ItemPtr->setCustomName(CustomName); ItemPtr->setCustomName(CustomName);
#endif
Slot = ItemPtr->getInventorySlot(); Slot = ItemPtr->getInventorySlot();
return Slot; return Slot;
} }
@ -18730,7 +18738,9 @@ uint32 CPetAnimal::initLinkAnimalToTicket( CCharacter * c, uint8 index )
// Slot = ItemPtr->getLocSlot(); // Slot = ItemPtr->getLocSlot();
Slot = ItemPtr->getInventorySlot(); Slot = ItemPtr->getInventorySlot();
ItemPtr->setPetIndex(index); ItemPtr->setPetIndex(index);
#ifdef RYZOM_FORGE_PET_NAME
ItemPtr->setCustomName(CustomName); ItemPtr->setCustomName(CustomName);
#endif
return Slot; return Slot;
} }
else else

@ -314,7 +314,9 @@ struct CPetAnimal
// get the max bulk of the animal inventory // get the max bulk of the animal inventory
uint32 getAnimalMaxBulk(); uint32 getAnimalMaxBulk();
#ifdef RYZOM_FORGE_PET_NAME
void setCustomName(const ucstring& customName) { CustomName = customName; } void setCustomName(const ucstring& customName) { CustomName = customName; }
#endif
}; };
/** /**

@ -700,7 +700,7 @@ static void prepareCharacterPositionForStore ( COfflineEntityState & state, cons
LPROP(bool,IsMounted,if(IsMounted))\ LPROP(bool,IsMounted,if(IsMounted))\
PROP(bool,IsTpAllowed)\ PROP(bool,IsTpAllowed)\
PROP(TSatiety,Satiety)\ PROP(TSatiety,Satiety)\
PROP2(CustomName, ucstring, CustomName, CustomName = val)\ /*PROP2(CustomName, ucstring, CustomName, CustomName = val)*/\
//#pragma message( PERSISTENT_GENERATION_MESSAGE ) //#pragma message( PERSISTENT_GENERATION_MESSAGE )
#include "game_share/persistent_data_template.h" #include "game_share/persistent_data_template.h"

@ -43,7 +43,9 @@ public:
uint16 PetIdx; // must be returned to EGS with CPetSpawnConfirmationMsg class uint16 PetIdx; // must be returned to EGS with CPetSpawnConfirmationMsg class
sint32 Coordinate_X, Coordinate_Y, Coordinate_H; //For NEAR_POINT mode sint32 Coordinate_X, Coordinate_Y, Coordinate_H; //For NEAR_POINT mode
float Heading; //For NEAR_POINT mode float Heading; //For NEAR_POINT mode
#ifdef RYZOM_FORGE_PET_NAME
ucstring CustomName; ucstring CustomName;
#endif
virtual void description () virtual void description ()
{ {
@ -57,7 +59,9 @@ public:
property ("Coordinate_Y", PropSInt32, (sint32)0, Coordinate_Y); property ("Coordinate_Y", PropSInt32, (sint32)0, Coordinate_Y);
property ("Coordinate_H", PropSInt32, (sint32)0, Coordinate_H); property ("Coordinate_H", PropSInt32, (sint32)0, Coordinate_H);
property ("Heading", PropFloat, 0.0f, Heading); property ("Heading", PropFloat, 0.0f, Heading);
#ifdef RYZOM_FORGE_PET_NAME
property ("CustomName", PropUCString, ucstring(""), CustomName); property ("CustomName", PropUCString, ucstring(""), CustomName);
#endif
} }
virtual void callback (const std::string &/* name */, NLNET::TServiceId /* id */) {} virtual void callback (const std::string &/* name */, NLNET::TServiceId /* id */) {}

Loading…
Cancel
Save