Misc fixes

This commit is contained in:
hondacrx
2021-03-04 12:00:58 -05:00
parent 2949a2514c
commit 0fdab8635d
8 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -2687,7 +2687,7 @@ namespace Game.Entities
Log.outError(LogFilter.Player, "Player (guidlow {0}) have invalid coordinates (MapId: {1} {2}). Teleport to default race/class locations.", guid.ToString(), mapId, GetPosition());
RelocateToHomebind();
}
else if (mapEntry != null && mapEntry.IsBattlegroundOrArena())
else if (mapEntry.IsBattlegroundOrArena())
{
Battleground currentBg = null;
if (m_bgData.bgInstanceID != 0) //saved in Battleground
+1 -1
View File
@@ -2460,7 +2460,7 @@ namespace Game.Entities
}
}
if (!released && IsBagPos(dst) && pDstItem != null)
if (!released && IsBagPos(dst))
{
Bag bag = pDstItem.ToBag();
for (byte i = 0; i < bag.GetBagSize(); ++i)
+2 -2
View File
@@ -898,7 +898,7 @@ namespace Game.Entities
break;
}
}
if (item != null && duration > 0)
if (duration > 0)
{
GetSession().SendItemEnchantTimeUpdate(GetGUID(), item.GetGUID(), (uint)slot, duration / 1000);
m_enchantDuration.Add(new EnchantDuration(item, slot, duration));
@@ -2202,7 +2202,7 @@ namespace Game.Entities
}
// now re-learn if need re-activate
if (cur_active && !prevSpell.Active && learnLowRank)
if (!prevSpell.Active && learnLowRank)
{
if (AddSpell(prev_id, true, false, prevSpell.Dependent, prevSpell.Disabled))
{
+1 -1
View File
@@ -4626,7 +4626,7 @@ namespace Game.Entities
if (pet == null)
return null;
if (IsInWorld && pet != null)
if (IsInWorld)
return pet;
}