As far as I know it is part of the kill packet. If you are using the projectx source, the data value is hardcoded 0 or should be. Simply change that value to kill count and it should work.
I changed that. And, as I said, it works if the other kills while you're seeing it. But, when the other enters your screen, initial KO count above his head is 0. Only after killing another mob that one is updated (naturally, since a new kill packet is send).
I just wonder how to see the KO count above the other player head with the current value right from spawn. Maybe sending a fake kill packet?
/// <summary>
/// The XP kills holder
/// </summary>
private int _xpkills;
/// <summary>
/// Gets or sets the XP kills
/// </summary>
public int XPKills
{
get { return _xpkills; }
set { _xpkills = value; }
}
In ProjectX_V3_Game\Packets\Interaction\Battle\Combat .cs public static void Kill(Entities.IEntity attacker, Entities.IEntity attacked, uint damage = 0)
Code:
using (var killpacket = new Packets.InteractionPacket())
{
killpacket.Action = Enums.InteractAction.Kill;
killpacket.TargetUID = attacked.EntityUID;
killpacket.X = attacked.X;
killpacket.Y = attacked.Y;
if (attacker != null)
{
killpacket.EntityUID = attacker.EntityUID;
// Possible flag check can be added here. Depends on how you have your XP system build.
killpacket.KoCount = (ushort)(attacker as Entities.GameClient).XPKills;
attacker.Screen.UpdateScreen(killpacket);
if (attacker is Entities.GameClient)
(attacker as Entities.GameClient).Send(killpacket);
}
else
{
killpacket.EntityUID = 0;
attacked.Screen.UpdateScreen(killpacket);
if (attacked is Entities.GameClient)
(attacked as Entities.GameClient).Send(killpacket);
}
}
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.
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.
That's what happens on official conquer. If you first go on screen of someone with a KO count it shows as 0 till they kill something IIRC.
The client only knows your KO count when you actually kill a monster and the kill packet is sent (to screen)
[Mini-Release] Player Count & Guild Identifier 10/13/2014 - Flyff PServer Guides & Releases - 22 Replies Channel Player Count
Look for this void CWndSelectServer::OnInitialUpdate()
do this one:
if( g_dpCertified.m_aServerset.dwParent == pServerDesc->dwID )
{
lCount = g_dpCertified.m_aServerset.lCount;
lMax = g_dpCertified.m_aServerset.lMax;
Getting player count out of gamelist 02/09/2013 - Diablo 2 Programming - 0 Replies hi all,
is there any possibility to get the players count out of the gamelist (before joining random game)?
http://i.epvpimg.com/Fc6Wg.jpg
thx for your help :)
[Question] About Ctf / Ba player count 12/31/2012 - SRO Private Server - 4 Replies How to make it from 8 vs 8 to another number , eg :3 vs 3 , does anybody know .
Single spawn / group spawn player problem 11/05/2012 - SRO Coding Corner - 15 Replies Hey guys,
I try to parse the player spawn packets so i can get the playerames / guildnames and items.
Now im almost got all the information more sometimes my parser fails when ppl teleported.
Is there something that i missed after a player teleported ?
My parse code: public static void ParseChar(PacketReader packet, uint model) { - Pastebin.com