I just added in pvp zones to get pvp point. But it does not update istant. The pvp winner must teleport or die so his pvps update +1. So i would like it to update instant if its possible.
l2jaCis
Here is the code:
// If in pvp zone, add pvp point.
if (isInsideZone(ZoneId.PVP) && targetPlayer.isInsideZone(ZoneId.PVP))
{
setPvpKills(getPvpKills() + 1);
// Until the zone was a siege zone. Check also if victim was a player. Randomers aren't counted.
if (target instanceof L2PcInstance && getSiegeState() > 0 && targetPlayer.getSiegeState() > 0 && getSiegeState() != targetPlayer.getSiegeState())
{
// Now check clan relations.
final L2Clan killerClan = getClan();
if (killerClan != null)
killerClan.setSiegeKills(killerClan.getSiegeKills() + 1);
final L2Clan targetClan = targetPlayer.getClan();
if (targetClan != null)
targetClan.setSiegeDeaths(targetClan.getSiegeDeaths() + 1);
}
return;
}
Question
MaDu7zU
Hello Guys!
I just added in pvp zones to get pvp point. But it does not update istant. The pvp winner must teleport or die so his pvps update +1. So i would like it to update instant if its possible.
l2jaCis
Here is the code:
// If in pvp zone, add pvp point. if (isInsideZone(ZoneId.PVP) && targetPlayer.isInsideZone(ZoneId.PVP)) { setPvpKills(getPvpKills() + 1); // Until the zone was a siege zone. Check also if victim was a player. Randomers aren't counted. if (target instanceof L2PcInstance && getSiegeState() > 0 && targetPlayer.getSiegeState() > 0 && getSiegeState() != targetPlayer.getSiegeState()) { // Now check clan relations. final L2Clan killerClan = getClan(); if (killerClan != null) killerClan.setSiegeKills(killerClan.getSiegeKills() + 1); final L2Clan targetClan = targetPlayer.getClan(); if (targetClan != null) targetClan.setSiegeDeaths(targetClan.getSiegeDeaths() + 1); } return; }
Okay i just found the problem!
I added this line:
setPvpKills(getPvpKills() + 1); + sendPacket(new UserInfo(this));
Any mod please close the topic. Dont delete it, maybe helps someone. :)
Thank you!
Edited by MaDu7zU1 answer to this question
Recommended Posts