Skip to content
Snippets Groups Projects
Commit f31d7da3 authored by Juris's avatar Juris
Browse files

Fix for http://www.l2jserver.com/forum/viewtopic.php?f=77&t=30681

The error occurs because Q211 and Q212 save the value as boolean,
while all other quests store it as integer.
parent 8fb410b1
No related branches found
No related tags found
No related merge requests found
......@@ -111,10 +111,10 @@ public final class Q00211_TrialOfTheChallenger extends Quest
if (qs.isCreated())
{
final PlayerVariables vars = player.getVariables();
if (!vars.getBoolean("2ND_CLASS_DIAMOND_REWARD", false))
if (vars.getInt("2ND_CLASS_DIAMOND_REWARD", 0) == 0)
{
giveItems(player, DIMENSIONAL_DIAMONDS);
vars.set("2ND_CLASS_DIAMOND_REWARD", true);
vars.set("2ND_CLASS_DIAMOND_REWARD", 1);
htmltext = event;
}
else
......@@ -339,10 +339,10 @@ public final class Q00211_TrialOfTheChallenger extends Quest
// redundant retail check - already rewarded at beginning of quest
final PlayerVariables vars = talker.getVariables();
if (!vars.getBoolean("2ND_CLASS_DIAMOND_REWARD", false))
if (vars.getInt("2ND_CLASS_DIAMOND_REWARD", 0) == 0)
{
giveItems(talker, DIMENSIONAL_DIAMONDS);
vars.set("2ND_CLASS_DIAMOND_REWARD", true);
vars.set("2ND_CLASS_DIAMOND_REWARD", 1);
}
talker.sendPacket(new SocialAction(talker.getObjectId(), 3));
......
......@@ -570,7 +570,7 @@ public final class Q00212_TrialOfDuty extends Quest
{
final PlayerVariables vars = player.getVariables();
if (!vars.getBoolean("2ND_CLASS_DIAMOND_REWARD", false))
if (vars.getInt("2ND_CLASS_DIAMOND_REWARD", 0) == 0)
{
if (player.getClassId() == ClassId.knight)
{
......@@ -581,7 +581,7 @@ public final class Q00212_TrialOfDuty extends Quest
rewardItems(player, DIMENSIONAL_DIAMOND, 61);
}
vars.set("2ND_CLASS_DIAMOND_REWARD", true);
vars.set("2ND_CLASS_DIAMOND_REWARD", 1);
return true;
}
return false;
......
UPDATE `character_quests` SET `value` = '1' WHERE `var` = '2ND_CLASS_DIAMOND_REWARD' AND `value` = 'true';
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment