Код:
src/game/CreatureEventAI.cpp
@@ -677,20 +677,17 @@
EnterEvadeMode();
break;
case ACTION_T_FLEE_FOR_ASSIST:
- m_creature->DoFleeToGetAssistance();
+ if (m_creature->CanFreeMove())
+ m_creature->DoFleeToGetAssistance();
break;
case ACTION_T_QUEST_EVENT_ALL:
if (pActionInvoker && pActionInvoker->GetTypeId() == TYPEID_PLAYER)
((Player*)pActionInvoker)->GroupEventHappens(action.quest_event_all.questId,m_creature);
break;
case ACTION_T_CAST_EVENT_ALL:
- {
- ThreatList const& threatList = m_creature->getThreatManager().getThreatList();
- for (ThreatList::const_iterator i = threatList.begin(); i != threatList.end(); ++i)
- if (Player* temp = m_creature->GetMap()->GetPlayer((*i)->getUnitGuid()))
- temp->CastedCreatureOrGO(action.cast_event_all.creatureId, m_creature->GetObjectGuid(), action.cast_event_all.spellId);
+ if (pActionInvoker && pActionInvoker->GetTypeId() == TYPEID_PLAYER)
+ ((Player*)pActionInvoker)->CastedCreatureOrGO(action.cast_event_all.creatureId, m_creature->GetObjectGuid(), action.cast_event_all.spellId);
break;
- }
case ACTION_T_REMOVEAURASFROMSPELL:
if (Unit* target = GetTargetByType(action.remove_aura.target, pActionInvoker))
target->RemoveAurasDueToSpell(action.remove_aura.spellId);
Первая часть запрещает "страх" для юнитов, что не могут бежать (например в стуне).
Вторая часть разрешает ивент игроку, который еще не в агролисте.
Код:
src/game/Unit.cpp
@@ -1062,7 +1062,7 @@
}
}
- if (damagetype != NODAMAGE && damage && pVictim->GetTypeId() == TYPEID_PLAYER)
+ if (damagetype != NODAMAGE && damage)
{
if( damagetype != DOT )
{
Разрешает сбить канальный спел с юнита игроку.