*Changes in Exarch Maladaar script
*Script for airstrike items - by Bagsac *Changes in Moroes script --HG-- branch : trunk
This commit is contained in:
@@ -31,6 +31,7 @@ item_nether_wraith_beacon(i31742) Summons creatures for quest Becoming a Spell
|
||||
item_flying_machine(i34060,i34061) Engineering crafted flying machines
|
||||
item_gor_dreks_ointment(i30175) Protecting Our Own(q10488)
|
||||
item_muiseks_vessel Cast on creature, they must be dead(q 3123,3124,3125,3126,3127)
|
||||
item_only_for_flight Items which should only useable while flying
|
||||
item_protovoltaic_magneto_collector Prevents abuse
|
||||
item_razorthorn_flayer_gland Quest Discovering Your Roots (q11520) and Rediscovering Your Roots (q11521). Prevents abuse
|
||||
item_tame_beast_rods(many) Prevent cast on any other creature than the intended (for all tame beast quests)
|
||||
@@ -65,13 +66,29 @@ bool ItemUse_item_area_52_special(Player *player, Item* _Item, SpellCastTargets
|
||||
}
|
||||
|
||||
/*#####
|
||||
# item_arcane_charges
|
||||
# item_only_for_flight
|
||||
#####*/
|
||||
|
||||
bool ItemUse_item_arcane_charges(Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
bool ItemUse_item_only_for_flight(Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
{
|
||||
uint32 itemId = _Item->GetEntry();
|
||||
bool disabled = false;
|
||||
|
||||
//for special scripts
|
||||
switch(itemId)
|
||||
{
|
||||
case 24538:
|
||||
if(!player->GetAreaId() == 3628)
|
||||
disabled = true;
|
||||
break;
|
||||
case 34489:
|
||||
if(!player->GetZoneId() == 4080)
|
||||
disabled = true;
|
||||
break;
|
||||
}
|
||||
|
||||
// allow use in flight only
|
||||
if( player->isInFlight() )
|
||||
if( player->isInFlight() && !disabled)
|
||||
return false;
|
||||
|
||||
// error
|
||||
@@ -458,8 +475,8 @@ void AddSC_item_scripts()
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="item_arcane_charges";
|
||||
newscript->pItemUse = ItemUse_item_arcane_charges;
|
||||
newscript->Name="item_only_for_flight";
|
||||
newscript->pItemUse = ItemUse_item_only_for_flight;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
|
||||
+17
-21
@@ -143,7 +143,11 @@ CreatureAI* GetAI_mob_stolen_soul(Creature *_Creature)
|
||||
|
||||
struct TRINITY_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
|
||||
{
|
||||
boss_exarch_maladaarAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
boss_exarch_maladaarAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
HasTaunted = false;
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 soulmodel;
|
||||
uint64 soulholder;
|
||||
@@ -166,31 +170,20 @@ struct TRINITY_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
|
||||
Ribbon_of_Souls_timer = 5000;
|
||||
StolenSoul_Timer = 25000 + rand()% 10000;
|
||||
|
||||
HasTaunted = false;
|
||||
Avatar_summoned = false;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessiblePlaceFor(m_creature))
|
||||
{
|
||||
if (!HasTaunted && m_creature->IsWithinDistInMap(who, 150.0))
|
||||
{
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
HasTaunted = true;
|
||||
}
|
||||
if (!HasTaunted && m_creature->IsWithinDistInMap(who, 150.0))
|
||||
{
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
HasTaunted = true;
|
||||
}
|
||||
|
||||
if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
|
||||
return;
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
float attackRadius = m_creature->GetAttackDistance(who);
|
||||
if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))
|
||||
{
|
||||
//who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||
AttackStart(who);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
@@ -207,13 +200,16 @@ struct TRINITY_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
|
||||
if (summoned->GetEntry() == ENTRY_STOLEN_SOUL)
|
||||
{
|
||||
//SPELL_STOLEN_SOUL_VISUAL has shapeshift effect, but not implemented feature in Trinity for this spell.
|
||||
summoned->SetDisplayId(soulmodel);
|
||||
summoned->CastSpell(summoned,SPELL_STOLEN_SOUL_VISUAL,false);
|
||||
summoned->SetDisplayId(soulmodel);
|
||||
summoned->setFaction(m_creature->getFaction());
|
||||
|
||||
if (Unit *target = Unit::GetUnit(*m_creature,soulholder))
|
||||
summoned->AI()->AttackStart(target);
|
||||
{
|
||||
|
||||
((mob_stolen_soulAI*)summoned->AI())->SetMyClass(soulclass);
|
||||
summoned->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -323,12 +323,10 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
|
||||
}else Wait_Timer -= diff;
|
||||
}
|
||||
|
||||
//Blind highest aggro, and attack second highest
|
||||
//Gouge highest aggro, and attack second highest
|
||||
if (Gouge_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_GOUGE);
|
||||
if (m_creature->getThreatManager().getThreat(m_creature->getVictim()))
|
||||
m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-100);
|
||||
DoCast(m_creature->getVictim(), SPELL_GOUGE);
|
||||
Gouge_Timer = 40000;
|
||||
}else Gouge_Timer -= diff;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user