Merge pull request #97 from Jamix77/master

Fixes.
This commit is contained in:
Daniel Ginovker 2020-02-23 10:02:49 -05:00 committed by GitHub
commit d349e912c2
6 changed files with 20 additions and 3 deletions

View file

@ -76,10 +76,13 @@ final class KeyboardListener implements KeyListener, FocusListener {
{
Class73.method1308(RSString.createRSString("::shutdowninterface"), false);
}
if (var1.getKeyCode() == KeyEvent.VK_SPACE)
//causing issues when in other interfaces, such as GE interface. My quick thing impl didn't work - Jamix77
/**if (var1.getKeyCode() == KeyEvent.VK_SPACE)
{
Class2.method78(40, false, 0);
}
}**/
/**

View file

@ -171,4 +171,7 @@ public final class ServerConstants {
*/
}
public static final Boolean NEW_PLAYER_DEFAULT_CLAN = true;
public static final String SERVER_NAME = "2009Scape";
}

View file

@ -9,6 +9,7 @@ import java.sql.Timestamp;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.crandor.ServerConstants;
import org.crandor.cache.misc.buffer.ByteBufferUtils;
import org.crandor.game.node.entity.player.info.portal.PlayerSQLManager;
import org.crandor.game.system.SystemManager;
@ -18,7 +19,6 @@ import org.crandor.game.system.task.TaskExecutor;
import org.crandor.net.Constants;
import org.crandor.net.IoSession;
import org.crandor.net.event.LoginReadEvent;
import org.keldagrim.ServerConstants;
/**
* Handles the registry of new accounts.
@ -173,6 +173,8 @@ public class AccountRegister extends SQLEntryHandler<RegistryDetails> {
}else{
statement.setString(7,null);
}
statement.setString(7, "2009scape");
statement.executeUpdate();
SQLManager.close(statement.getConnection());
}

View file

@ -75,6 +75,7 @@ public final class ExperienceLampInterface extends ComponentPlugin {
player.getAudioManager().send(SOUND);
player.getInventory().remove(lamp);
player.getInterfaceManager().close();
int skillLevel = player.getSkills().getStaticLevel(skillType.skill);
int modifier = 10;
double experience = skillLevel * modifier;
@ -89,6 +90,7 @@ public final class ExperienceLampInterface extends ComponentPlugin {
player.getDialogueInterpreter().open(70099, new Object[] { "The lamp gives you " + (experience * (player.getSkills().experienceMutiplier)) + " " + Skills.SKILL_NAME[skillType.skill] + " experience." });
}
player.getSkills().addExperience(skillType.skill, experience, false);
player.getInterfaceManager().restoreTabs();
}
return true;
}

View file

@ -28,6 +28,7 @@ public final class LampPlugin extends OptionHandler {
public boolean handle(Player player, Node node, String option) {
player.setAttribute("lamp", node);
player.getInterfaceManager().open(new Component(134));
player.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13);
return true;
}

View file

@ -45,6 +45,11 @@ public class MasterChefDialogue extends DialoguePlugin {
case 20:
if (player.getInventory().containsAll(1933,1929)) {
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "Mix together the flour and water to form a dough."));
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "Mix together the flour and water to form a dough."));
stage = 1;
} else if (player.getInventory().containsItem(new Item(2307))) {
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "You already have some dough, no need", "to make more."));
stage = 1;
} else if (player.getInventory().containsItem(new Item(2307))) {
@ -61,6 +66,7 @@ public class MasterChefDialogue extends DialoguePlugin {
stage = 1;
} else {
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I see you have lost your pot of flour and bucket of water,", "No worries i will supply you with more."));
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "I see you have lost your pot of flour and bucket of water,", "No worries i will supply you with more."));
if (player.getInventory().freeSlots() >= 2) {
player.getInventory().add(new Item(1933));
player.getInventory().add(new Item(1929));