mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Merge [SD2]
r1307 Add gossip for npc_tracy_proudwell. Patch by hoshie r1308 Fixed one not initialized array. r1309 Correct typo in folder name. - skip r1310 Enable faction change and remove unitState at attackStart for script related to quest 1560 --HG-- branch : trunk
This commit is contained in:
@@ -550,6 +550,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_wounded_blood_elf' WHERE `entry
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_aeranas' WHERE `entry`=17085;
|
||||
UPDATE `gameobject_template` SET `ScriptName`='go_haaleshi_altar' WHERE `entry`=181606;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_naladu' WHERE `entry`=19361;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_tracy_proudwell' WHERE `entry`=18266;
|
||||
|
||||
/* HILLSBRAD FOOTHILLS */
|
||||
|
||||
|
||||
1
sql/updates/5092_world_scripts.sql
Normal file
1
sql/updates/5092_world_scripts.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE creature_template SET ScriptName='npc_tracy_proudwell' WHERE entry=18266;
|
||||
@@ -582,6 +582,25 @@ struct MANGOS_DLL_DECL npc_toogaAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
{
|
||||
if (!pWho)
|
||||
return;
|
||||
|
||||
if (m_creature->Attack(pWho, true))
|
||||
{
|
||||
m_creature->AddThreat(pWho, 0.0f);
|
||||
m_creature->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(m_creature);
|
||||
|
||||
if (m_creature->hasUnitState(UNIT_STAT_FOLLOW))
|
||||
m_creature->clearUnitState(UNIT_STAT_FOLLOW);
|
||||
|
||||
if (IsCombatMovement())
|
||||
m_creature->GetMotionMaster()->MoveChase(pWho);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
m_creature->RemoveAllAuras();
|
||||
@@ -598,6 +617,9 @@ struct MANGOS_DLL_DECL npc_toogaAI : public ScriptedAI
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_creature->hasUnitState(UNIT_STAT_FOLLOW))
|
||||
m_creature->clearUnitState(UNIT_STAT_FOLLOW);
|
||||
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
}
|
||||
@@ -622,7 +644,7 @@ struct MANGOS_DLL_DECL npc_toogaAI : public ScriptedAI
|
||||
m_uiPlayerGUID = pPlayer->GetGUID();
|
||||
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
|
||||
//m_creature->setFaction(FACTION_TOOG_ESCORTEE);
|
||||
m_creature->setFaction(FACTION_TOOG_ESCORTEE);
|
||||
|
||||
m_creature->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ struct TRINITY_DLL_DECL boss_bjarngrimAI : public ScriptedAI
|
||||
m_pInstance = pCreature->GetInstanceData();
|
||||
m_bIsHeroic = pCreature->GetMap()->IsHeroic();
|
||||
m_uiStance = STANCE_DEFENSIVE;
|
||||
memset(&m_auiStormforgedLieutenantGUID, 0, sizeof(m_auiStormforgedLieutenantGUID));
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
@@ -111,7 +112,7 @@ struct TRINITY_DLL_DECL boss_bjarngrimAI : public ScriptedAI
|
||||
uint32 m_uiMortalStrike_Timer;
|
||||
uint32 m_uiSlam_Timer;
|
||||
|
||||
uint64 m_uiStormforgedLieutenantGUID[2];
|
||||
uint64 m_auiStormforgedLieutenantGUID[2];
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -136,7 +137,7 @@ struct TRINITY_DLL_DECL boss_bjarngrimAI : public ScriptedAI
|
||||
|
||||
for(uint8 i = 0; i < 2; ++i)
|
||||
{
|
||||
if (Creature* pStormforgedLieutenant = (Unit::GetCreature((*m_creature), m_uiStormforgedLieutenantGUID[i])))
|
||||
if (Creature* pStormforgedLieutenant = (Unit::GetCreature((*m_creature), m_auiStormforgedLieutenantGUID[i])))
|
||||
{
|
||||
if (!pStormforgedLieutenant->isAlive())
|
||||
pStormforgedLieutenant->Respawn();
|
||||
|
||||
@@ -25,6 +25,7 @@ EndScriptData */
|
||||
npc_aeranas
|
||||
go_haaleshi_altar
|
||||
npc_naladu
|
||||
npc_tracy_proudwell
|
||||
npc_wounded_blood_elf
|
||||
EndContentData */
|
||||
|
||||
@@ -156,6 +157,54 @@ bool GossipSelect_npc_naladu(Player* pPlayer, Creature* pCreature, uint32 uiSend
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_tracy_proudwell
|
||||
######*/
|
||||
|
||||
#define GOSSIP_TEXT_REDEEM_MARKS "I have marks to redeem!"
|
||||
#define GOSSIP_TRACY_PROUDWELL_ITEM1 "I heard that your dog Fei Fei took Klatu's prayer beads..."
|
||||
#define GOSSIP_TRACY_PROUDWELL_ITEM2 "<back>"
|
||||
|
||||
enum
|
||||
{
|
||||
GOSSIP_TEXTID_TRACY_PROUDWELL1 = 10689,
|
||||
QUEST_DIGGING_FOR_PRAYER_BEADS = 10916
|
||||
};
|
||||
|
||||
bool GossipHello_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
if (pCreature->isQuestGiver())
|
||||
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
|
||||
|
||||
if (pCreature->isVendor())
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_REDEEM_MARKS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
|
||||
if (pPlayer->GetQuestStatus(QUEST_DIGGING_FOR_PRAYER_BEADS) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TRACY_PROUDWELL_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
||||
{
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TRACY_PROUDWELL_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TRACY_PROUDWELL1, pCreature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_TRADE:
|
||||
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_wounded_blood_elf
|
||||
######*/
|
||||
@@ -268,6 +317,12 @@ void AddSC_hellfire_peninsula()
|
||||
newscript->pGossipSelect = &GossipSelect_npc_naladu;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_tracy_proudwell";
|
||||
newscript->pGossipHello = &GossipHello_npc_tracy_proudwell;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_tracy_proudwell;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_wounded_blood_elf";
|
||||
newscript->GetAI = &GetAI_npc_wounded_blood_elf;
|
||||
|
||||
Reference in New Issue
Block a user