From 18c8f3b2dc8661637a9cba66cfbc76ac80932b1f Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Wed, 24 Mar 2010 19:50:09 +0000 Subject: [PATCH 01/13] fixed Harold telling players about about expiring earnings every minute --- doc/CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 36aed1a549..496b3e7329 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -25,6 +25,8 @@ Changelog - improved stability of the client in uncommon situations - stat changes that occurred during zone change (like losing xp on death) did not update the stats window. - click walking is now a lot smother +- fixed Harold telling players about about expiring earnings every minute + 0.81.3 - prevent crash on "No line matching interface" (fixes #2970406) From b2bdf4ac55ef67d1e5bc042bedae8759553c66c8 Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Wed, 24 Mar 2010 20:08:44 +0000 Subject: [PATCH 02/13] backporting fixed typos and capitalised proper nouns by kymara --- doc/CHANGES.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 496b3e7329..ea46e8ae5d 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -3,13 +3,13 @@ Changelog 0.82 *features - single click movement -- easter bunny -- pied piper quest +- Easter Bunny +- Pied Piper quest - open manual on key F1 - added /volume support for sound - asynchronous database access -- kalavan orb -- sad scientist quest +- Kalavan orb +- Sad Scientist quest *admins* - new /script AdminPortal.class @@ -24,8 +24,9 @@ Changelog - Carmen only asks for her quest if the player is at least level 2. - improved stability of the client in uncommon situations - stat changes that occurred during zone change (like losing xp on death) did not update the stats window. -- click walking is now a lot smother -- fixed Harold telling players about about expiring earnings every minute +- click walking is now a lot smoother +- fixed Harold telling players about expiring earnings every minute + 0.81.3 From 536cff582d7906d88976ea8b720c7eabb6e3a692 Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Wed, 24 Mar 2010 20:09:05 +0000 Subject: [PATCH 03/13] updated version number --- build.ant.properties | 2 +- runserver.bat | 2 +- runserver.sh | 2 +- src/games/stendhal/client/update/Version.java | 2 +- src/games/stendhal/common/Debug.java | 2 +- src/games/stendhal/server/core/engine/GenerateINI.java | 2 +- stendhal.jnlp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.ant.properties b/build.ant.properties index ed556285df..b2c07e95aa 100644 --- a/build.ant.properties +++ b/build.ant.properties @@ -76,7 +76,7 @@ version_server = http://arianne.sourceforge.net/stendhal.version # current version of stendhal version.old = 0.81 -version = 0.81.5 +version = 0.82 # javac options javac.deprecation = true diff --git a/runserver.bat b/runserver.bat index 29aca7e507..96b217b9ba 100644 --- a/runserver.bat +++ b/runserver.bat @@ -1,3 +1,3 @@ -set STENDHAL_VERSION=0.81.5 +set STENDHAL_VERSION=0.82 set LOCALCLASSPATH=.;data\script;data\conf;stendhal-server-%STENDHAL_VERSION%.jar;marauroa.jar;mysql-connector.jar;log4j.jar;commons-lang.jar;h2.jar java -Xmx400m -cp "%LOCALCLASSPATH%" marauroa.server.marauroad -c server.ini -l diff --git a/runserver.sh b/runserver.sh index 8322a4b628..dab6b1a21d 100644 --- a/runserver.sh +++ b/runserver.sh @@ -1,5 +1,5 @@ #!/bin/sh -STENDHAL_VERSION="0.81.5" +STENDHAL_VERSION="0.82" LOCALCLASSPATH=.:data/script/:data/conf/:stendhal-server-$STENDHAL_VERSION.jar:marauroa.jar:mysql-connector.jar:log4j.jar:commons-lang.jar:h2.jar diff --git a/src/games/stendhal/client/update/Version.java b/src/games/stendhal/client/update/Version.java index 0570658d44..113c8ec564 100644 --- a/src/games/stendhal/client/update/Version.java +++ b/src/games/stendhal/client/update/Version.java @@ -10,7 +10,7 @@ package games.stendhal.client.update; public class Version { /** Version Number. */ - public static final String VERSION = "0.81.5"; + public static final String VERSION = "0.82"; /** * Extract the specified number of parts from a version-string. diff --git a/src/games/stendhal/common/Debug.java b/src/games/stendhal/common/Debug.java index f34aa74bdb..3dced790db 100644 --- a/src/games/stendhal/common/Debug.java +++ b/src/games/stendhal/common/Debug.java @@ -25,7 +25,7 @@ public interface Debug { /** server version. */ // Note: This line is updated by build.xml using a regexp so be sure to adjust it in case you modify this line. - String VERSION = "0.81.5"; + String VERSION = "0.82"; /** diff --git a/src/games/stendhal/server/core/engine/GenerateINI.java b/src/games/stendhal/server/core/engine/GenerateINI.java index 815639af54..fd761758ed 100644 --- a/src/games/stendhal/server/core/engine/GenerateINI.java +++ b/src/games/stendhal/server/core/engine/GenerateINI.java @@ -233,7 +233,7 @@ public class GenerateINI { out.println(); out.println("server_typeGame=" + gameName); out.println("server_name=" + gameName + " Marauroa server"); - out.println("server_version=0.81.5"); + out.println("server_version=0.82"); out.println("server_contact=https://sourceforge.net/tracker/?atid=514826&group_id=66537&func=browse"); out.println(); out.println("# Extensions configured on the server. Enable at will."); diff --git a/stendhal.jnlp b/stendhal.jnlp index 472a2e0291..55ae6d012c 100644 --- a/stendhal.jnlp +++ b/stendhal.jnlp @@ -22,7 +22,7 @@ Some of these people are NPC, they will give you tasks to accomplish and hints t - + From 217d82fe0b2453701f44da1a3573c09f2bdba425 Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Wed, 24 Mar 2010 20:14:34 +0000 Subject: [PATCH 04/13] changed manual hint pointing to F1 instead of the first screen. --- src/games/stendhal/server/core/events/TutorialEventType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/games/stendhal/server/core/events/TutorialEventType.java b/src/games/stendhal/server/core/events/TutorialEventType.java index af803bea87..241582e2a0 100644 --- a/src/games/stendhal/server/core/events/TutorialEventType.java +++ b/src/games/stendhal/server/core/events/TutorialEventType.java @@ -16,7 +16,7 @@ public enum TutorialEventType { VISIT_SEMOS_CITY( "You can get a map of Semos from Monogenes. Start by saying \"hi\". Or you can go down the steps to the dungeons and fight some creatures."), VISIT_SEMOS_DUNGEON( - "You can attack creatures by right clicking on them and choosing \"Attack\""), + "You can attack creatures by right clicking on them and choosing \"Attack\". Alternatively you can use double click."), VISIT_SEMOS_DUNGEON_2( "Be careful. If you walk deeper and deeper, the creatures will get more powerful."), VISIT_SEMOS_TAVERN( @@ -34,7 +34,7 @@ public enum TutorialEventType { FIRST_DEATH( "Oh, you have just died. But fortunately death is not permanent in this world."), TIMED_HELP( - "There is a manual with many pictures on the first screen before you login."), + "Press F1 to read the manual with many pictures."), TIMED_NAKED( "Oh, aren't you feeling cold? Right click on yourself and choose \"Set Outfit\" to get dressed."), TIMED_PASSWORD( From ca1bd904beb8afffcdb5f43f52a18f29f0ca5d12 Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Wed, 24 Mar 2010 20:18:43 +0000 Subject: [PATCH 05/13] fixed help about /volume --- src/games/stendhal/client/actions/HelpAction.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/games/stendhal/client/actions/HelpAction.java b/src/games/stendhal/client/actions/HelpAction.java index 554718975e..fec5c08bf1 100644 --- a/src/games/stendhal/client/actions/HelpAction.java +++ b/src/games/stendhal/client/actions/HelpAction.java @@ -49,9 +49,8 @@ class HelpAction implements SlashAction { "* Misc: ", "- /info \t\tFind out what the current server time is", "- /mute\t\tMute or unmute the sounds", - "- /volume show\t\tShow the current volume of sounds and music", - "- /volume \t\tSets the volume for the specified group" - }; + "- /volume\t\tLists or sets the volume for sound and music" + }; for (final String line : lines) { ClientSingletonRepository.getUserInterface().addEventLine(new HeaderLessEventLine(line, NotificationType.CLIENT)); From 08cb38d40c151d6424cc299c4edb320327319cbe Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Wed, 24 Mar 2010 20:28:18 +0000 Subject: [PATCH 06/13] fixed price of roach to 10 in hard coded shop signs (fixes #2971215) --- data/conf/zones/kirdneh.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/conf/zones/kirdneh.xml b/data/conf/zones/kirdneh.xml index 51e278b694..cff8987b72 100644 --- a/data/conf/zones/kirdneh.xml +++ b/data/conf/zones/kirdneh.xml @@ -49,7 +49,7 @@ Whut I be buyin: cod 10 char 30 trout 45 -roach 30 +roach 10 perch 22 mackerel 20 clownfish 30 From 8129768f6978d9e10b7fe3f1f05280d94c745aa9 Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Wed, 24 Mar 2010 20:34:41 +0000 Subject: [PATCH 07/13] backporting fixed error in speech by kymara --- src/games/stendhal/server/maps/quests/ThePiedPiper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/games/stendhal/server/maps/quests/ThePiedPiper.java b/src/games/stendhal/server/maps/quests/ThePiedPiper.java index 45790ce0a2..09129acbea 100644 --- a/src/games/stendhal/server/maps/quests/ThePiedPiper.java +++ b/src/games/stendhal/server/maps/quests/ThePiedPiper.java @@ -469,7 +469,7 @@ import org.apache.log4j.Logger; */ private void tellAllAboutNoRatsInCity() { final String text = "Mayor Chalmers shouts: No #rats in Ados survived, "+ - "excluded those who always lived in the "+ + "only those who always lived in the "+ "haunted house. "+ "Rat hunters are welcome to get their #reward."; SingletonRepository.getRuleProcessor().tellAllPlayers(text); From 38f14edc5e92de51fab826d800a32b53a45aea8b Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Wed, 24 Mar 2010 21:07:23 +0000 Subject: [PATCH 08/13] don't move on single click unless the Stendhal window was focused --- .../stendhal/client/gui/wt/GroundContainer.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/games/stendhal/client/gui/wt/GroundContainer.java b/src/games/stendhal/client/gui/wt/GroundContainer.java index b0bffa9c7b..ac402cc81a 100644 --- a/src/games/stendhal/client/gui/wt/GroundContainer.java +++ b/src/games/stendhal/client/gui/wt/GroundContainer.java @@ -26,6 +26,7 @@ import games.stendhal.client.gui.wt.core.WtDraggable; import games.stendhal.client.gui.wt.core.WtDropTarget; import java.awt.Cursor; +import java.awt.KeyboardFocusManager; import java.awt.Point; import java.awt.event.InputEvent; import java.awt.event.MouseEvent; @@ -46,6 +47,8 @@ public class GroundContainer extends WtBaseframe implements WtDropTarget, /** the game client. */ private final StendhalClient client; + private boolean windowWasActiveOnMousePressed = true; + /** * The UI. */ @@ -93,6 +96,15 @@ public class GroundContainer extends WtBaseframe implements WtDropTarget, return null; } + /** + * remembers whether the client was active on last mouse down + */ + @Override + public synchronized void mousePressed(MouseEvent e) { + windowWasActiveOnMousePressed = (KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow() != null); + super.mousePressed(e); + } + /** * * @@ -105,6 +117,7 @@ public class GroundContainer extends WtBaseframe implements WtDropTarget, // yes, click already processed return true; } + // get clicked entity final Point2D point = screen.convertScreenViewToWorld(p); @@ -127,7 +140,9 @@ public class GroundContainer extends WtBaseframe implements WtDropTarget, return true; } } else if (getWtPanelAt(p) == null) { - createAndSendMoveToAction(point); + if (windowWasActiveOnMousePressed) { + createAndSendMoveToAction(point); + } return true; } From 397029e4b20d10e306ca27fee4b87cfe9489c725 Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Wed, 24 Mar 2010 23:13:42 +0000 Subject: [PATCH 09/13] backporting clicking on portals --- .../stendhal/client/gui/j2d/entity/Portal2DView.java | 6 ++++++ .../stendhal/server/core/pathfinder/Pathfinder.java | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/src/games/stendhal/client/gui/j2d/entity/Portal2DView.java b/src/games/stendhal/client/gui/j2d/entity/Portal2DView.java index 293aa52700..142132e920 100644 --- a/src/games/stendhal/client/gui/j2d/entity/Portal2DView.java +++ b/src/games/stendhal/client/gui/j2d/entity/Portal2DView.java @@ -73,4 +73,10 @@ class Portal2DView extends InvisibleEntity2DView { break; } } + + @Override + public boolean isInteractive() { + return false; + } + } diff --git a/src/games/stendhal/server/core/pathfinder/Pathfinder.java b/src/games/stendhal/server/core/pathfinder/Pathfinder.java index 13263e63e8..a38218b489 100644 --- a/src/games/stendhal/server/core/pathfinder/Pathfinder.java +++ b/src/games/stendhal/server/core/pathfinder/Pathfinder.java @@ -24,7 +24,10 @@ package games.stendhal.server.core.pathfinder; import games.stendhal.common.CollisionDetection; import games.stendhal.server.core.engine.StendhalRPZone; import games.stendhal.server.entity.Entity; +import games.stendhal.server.entity.mapstuff.portal.Portal; +import games.stendhal.server.entity.player.Player; +import java.awt.Point; import java.awt.geom.Rectangle2D; import java.util.Comparator; import java.util.HashMap; @@ -264,6 +267,7 @@ class Pathfinder { * have stopped */ private void createEntityCollisionMap() { + Point targetPoint = new Point(nodeGoal.getX(), nodeGoal.getY()); collisionMap = new CollisionDetection(); collisionMap.init(zone.getWidth(), zone.getHeight()); for (final RPObject obj : zone) { @@ -275,6 +279,11 @@ class Pathfinder { final Rectangle2D area = otherEntity.getArea(otherEntity.getX(), otherEntity.getY()); + + // Hack: Allow players to move onto portals as destination + if ((entity instanceof Player) && (otherEntity instanceof Portal) && area.contains(targetPoint)) { + continue; + } collisionMap.setCollide(area, true); } } From 577133f92079ca172f89747dd282c39f5cc28f0f Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Sat, 27 Mar 2010 12:19:51 +0000 Subject: [PATCH 10/13] backported fix of warning about Easter Bunny already in the NPCList (this fix is part of the released version but was not in CVS because of a CVS sever downtime) --- src/games/stendhal/server/maps/quests/MeetBunny.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/games/stendhal/server/maps/quests/MeetBunny.java b/src/games/stendhal/server/maps/quests/MeetBunny.java index 2867d43a3e..c3cae843de 100644 --- a/src/games/stendhal/server/maps/quests/MeetBunny.java +++ b/src/games/stendhal/server/maps/quests/MeetBunny.java @@ -81,7 +81,6 @@ public class MeetBunny extends AbstractQuest { addGoodbye("Don't eat too much this Easter! Bye!"); } }; - npcs.add(bunny); bunny.setEntityClass("easterbunnynpc"); bunny.initHP(100); // times out twice as fast as normal NPCs From 368846ed5a721bd97c1651b81109a5888017dbfa Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Sat, 27 Mar 2010 12:20:22 +0000 Subject: [PATCH 11/13] backported fix to stop the player walking animation on collision by kiheru (this fix is part of the released version but was not in CVS because of a CVS sever downtime) --- src/games/stendhal/server/entity/player/Player.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/games/stendhal/server/entity/player/Player.java b/src/games/stendhal/server/entity/player/Player.java index dbf6ebc15c..9390fa645d 100644 --- a/src/games/stendhal/server/entity/player/Player.java +++ b/src/games/stendhal/server/entity/player/Player.java @@ -1817,7 +1817,15 @@ public class Player extends RPEntity { } @Override protected void handleObjectCollision() { - clearPath(); + if (hasPath()) { + /* + * Stop a player only if he is following a path. + * Otherwise running behind archers becomes almost + * impossible. + */ + stop(); + clearPath(); + } } From 84f054a3ff5c6258da595facad91172f729199b6 Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Sat, 27 Mar 2010 12:55:10 +0000 Subject: [PATCH 12/13] ignore bogus mouse click event after drag&drop on MS Windows (fixes #2976895) --- .../stendhal/client/gui/wt/GroundContainer.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/games/stendhal/client/gui/wt/GroundContainer.java b/src/games/stendhal/client/gui/wt/GroundContainer.java index ac402cc81a..aac0fe1e1e 100644 --- a/src/games/stendhal/client/gui/wt/GroundContainer.java +++ b/src/games/stendhal/client/gui/wt/GroundContainer.java @@ -48,6 +48,8 @@ public class GroundContainer extends WtBaseframe implements WtDropTarget, private final StendhalClient client; private boolean windowWasActiveOnMousePressed = true; + private int xOnMousePressed; + private int yOnMousePressed; /** * The UI. @@ -102,16 +104,27 @@ public class GroundContainer extends WtBaseframe implements WtDropTarget, @Override public synchronized void mousePressed(MouseEvent e) { windowWasActiveOnMousePressed = (KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow() != null); + xOnMousePressed = e.getX(); + yOnMousePressed = e.getY(); super.mousePressed(e); } /** + * Handles mouse click events * - * - * + * @param p point of click */ @Override public synchronized boolean onMouseClick(final Point p) { + + // on MS Windows releasing the mouse after a drag&drop action is + // counted as mouse click: https://sourceforge.net/support/tracker.php?aid=2976895 + if ((Math.abs(p.getX() - xOnMousePressed) > 10) + || (Math.abs(p.getY() - yOnMousePressed) > 10)) { + return false; + } + + // base class checks if the click is within a child if (super.onMouseClick(p)) { // yes, click already processed From bfd2a354e015c76b2b3a33bc4b70f2735885c506 Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Sat, 27 Mar 2010 12:57:22 +0000 Subject: [PATCH 13/13] revert because it was committed to the wrong branch --- .../stendhal/client/gui/wt/GroundContainer.java | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/games/stendhal/client/gui/wt/GroundContainer.java b/src/games/stendhal/client/gui/wt/GroundContainer.java index aac0fe1e1e..ac402cc81a 100644 --- a/src/games/stendhal/client/gui/wt/GroundContainer.java +++ b/src/games/stendhal/client/gui/wt/GroundContainer.java @@ -48,8 +48,6 @@ public class GroundContainer extends WtBaseframe implements WtDropTarget, private final StendhalClient client; private boolean windowWasActiveOnMousePressed = true; - private int xOnMousePressed; - private int yOnMousePressed; /** * The UI. @@ -104,27 +102,16 @@ public class GroundContainer extends WtBaseframe implements WtDropTarget, @Override public synchronized void mousePressed(MouseEvent e) { windowWasActiveOnMousePressed = (KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow() != null); - xOnMousePressed = e.getX(); - yOnMousePressed = e.getY(); super.mousePressed(e); } /** - * Handles mouse click events * - * @param p point of click + * + * */ @Override public synchronized boolean onMouseClick(final Point p) { - - // on MS Windows releasing the mouse after a drag&drop action is - // counted as mouse click: https://sourceforge.net/support/tracker.php?aid=2976895 - if ((Math.abs(p.getX() - xOnMousePressed) > 10) - || (Math.abs(p.getY() - yOnMousePressed) > 10)) { - return false; - } - - // base class checks if the click is within a child if (super.onMouseClick(p)) { // yes, click already processed