mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Merge [SD2]
r1211 Correct tempsummon type for adds and add spellId for future use. Patch by Abim - skip r1212 Added support for quest 6523. Patch by Meldanor - skip (already have that, just move waypoints to db) r1213 Add a few missing address-of operators and some general cleanup. r1214 Adjusting how pet are summoned and check when new pet can be summoned for sharkkis. - skip r1215 Added support for event related to quest 12727. Original patch by ckegg r1216 Some adjustments to function for controlling combat movement (MoveChase()) r1217 Use SetCombatMovement() for more scripts where expected and remove one useless function from Scripted_NoMovementAI (this may be fully removed) r1218 Correct script_texts, adding variable %s where missing (...and where expected. Note that not all creature emote texts contain name of sender). - skip r1219 Reset DATA_OPERA_OZ_DEATHCOUNT to 0 at start, in case event was previously run and incremented counter. r1220 Correct lost-in-process FillPointMovementListForCreature() for quest 12727 (copy/paste == bad) --HG-- branch : trunk
This commit is contained in:
@@ -79,7 +79,7 @@ void SummonList::DespawnAll()
|
||||
}
|
||||
}
|
||||
|
||||
ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(creature), IsFleeing(false), CombatMovement(true), m_uiEvadeCheckCooldown(2500)
|
||||
ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(creature), IsFleeing(false), m_bCombatMovement(true), m_uiEvadeCheckCooldown(2500)
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
}
|
||||
@@ -572,9 +572,9 @@ void ScriptedAI::SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand, int32 ui
|
||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, uint32(uiRanged));
|
||||
}
|
||||
|
||||
void ScriptedAI::SetCombatMovement(bool CombatMove)
|
||||
void ScriptedAI::SetCombatMovement(bool bCombatMove)
|
||||
{
|
||||
CombatMovement = CombatMove;
|
||||
m_bCombatMovement = bCombatMove;
|
||||
}
|
||||
|
||||
// Hacklike storage used for misc creatures that are expected to evade of outside of a certain area.
|
||||
@@ -623,22 +623,6 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff)
|
||||
return true;
|
||||
}
|
||||
|
||||
/*void Scripted_NoMovementAI::MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if( !m_creature->getVictim() && m_creature->canAttack(who) && ( m_creature->IsHostileTo( who )) && who->isInAccessiblePlaceFor(m_creature) )
|
||||
{
|
||||
if (!m_creature->canFly() && !m_creature->IsWithinDist(who, CREATURE_Z_ATTACK_RANGE))
|
||||
return;
|
||||
|
||||
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 Scripted_NoMovementAI::AttackStart(Unit* who)
|
||||
{
|
||||
if (!who)
|
||||
|
||||
@@ -190,14 +190,14 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
|
||||
void SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand = EQUIP_NO_CHANGE, int32 uiOffHand = EQUIP_NO_CHANGE, int32 uiRanged = EQUIP_NO_CHANGE);
|
||||
|
||||
//Generally used to control if MoveChase() is to be used or not in AttackStart(). Some creatures does not chase victims
|
||||
void SetCombatMovement(bool CombatMove);
|
||||
bool IsCombatMovement() { return m_bCombatMovement; }
|
||||
|
||||
bool EnterEvadeIfOutOfCombatArea(const uint32 uiDiff);
|
||||
|
||||
protected:
|
||||
bool CombatMovement;
|
||||
|
||||
private:
|
||||
bool m_bCombatMovement;
|
||||
uint32 m_uiEvadeCheckCooldown;
|
||||
};
|
||||
|
||||
@@ -205,8 +205,6 @@ struct TRINITY_DLL_DECL Scripted_NoMovementAI : public ScriptedAI
|
||||
{
|
||||
Scripted_NoMovementAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
//Called if IsVisible(Unit *who) is true at each *who move
|
||||
//void MoveInLineOfSight(Unit* who);
|
||||
|
||||
//Called at each attack of m_creature by any victim
|
||||
void AttackStart(Unit* who);
|
||||
|
||||
Reference in New Issue
Block a user