mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[Build] Most errors fixed
This commit is contained in:
parent
868302dd0b
commit
778052084e
70 changed files with 619 additions and 602 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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); }
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue