fix(DB/Core): quest chain leading to "Battle for the Undercity" (#1629)

This commit is contained in:
Stoabrogga
2019-03-27 00:01:52 +01:00
committed by Nefertumm
parent f55f90a35f
commit 6380500b33
3 changed files with 300 additions and 2 deletions

View File

@@ -3794,6 +3794,8 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
if ((e.event.los.noHostile && !me->IsHostileTo(unit)) ||
(!e.event.los.noHostile && me->IsHostileTo(unit)))
{
if (e.event.los.playerOnly && unit->GetTypeId() != TYPEID_PLAYER)
return;
RecalcTimer(e, e.event.los.cooldownMin, e.event.los.cooldownMax);
ProcessAction(e, unit);
}
@@ -3814,6 +3816,8 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
if ((e.event.los.noHostile && !me->IsHostileTo(unit)) ||
(!e.event.los.noHostile && me->IsHostileTo(unit)))
{
if (e.event.los.playerOnly && unit->GetTypeId() != TYPEID_PLAYER)
return;
RecalcTimer(e, e.event.los.cooldownMin, e.event.los.cooldownMax);
ProcessAction(e, unit);
}

View File

@@ -98,7 +98,7 @@ enum SMART_EVENT
SMART_EVENT_EVADE = 7, // NONE
SMART_EVENT_SPELLHIT = 8, // SpellID, School, CooldownMin, CooldownMax
SMART_EVENT_RANGE = 9, // MinDist, MaxDist, RepeatMin, RepeatMax
SMART_EVENT_OOC_LOS = 10, // NoHostile, MaxRnage, CooldownMin, CooldownMax
SMART_EVENT_OOC_LOS = 10, // NoHostile, MaxRnage, CooldownMin, CooldownMax, PlayerOnly
SMART_EVENT_RESPAWN = 11, // type, MapId, ZoneId
SMART_EVENT_TARGET_HEALTH_PCT = 12, // HPMin%, HPMax%, RepeatMin, RepeatMax
SMART_EVENT_VICTIM_CASTING = 13, // RepeatMin, RepeatMax, spellid
@@ -114,7 +114,7 @@ enum SMART_EVENT
SMART_EVENT_HAS_AURA = 23, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
SMART_EVENT_TARGET_BUFFED = 24, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
SMART_EVENT_RESET = 25, // Called after combat, when the creature respawn and spawn.
SMART_EVENT_IC_LOS = 26, // NoHostile, MaxRnage, CooldownMin, CooldownMax
SMART_EVENT_IC_LOS = 26, // NoHostile, MaxRnage, CooldownMin, CooldownMax, PlayerOnly
SMART_EVENT_PASSENGER_BOARDED = 27, // CooldownMin, CooldownMax
SMART_EVENT_PASSENGER_REMOVED = 28, // CooldownMin, CooldownMax
SMART_EVENT_CHARMED = 29, // NONE
@@ -208,6 +208,7 @@ struct SmartEvent
uint32 maxDist;
uint32 cooldownMin;
uint32 cooldownMax;
uint32 playerOnly;
} los;
struct