refactor(Core/Unit): clean MonsterText methods (#6957)

This commit is contained in:
Kitzunu
2021-10-15 10:25:29 +02:00
committed by GitHub
parent 3c42a7d72d
commit bc82f36f1f
75 changed files with 750 additions and 672 deletions

View File

@@ -1,4 +1,4 @@
/*
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
@@ -3970,7 +3970,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, nullptr);
m_caster->TextEmote(buf);
break;
}
// Roll 'dem Bones - Worn Troll Dice
@@ -3981,7 +3981,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, nullptr);
m_caster->TextEmote(buf);
break;
}
// Death Knight Initiate Visual
@@ -6392,9 +6392,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)