Jump to content
  • 0

Add/Update PvP point in Arena


Question

Posted (edited)

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 MaDu7zU

1 answer to this question

Recommended Posts

  • 0
Posted (edited)
1 hour ago, MaDu7zU said:

Here is the code:


		setPvpKills(getPvpKills() + 1);
+		sendPacket(new UserInfo(this));

Any mod please close the topic. Dont delete it, maybe helps someone. :)

Thank you!

 

Locked.

 

Just for marking the answer (since i can't mark as answer the first topic):

 

sendPacket(new UserInfo(this));
Edited by Solomun
  • Thanks 1
Guest
This topic is now closed to further replies.
×
×
  • Create New...