mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-20 23:11:56 -04:00
Scripts/Misc: Adjustments to previous fixes (#27821)
(cherry picked from commit 9ee6f4fb11)
This commit is contained in:
@@ -982,8 +982,8 @@ class spell_gen_consumption : public SpellScript
|
||||
|
||||
void HandleDamageCalc(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || caster->GetTypeId() != TYPEID_UNIT)
|
||||
Creature* caster = GetCaster()->ToCreature();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
int32 damage = 0;
|
||||
@@ -3684,10 +3684,9 @@ class spell_gen_whisper_to_controller : public SpellScript
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (TempSummon* casterSummon = caster->ToTempSummon())
|
||||
if (Player* target = casterSummon->GetSummonerUnit()->ToPlayer())
|
||||
casterSummon->Unit::Whisper(uint32(GetEffectValue()), target, false);
|
||||
if (TempSummon* casterSummon = GetCaster()->ToTempSummon())
|
||||
if (Player* target = casterSummon->GetSummonerUnit()->ToPlayer())
|
||||
casterSummon->Unit::Whisper(uint32(GetEffectValue()), target, false);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in New Issue
Block a user