mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-17 01:04:34 +00:00
fix(DB/ZulGurub): Hoodoo Piles should not melee atack their targets. (#12269)
Will of Hakkar is casted on pile looter. Fixes #12186
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
--
|
||||
UPDATE `creature_template` SET `flags_extra`=130 WHERE `entry`=15047;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=15047 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` VALUES
|
||||
(15047,0,0,0,1,0,100,1,500,500,0,0,0,11,24178,0,0,0,0,0,23,0,0,0,0,0,0,0,0,'Gurubashi - OOC - Cast Will of Hakkar');
|
||||
@@ -2058,17 +2058,16 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
|
||||
bool self = false;
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if (spellInfo->Effects[i].TargetA.GetTarget() == TARGET_UNIT_CASTER)
|
||||
if (spellInfo->Effects[i].TargetA.GetReferenceType() == TARGET_REFERENCE_TYPE_CASTER && !spellInfo->Effects[i].TargetB.GetTarget())
|
||||
{
|
||||
self = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (self)
|
||||
if (self && target && target->GetGUID() != GetGUID())
|
||||
{
|
||||
if (target)
|
||||
target->CastSpell(target, spellInfo, true);
|
||||
target->CastSpell(target, spellInfo, true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user