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