Fixed infinite loop with DoBattleAction. Added some casting logic.

This commit is contained in:
Filip Maj 2017-08-29 00:33:23 -04:00
parent d81832f256
commit 67485eafc0
5 changed files with 106 additions and 78 deletions

View file

@ -197,7 +197,7 @@ namespace FFXIVClassic_Map_Server.Actors
{
if (actions.Length - currentIndex >= 18)
BattleActionX18Packet.BuildPacket(actorId, animationId, commandId, actions, ref currentIndex);
else if (actions.Length - currentIndex >= 1)
else if (actions.Length - currentIndex > 1)
BattleActionX10Packet.BuildPacket(actorId, animationId, commandId, actions, ref currentIndex);
else if (actions.Length - currentIndex == 1)
{
@ -218,7 +218,7 @@ namespace FFXIVClassic_Map_Server.Actors
{
if (actions.Count - currentIndex >= 18)
BattleActionX18Packet.BuildPacket(actorId, animationId, commandId, actions, ref currentIndex);
else if (actions.Count - currentIndex >= 1)
else if (actions.Count - currentIndex > 1)
BattleActionX10Packet.BuildPacket(actorId, animationId, commandId, actions, ref currentIndex);
else if (actions.Count - currentIndex == 1)
{