mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
fix(Core/Unit): Fix creatures not being able to cast spells during Ju… (#14957)
This commit is contained in:
@@ -17852,6 +17852,13 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
|
||||
isRewardAllowed = creature->IsDamageEnoughForLootingAndReward();
|
||||
if (!isRewardAllowed)
|
||||
creature->SetLootRecipient(nullptr);
|
||||
|
||||
// Call creature just died function
|
||||
if (CreatureAI* ai = creature->AI())
|
||||
{
|
||||
ai->JustDied(killer);
|
||||
sScriptMgr->OnUnitDeath(creature, killer);
|
||||
}
|
||||
}
|
||||
|
||||
// pussywizard: remade this if section (player is on the same map
|
||||
@@ -18074,13 +18081,6 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
|
||||
if (killer && killer->GetTypeId() == TYPEID_UNIT && killer->IsAIEnabled)
|
||||
killer->ToCreature()->AI()->KilledUnit(victim);
|
||||
|
||||
// Call creature just died function
|
||||
if (CreatureAI* ai = creature->AI())
|
||||
{
|
||||
ai->JustDied(killer);
|
||||
sScriptMgr->OnUnitDeath(creature, killer);
|
||||
}
|
||||
|
||||
if (TempSummon* summon = creature->ToTempSummon())
|
||||
{
|
||||
if (WorldObject* summoner = summon->GetSummoner())
|
||||
|
||||
Reference in New Issue
Block a user