[Build] Most errors fixed

This commit is contained in:
Antz 2015-02-07 22:46:39 +00:00 committed by Antz
parent 868302dd0b
commit 778052084e
70 changed files with 619 additions and 602 deletions

View file

@ -138,7 +138,7 @@ bool npc_escortAI::AssistPlayerInCombat(Unit* pWho)
}
// experimental (unknown) flag not present
if (!(m_creature->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_CAN_ASSIST))
if (!(m_creature->GetCreatureInfo()-> type_flags & CREATURE_TYPEFLAGS_CAN_ASSIST))
{
return false;
}

View file

@ -76,7 +76,7 @@ bool FollowerAI::AssistPlayerInCombat(Unit* pWho)
}
// experimental (unknown) flag not present
if (!(m_creature->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_CAN_ASSIST))
if (!(m_creature->GetCreatureInfo()->type_flags & CREATURE_TYPEFLAGS_CAN_ASSIST))
{
return false;
}

View file

@ -102,7 +102,7 @@ void ScriptedAI::MoveInLineOfSight(Unit* pWho)
*/
void ScriptedAI::AttackStart(Unit* pWho)
{
if (!m_creature->CanAttackByItself())
if (!m_creature->CanInitiateAttack())
return;
if (pWho && m_creature->Attack(pWho, true)) // The Attack function also uses basic checks if pWho can be attacked
@ -713,7 +713,7 @@ void Scripted_NoMovementAI::GetAIInformation(ChatHandler& reader)
void Scripted_NoMovementAI::AttackStart(Unit* pWho)
{
if (!m_creature->CanAttackByItself())
if (!m_creature->CanInitiateAttack())
return;
if (pWho && m_creature->Attack(pWho, true))

View file

@ -124,7 +124,7 @@ struct generic_creatureAI : public ScriptedAI
else { info = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, 0, 0, SELECT_EFFECT_DONTCARE); }
// 50% chance if elite or higher, 20% chance if not, to replace our white hit with a spell
if (info && (rand() % (m_creature->GetCreatureInfo()->Rank > 1 ? 2 : 5) == 0) && !GlobalCooldown)
if (info && (rand() % (m_creature->GetCreatureInfo()->rank > 1 ? 2 : 5) == 0) && !GlobalCooldown)
{
// Cast the spell
if (Healing) { DoCastSpell(m_creature, info); }

View file

@ -554,14 +554,6 @@ void AddScripts()
// battlegrounds
AddSC_battleground();
// custom
// examples
AddSC_example_creature();
AddSC_example_escort();
AddSC_example_gossip_codebox();
AddSC_example_misc();
// world
AddSC_areatrigger_scripts();
AddSC_bosses_emerald_dragons();