Some refactoring of code. and some cleanups

This commit is contained in:
hondacrx
2019-09-21 12:11:16 -04:00
parent 7c405230cc
commit 35c06c09fd
214 changed files with 1235 additions and 1341 deletions
+3 -4
View File
@@ -20,7 +20,6 @@ using Game.DataStorage;
using Game.Groups;
using Game.Network.Packets;
using Game.Spells;
using System.Linq;
namespace Game.Entities
{
@@ -28,7 +27,7 @@ namespace Game.Entities
{
public Totem(SummonPropertiesRecord properties, Unit owner) : base(properties, owner, false)
{
m_unitTypeMask |= UnitTypeMask.Totem;
UnitTypeMask |= UnitTypeMask.Totem;
m_type = TotemType.Passive;
}
@@ -78,12 +77,12 @@ namespace Game.Entities
// Get spell cast by totem
SpellInfo totemSpell = Global.SpellMgr.GetSpellInfo(GetSpell());
if (totemSpell != null)
if (totemSpell.CalcCastTime(getLevel()) != 0) // If spell has cast time . its an active totem
if (totemSpell.CalcCastTime(GetLevel()) != 0) // If spell has cast time . its an active totem
m_type = TotemType.Active;
m_duration = duration;
SetLevel(GetOwner().getLevel());
SetLevel(GetOwner().GetLevel());
}
public override void InitSummon()