Core/Refactor: Part 4

This commit is contained in:
hondacrx
2018-05-27 15:40:06 -04:00
parent d94ad385b1
commit 2c3479c6e2
59 changed files with 159 additions and 223 deletions
+4 -3
View File
@@ -1374,9 +1374,8 @@ namespace Game.Spells
bool searchInWorld = containerMask.HasAnyFlag(GridMapTypeMask.Creature | GridMapTypeMask.Player | GridMapTypeMask.Corpse);
if (searchInGrid || searchInWorld)
{
float x, y;
x = pos.GetPositionX();
y = pos.GetPositionY();
float x = pos.GetPositionX();
float y = pos.GetPositionY();
CellCoord p = GridDefines.ComputeCellCoord(x, y);
Cell cell = new Cell(p);
@@ -1768,6 +1767,8 @@ namespace Game.Spells
if (effect != null && (effectMask & (1 << (int)effect.EffectIndex)) != 0 && CheckEffectTarget(item, effect))
validEffectMask |= 1u << (int)effect.EffectIndex;
effectMask &= validEffectMask;
// no effects left
if (effectMask == 0)
return;