L2JMobius

C6 Gate Chant - summons just one player from party

ver · 8 · 6754

Offline ver

  • Knight
  • ***
    • Posts: 70
Gate Chant skill (1429) suppose to be summoning all party members. At least the code is "trying" to do so.
Unfortunatelly some exception is thrown and effect is stopping right after the first party member.

Exactly here:
L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java:248 
targetPlayer.teleportRequest(null, null);

I've tried to investigate this issue, but Im not so skilled in Java... So far I've found that teleportRequest method of PlayerInstance is fallin at like L2J_Mobius_C6_Interlude\java\org\l2jmobius\gameserver\model\actor\instance\PlayerInstance.java:13170
_summonRequest.setTarget(requester, skill);

where both requester and skill values are null.

However after removing targetPlayer.teleportRequest(null, null); skill does teleport all party members, unfortunatelly they are all assigned as "in same location" (dunno exactly) and teleporting'em again does not work.
I've also tried to getMessage of throwed exception - unfortunatelly "null" ;(


Any hints and thoughts would be appreciated!

Best regards


Offline ver

  • Knight
  • ***
    • Posts: 70
This bug exists in SummonRequestHolder class (L2J_Mobius_C6_Interlude\java\org\l2jmobius\gameserver\model\holders\SummonRequestHolder.java).

in line 35:
_location = new Location(summoner.getX(), summoner.getY(), summoner.getZ(), summoner.getHeading());

If can't be done that way because summoner variable is passed as null, so getX, getY.. methods wont work.

I made this as a simple workaround... which works (I know  summoner might be checked more precisely with PlayerInstance or something):
if (summoner != null) {
    _location = new Location(summoner.getX(), summoner.getY(), summoner.getZ(), summoner.getHeading());
} else {
    _location = Location.DUMMY_LOC;
}


Best regards!

ps. sorry for no patch file



Online Mobius

  • Distinguished King
  • *****
    • Posts: 16052
Have you tried this?
Code: [Select]
Index: java/org/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java
===================================================================
--- java/org/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java (revision 7754)
+++ java/org/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java (working copy)
@@ -245,7 +245,7 @@
  else
  {
  PlayerInstance.teleToTarget(targetPlayer, activePlayer, activePlayer.getLocation(), skill);
- targetPlayer.teleportRequest(null, null);
+ targetPlayer.teleportRequest(activePlayer, skill);
  }
  }
  }


Offline ver

  • Knight
  • ***
    • Posts: 70
I didnt try it...
But lookin at teleportRequest method it will return false. It will be pretty much same as not calling it which I tried and it didn't work cuz
 playerInstance._summonRequest._summoner suppose to be set to null.


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16052

Offline ver

  • Knight
  • ***
    • Posts: 70
It worked. Thanks.

However... dunno if its matter, but just wanted to mention that
PlayerInstance.teleportAnswer() method contains simmilar call (line 13139):
_summonRequest.setTarget(null, null);



Online Mobius

  • Distinguished King
  • *****
    • Posts: 16052