aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-15 19:12:22 -0500
committermegamage <none@none>2009-04-15 19:12:22 -0500
commitf35a6b1363c44e30869d60ca48bfd70702591c55 (patch)
tree130185f7764bbeffa386a89937b8055c94478bcd
parent20344396b3aa91728c16851e6522944e5671af05 (diff)
*Fix more receive emote and disable the remaining ones, until someone is kind enough to do the work.
--HG-- branch : trunk
-rw-r--r--src/bindings/scripts/scripts/guard/guards.cpp4
-rw-r--r--src/bindings/scripts/scripts/npc/npcs_special.cpp104
-rw-r--r--src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp29
-rw-r--r--src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp2
4 files changed, 66 insertions, 73 deletions
diff --git a/src/bindings/scripts/scripts/guard/guards.cpp b/src/bindings/scripts/scripts/guard/guards.cpp
index e157310f291..2a7f171a4a4 100644
--- a/src/bindings/scripts/scripts/guard/guards.cpp
+++ b/src/bindings/scripts/scripts/guard/guards.cpp
@@ -4010,7 +4010,7 @@ void AddSC_guards()
newscript->Name="guard_orgrimmar";
newscript->pGossipHello = &GossipHello_guard_orgrimmar;
newscript->pGossipSelect = &GossipSelect_guard_orgrimmar;
- newscript->pReceiveEmote = &ReceiveEmote_guard_orgrimmar;
+ //newscript->pReceiveEmote = &ReceiveEmote_guard_orgrimmar;
newscript->GetAI = &GetAI_guard_orgrimmar;
newscript->RegisterSelf();
@@ -4046,7 +4046,7 @@ void AddSC_guards()
newscript->Name="guard_stormwind";
newscript->pGossipHello = &GossipHello_guard_stormwind;
newscript->pGossipSelect = &GossipSelect_guard_stormwind;
- newscript->pReceiveEmote = &ReceiveEmote_guard_stormwind;
+ //newscript->pReceiveEmote = &ReceiveEmote_guard_stormwind;
newscript->GetAI = &GetAI_guard_stormwind;
newscript->RegisterSelf();
diff --git a/src/bindings/scripts/scripts/npc/npcs_special.cpp b/src/bindings/scripts/scripts/npc/npcs_special.cpp
index 3084b57e956..8257fa60596 100644
--- a/src/bindings/scripts/scripts/npc/npcs_special.cpp
+++ b/src/bindings/scripts/scripts/npc/npcs_special.cpp
@@ -79,39 +79,37 @@ struct TRINITY_DLL_DECL npc_chicken_cluckAI : public ScriptedAI
if(UpdateVictim())
DoMeleeAttackIfReady();
}
-};
-
-CreatureAI* GetAI_npc_chicken_cluck(Creature *_Creature)
-{
- return new npc_chicken_cluckAI(_Creature);
-}
-bool ReceiveEmote_npc_chicken_cluck( Player *player, Creature *_Creature, uint32 emote )
-{
- if( emote == TEXTEMOTE_CHICKEN )
+ void ReceiveEmote( Player *player, uint32 emote )
{
- if( player->GetTeam() == ALLIANCE )
+ if( emote == TEXTEMOTE_CHICKEN )
{
- if( rand()%30 == 1 )
+ if( player->GetTeam() == ALLIANCE )
{
- if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_NONE )
+ if( rand()%30 == 1 )
{
- _Creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- _Creature->setFaction(FACTION_FRIENDLY);
- DoScriptText(EMOTE_A_HELLO, _Creature);
+ if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_NONE )
+ {
+ m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ m_creature->setFaction(FACTION_FRIENDLY);
+ DoScriptText(EMOTE_A_HELLO, m_creature);
+ }
}
- }
- } else DoScriptText(EMOTE_H_HELLO,_Creature);
- }
- if( emote == TEXTEMOTE_CHEER && player->GetTeam() == ALLIANCE )
- if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE )
- {
- _Creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- _Creature->setFaction(FACTION_FRIENDLY);
- DoScriptText(EMOTE_CLUCK_TEXT2, _Creature);
+ } else DoScriptText(EMOTE_H_HELLO,m_creature);
+ }
+ if( emote == TEXTEMOTE_CHEER && player->GetTeam() == ALLIANCE )
+ if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE )
+ {
+ m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ m_creature->setFaction(FACTION_FRIENDLY);
+ DoScriptText(EMOTE_CLUCK_TEXT2, m_creature);
+ }
}
+};
- return true;
+CreatureAI* GetAI_npc_chicken_cluck(Creature *_Creature)
+{
+ return new npc_chicken_cluckAI(_Creature);
}
bool QuestAccept_npc_chicken_cluck(Player *player, Creature *_Creature, const Quest *_Quest )
@@ -174,39 +172,37 @@ struct TRINITY_DLL_DECL npc_dancing_flamesAI : public ScriptedAI
}
void Aggro(Unit* who){}
-};
-
-CreatureAI* GetAI_npc_dancing_flames(Creature *_Creature)
-{
- return new npc_dancing_flamesAI(_Creature);
-}
-bool ReceiveEmote_npc_dancing_flames( Player *player, Creature *flame, uint32 emote )
-{
- if ( ((npc_dancing_flamesAI*)flame->AI())->active &&
- flame->IsWithinLOS(player->GetPositionX(),player->GetPositionY(),player->GetPositionZ()) && flame->IsWithinDistInMap(player,30.0f))
+ void ReceiveEmote( Player *player, uint32 emote )
{
- flame->SetInFront(player);
- ((npc_dancing_flamesAI*)flame->AI())->active = false;
-
- WorldPacket data;
- flame->BuildHeartBeatMsg(&data);
- flame->SendMessageToSet(&data,true);
- switch(emote)
+ if (m_creature->IsWithinLOS(player->GetPositionX(),player->GetPositionY(),player->GetPositionZ()) && m_creature->IsWithinDistInMap(player,30.0f))
{
- case TEXTEMOTE_KISS: flame->HandleEmoteCommand(EMOTE_ONESHOT_SHY); break;
- case TEXTEMOTE_WAVE: flame->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break;
- case TEXTEMOTE_BOW: flame->HandleEmoteCommand(EMOTE_ONESHOT_BOW); break;
- case TEXTEMOTE_JOKE: flame->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break;
- case TEXTEMOTE_DANCE:
+ m_creature->SetInFront(player);
+ active = false;
+
+ WorldPacket data;
+ m_creature->BuildHeartBeatMsg(&data);
+ m_creature->SendMessageToSet(&data,true);
+ switch(emote)
{
- if (!player->HasAura(SPELL_SEDUCTION))
- flame->CastSpell(player,SPELL_SEDUCTION,true);
+ case TEXTEMOTE_KISS: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SHY); break;
+ case TEXTEMOTE_WAVE: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break;
+ case TEXTEMOTE_BOW: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_BOW); break;
+ case TEXTEMOTE_JOKE: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break;
+ case TEXTEMOTE_DANCE:
+ {
+ if (!player->HasAura(SPELL_SEDUCTION))
+ m_creature->CastSpell(player,SPELL_SEDUCTION,true);
+ }
+ break;
}
- break;
}
}
- return true;
+};
+
+CreatureAI* GetAI_npc_dancing_flames(Creature *_Creature)
+{
+ return new npc_dancing_flamesAI(_Creature);
}
/*######
@@ -1424,7 +1420,6 @@ void AddSC_npcs_special()
newscript = new Script;
newscript->Name="npc_chicken_cluck";
newscript->GetAI = &GetAI_npc_chicken_cluck;
- newscript->pReceiveEmote = &ReceiveEmote_npc_chicken_cluck;
newscript->pQuestAccept = &QuestAccept_npc_chicken_cluck;
newscript->pQuestComplete = &QuestComplete_npc_chicken_cluck;
newscript->RegisterSelf();
@@ -1432,7 +1427,6 @@ void AddSC_npcs_special()
newscript = new Script;
newscript->Name="npc_dancing_flames";
newscript->GetAI = &GetAI_npc_dancing_flames;
- newscript->pReceiveEmote = &ReceiveEmote_npc_dancing_flames;
newscript->RegisterSelf();
newscript = new Script;
@@ -1492,12 +1486,12 @@ void AddSC_npcs_special()
newscript = new Script;
newscript->Name="npc_winter_reveler";
- newscript->pReceiveEmote = &ReceiveEmote_npc_winter_reveler;
+ //newscript->pReceiveEmote = &ReceiveEmote_npc_winter_reveler;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="npc_brewfest_reveler";
- newscript->pReceiveEmote = &ReceiveEmote_npc_brewfest_reveler;
+ //newscript->pReceiveEmote = &ReceiveEmote_npc_brewfest_reveler;
newscript->RegisterSelf();
newscript = new Script;
diff --git a/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp b/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
index 4d8d3b6411b..e944d25ad70 100644
--- a/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
+++ b/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
@@ -157,6 +157,20 @@ struct TRINITY_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI
DoMeleeAttackIfReady();
}
+
+ void ReciveEmote(Player* pPlayer, uint32 emote)
+ {
+ if (emote == TEXTEMOTE_SALUTE)
+ {
+ if (FlareCount >= 2)
+ {
+ if (m_creature->getFaction() == FACTION_FRIENDLY_F)
+ return;
+ else
+ DoFriend();
+ }
+ }
+ }
};
CreatureAI* GetAI_npc_taskmaster_fizzule(Creature* pCreature)
@@ -164,20 +178,6 @@ CreatureAI* GetAI_npc_taskmaster_fizzule(Creature* pCreature)
return new npc_taskmaster_fizzuleAI(pCreature);
}
-bool ReciveEmote_npc_taskmaster_fizzule(Player* pPlayer, Creature* pCreature, uint32 emote)
-{
- if (emote == TEXTEMOTE_SALUTE)
- {
- if (((npc_taskmaster_fizzuleAI*)pCreature->AI())->FlareCount >= 2)
- {
- if (pCreature->getFaction() == FACTION_FRIENDLY_F)
- return true;
- else
- ((npc_taskmaster_fizzuleAI*)pCreature->AI())->DoFriend();
- }
- }
- return true;
-}
/*#####
## npc_twiggy_flathead
#####*/
@@ -549,7 +549,6 @@ void AddSC_the_barrens()
newscript = new Script;
newscript->Name="npc_taskmaster_fizzule";
newscript->GetAI = &GetAI_npc_taskmaster_fizzule;
- newscript->pReceiveEmote = &ReciveEmote_npc_taskmaster_fizzule;
newscript->RegisterSelf();
newscript = new Script;
diff --git a/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp b/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
index 37697119a35..64c3df4f0c3 100644
--- a/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
+++ b/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
@@ -285,7 +285,7 @@ void AddSC_stormwind_city()
newscript = new Script;
newscript->Name = "npc_general_marcus_jonathan";
- newscript->pReceiveEmote = &ReceiveEmote_npc_general_marcus_jonathan;
+ //newscript->pReceiveEmote = &ReceiveEmote_npc_general_marcus_jonathan;
newscript->RegisterSelf();
newscript = new Script;