aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/World')
-rw-r--r--src/server/scripts/World/npcs_special.cpp129
1 files changed, 16 insertions, 113 deletions
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index e6ebd852106..0872038d377 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -1569,130 +1569,34 @@ public:
## npc_brewfest_reveler
####*/
-class npc_brewfest_reveler : public CreatureScript
+enum BrewfestReveler
{
-public:
- npc_brewfest_reveler() : CreatureScript("npc_brewfest_reveler") { }
-
- struct npc_brewfest_revelerAI : public ScriptedAI
- {
- npc_brewfest_revelerAI(Creature* creature) : ScriptedAI(creature) {}
- void ReceiveEmote(Player* player, uint32 emote) OVERRIDE
- {
- if (!IsHolidayActive(HOLIDAY_BREWFEST))
- return;
-
- if (emote == TEXT_EMOTE_DANCE)
- me->CastSpell(player, 41586, false);
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_brewfest_revelerAI(creature);
- }
+ SPELL_BREWFEST_TOAST = 41586
};
-
-#define SAY_RANDOM_MOJO0 "Now that's what I call froggy-style!"
-#define SAY_RANDOM_MOJO1 "Your lily pad or mine?"
-#define SAY_RANDOM_MOJO2 "This won't take long, did it?"
-#define SAY_RANDOM_MOJO3 "I thought you'd never ask!"
-#define SAY_RANDOM_MOJO4 "I promise not to give you warts..."
-#define SAY_RANDOM_MOJO5 "Feelin' a little froggy, are ya?"
-#define SAY_RANDOM_MOJO6a "Listen, "
-#define SAY_RANDOM_MOJO6b ", I know of a little swamp not too far from here...."
-#define SAY_RANDOM_MOJO7 "There's just never enough Mojo to go around..."
-
-class npc_mojo : public CreatureScript
+class npc_brewfest_reveler : public CreatureScript
{
-public:
- npc_mojo() : CreatureScript("npc_mojo") { }
+ public:
+ npc_brewfest_reveler() : CreatureScript("npc_brewfest_reveler") { }
- struct npc_mojoAI : public ScriptedAI
- {
- npc_mojoAI(Creature* creature) : ScriptedAI(creature) {Reset();}
- uint32 hearts;
- uint64 victimGUID;
- void Reset() OVERRIDE
+ struct npc_brewfest_revelerAI : public ScriptedAI
{
- victimGUID = 0;
- hearts = 15000;
- if (Unit* own = me->GetOwner())
- me->GetMotionMaster()->MoveFollow(own, 0, 0);
- }
-
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ npc_brewfest_revelerAI(Creature* creature) : ScriptedAI(creature) { }
- void UpdateAI(uint32 diff) OVERRIDE
- {
- if (me->HasAura(20372))
+ void ReceiveEmote(Player* player, uint32 emote) OVERRIDE
{
- if (hearts <= diff)
- {
- me->RemoveAurasDueToSpell(20372);
- hearts = 15000;
- } hearts -= diff;
- }
- }
-
- void ReceiveEmote(Player* player, uint32 emote) OVERRIDE
- {
- me->HandleEmoteCommand(emote);
- Unit* owner = me->GetOwner();
- if (emote != TEXT_EMOTE_KISS || !owner || owner->GetTypeId() != TYPEID_PLAYER ||
- owner->ToPlayer()->GetTeam() != player->GetTeam())
- {
- return;
- }
+ if (!IsHolidayActive(HOLIDAY_BREWFEST))
+ return;
- std::string whisp = "";
- switch (rand() % 8)
- {
- case 0:
- whisp.append(SAY_RANDOM_MOJO0);
- break;
- case 1:
- whisp.append(SAY_RANDOM_MOJO1);
- break;
- case 2:
- whisp.append(SAY_RANDOM_MOJO2);
- break;
- case 3:
- whisp.append(SAY_RANDOM_MOJO3);
- break;
- case 4:
- whisp.append(SAY_RANDOM_MOJO4);
- break;
- case 5:
- whisp.append(SAY_RANDOM_MOJO5);
- break;
- case 6:
- whisp.append(SAY_RANDOM_MOJO6a);
- whisp.append(player->GetName());
- whisp.append(SAY_RANDOM_MOJO6b);
- break;
- case 7:
- whisp.append(SAY_RANDOM_MOJO7);
- break;
+ if (emote == TEXT_EMOTE_DANCE)
+ me->CastSpell(player, SPELL_BREWFEST_TOAST, false);
}
+ };
- me->MonsterWhisper(whisp.c_str(), player->GetGUID());
- if (victimGUID)
- if (Player* victim = ObjectAccessor::GetPlayer(*me, victimGUID))
- victim->RemoveAura(43906); // remove polymorph frog thing
- me->AddAura(43906, player); // add polymorph frog thing
- victimGUID = player->GetGUID();
- DoCast(me, 20372, true); // tag.hearts
- me->GetMotionMaster()->MoveFollow(player, 0, 0);
- hearts = 15000;
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_brewfest_revelerAI(creature);
}
- };
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_mojoAI(creature);
- }
};
enum TrainingDummy
@@ -2548,7 +2452,6 @@ void AddSC_npcs_special()
new npc_steam_tonk();
new npc_tonk_mine();
new npc_brewfest_reveler();
- new npc_mojo();
new npc_training_dummy();
new npc_wormhole();
new npc_pet_trainer();