Core/BattlePets: Store declined names

Port From (https://github.com/TrinityCore/TrinityCore/commit/82b3a409db4dfe689c84234f3ae427369325bf0b)
This commit is contained in:
hondacrx
2021-10-16 17:40:34 -04:00
parent a9bdba8196
commit 86cc00ff57
6 changed files with 111 additions and 13 deletions
+1 -8
View File
@@ -45,14 +45,7 @@ namespace Game
[WorldPacketHandler(ClientOpcodes.BattlePetModifyName)]
void HandleBattlePetModifyName(BattlePetModifyName battlePetModifyName)
{
BattlePetMgr.BattlePet pet = GetBattlePetMgr().GetPet(battlePetModifyName.PetGuid);
if (pet != null)
{
pet.PacketInfo.Name = battlePetModifyName.Name;
if (pet.SaveInfo != BattlePetSaveInfo.New)
pet.SaveInfo = BattlePetSaveInfo.Changed;
}
GetBattlePetMgr().ModifyName(battlePetModifyName.PetGuid, battlePetModifyName.Name, battlePetModifyName.DeclinedName.Value);
}
[WorldPacketHandler(ClientOpcodes.BattlePetDeletePet)]