Misc fixes, and added GetDebugInfo() which was missed.

This commit is contained in:
hondacrx
2022-01-05 13:11:32 -05:00
parent b2ddeb3408
commit 0d68984717
28 changed files with 170 additions and 53 deletions
+3 -3
View File
@@ -301,7 +301,7 @@ namespace Game.Chat
Player bad = Global.ObjAccessor.FindPlayerByName(badname);
ObjectGuid victim = bad ? bad.GetGUID() : ObjectGuid.Empty;
if (victim.IsEmpty() || !IsOn(victim))
if (bad == null || victim.IsEmpty() || !IsOn(victim))
{
ChannelNameBuilder builder = new(this, new PlayerNotFoundAppend(badname));
SendToOne(builder, good);
@@ -434,7 +434,7 @@ namespace Game.Chat
Player newp = Global.ObjAccessor.FindPlayerByName(p2n);
ObjectGuid victim = newp ? newp.GetGUID() : ObjectGuid.Empty;
if (victim.IsEmpty() || !IsOn(victim) ||
if (newp == null || victim.IsEmpty() || !IsOn(victim) ||
(player.GetTeam() != newp.GetTeam() &&
(!player.GetSession().HasPermission(RBACPermissions.TwoSideInteractionChannel) ||
!newp.GetSession().HasPermission(RBACPermissions.TwoSideInteractionChannel))))
@@ -490,7 +490,7 @@ namespace Game.Chat
Player newp = Global.ObjAccessor.FindPlayerByName(newname);
ObjectGuid victim = newp ? newp.GetGUID() : ObjectGuid.Empty;
if (victim.IsEmpty() || !IsOn(victim) ||
if (newp == null || victim.IsEmpty() || !IsOn(victim) ||
(player.GetTeam() != newp.GetTeam() &&
(!player.GetSession().HasPermission(RBACPermissions.TwoSideInteractionChannel) ||
!newp.GetSession().HasPermission(RBACPermissions.TwoSideInteractionChannel))))