Revert "Updates Packets & Randomizer (#43)" (#61)

This reverts commit 179cb50557.
This commit is contained in:
Kamron Batman 2019-11-11 08:46:11 -08:00 • committed by GitHub
parent 179cb50557
commit c2ecc76457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
588 changed files with 16260 additions and 10926 deletions

View file

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Engines.ConPVP;
using Server.Items;
using Server.Network;
@ -12,7 +11,7 @@ namespace Server.Spells
{
public abstract class SpecialMove
{
private static readonly Dictionary<Mobile, SpecialMoveContext> m_PlayersTable = new Dictionary<Mobile, SpecialMoveContext>();
private static Dictionary<Mobile, SpecialMoveContext> m_PlayersTable = new Dictionary<Mobile, SpecialMoveContext>();
public virtual int BaseMana => 0;
@ -182,8 +181,13 @@ namespace Server.Spells
public static void ClearAllMoves(Mobile m)
{
foreach (var (moveID, _) in SpellRegistry.SpecialMoves.Where(kvp => kvp.Key != -1))
Packets.SendToggleSpecialAbility(m.NetState, (short)(moveID + 1), false);
foreach (KeyValuePair<int, SpecialMove> kvp in SpellRegistry.SpecialMoves)
{
int moveID = kvp.Key;
if (moveID != -1)
m.Send(new ToggleSpecialAbility(moveID + 1, false));
}
}
public static SpecialMove GetCurrentMove(Mobile m)
@ -238,7 +242,7 @@ namespace Server.Spells
int moveID = SpellRegistry.GetRegistryNumber(move);
if (moveID > 0)
Packets.SendToggleSpecialAbility(m.NetState, (short)(moveID + 1), true);
m.Send(new ToggleSpecialAbility(moveID + 1, true));
TextDefinition.SendMessageTo(m, move.AbilityMessage);
}
@ -255,7 +259,7 @@ namespace Server.Spells
int moveID = SpellRegistry.GetRegistryNumber(move);
if (moveID > 0)
Packets.SendToggleSpecialAbility(m.NetState, (short)(moveID + 1), false);
m.Send(new ToggleSpecialAbility(moveID + 1, false));
}
Table.Remove(m);