mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Feature] Implement Custom Pet Names (#4594)
* rebase\tidy up to address commends * I blame git for this one * last typo * spaces * formating fixes I think? * Repository fixes * Cleanup --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "../common/repositories/pets_repository.h"
|
||||
#include "../common/repositories/pets_beastlord_data_repository.h"
|
||||
#include "../common/repositories/character_pet_name_repository.h"
|
||||
|
||||
#include "entity.h"
|
||||
#include "client.h"
|
||||
@@ -164,6 +165,12 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
|
||||
// 4 - Keep DB name
|
||||
// 5 - `s ward
|
||||
|
||||
if (IsClient() && !petname) {
|
||||
const auto vanity_name = CharacterPetNameRepository::FindOne(database, CastToClient()->CharacterID());
|
||||
if (!vanity_name.name.empty()) {
|
||||
petname = vanity_name.name.c_str();
|
||||
}
|
||||
}
|
||||
|
||||
if (petname != nullptr) {
|
||||
// Name was provided, use it.
|
||||
|
||||
Reference in New Issue
Block a user