From b68bbda363e6858c7dad550c7a592c0157f9c6d1 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 1 Jun 2022 16:59:05 -0400 Subject: [PATCH] Core/Spells: Implemented SPELL_ATTR6_TAPS_IMMEDIATELY Port From (https://github.com/TrinityCore/TrinityCore/commit/104c2ddb6a88318bbcb0ea67b3fdaba40a3213a1) --- Source/Framework/Constants/Spells/SpellConst.cs | 2 +- Source/Game/Entities/Unit/Unit.Combat.cs | 6 ------ Source/Game/Handlers/SocialHandler.cs | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index 7c9771a6a..884995524 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1815,7 +1815,7 @@ namespace Framework.Constants AuraIconOnlyForCasterLimit10 = 0x100000, // Aura Icon Only For Caster (Limit 10) (Client Only) ShowMechanicAsCombatText = 0x200000, // Show Mechanic As Combat Text (Client Only) AbsorbCannotBeIgnore = 0x400000, // Absorb Cannot Be Ignore - TapsImmediately = 0x800000, /*Nyi*/ // Taps Immediately + TapsImmediately = 0x800000, // Taps Immediately CanTargetUntargetable = 0x1000000, // Can Target Untargetable DoesntResetSwingTimerIfInstant = 0x2000000, // Doesn'T Reset Swing Timer If Instant VehicleImmunityCategory = 0x4000000, /*Nyi*/ // Vehicle Immunity Category diff --git a/Source/Game/Entities/Unit/Unit.Combat.cs b/Source/Game/Entities/Unit/Unit.Combat.cs index c787784ae..a4e72ba62 100644 --- a/Source/Game/Entities/Unit/Unit.Combat.cs +++ b/Source/Game/Entities/Unit/Unit.Combat.cs @@ -672,12 +672,6 @@ namespace Game.Entities if (targetOwner != null) targetOwner.EngageWithTarget(this); - //Patch 3.0.8: All player spells which cause a creature to become aggressive to you will now also immediately cause the creature to be tapped. - Creature creature = target.ToCreature(); - if (creature != null) - if (!creature.HasLootRecipient() && IsPlayer()) - creature.SetLootRecipient(this); - Player myPlayerOwner = GetCharmerOrOwnerPlayerOrPlayerItself(); Player targetPlayerOwner = target.GetCharmerOrOwnerPlayerOrPlayerItself(); if (myPlayerOwner && targetPlayerOwner && !(myPlayerOwner.duel != null && myPlayerOwner.duel.Opponent == targetPlayerOwner)) diff --git a/Source/Game/Handlers/SocialHandler.cs b/Source/Game/Handlers/SocialHandler.cs index a78b6750c..10476981d 100644 --- a/Source/Game/Handlers/SocialHandler.cs +++ b/Source/Game/Handlers/SocialHandler.cs @@ -321,7 +321,7 @@ namespace Game if (!ObjectManager.NormalizePlayerName(ref packet.Name)) return; - ObjectGuid ignoreGuid; + ObjectGuid ignoreGuid = ObjectGuid.Empty; FriendsResult ignoreResult = FriendsResult.IgnoreNotFound; CharacterCacheEntry characterInfo = Global.CharacterCacheStorage.GetCharacterCacheByName(packet.Name);