/// <summary> /// Simple skill cancel. /// </summary> /// <param name="client"></param> /// <param name="creature"></param> public static void SkillCancel(Client client, MabiCreature creature) { var packet = new MabiPacket(Op.SkillCancel, creature.Id); packet.PutBytes(0, 1); client.Send(packet); }
/// <summary> /// Broadcasts WalkTo. If to is null, the creature's position is used. /// </summary> /// <param name="wm"></param> /// <param name="creature"></param> public static void WalkTo(MabiCreature creature, MabiVertex to = null) { var pos = creature.GetPosition(); var p = new MabiPacket(Op.WalkTo, creature.Id); p.PutInts(pos.X, pos.Y); // From p.PutInts(pos.X, pos.Y); // To p.PutBytes(1, 0); WorldManager.Instance.Broadcast(p, SendTargets.Range, creature); }
/// <summary> /// Updates the stack amount (how many uses left). /// </summary> /// <param name="creature"></param> /// <param name="skillId"></param> /// <param name="remaining"></param> /// <param name="max"></param> public static void SkillStackUpdate(Client client, MabiCreature creature, SkillConst skillId, byte remaining) { var packet = new MabiPacket(Op.SkillStackUpdate, creature.Id); packet.PutBytes(remaining, 1, 0); packet.PutShort((ushort)skillId); client.Send(packet); }
public static void SkillStackSet(Client client, MabiCreature creature, SkillConst skillId, byte stack) { var packet = new MabiPacket(Op.SkillStackSet, creature.Id); packet.PutBytes(creature.ActiveSkillStacks, 1); packet.PutShort((ushort)creature.ActiveSkillId); client.Send(packet); }