L2JMobius

Free Users => Solved/Invalid Bug Reports => Topic started by: caioconc on June 30, 2020, 04:29:56 PM

Title: Rift dimensional
Post by: caioconc on June 30, 2020, 04:29:56 PM
hi, I found a "bug" while trying to return from the rift to my world.

https://streamable.com/85nh55
Title: Re: Rift dimensional
Post by: tse38 on June 30, 2020, 07:26:33 PM
I had the same problem when my chars werent registered on winning side
Title: Re: Rift dimensional
Post by: caioconc on July 01, 2020, 02:10:45 AM
but it is not the correct one!
think like this ... I left my character off, how am I going to get out?
Title: Re: Rift dimensional
Post by: Mobius on July 01, 2020, 02:45:54 AM
Is this related with https://l2jmobius.org/forum/index.php?topic=5123 ?

Try this.
Code: [Select]
Index: dist/game/data/scripts/teleports/OracleTeleport/OracleTeleport.java
===================================================================
--- dist/game/data/scripts/teleports/OracleTeleport/OracleTeleport.java (revision 7374)
+++ dist/game/data/scripts/teleports/OracleTeleport/OracleTeleport.java (working copy)
@@ -16,6 +16,7 @@
  */
 package teleports.OracleTeleport;
 
+import org.l2jmobius.commons.util.Rnd;
 import org.l2jmobius.gameserver.model.Location;
 import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
 import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -275,6 +276,14 @@
  htmltext = "rift_back.htm";
  st.exitQuest(true);
  }
+ else
+ {
+ final Location loc = RETURN_LOCS[Rnd.get(RETURN_LOCS.length)];
+ player.teleToLocation(loc.getX(), loc.getY(), loc.getZ());
+ htmltext = "rift_back_unknown.htm";
+ player.setIn7sDungeon(false);
+ st.exitQuest(true);
+ }
  }
  else if (event.equalsIgnoreCase("Festival"))
  {
Index: dist/game/data/scripts/teleports/OracleTeleport/rift_back_unknown.htm
===================================================================
--- dist/game/data/scripts/teleports/OracleTeleport/rift_back_unknown.htm (nonexistent)
+++ dist/game/data/scripts/teleports/OracleTeleport/rift_back_unknown.htm (working copy)
@@ -0,0 +1,4 @@
+<html><body>Rift Post:<br>
+I cannot find your original location.<br1>
+I will return you to a random return point.
+</body></html>
\ No newline at end of file
Title: Re: Rift dimensional
Post by: caioconc on July 01, 2020, 03:41:42 AM
tks
Title: Re: Rift dimensional
Post by: Mobius on July 01, 2020, 03:47:01 AM
Does it work?
Title: Re: Rift dimensional
Post by: caioconc on July 01, 2020, 03:59:49 AM
no :/
Title: Re: Rift dimensional
Post by: Mobius on July 01, 2020, 05:31:21 AM
New patch.
Code: [Select]
Index: dist/game/data/scripts/teleports/OracleTeleport/OracleTeleport.java
===================================================================
--- dist/game/data/scripts/teleports/OracleTeleport/OracleTeleport.java (revision 7374)
+++ dist/game/data/scripts/teleports/OracleTeleport/OracleTeleport.java (working copy)
@@ -16,6 +16,7 @@
  */
 package teleports.OracleTeleport;
 
+import org.l2jmobius.commons.util.Rnd;
 import org.l2jmobius.gameserver.model.Location;
 import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
 import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -275,6 +276,14 @@
  htmltext = "rift_back.htm";
  st.exitQuest(true);
  }
+ else
+ {
+ final Location loc = RETURN_LOCS[Rnd.get(RETURN_LOCS.length)];
+ player.teleToLocation(loc.getX(), loc.getY(), loc.getZ());
+ htmltext = "rift_back_unknown.htm";
+ player.setIn7sDungeon(false);
+ st.exitQuest(true);
+ }
  }
  else if (event.equalsIgnoreCase("Festival"))
  {
Index: dist/game/data/scripts/teleports/OracleTeleport/rift_back_unknown.htm
===================================================================
--- dist/game/data/scripts/teleports/OracleTeleport/rift_back_unknown.htm (nonexistent)
+++ dist/game/data/scripts/teleports/OracleTeleport/rift_back_unknown.htm (working copy)
@@ -0,0 +1,4 @@
+<html><body>Rift Post:<br>
+I cannot find your original location.<br1>
+I will return you to a random return point.
+</body></html>
\ No newline at end of file
Index: java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (revision 7383)
+++ java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (working copy)
@@ -1480,18 +1480,12 @@
  {
  event = "";
  }
-
- if (!_quests.containsKey(quest))
+ if (event.length() == 0)
  {
  return retval;
  }
 
  QuestState qs = getQuestState(quest);
- if ((qs == null) && (event.length() == 0))
- {
- return retval;
- }
-
  if (qs == null)
  {
  Quest q = null;
@@ -1506,9 +1500,10 @@
  }
  qs = q.newQuestState(this);
  }
- if ((qs != null) && (getLastQuestNpcObject() > 0))
+
+ if ((qs != null) && (_questNpcObject > 0))
  {
- final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
+ final WorldObject object = World.getInstance().findObject(_questNpcObject);
  if ((object instanceof NpcInstance) && isInsideRadius(object, NpcInstance.INTERACTION_DISTANCE, false, false))
  {
  final NpcInstance npc = (NpcInstance) object;
@@ -1523,7 +1518,6 @@
  {
  showQuestWindow(quest, State.getStateName(qs.getState()));
  }
-
  retval = qs;
  }
  }
Index: java/org/l2jmobius/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- java/org/l2jmobius/gameserver/network/clientpackets/RequestBypassToServer.java (revision 7374)
+++ java/org/l2jmobius/gameserver/network/clientpackets/RequestBypassToServer.java (working copy)
@@ -295,6 +295,15 @@
  }
  else
  {
+ final WorldObject object = player.getTarget();
+ if ((object instanceof NpcInstance) && (player.getLastQuestNpcObject() != object.getObjectId()))
+ {
+ final WorldObject lastQuestNpc = World.getInstance().findObject(player.getLastQuestNpcObject());
+ if ((lastQuestNpc != null) && !player.isInsideRadius(lastQuestNpc, NpcInstance.INTERACTION_DISTANCE, false, false))
+ {
+ player.setLastQuestNpcObject(object.getObjectId());
+ }
+ }
  player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim());
  }
  }
Title: Re: Rift dimensional
Post by: caioconc on July 01, 2020, 06:51:53 AM
 ;D ;D ;D ;D
tkssssss...
Title: Re: Rift dimensional
Post by: Mobius on July 02, 2020, 06:07:45 AM
Fixed with https://bitbucket.org/MobiusDev/l2j_mobius/commits/7a5deb4d68b1d3fb37849aab715f2084c390854a