*Fix more receive emote and disable the remaining ones, until someone is kind enough to do the work.
--HG-- branch : trunk
This commit is contained in:
@@ -4010,7 +4010,7 @@ void AddSC_guards()
|
|||||||
newscript->Name="guard_orgrimmar";
|
newscript->Name="guard_orgrimmar";
|
||||||
newscript->pGossipHello = &GossipHello_guard_orgrimmar;
|
newscript->pGossipHello = &GossipHello_guard_orgrimmar;
|
||||||
newscript->pGossipSelect = &GossipSelect_guard_orgrimmar;
|
newscript->pGossipSelect = &GossipSelect_guard_orgrimmar;
|
||||||
newscript->pReceiveEmote = &ReceiveEmote_guard_orgrimmar;
|
//newscript->pReceiveEmote = &ReceiveEmote_guard_orgrimmar;
|
||||||
newscript->GetAI = &GetAI_guard_orgrimmar;
|
newscript->GetAI = &GetAI_guard_orgrimmar;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
|
|
||||||
@@ -4046,7 +4046,7 @@ void AddSC_guards()
|
|||||||
newscript->Name="guard_stormwind";
|
newscript->Name="guard_stormwind";
|
||||||
newscript->pGossipHello = &GossipHello_guard_stormwind;
|
newscript->pGossipHello = &GossipHello_guard_stormwind;
|
||||||
newscript->pGossipSelect = &GossipSelect_guard_stormwind;
|
newscript->pGossipSelect = &GossipSelect_guard_stormwind;
|
||||||
newscript->pReceiveEmote = &ReceiveEmote_guard_stormwind;
|
//newscript->pReceiveEmote = &ReceiveEmote_guard_stormwind;
|
||||||
newscript->GetAI = &GetAI_guard_stormwind;
|
newscript->GetAI = &GetAI_guard_stormwind;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
|
|
||||||
|
|||||||
@@ -79,14 +79,8 @@ struct TRINITY_DLL_DECL npc_chicken_cluckAI : public ScriptedAI
|
|||||||
if(UpdateVictim())
|
if(UpdateVictim())
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI_npc_chicken_cluck(Creature *_Creature)
|
void ReceiveEmote( Player *player, uint32 emote )
|
||||||
{
|
|
||||||
return new npc_chicken_cluckAI(_Creature);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ReceiveEmote_npc_chicken_cluck( Player *player, Creature *_Creature, uint32 emote )
|
|
||||||
{
|
{
|
||||||
if( emote == TEXTEMOTE_CHICKEN )
|
if( emote == TEXTEMOTE_CHICKEN )
|
||||||
{
|
{
|
||||||
@@ -96,22 +90,26 @@ bool ReceiveEmote_npc_chicken_cluck( Player *player, Creature *_Creature, uint32
|
|||||||
{
|
{
|
||||||
if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_NONE )
|
if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_NONE )
|
||||||
{
|
{
|
||||||
_Creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||||
_Creature->setFaction(FACTION_FRIENDLY);
|
m_creature->setFaction(FACTION_FRIENDLY);
|
||||||
DoScriptText(EMOTE_A_HELLO, _Creature);
|
DoScriptText(EMOTE_A_HELLO, m_creature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else DoScriptText(EMOTE_H_HELLO,_Creature);
|
} else DoScriptText(EMOTE_H_HELLO,m_creature);
|
||||||
}
|
}
|
||||||
if( emote == TEXTEMOTE_CHEER && player->GetTeam() == ALLIANCE )
|
if( emote == TEXTEMOTE_CHEER && player->GetTeam() == ALLIANCE )
|
||||||
if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE )
|
if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE )
|
||||||
{
|
{
|
||||||
_Creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||||
_Creature->setFaction(FACTION_FRIENDLY);
|
m_creature->setFaction(FACTION_FRIENDLY);
|
||||||
DoScriptText(EMOTE_CLUCK_TEXT2, _Creature);
|
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 )
|
bool QuestAccept_npc_chicken_cluck(Player *player, Creature *_Creature, const Quest *_Quest )
|
||||||
@@ -174,6 +172,32 @@ struct TRINITY_DLL_DECL npc_dancing_flamesAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit* who){}
|
void Aggro(Unit* who){}
|
||||||
|
|
||||||
|
void ReceiveEmote( Player *player, uint32 emote )
|
||||||
|
{
|
||||||
|
if (m_creature->IsWithinLOS(player->GetPositionX(),player->GetPositionY(),player->GetPositionZ()) && m_creature->IsWithinDistInMap(player,30.0f))
|
||||||
|
{
|
||||||
|
m_creature->SetInFront(player);
|
||||||
|
active = false;
|
||||||
|
|
||||||
|
WorldPacket data;
|
||||||
|
m_creature->BuildHeartBeatMsg(&data);
|
||||||
|
m_creature->SendMessageToSet(&data,true);
|
||||||
|
switch(emote)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI_npc_dancing_flames(Creature *_Creature)
|
CreatureAI* GetAI_npc_dancing_flames(Creature *_Creature)
|
||||||
@@ -181,34 +205,6 @@ CreatureAI* GetAI_npc_dancing_flames(Creature *_Creature)
|
|||||||
return new npc_dancing_flamesAI(_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))
|
|
||||||
{
|
|
||||||
flame->SetInFront(player);
|
|
||||||
((npc_dancing_flamesAI*)flame->AI())->active = false;
|
|
||||||
|
|
||||||
WorldPacket data;
|
|
||||||
flame->BuildHeartBeatMsg(&data);
|
|
||||||
flame->SendMessageToSet(&data,true);
|
|
||||||
switch(emote)
|
|
||||||
{
|
|
||||||
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:
|
|
||||||
{
|
|
||||||
if (!player->HasAura(SPELL_SEDUCTION))
|
|
||||||
flame->CastSpell(player,SPELL_SEDUCTION,true);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*######
|
/*######
|
||||||
## Triage quest
|
## Triage quest
|
||||||
######*/
|
######*/
|
||||||
@@ -1424,7 +1420,6 @@ void AddSC_npcs_special()
|
|||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name="npc_chicken_cluck";
|
newscript->Name="npc_chicken_cluck";
|
||||||
newscript->GetAI = &GetAI_npc_chicken_cluck;
|
newscript->GetAI = &GetAI_npc_chicken_cluck;
|
||||||
newscript->pReceiveEmote = &ReceiveEmote_npc_chicken_cluck;
|
|
||||||
newscript->pQuestAccept = &QuestAccept_npc_chicken_cluck;
|
newscript->pQuestAccept = &QuestAccept_npc_chicken_cluck;
|
||||||
newscript->pQuestComplete = &QuestComplete_npc_chicken_cluck;
|
newscript->pQuestComplete = &QuestComplete_npc_chicken_cluck;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
@@ -1432,7 +1427,6 @@ void AddSC_npcs_special()
|
|||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name="npc_dancing_flames";
|
newscript->Name="npc_dancing_flames";
|
||||||
newscript->GetAI = &GetAI_npc_dancing_flames;
|
newscript->GetAI = &GetAI_npc_dancing_flames;
|
||||||
newscript->pReceiveEmote = &ReceiveEmote_npc_dancing_flames;
|
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
|
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
@@ -1492,12 +1486,12 @@ void AddSC_npcs_special()
|
|||||||
|
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name="npc_winter_reveler";
|
newscript->Name="npc_winter_reveler";
|
||||||
newscript->pReceiveEmote = &ReceiveEmote_npc_winter_reveler;
|
//newscript->pReceiveEmote = &ReceiveEmote_npc_winter_reveler;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
|
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name="npc_brewfest_reveler";
|
newscript->Name="npc_brewfest_reveler";
|
||||||
newscript->pReceiveEmote = &ReceiveEmote_npc_brewfest_reveler;
|
//newscript->pReceiveEmote = &ReceiveEmote_npc_brewfest_reveler;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
|
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
|
|||||||
@@ -157,6 +157,20 @@ struct TRINITY_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI
|
|||||||
|
|
||||||
DoMeleeAttackIfReady();
|
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)
|
CreatureAI* GetAI_npc_taskmaster_fizzule(Creature* pCreature)
|
||||||
@@ -164,20 +178,6 @@ CreatureAI* GetAI_npc_taskmaster_fizzule(Creature* pCreature)
|
|||||||
return new npc_taskmaster_fizzuleAI(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
|
## npc_twiggy_flathead
|
||||||
#####*/
|
#####*/
|
||||||
@@ -549,7 +549,6 @@ void AddSC_the_barrens()
|
|||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name="npc_taskmaster_fizzule";
|
newscript->Name="npc_taskmaster_fizzule";
|
||||||
newscript->GetAI = &GetAI_npc_taskmaster_fizzule;
|
newscript->GetAI = &GetAI_npc_taskmaster_fizzule;
|
||||||
newscript->pReceiveEmote = &ReciveEmote_npc_taskmaster_fizzule;
|
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
|
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ void AddSC_stormwind_city()
|
|||||||
|
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name = "npc_general_marcus_jonathan";
|
newscript->Name = "npc_general_marcus_jonathan";
|
||||||
newscript->pReceiveEmote = &ReceiveEmote_npc_general_marcus_jonathan;
|
//newscript->pReceiveEmote = &ReceiveEmote_npc_general_marcus_jonathan;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
|
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
|
|||||||
Reference in New Issue
Block a user