aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 00b787345d4..adc120ade49 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -3798,7 +3798,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
if (m_caster->getGender() > 0)
gender = "her";
sprintf(buf, "%s rubs %s [Decahedral Dwarven Dice] between %s hands and rolls. One %u and one %u.", m_caster->GetName().c_str(), gender, gender, urand(1, 10), urand(1, 10));
- m_caster->MonsterTextEmote(buf, NULL);
+ m_caster->TextEmote(buf);
break;
}
// Roll 'dem Bones - Worn Troll Dice
@@ -3809,7 +3809,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
if (m_caster->getGender() > 0)
gender = "her";
sprintf(buf, "%s causually tosses %s [Worn Troll Dice]. One %u and one %u.", m_caster->GetName().c_str(), gender, urand(1, 6), urand(1, 6));
- m_caster->MonsterTextEmote(buf, NULL);
+ m_caster->TextEmote(buf);
break;
}
// Death Knight Initiate Visual
@@ -5783,14 +5783,18 @@ void Spell::EffectPlaySound(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
+ if (!unitTarget)
+ return;
+
+ Player* player = unitTarget->ToPlayer();
+ if (!player)
return;
switch (m_spellInfo->Id)
{
case 58730: // Restricted Flight Area
case 58600: // Restricted Flight Area
- unitTarget->ToPlayer()->GetSession()->SendNotification(LANG_ZONE_NOFLYZONE);
+ player->GetSession()->SendNotification(LANG_ZONE_NOFLYZONE);
break;
default:
break;
@@ -5804,9 +5808,7 @@ void Spell::EffectPlaySound(SpellEffIndex effIndex)
return;
}
- WorldPacket data(SMSG_PLAY_SOUND, 4);
- data << uint32(soundId);
- unitTarget->ToPlayer()->GetSession()->SendPacket(&data);
+ player->PlayDirectSound(soundId, player);
}
void Spell::EffectRemoveAura(SpellEffIndex effIndex)