Misc fixes
This commit is contained in:
@@ -376,15 +376,11 @@ namespace Game.AI
|
|||||||
public void Start(bool isActiveAttacker = true, bool run = false, ObjectGuid playerGUID = default, Quest quest = null, bool instantRespawn = false, bool canLoopPath = false, bool resetWaypoints = true)
|
public void Start(bool isActiveAttacker = true, bool run = false, ObjectGuid playerGUID = default, Quest quest = null, bool instantRespawn = false, bool canLoopPath = false, bool resetWaypoints = true)
|
||||||
{
|
{
|
||||||
// Queue respawn from the point it starts
|
// Queue respawn from the point it starts
|
||||||
Map map = me.GetMap();
|
CreatureData cdata = me.GetCreatureData();
|
||||||
if (map != null)
|
if (cdata != null)
|
||||||
{
|
{
|
||||||
CreatureData cdata = me.GetCreatureData();
|
if (WorldConfig.GetBoolValue(WorldCfg.RespawnDynamicEscortNpc) && cdata.spawnGroupData.flags.HasFlag(SpawnGroupFlags.EscortQuestNpc))
|
||||||
if (cdata != null)
|
me.SaveRespawnTime(me.GetRespawnDelay());
|
||||||
{
|
|
||||||
if (WorldConfig.GetBoolValue(WorldCfg.RespawnDynamicEscortNpc) && cdata.spawnGroupData.flags.HasFlag(SpawnGroupFlags.EscortQuestNpc))
|
|
||||||
me.SaveRespawnTime(me.GetRespawnDelay());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (me.IsEngaged())
|
if (me.IsEngaged())
|
||||||
|
|||||||
@@ -180,15 +180,11 @@ namespace Game.AI
|
|||||||
|
|
||||||
public void StartFollow(Player player, uint factionForFollower = 0, Quest quest = null)
|
public void StartFollow(Player player, uint factionForFollower = 0, Quest quest = null)
|
||||||
{
|
{
|
||||||
Map map = me.GetMap();
|
CreatureData cdata = me.GetCreatureData();
|
||||||
if (map != null)
|
if (cdata != null)
|
||||||
{
|
{
|
||||||
CreatureData cdata = me.GetCreatureData();
|
if (WorldConfig.GetBoolValue(WorldCfg.RespawnDynamicEscortNpc) && cdata.spawnGroupData.flags.HasFlag(SpawnGroupFlags.EscortQuestNpc))
|
||||||
if (cdata != null)
|
me.SaveRespawnTime(me.GetRespawnDelay());
|
||||||
{
|
|
||||||
if (WorldConfig.GetBoolValue(WorldCfg.RespawnDynamicEscortNpc) && cdata.spawnGroupData.flags.HasFlag(SpawnGroupFlags.EscortQuestNpc))
|
|
||||||
me.SaveRespawnTime(me.GetRespawnDelay());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (me.IsEngaged())
|
if (me.IsEngaged())
|
||||||
|
|||||||
@@ -665,8 +665,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
Unit target;
|
Unit target;
|
||||||
// @todo this hack with search required until GO casting not implemented
|
// @todo this hack with search required until GO casting not implemented
|
||||||
Unit owner = GetOwner();
|
if (GetOwner() != null)
|
||||||
if (owner)
|
|
||||||
{
|
{
|
||||||
// Hunter trap: Search units which are unfriendly to the trap's owner
|
// Hunter trap: Search units which are unfriendly to the trap's owner
|
||||||
var checker = new NearestAttackableNoTotemUnitInObjectRangeCheck(this, radius);
|
var checker = new NearestAttackableNoTotemUnitInObjectRangeCheck(this, radius);
|
||||||
|
|||||||
@@ -1506,12 +1506,8 @@ namespace Game.Spells
|
|||||||
{
|
{
|
||||||
case SpellTargetObjectTypes.Unit:
|
case SpellTargetObjectTypes.Unit:
|
||||||
case SpellTargetObjectTypes.UnitAndDest:
|
case SpellTargetObjectTypes.UnitAndDest:
|
||||||
if (!m_spellInfo.HasAttribute(SpellAttr2.CanTargetDead))
|
retMask &= GridMapTypeMask.Player | GridMapTypeMask.Creature;
|
||||||
{
|
break;
|
||||||
retMask &= GridMapTypeMask.Player | GridMapTypeMask.Creature;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
goto case SpellTargetObjectTypes.Corpse;
|
|
||||||
case SpellTargetObjectTypes.Corpse:
|
case SpellTargetObjectTypes.Corpse:
|
||||||
case SpellTargetObjectTypes.CorpseEnemy:
|
case SpellTargetObjectTypes.CorpseEnemy:
|
||||||
case SpellTargetObjectTypes.CorpseAlly:
|
case SpellTargetObjectTypes.CorpseAlly:
|
||||||
|
|||||||
Reference in New Issue
Block a user