L2JMobius

Free Users => Shares/Contributions => Topic started by: Street on February 22, 2023, 11:44:50 PM

Title: Mistake in Mission Level
Post by: Street on February 22, 2023, 11:44:50 PM
Can't get old information about Mission Level, because we trying restore information from the key. Need to replace it with the value.
Code: [Select]
final String variable = PlayerVariables.MISSION_LEVEL_PROGRESS + MissionLevel.getInstance().getCurrentSeason();
if (getVariables().hasVariable(variable))
{
_missionLevelProgress = new MissionLevelPlayerDataHolder(getVariables().getString(variable));
Title: Re: Mistake in Mission Level
Post by: Paiplayer on February 22, 2023, 11:54:48 PM
Can't get old information about Mission Level, because we trying restore information from the key. Need to replace it with the value.
Code: [Select]
final String variable = PlayerVariables.MISSION_LEVEL_PROGRESS + MissionLevel.getInstance().getCurrentSeason();
if (getVariables().hasVariable(variable))
{
_missionLevelProgress = new MissionLevelPlayerDataHolder(getVariables().getString(variable));

Can you be more specific with what you talking about, wich file need to be changed or, at least, one patch option?



-- Edit

Go'ed some hous later to check this out and found @ java\org\l2jmobius\gameserver\model\actor\Player.java line 15665 . There's the DIFF:


Code: [Select]
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/Player.java
index 88ba4c6..223445b 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/Player.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/Player.java

@@ -15655,7 +15662,7 @@
  final String variable = PlayerVariables.MISSION_LEVEL_PROGRESS + MissionLevel.getInstance().getCurrentSeason();
  if (getVariables().hasVariable(variable))
  {
- _missionLevelProgress = new MissionLevelPlayerDataHolder(variable);
+ _missionLevelProgress = new MissionLevelPlayerDataHolder(getVariables().getString(variable));
  }
  else
  {

Tested and it really fixed the Missions Tab. Congrats, @Street!