mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 17:43:47 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -8944,7 +8944,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
|
||||
// All ok. Check current trigger spell
|
||||
SpellInfo const* triggerEntry = sSpellMgr->GetSpellInfo(trigger_spell_id);
|
||||
if (triggerEntry == nullptr)
|
||||
if (!triggerEntry)
|
||||
{
|
||||
// Don't cast unknown spell
|
||||
LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell {} (effIndex: {}) has unknown TriggerSpell {}. Unhandled custom case?", auraSpellInfo->Id, triggeredByAura->GetEffIndex(), trigger_spell_id);
|
||||
@@ -9387,7 +9387,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
}
|
||||
|
||||
// try detect target manually if not set
|
||||
if (target == nullptr)
|
||||
if (!target)
|
||||
target = !(procFlags & (PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS | PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS)) && triggerEntry->IsPositive() ? this : victim;
|
||||
|
||||
if (cooldown)
|
||||
@@ -13844,6 +13844,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
|
||||
if (Unit* critter = ObjectAccessor::GetUnit(*this, GetCritterGUID()))
|
||||
critter->UpdateSpeed(mtype, forced);
|
||||
}
|
||||
ToPlayer()->SetCanTeleport(true);
|
||||
}
|
||||
|
||||
switch (mtype)
|
||||
@@ -15778,7 +15779,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
continue;
|
||||
|
||||
// If not trigger by default and spellProcEvent == nullptr - skip
|
||||
if (!isTriggerAura[aurEff->GetAuraType()] && triggerData.spellProcEvent == nullptr)
|
||||
if (!isTriggerAura[aurEff->GetAuraType()] && !triggerData.spellProcEvent)
|
||||
continue;
|
||||
|
||||
switch (aurEff->GetAuraType())
|
||||
@@ -19185,6 +19186,10 @@ void Unit::ExitVehicle(Position const* /*exitPosition*/)
|
||||
return;
|
||||
|
||||
GetVehicleBase()->RemoveAurasByType(SPELL_AURA_CONTROL_VEHICLE, GetGUID());
|
||||
if (Player* player = ToPlayer())
|
||||
{
|
||||
player->SetCanTeleport(true);
|
||||
}
|
||||
//! The following call would not even be executed successfully as the
|
||||
//! SPELL_AURA_CONTROL_VEHICLE unapply handler already calls _ExitVehicle without
|
||||
//! specifying an exitposition. The subsequent call below would return on if (!m_vehicle).
|
||||
|
||||
Reference in New Issue
Block a user