I have something similar;
In GameClient.cs
Code:
/// <summary>
/// Gets or sets the KOCount
/// </summary>
private ushort _kocount;
/// <summary>
/// Gets or sets the KO Task
/// </summary>
private uint _kotask;
/// <summary>
/// Gets or sets the KOCount
/// </summary>
/// <param name="KOCount"></param>
/// <returns></returns>
public ushort KOCount
{
get { return _kocount; }
set
{
_kocount = value;
}
}
/// <summary>
/// Gets or sets the KOTask
/// </summary>
/// <param name="KOTask"></param>
/// <returns></returns>
public uint KOTask
{
get { return _kotask; }
set
{
_kotask = value;
}
}
/// <summary>
/// Gets or sets the XPPct
/// </summary>
private byte _xppct;
/// <summary>
/// Gets or sets the XPPct
/// </summary>
/// <param name="XPPct"></param>
/// <returns></returns>
public byte XPPct
{
get { return _xppct; }
set
{
_xppct = (byte)(value > Core.NumericConst.MaxXPPct ? Core.NumericConst.MaxXPPct : value);
}
}
/// <summary>
/// Gets OnXP status.
/// </summary>
public bool OnXP
{
get {
return
ContainsFlag1(Enums.Effect1.Cyclone) ||
ContainsFlag1(Enums.Effect1.Superman) ||
ContainsFlag1(Enums.Effect1.FatalStrike);
}
}
In Combat.cs
Code:
using (var killpacket = new Packets.InteractionPacket())
{
killpacket.Action = Enums.InteractAction.Kill;
killpacket.TargetUID = attacked.EntityUID;
killpacket.X = attacked.X;
killpacket.Y = attacked.Y;
killpacket.Data = 1;
if (attacker != null)
{
killpacket.EntityUID = attacker.EntityUID;
attacker.Screen.UpdateScreen(killpacket);
if (attacker is Entities.GameClient)
{
(attacker as Entities.GameClient).XPPct += 1;
if ((attacker as Entities.GameClient).OnXP)
{
(attacker as Entities.GameClient).KOCount += 1;
ProjectX_V3_Lib.Threading.DelayedTask.Postpone((attacker as Entities.GameClient).KOTask, 1000);
killpacket.KoCount = (attacker as Entities.GameClient).KOCount;
}
//(attacker as Entities.GameClient).Send(killpacket);
(attacker as Entities.GameClient).SendToScreen(killpacket,true);
}
}
else
{
killpacket.EntityUID = 0;
attacked.Screen.UpdateScreen(killpacket);
if (attacked is Entities.GameClient)
(attacked as Entities.GameClient).Send(killpacket);
}
}
I've changed
Code:
(attacker as Entities.GameClient).Send(killpacket);
to
Code:
(attacker as Entities.GameClient).SendToScreen(killpacket,true);
so the others can see your KO count, when you're killing a mob.
Aceking, I'll check Redux, thanks. Or I'll see what I can do in spawn packet, to send a fake interact packet with the KO count from there, if the spawned client is OnXP.