mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
refactor(Core/Unit): clean MonsterText methods (#6957)
This commit is contained in:
@@ -226,7 +226,7 @@ public:
|
||||
if (q_status.CreatureOrGOCount[me->GetEntry() - 24202] == 0)
|
||||
{
|
||||
player->KilledMonsterCredit(me->GetEntry());
|
||||
player->MonsterSay(GetTextFor(me->GetEntry(), quest).c_str(), LANG_UNIVERSAL, player);
|
||||
player->Say(GetTextFor(me->GetEntry(), quest).c_str(), LANG_UNIVERSAL, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -456,16 +456,16 @@ public:
|
||||
if (thrown == 3)
|
||||
{
|
||||
thrown = 0;
|
||||
sayer->MonsterSay("SOMEONE TRY THIS SUPER BREW!", LANG_UNIVERSAL, 0);
|
||||
sayer->Say("SOMEONE TRY THIS SUPER BREW!", LANG_UNIVERSAL);
|
||||
//sayer->CastSpell(sayer, SPELL_CREATE_SUPER_BREW, true);
|
||||
sayer->SummonCreature(NPC_SUPER_BREW_TRIGGER, sayer->GetPositionX() + 15 * cos(sayer->GetOrientation()), sayer->GetPositionY() + 15 * sin(sayer->GetOrientation()), sayer->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (urand(0, 1))
|
||||
sayer->MonsterSay("Chug and chuck! Chug and chuck!", LANG_UNIVERSAL, 0);
|
||||
sayer->Say("Chug and chuck! Chug and chuck!", LANG_UNIVERSAL);
|
||||
else
|
||||
sayer->MonsterSay("Down the free brew and pelt the Guzzlers with your mug!", LANG_UNIVERSAL, 0);
|
||||
sayer->Say("Down the free brew and pelt the Guzzlers with your mug!", LANG_UNIVERSAL);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -479,7 +479,7 @@ public:
|
||||
{
|
||||
char amount[500];
|
||||
sprintf(amount, "We did it boys! Now back to the Grim Guzzler and we'll drink to the %u that were injured!", guzzlerCounter);
|
||||
herald->MonsterYell(amount, LANG_UNIVERSAL, 0);
|
||||
herald->Yell(amount, LANG_UNIVERSAL);
|
||||
}
|
||||
|
||||
Reset();
|
||||
@@ -492,7 +492,7 @@ public:
|
||||
{
|
||||
char amount[500];
|
||||
sprintf(amount, "RETREAT!! We've already lost %u and we can't afford to lose any more!!", guzzlerCounter);
|
||||
herald->MonsterYell(amount, LANG_UNIVERSAL, 0);
|
||||
herald->Yell(amount, LANG_UNIVERSAL);
|
||||
}
|
||||
|
||||
me->CastSpell(me, (me->GetMapId() == 1 ? SPELL_SUMMON_PLANS_H : SPELL_SUMMON_PLANS_A), true);
|
||||
@@ -771,19 +771,19 @@ public:
|
||||
switch (urand(0, 4))
|
||||
{
|
||||
case 0:
|
||||
me->MonsterSay("Drink it all boys!", LANG_UNIVERSAL, 0);
|
||||
me->Say("Drink it all boys!", LANG_UNIVERSAL);
|
||||
break;
|
||||
case 1:
|
||||
me->MonsterSay("DRINK! BRAWL! DRINK! BRAWL!", LANG_UNIVERSAL, 0);
|
||||
me->Say("DRINK! BRAWL! DRINK! BRAWL!", LANG_UNIVERSAL);
|
||||
break;
|
||||
case 2:
|
||||
me->MonsterSay("Did someone say, \"Free Brew\"?", LANG_UNIVERSAL, 0);
|
||||
me->Say("Did someone say, \"Free Brew\"?", LANG_UNIVERSAL);
|
||||
break;
|
||||
case 3:
|
||||
me->MonsterSay("No one expects the Dark Iron dwarves!", LANG_UNIVERSAL, 0);
|
||||
me->Say("No one expects the Dark Iron dwarves!", LANG_UNIVERSAL);
|
||||
break;
|
||||
case 4:
|
||||
me->MonsterSay("It's not a party without some crashers!", LANG_UNIVERSAL, 0);
|
||||
me->Say("It's not a party without some crashers!", LANG_UNIVERSAL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -698,7 +698,7 @@ public:
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 1:
|
||||
me->MonsterYell("Prepare yourselves, the bells have tolled! Shelter your weak, your young and your old! Each of you shall pay the final sum! Cry for mercy; the reckoning has come!", LANG_UNIVERSAL, 0);
|
||||
me->Yell("Prepare yourselves, the bells have tolled! Shelter your weak, your young and your old! Each of you shall pay the final sum! Cry for mercy; the reckoning has come!", LANG_UNIVERSAL);
|
||||
me->PlayDirectSound(11966);
|
||||
break;
|
||||
case 2:
|
||||
@@ -729,12 +729,12 @@ public:
|
||||
}
|
||||
if (counter == 5)
|
||||
{
|
||||
me->MonsterYell("The sky is dark. The fire burns. You strive in vain as Fate's wheel turns.", LANG_UNIVERSAL, 0);
|
||||
me->Yell("The sky is dark. The fire burns. You strive in vain as Fate's wheel turns.", LANG_UNIVERSAL);
|
||||
me->PlayDirectSound(12570);
|
||||
}
|
||||
else if (counter == 10)
|
||||
{
|
||||
me->MonsterYell("The town still burns. A cleansing fire! Time is short, I'll soon retire!", LANG_UNIVERSAL, 0);
|
||||
me->Yell("The town still burns. A cleansing fire! Time is short, I'll soon retire!", LANG_UNIVERSAL);
|
||||
me->PlayDirectSound(12571);
|
||||
}
|
||||
|
||||
@@ -786,7 +786,7 @@ public:
|
||||
{
|
||||
if (failed)
|
||||
{
|
||||
me->MonsterYell("Fire consumes! You've tried and failed. Let there be no doubt, justice prevailed!", LANG_UNIVERSAL, 0);
|
||||
me->Yell("Fire consumes! You've tried and failed. Let there be no doubt, justice prevailed!", LANG_UNIVERSAL);
|
||||
me->PlayDirectSound(11967);
|
||||
for (ObjectGuid const& guid : unitList)
|
||||
if (Unit* c = ObjectAccessor::GetUnit(*me, guid))
|
||||
@@ -796,7 +796,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
me->MonsterYell("My flames have died, left not a spark! I shall send you now to the lifeless dark!", LANG_UNIVERSAL, 0);
|
||||
me->Yell("My flames have died, left not a spark! I shall send you now to the lifeless dark!", LANG_UNIVERSAL);
|
||||
me->PlayDirectSound(11968);
|
||||
float x, y, z;
|
||||
GetPosToLand(x, y, z);
|
||||
@@ -814,7 +814,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
me->MonsterYell("So eager you are, for my blood to spill. Yet to vanquish me, 'tis my head you must kill!", LANG_UNIVERSAL, 0);
|
||||
me->Yell("So eager you are, for my blood to spill. Yet to vanquish me, 'tis my head you must kill!", LANG_UNIVERSAL);
|
||||
me->PlayDirectSound(11969);
|
||||
float x, y, z;
|
||||
GetPosToLand(x, y, z);
|
||||
@@ -979,7 +979,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
summons.DespawnAll();
|
||||
me->MonsterSay("This end have I reached before. What new adventure lies in store?", LANG_UNIVERSAL, 0);
|
||||
me->Say("This end have I reached before. What new adventure lies in store?", LANG_UNIVERSAL);
|
||||
me->PlayDirectSound(SOUND_DEATH);
|
||||
std::list<Creature*> unitList;
|
||||
me->GetCreaturesWithEntryInRange(unitList, 100.0f, NPC_PUMPKIN_FIEND);
|
||||
@@ -993,7 +993,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* /*who*/) override
|
||||
{
|
||||
me->MonsterYell("Your body lies beaten, battered and broken. Let my curse be your own, fate has spoken.", LANG_UNIVERSAL, 0);
|
||||
me->Yell("Your body lies beaten, battered and broken. Let my curse be your own, fate has spoken.", LANG_UNIVERSAL);
|
||||
me->PlayDirectSound(SOUND_SLAY);
|
||||
}
|
||||
|
||||
@@ -1025,7 +1025,7 @@ public:
|
||||
events.CancelEvent(EVENT_HORSEMAN_WHIRLWIND);
|
||||
events.CancelEvent(EVENT_HORSEMAN_CONFLAGRATION);
|
||||
events.CancelEvent(EVENT_SUMMON_PUMPKIN);
|
||||
me->MonsterYell("Here's my body, fit and pure! Now, your blackened souls I'll cure!", LANG_UNIVERSAL, 0);
|
||||
me->Yell("Here's my body, fit and pure! Now, your blackened souls I'll cure!", LANG_UNIVERSAL);
|
||||
|
||||
if (phase == 1)
|
||||
events.ScheduleEvent(EVENT_HORSEMAN_CONFLAGRATION, 6000);
|
||||
@@ -1126,23 +1126,23 @@ public:
|
||||
switch (talkCount)
|
||||
{
|
||||
case 1:
|
||||
player->MonsterSay("Horseman rise...", LANG_UNIVERSAL, 0);
|
||||
player->Say("Horseman rise...", LANG_UNIVERSAL);
|
||||
break;
|
||||
case 2:
|
||||
player->MonsterSay("Your time is nigh...", LANG_UNIVERSAL, 0);
|
||||
player->Say("Your time is nigh...", LANG_UNIVERSAL);
|
||||
if (Creature* trigger = me->SummonTrigger(1765.28f, 1347.46f, 17.5514f, 0.0f, 15 * IN_MILLISECONDS))
|
||||
trigger->CastSpell(trigger, SPELL_EARTH_EXPLOSION, true);
|
||||
break;
|
||||
case 3:
|
||||
me->GetMotionMaster()->MovePath(236820, false);
|
||||
me->CastSpell(me, SPELL_SHAKE_CAMERA_SMALL, true);
|
||||
player->MonsterSay("You felt death once...", LANG_UNIVERSAL, 0);
|
||||
me->MonsterSay("It is over, your search is done. Let fate choose now, the righteous one.", LANG_UNIVERSAL, 0);
|
||||
player->Say("You felt death once...", LANG_UNIVERSAL);
|
||||
me->Say("It is over, your search is done. Let fate choose now, the righteous one.", LANG_UNIVERSAL);
|
||||
me->PlayDirectSound(SOUND_AGGRO);
|
||||
break;
|
||||
case 4:
|
||||
me->CastSpell(me, SPELL_SHAKE_CAMERA_MEDIUM, true);
|
||||
player->MonsterSay("Now, know demise!", LANG_UNIVERSAL, 0);
|
||||
player->Say("Now, know demise!", LANG_UNIVERSAL);
|
||||
talkCount = 0;
|
||||
return; // pop and return, skip repeat
|
||||
}
|
||||
@@ -1206,7 +1206,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
me->MonsterSay("Soldiers arise, stand and fight! Bring victory at last to this fallen knight!", LANG_UNIVERSAL, 0);
|
||||
me->Say("Soldiers arise, stand and fight! Bring victory at last to this fallen knight!", LANG_UNIVERSAL);
|
||||
me->PlayDirectSound(SOUND_SPROUT);
|
||||
events.RepeatEvent(15000);
|
||||
talkCount = 0;
|
||||
@@ -1346,7 +1346,7 @@ public:
|
||||
}
|
||||
|
||||
me->CastSpell(me, SPELL_HORSEMAN_SPEAKS, true);
|
||||
me->MonsterTextEmote("Headless Horseman laughs", 0);
|
||||
me->TextEmote("Headless Horseman laughs");
|
||||
me->PlayDirectSound(sound);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -551,16 +551,16 @@ public:
|
||||
switch (stackAmount)
|
||||
{
|
||||
case 10:
|
||||
target->MonsterTextEmote("Turkey Hunter!", target, true);
|
||||
target->TextEmote("Turkey Hunter!", target, true);
|
||||
break;
|
||||
case 20:
|
||||
target->MonsterTextEmote("Turkey Domination!", target, true);
|
||||
target->TextEmote("Turkey Domination!", target, true);
|
||||
break;
|
||||
case 30:
|
||||
target->MonsterTextEmote("Turkey Slaughter!", target, true);
|
||||
target->TextEmote("Turkey Slaughter!", target, true);
|
||||
break;
|
||||
case 40:
|
||||
target->MonsterTextEmote("TURKEY TRIUMPH!", target, true);
|
||||
target->TextEmote("TURKEY TRIUMPH!", target, true);
|
||||
target->CastSpell(target, SPELL_ACHI_TURKINATOR_CREDIT, true);
|
||||
aurEff->GetBase()->Remove();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user