mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Merge [SD2]
r1142 Fix: Kael'thas advisors gain double health in phase 3 and dropp them on reset
Fix: Void Reaver will now ignore pets and totems when casting arcane orb
r1143 Remove old workaround for summon kael(TK) weapons and use spells instead. Apply code style to parts of code.
r1144 Added lost sql from revision 1119 and 1121 - skip
r1145 Correcting details for npc related to quest 590
--HG--
branch : trunk
This commit is contained in:
@@ -345,7 +345,8 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content
|
||||
(-1000427, 'Something tells me this $r wants the mysterious fossil too. Help!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_AGGRO'),
|
||||
(-1000428, 'Ah...the wondrous sound of kodos. I love the way they make the ground shake... inspect the beast for me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0,'kodo round SAY_SMEED_HOME_1'),
|
||||
(-1000429, 'Hey, look out with that kodo! You had better inspect that beast before i give you credit!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0,'kodo round SAY_SMEED_HOME_2'),
|
||||
(-1000430, 'That kodo sure is a beauty. Wait a minute, where are my bifocals? Perhaps you should inspect the beast for me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kodo round SAY_SMEED_HOME_3');
|
||||
(-1000430, 'That kodo sure is a beauty. Wait a minute, where are my bifocals? Perhaps you should inspect the beast for me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kodo round SAY_SMEED_HOME_3'),
|
||||
(-1000431, 'Okay, okay... gimme a minute to rest now. You gone and beat me up good.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 14, 1, 'calvin SAY_COMPLETE');
|
||||
|
||||
-- -1 033 000 SHADOWFANG KEEP
|
||||
INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES
|
||||
|
||||
3
sql/updates/4803_script_texts.sql
Normal file
3
sql/updates/4803_script_texts.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DELETE FROM script_texts WHERE entry=-1000431;
|
||||
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
|
||||
(-1000431,'Okay, okay... gimme a minute to rest now. You gone and beat me up good.',0,0,14,1,'calvin SAY_COMPLETE');
|
||||
File diff suppressed because it is too large
Load Diff
@@ -79,6 +79,7 @@ struct TRINITY_DLL_DECL boss_void_reaverAI : public ScriptedAI
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
DoZoneInCombat();
|
||||
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_VOIDREAVEREVENT, DONE);
|
||||
@@ -119,13 +120,20 @@ struct TRINITY_DLL_DECL boss_void_reaverAI : public ScriptedAI
|
||||
for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
|
||||
//18 yard radius minimum
|
||||
// exclude pets & totems
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
continue;
|
||||
|
||||
//18 yard radius minimum
|
||||
if(target && target->GetTypeId() == TYPEID_PLAYER && target->isAlive() && !target->IsWithinDist(m_creature, 18, false))
|
||||
target_list.push_back(target);
|
||||
target = NULL;
|
||||
}
|
||||
|
||||
if(target_list.size())
|
||||
target = *(target_list.begin()+rand()%target_list.size());
|
||||
else
|
||||
target = m_creature->getVictim();
|
||||
|
||||
if (target)
|
||||
m_creature->CastSpell(target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(), SPELL_ARCANE_ORB, false, NULL, NULL, NULL, target);
|
||||
|
||||
@@ -33,31 +33,94 @@ EndContentData */
|
||||
## npc_calvin_montague
|
||||
######*/
|
||||
|
||||
#define QUEST_590 590
|
||||
#define FACTION_FRIENDLY 68
|
||||
#define FACTION_HOSTILE 16
|
||||
enum
|
||||
{
|
||||
SAY_COMPLETE = -1000431,
|
||||
SPELL_DRINK = 2639, // possibly not correct spell (but iconId is correct)
|
||||
QUEST_590 = 590,
|
||||
FACTION_HOSTILE = 168
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_calvin_montagueAI : public ScriptedAI
|
||||
{
|
||||
npc_calvin_montagueAI(Creature* c) : ScriptedAI(c) {}
|
||||
npc_calvin_montagueAI(Creature* pCreature) : ScriptedAI(pCreature) { }
|
||||
|
||||
uint32 m_uiPhase;
|
||||
uint32 m_uiPhaseTimer;
|
||||
uint64 m_uiPlayerGUID;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->setFaction(FACTION_FRIENDLY);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||
m_uiPhase = 0;
|
||||
m_uiPhaseTimer = 5000;
|
||||
m_uiPlayerGUID = 0;
|
||||
|
||||
me->RestoreFaction();
|
||||
|
||||
if (!m_creature->HasFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_ATTACKABLE_2))
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) { }
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
void AttackedBy(Unit* pAttacker)
|
||||
{
|
||||
if( Killer->GetTypeId() == TYPEID_PLAYER )
|
||||
if( CAST_PLR(Killer)->GetQuestStatus(QUEST_590) == QUEST_STATUS_INCOMPLETE )
|
||||
CAST_PLR(Killer)->AreaExploredOrEventHappens(QUEST_590);
|
||||
if (m_creature->getVictim() || m_creature->IsFriendlyTo(pAttacker))
|
||||
return;
|
||||
|
||||
AttackStart(pAttacker);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void DamageTaken(Unit* pDoneBy, uint32 &uiDamage)
|
||||
{
|
||||
if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage)*100 / m_creature->GetMaxHealth() < 15))
|
||||
{
|
||||
uiDamage = 0;
|
||||
|
||||
me->RestoreFaction();
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||
m_creature->CombatStop(true);
|
||||
|
||||
m_uiPhase = 1;
|
||||
|
||||
if (pDoneBy->GetTypeId() == TYPEID_PLAYER)
|
||||
m_uiPlayerGUID = pDoneBy->GetGUID();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (m_uiPhase)
|
||||
{
|
||||
if (m_uiPhaseTimer < uiDiff)
|
||||
m_uiPhaseTimer = 7500;
|
||||
else
|
||||
{
|
||||
m_uiPhaseTimer -= uiDiff;
|
||||
return;
|
||||
}
|
||||
|
||||
switch(m_uiPhase)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_COMPLETE, m_creature);
|
||||
++m_uiPhase;
|
||||
break;
|
||||
case 2:
|
||||
if (Unit* pUnit = Unit::GetUnit(*m_creature, m_uiPlayerGUID))
|
||||
CAST_PLR(pUnit)->AreaExploredOrEventHappens(QUEST_590);
|
||||
|
||||
m_creature->CastSpell(m_creature,SPELL_DRINK,true);
|
||||
++m_uiPhase;
|
||||
break;
|
||||
case 3:
|
||||
EnterEvadeMode();
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
@@ -69,13 +132,13 @@ CreatureAI* GetAI_npc_calvin_montague(Creature *_Creature)
|
||||
return new npc_calvin_montagueAI (_Creature);
|
||||
}
|
||||
|
||||
bool QuestAccept_npc_calvin_montague(Player* player, Creature* creature, Quest const* quest)
|
||||
bool QuestAccept_npc_calvin_montague(Player* pPlayer, Creature* pCreature, Quest const* quest)
|
||||
{
|
||||
if( quest->GetQuestId() == QUEST_590 )
|
||||
{
|
||||
creature->setFaction(FACTION_HOSTILE);
|
||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||
CAST_AI(npc_calvin_montagueAI, creature->AI())->AttackStart(player);
|
||||
pCreature->setFaction(FACTION_HOSTILE);
|
||||
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||
CAST_AI(npc_calvin_montagueAI, pCreature->AI())->AttackStart(pPlayer);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user