Pets gain XP from far away, is this normal ?
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 60
- Joined: Tue Aug 23, 2011 5:20 pm
Pets gain XP from far away, is this normal ?
Hi.
I tryed search, no luck, i tryed search google, no luck either, lots of topics but no one talking about this.
Wolfs and pets gain xp of the player, even if they are so far away you cant see them.
For example, you leave pet in giran, and you run all the way to dion, and kill there, pet will recieve xp.
I dont know if its a bug or if its ok like this.
Anyone knows ? thanks in advance.
I tryed search, no luck, i tryed search google, no luck either, lots of topics but no one talking about this.
Wolfs and pets gain xp of the player, even if they are so far away you cant see them.
For example, you leave pet in giran, and you run all the way to dion, and kill there, pet will recieve xp.
I dont know if its a bug or if its ok like this.
Anyone knows ? thanks in advance.
- Tryskell
- Posts: 256
- Joined: Wed Nov 25, 2009 5:57 pm
- Location: France :)
Re: Pets gain XP from far away, is this normal ?
PcStat.java
Edit that section to add a isInsideRadius( check :
Added to that I must add a summon (in L2OFF) which is too far is automatically teleported to you after a while (around 10secs). No clue about pets, to be honest.
Code: Select all
public boolean addExpAndSp(long addToExp, int addToSp, boolean useBonuses)
Code: Select all
if (!pet.isDead()) pet.addExpAndSp((long) (addToExp * (1 - ratioTakenByPlayer)), (int) (addToSp * (1 - ratioTakenByPlayer)));
- MELERIX
- L2j Veteran
- Posts: 6667
- Joined: Sat Sep 23, 2006 11:31 pm
- Location: Chile
- Contact:
- Tryskell
- Posts: 256
- Joined: Wed Nov 25, 2009 5:57 pm
- Location: France :)
Re: Pets gain XP from far away, is this normal ?
MELERIX wrote:radius in retail is 1000 (party radius)
Code: Select all
if (!pet.isDead() && pet.isInsideRadius(activeChar, 1000, true, false)) pet.addExpAndSp((long) (addToExp * (1 - ratioTakenByPlayer)), (int) (addToSp * (1 - ratioTakenByPlayer)));
Second boolean (false) will check >= 1000 instead of > 1000.
Untested, but -1 reason it doesn't work.
- Szponiasty
- Advanced User
- Posts: 557
- Joined: Mon Apr 21, 2008 1:31 pm
- Location: Eastern Poland
Re: Pets gain XP from far away, is this normal ?
isInsideRadius does not check geodata los. so 1000 radius up/down, through walls, cellings, floorsTryskell wrote:MELERIX wrote:radius in retail is 1000 (party radius)First boolean (true) check Z too (to avoid exploits at ToI or such vertical places).Code: Select all
if (!pet.isDead() && pet.isInsideRadius(activeChar, 1000, true, false)) pet.addExpAndSp((long) (addToExp * (1 - ratioTakenByPlayer)), (int) (addToSp * (1 - ratioTakenByPlayer)));
Second boolean (false) will check >= 1000 instead of > 1000.
Untested, but -1 reason it doesn't work.
And in the next chronicle they went into space, fighting the evil empire... In a galaxy far, far away xD
- Tryskell
- Posts: 256
- Joined: Wed Nov 25, 2009 5:57 pm
- Location: France :)
Re: Pets gain XP from far away, is this normal ?
What would you need a LoS check on that ? It's exactly as party experience system share. There is no geodata stuff involved, lol. So yeah, 1k radius through anything .Szponiasty wrote:isInsideRadius does not check geodata los. so 1000 radius up/down, through walls, cellings, floorsTryskell wrote:MELERIX wrote:radius in retail is 1000 (party radius)First boolean (true) check Z too (to avoid exploits at ToI or such vertical places).Code: Select all
if (!pet.isDead() && pet.isInsideRadius(activeChar, 1000, true, false)) pet.addExpAndSp((long) (addToExp * (1 - ratioTakenByPlayer)), (int) (addToSp * (1 - ratioTakenByPlayer)));
Second boolean (false) will check >= 1000 instead of > 1000.
Untested, but -1 reason it doesn't work.
- MELERIX
- L2j Veteran
- Posts: 6667
- Joined: Sat Sep 23, 2006 11:31 pm
- Location: Chile
- Contact:
Re: Pets gain XP from far away, is this normal ?
that is not retail like, these things don't have geo check in retail.Tryskell wrote:First boolean (true) check Z too (to avoid exploits at ToI or such vertical places).
- Tryskell
- Posts: 256
- Joined: Wed Nov 25, 2009 5:57 pm
- Location: France :)
Re: Pets gain XP from far away, is this normal ?
Put false then, I explained the whole method .MELERIX wrote:that is not retail like, these things don't have geo check in retail.Tryskell wrote:First boolean (true) check Z too (to avoid exploits at ToI or such vertical places).
And you can say whatever you want, current L2J check Z axis. The 4 times it is used, it checks Z axis. It's like smashing your own face with your hand because of wind.
Code: Select all
if (!Util.checkIfInRange(Config.ALT_PARTY_RANGE, this, ddealer, true))
I agree anyway the check wasn't the best, but still, following current L2J implementation, we got :
Code: Select all
if (!pet.isDead() && Util.checkIfInRange(1000, activeChar, pet, true)) pet.addExpAndSp((long) (addToExp * (1 - ratioTakenByPlayer)), (int) (addToSp * (1 - ratioTakenByPlayer)));
- MELERIX
- L2j Veteran
- Posts: 6667
- Joined: Sat Sep 23, 2006 11:31 pm
- Location: Chile
- Contact:
Re: Pets gain XP from far away, is this normal ?
well I just telling it, because I remember in retail party range don't care about walls/floor (no idea how is working currently in L2J).