Core/BattlePets: Set Allow = false; in SMSG_QUERY_BATTLE_PET_NAME_RESPONSE when name is empty
Port From (https://github.com/TrinityCore/TrinityCore/commit/e9e69ed978687768f607fad08aa6f0bafa9b2359)
This commit is contained in:
@@ -399,7 +399,7 @@ namespace Game.BattlePets
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
pet.PacketInfo.Name = name;
|
pet.PacketInfo.Name = name;
|
||||||
pet.NameTimestamp = !pet.PacketInfo.Name.IsEmpty() ? GameTime.GetGameTime() : 0;
|
pet.NameTimestamp = GameTime.GetGameTime();
|
||||||
|
|
||||||
pet.DeclinedName = new DeclinedName();
|
pet.DeclinedName = new DeclinedName();
|
||||||
if (declinedName != null)
|
if (declinedName != null)
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ using Game.BattlePets;
|
|||||||
using Game.Entities;
|
using Game.Entities;
|
||||||
using Game.Networking;
|
using Game.Networking;
|
||||||
using Game.Networking.Packets;
|
using Game.Networking.Packets;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace Game
|
namespace Game
|
||||||
{
|
{
|
||||||
@@ -88,7 +89,6 @@ namespace Game
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
response.Allow = true;
|
|
||||||
response.Name = battlePet.PacketInfo.Name;
|
response.Name = battlePet.PacketInfo.Name;
|
||||||
if (battlePet.DeclinedName != null)
|
if (battlePet.DeclinedName != null)
|
||||||
{
|
{
|
||||||
@@ -96,6 +96,8 @@ namespace Game
|
|||||||
response.DeclinedNames = battlePet.DeclinedName;
|
response.DeclinedNames = battlePet.DeclinedName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
response.Allow = !response.Name.IsEmpty();
|
||||||
|
|
||||||
SendPacket(response);
|
SendPacket(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user