mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Fixed possible crash
This commit is contained in:
@@ -5464,6 +5464,9 @@ void Spell::EffectGiveCurrency(SpellEffIndex /*effIndex*/)
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (!sCurrencyTypesStore.LookupEntry(effectInfo->MiscValue))
|
||||
return;
|
||||
|
||||
unitTarget->ToPlayer()->ModifyCurrency(effectInfo->MiscValue, damage);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user