refactor(Core/Unit): clean MonsterText methods (#6957)
This commit is contained in:
parent
3c42a7d72d
commit
bc82f36f1f
75 changed files with 750 additions and 672 deletions
|
|
@ -156,7 +156,7 @@ public:
|
|||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
me->MonsterYell("Ah, the heroes. Your little friends said you would come. This certainly saves me the trouble of hunting you down myself.", LANG_UNIVERSAL, 0);
|
||||
me->Yell("Ah, the heroes. Your little friends said you would come. This certainly saves me the trouble of hunting you down myself.", LANG_UNIVERSAL);
|
||||
me->CastSpell(me, SPELL_ARTRUIS_ICY_VEINS, true);
|
||||
events.RescheduleEvent(EVENT_CAST_FROST_BOLT, 4000);
|
||||
events.RescheduleEvent(EVENT_CAST_FROST_NOVA, 15000);
|
||||
|
|
@ -200,7 +200,7 @@ public:
|
|||
}
|
||||
else if (action == ACTION_MAKE_FRIENDLY && me->GetVictim())
|
||||
{
|
||||
minion->MonsterSay("Now you not catch us with back turned! Now we hurt you bad undead. BAD!", LANG_UNIVERSAL, 0);
|
||||
minion->Say("Now you not catch us with back turned! Now we hurt you bad undead. BAD!", LANG_UNIVERSAL);
|
||||
minion->RemoveAurasDueToSpell(SPELL_ARTRUIS_BINDING);
|
||||
minion->setFaction(me->GetVictim()->getFaction());
|
||||
minion->AddThreat(me, 100000.0f);
|
||||
|
|
@ -228,21 +228,21 @@ public:
|
|||
if (me->GetHealthPct() <= 30)
|
||||
{
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
me->MonsterTextEmote("Artruis is shielded. You must choose your side quickly to break his spell.", 0, true);
|
||||
me->TextEmote("Artruis is shielded. You must choose your side quickly to break his spell.", nullptr, true);
|
||||
SummonsAction(ACTION_BIND_MINIONS);
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
case EVENT_ARTRUIS_TALK1:
|
||||
me->MonsterYell("I have weathered a hundred years of war and suffering. Do you truly think it wise to pit your mortal bodies against a being that cannot die? I'd venture you have more to lose.", LANG_UNIVERSAL, 0);
|
||||
me->Yell("I have weathered a hundred years of war and suffering. Do you truly think it wise to pit your mortal bodies against a being that cannot die? I'd venture you have more to lose.", LANG_UNIVERSAL);
|
||||
events.RescheduleEvent(EVENT_ARTRUIS_TALK2, 10000);
|
||||
break;
|
||||
case EVENT_ARTRUIS_TALK2:
|
||||
me->MonsterYell("Even shattered into countless pieces, the crystals all around weaken me... perhaps i should not have underestimated the titans so...", LANG_UNIVERSAL, 0);
|
||||
me->Yell("Even shattered into countless pieces, the crystals all around weaken me... perhaps i should not have underestimated the titans so...", LANG_UNIVERSAL);
|
||||
break;
|
||||
case EVENT_ARTRUIS_TALK3:
|
||||
me->MonsterYell("Arthas once mustered strength... of the very same sort... perhaps he is the path that you will follow.", LANG_UNIVERSAL, 0);
|
||||
me->Yell("Arthas once mustered strength... of the very same sort... perhaps he is the path that you will follow.", LANG_UNIVERSAL);
|
||||
break;
|
||||
case EVENT_CAST_FROST_BOLT:
|
||||
me->CastSpell(me->GetVictim(), SPELL_ARTRUIS_FROSTBOLT, false);
|
||||
|
|
@ -340,7 +340,7 @@ public:
|
|||
void Say(const char* text)
|
||||
{
|
||||
if (Creature* th = ObjectAccessor::GetCreature(*me, thunderbrewGUID))
|
||||
th->MonsterSay(text, LANG_UNIVERSAL, 0);
|
||||
th->Say(text, LANG_UNIVERSAL);
|
||||
else
|
||||
Reset();
|
||||
}
|
||||
|
|
@ -841,9 +841,10 @@ public:
|
|||
## npc_jungle_punch_target
|
||||
#####*/
|
||||
|
||||
constexpr auto SAY_OFFER = "Care to try Grimbooze Thunderbrew's new jungle punch?";
|
||||
|
||||
enum JunglePunch
|
||||
{
|
||||
SAY_OFFER = 28558,
|
||||
ITEM_TANKARD = 2705,
|
||||
|
||||
NPC_HEMET = 27986,
|
||||
|
|
@ -1025,7 +1026,7 @@ public:
|
|||
continue;
|
||||
|
||||
player->KilledMonsterCredit(me->GetEntry());
|
||||
player->MonsterSay(SAY_OFFER, LANG_UNIVERSAL, me);
|
||||
player->Say(SAY_OFFER, LANG_UNIVERSAL);
|
||||
sayStep = 1;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1476,15 +1477,15 @@ public:
|
|||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Player* player = GetHitUnit()->ToPlayer())
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
switch (GetSpellInfo()->Id)
|
||||
{
|
||||
case SPELL_CORRECT_TRACKS:
|
||||
player->MonsterSay(sObjectMgr->GetAcoreStringForDBCLocale(SAY_CORRECT_TRACKS), LANG_UNIVERSAL, player);
|
||||
target->Say(SAY_CORRECT_TRACKS, target);
|
||||
break;
|
||||
case SPELL_INCORRECT_TRACKS:
|
||||
player->MonsterSay(sObjectMgr->GetAcoreStringForDBCLocale(SAY_INCORRECT_TRACKS), LANG_UNIVERSAL, player);
|
||||
target->Say(SAY_INCORRECT_TRACKS, target);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue