Corrected more wrong npc_text ids.

This commit is contained in:
brotalnia
2017-11-18 04:03:13 +02:00
parent 8b479c481d
commit a37ae4642b
6 changed files with 168 additions and 70 deletions
@@ -785,11 +785,11 @@ bool GossipHello_npc_reginald_windsor(Player* pPlayer, Creature* pCreature)
if (auto pWindsorEventAI = static_cast<npc_reginald_windsorAI*>(pCreature->AI()))
{
if (pPlayer == pWindsorEventAI->GetPlayer() && pWindsorEventAI->QuestAccepted)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Me and my friends are ready. Let's stop this masquerade!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, sObjectMgr.GetBroadcastText(8256, pPlayer->GetSession()->GetSessionDbLocaleIndex(), pPlayer->getGender()), GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
else if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(125800, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(5633, pCreature->GetGUID());
}
return true;
}
@@ -39,12 +39,10 @@ enum AshbringerEventMisc
NPC_COMMANDER_MOGRAINE = 3976,
NPC_HIGHLORD_MOGRAINE = 16062,
SAY_HAVE_YOU_COME = -1999927,
SAY_AND_SO_IT_BEG = -1999928,
SAY_ASHBRINGER = -1999916,
SAY_KNEEL_BEFORE = -1999917,
SAY_MY_LORD = -1999918,
SAY_TAKE_ME_WITH = -1999919,
GO_CHAPPEL_DOOR = 104591,
SAY_COMMANDER1 = -1999920,
@@ -171,6 +169,26 @@ struct instance_scarlet_monastery : ScriptedInstance
return 0;
}
uint32 GetRandomScarletText()
{
switch (urand(0, 6))
{
case 0:
return 12378;
case 1:
return 12379;
case 2:
return 12380;
case 3:
return 12381;
case 4:
return 12382;
case 5:
return 12383;
}
return 12384;
}
void OnCreatureSpellHit(Unit* pCaster, Creature* receiver, const SpellEntry* spell) override
{
if (!m_ashbringerActive || !pCaster || !receiver || !spell)
@@ -204,7 +222,7 @@ struct instance_scarlet_monastery : ScriptedInstance
if (!m_ashbringerSayTimer && urand(0,1))
{
m_ashbringerSayTimer = 2000;
DoScriptText(irand(SAY_TAKE_ME_WITH, SAY_HAVE_YOU_COME), receiver);
DoScriptText(GetRandomScarletText(), receiver);
}
break;
}
@@ -865,21 +865,6 @@ InstanceData* GetInstanceData_instance_temple_of_ahnqiraj(Map* pMap)
return new instance_temple_of_ahnqiraj(pMap);
}
bool GossipHello_npc_Caelestrasz(Player* pPlayer, Creature* pCreature)
{
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (InstanceData* instData = pCreature->GetInstanceData()) {
if (instData->GetData(TYPE_CTHUN) == DONE) {
pPlayer->SEND_GOSSIP_MENU(40101, pCreature->GetGUID());
}
else {
pPlayer->SEND_GOSSIP_MENU(40100, pCreature->GetGUID());
}
return true;
}
return false;
}
CreatureAI* GetAI_qirajiMindslayer(Creature* pCreature)
{
return new AI_QirajiMindslayer(pCreature);
@@ -899,11 +884,6 @@ void AddSC_instance_temple_of_ahnqiraj()
pNewScript->pAreaTrigger = &AreaTrigger_at_temple_ahnqiraj;
pNewScript->RegisterSelf();
pNewScript = new Script;
pNewScript->Name = "aq_caelestrasz_ai";
pNewScript->pGossipHello = &GossipHello_npc_Caelestrasz;
pNewScript->RegisterSelf();
pNewScript = new Script;
pNewScript->Name = "mob_qiraji_mindslayer";
pNewScript->GetAI = &GetAI_qirajiMindslayer;
+2 -2
View File
@@ -28,8 +28,8 @@ enum
ITEM_MAGICAL_LEDGER = 20949,
TEXT_HARM = 7880,
TEXT_SAVING_WORLD = 1548114,
TEXT_SCEPTER_0 = 1548101,
TEXT_SAVING_WORLD = 7901,
TEXT_SCEPTER_0 = 7885,
PLAYER_SAY_0 = -3100013,
MAX_SCEPTER_DIALOGUE = 13,
-43
View File
@@ -221,47 +221,6 @@ const uint32 HordeSoldierId[3] =
## npc_doctor (handles both Gustaf Vanhowzen and Gregory Victor)
######*/
bool GossipHello_npc_doctor(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetObjectGuid());
if ((pPlayer->GetTeam() == ALLIANCE && pPlayer->GetQuestStatus(QUEST_TRIAGE_A) == QUEST_STATUS_COMPLETE) || (pPlayer->GetTeam() == HORDE && pPlayer->GetQuestStatus(QUEST_TRIAGE_H) == QUEST_STATUS_COMPLETE))
{
if (pPlayer->GetSkillValue(SKILL_FIRST_AID) >= 240 && !pPlayer->HasSpell(10841))
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, -3100005, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
if (pPlayer->GetSkillValue(SKILL_FIRST_AID) >= 260 && !pPlayer->HasSpell(18629))
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, -3100006, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
if (pPlayer->GetSkillValue(SKILL_FIRST_AID) >= 290 && !pPlayer->HasSpell(18630))
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, -3100007, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
}
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetObjectGuid());
return true;
}
bool GossipSelect_npc_doctor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF + 1:
pPlayer->CastSpell(pPlayer, 10843, true);
pPlayer->CLOSE_GOSSIP_MENU();
break;
case GOSSIP_ACTION_INFO_DEF + 2:
pPlayer->CastSpell(pPlayer, 18631, true);
pPlayer->CLOSE_GOSSIP_MENU();
break;
case GOSSIP_ACTION_INFO_DEF + 3:
pPlayer->CastSpell(pPlayer, 18632, true);
pPlayer->CLOSE_GOSSIP_MENU();
break;
}
return true;
}
struct npc_doctorAI : public ScriptedAI
{
npc_doctorAI(Creature* pCreature) : ScriptedAI(pCreature)
@@ -3537,8 +3496,6 @@ void AddSC_npcs_special()
newscript->GetAI = &GetAI_npc_doctor;
newscript->pQuestAcceptNPC = &QuestAccept_npc_doctor;
newscript->pQuestRewardedNPC = &QuestRewarded_npc_doctor;
newscript->pGossipHello = &GossipHello_npc_doctor;
newscript->pGossipSelect = &GossipSelect_npc_doctor;
newscript->RegisterSelf();
newscript = new Script;