114 Commits

Author SHA1 Message Date
Major 6bced4868f Make immutable DistancedAction fields visible to subclasses 2017-05-26 14:42:25 +01:00
Major 3c9b214134 Register MagicOnNpcMessageDecoder in 317 2017-05-25 15:39:52 +01:00
Lmctruck30 4802fba081 Fix 317 HitUpdateBlock encoding 2017-05-25 15:28:22 +01:00
Lmctruck30 57680aec3e Add Report Abuse Message 2017-05-25 15:19:08 +01:00
Lmctruck30 cb0d7e369a Add Item on Npc 2017-05-25 15:08:15 +01:00
Major f4c08995b5 Condense some unnecessarily-long variable names 2017-05-25 02:32:20 +01:00
Gary Tierney 0559c4093c Fix argument order of tile item message ctor call
Rearrange the arguments passed to the SendTileItemUpdateMessage
constructor when recording a ground item RegionUpdate.  Fixes #316.
2017-05-23 01:40:31 +01:00
Gary Tierney 30a1aebb56 Remove Maven POM files 2017-01-02 04:59:41 +00:00
Gary Tierney 4d79052199 Convert to the gradle build system
Ports the Maven build POMs to Gradle build scripts, which are a bit
friendlier to use.  Instead of using the exec:java Maven goal to run the
server now, the gradle run task should be used.
2017-01-02 04:44:04 +00:00
Gary Tierney e5a6638e2f Add support for player / npc following
Implements a new MobExtension plugin which adds 'follow', and 'chase'
mixins that allow the mob to follow behind another mob, and chase them
while keeping at a safe distance to fire projectiles.  Also adds a new
public method 'raycast' to CollisionManager, for drawing a line through
the world using bresenham's line algorithm whille checking for any impenetrable
objects.
2017-01-02 04:11:13 +00:00
Gary Tierney baa12ca446 Add a mob extension plugin for walking to entities
Adds a new mob extension plugin which creates a walk_to() method on
Mobs to allow walking to another entity (accounting for the size of the
entity) with an optional facing position.
2017-01-02 03:39:02 +00:00
Gary Tierney 916f6c547d Add tests around CollisionManager functionality
Adds tests for the CollisionManager which makes sure that collision
matrices are correctly built for the following object types:

* Interactables
* Walls
* Corners

Missing from these tests are tests for blocked / bridged tiles, and
large corner walls, which can be added later.  Additionally, the test
cases include ASCII illustrations of the collision grid and how it is
built / checked for a particular object or movement.
2016-12-31 05:19:49 +00:00
Gary Tierney 6188c2e751 Add support for dynamic collision detection
This commit implements collision detection using the map files loaded
from the cache, and adds support for modifying the collision matrices at
runtime when the game world is updated.

All checks to see if a tile is reachable should now be done via.
World#traversable, instead of Region#traversable, as the World object
can handle checking tiles across multiple regions.  These are done for
the WalkingQueue and Pathfinder implementations.
2016-12-31 05:14:19 +00:00
Gary Tierney 0672fa2ea0 Fix bitwise negation in CollisionMatrix#clear()
Adds the missing bitwise AND to the clear() method in CollisionMatrix,
so any flags besides the one given are retained.
2016-12-31 02:09:42 +00:00
Gary Tierney 376d36871a Allow registering region listeners globally
Adds the ability to register region listeners with the
RegionRepository, which will register the listener with any existing
regions and cache it for any newly created regions later.
2016-12-31 02:09:42 +00:00
Gary Tierney 6a4625cb32 Refactor map loading code
Refactors the map file loading code by importing existing code from the
Vicis cache editor project.  Adds classes for decoding objects and tiles
for a given map file index. Only the new MapIndex decoder code is used
when loading GameObjects at the moment , which will later be updated.
2016-12-31 02:08:58 +00:00
AymericDu a8cada6f9e Template method on ChatMessage 2016-03-19 15:37:28 +01:00
Jesse Woolsey 6cf2fb0a5c Fix Distance check
Before:

http://recordit.co/qFCM2jaox2

After:

http://recordit.co/Jre4B5s1zT
2016-03-18 19:52:06 -04:00
Major a59bbe68f6 Merge pull request #252 from CharlesVaneenoo/RefactorHandle
refactor method handle in EquipItemHandler.java
2016-03-13 09:28:05 +00:00
Gary Tierney f2aced1bca Add support for projectiles
* Adds support for short-lived entities, which are never added to the
  entity sets of the region they belong in.

* Adds support for checking the number of tiles a Mob occupies.

* Adds a ProjectileBuilder class to simplify creating projectiles.
2016-03-11 20:03:33 +00:00
munggs 5aa7e0f90d Refactor add method in Inventory 2016-03-11 16:26:53 +01:00
Hequette Pierre 172e347912 refactor method handle in EquipItemHandler.java 2016-03-08 22:24:58 +01:00
Jeremy MATHIAS ca82ad5e4e Add unit tests for SkillSet 2016-03-07 16:14:52 +01:00
CharlesVaneenoo 5fd8640d62 new PR after bad rebase 2016-02-26 21:25:20 +01:00
Jesse Woolsey ddaa505c6a * Fix Several Items that were glitched when worn.
* Fix items that were not able to be worn due to the name.
* Added prayer check in due to one of the items using it during 377
2016-02-15 21:47:25 -05:00
Major- d3c5417403 Fix #218 2016-02-15 17:32:00 +00:00
Jesse Woolsey fd855263a4 * Fix messages that were wrong 2016-02-15 09:23:51 -05:00
Jesse Woolsey 08d797d907 Fixed beards for helmets. 2016-02-14 20:59:22 -05:00
Major- 3a926c6173 Fix #221 2016-02-14 03:42:50 +00:00
Major- 6559c03209 Set default viewing distance to 15 2016-02-13 18:41:42 +00:00
Major- 9e20ecfe39 Fix 377 FlashTabInterfaceMessageEncoder 2016-02-13 16:31:42 +00:00
Major- 0f32ec92c4 Fix HintIconMessage.Type 2016-02-13 16:31:42 +00:00
Major- 9a920d95ee Add support for Events defined in Ruby
A slightly complicated and hacky change, because this requires working
around JRuby issue 2359.
2016-02-13 16:31:42 +00:00
Ryley Kimmel dd9edb358d Merge pull request #202 from ryleykimmel/issue179
Rebase HintIconMessage
2016-02-11 11:36:05 -05:00
atomicint 437a664f00 Rebase HintIconMessage
- Split HintIconMessage into two separate classes (PositionHintIconMessage and MobHintIconMessage)
- Split HintIconMessageEncoder into two separate encoders (PositionHintIconMessageEncoder and MobHintIconMessageEncoder)

This resolves #179

Add PositionHintIconMessage#reset

Fix parse errors introduced in e799577
This also resolves #181

Order enumerators by value
Clean up PositionHintIconHintMessageEncoder for 377/317
2016-02-11 11:35:20 -05:00
Major- 774e7f9fef Fix #136
This also fixes a related issue where changes to the region were not
being sent on login.
2016-02-11 16:12:52 +00:00
Major- 4b744e5e86 Cleanup object-related code 2016-02-11 15:14:42 +00:00
Major- d6ac9eeeaa Remove message filtering 2016-02-11 13:07:02 +00:00
Major- c474908163 Log exception after failing to bind to HTTP 2016-02-11 12:57:12 +00:00
Major- f49bb8c023 Cleanup Player code 2016-02-11 12:57:05 +00:00
Major- 7a4392fe74 Add SetWidgetModelMessage 2016-02-10 19:45:32 +00:00
Major- d10eb1267f Improve GroupedRegionUpdateMessageEncoder code 2016-02-10 19:38:25 +00:00
Major- a880127c5f Improve internal Mob code 2016-02-10 19:32:32 +00:00
Gary Tierney bea2e61b27 Add a heuristic using euclidean distance for cost 2016-02-09 23:41:15 +00:00
Gary Tierney 1ef364beb8 Fix missing direction in a* traversable call 2016-02-09 23:39:17 +00:00
Major 4526797095 Merge pull request #180 from ryleykimmel/issue142
Queue npcs before unregistering
2016-02-09 21:13:18 +00:00
atomicint 56ff74e844 Use ArrayDeque, concurrency not important 2016-02-09 13:48:10 -05:00
atomicint c4874acd3c Queue npcs before unregistering, increase maximum messages 2016-02-09 13:32:07 -05:00
Major b99b20fbb4 Merge pull request #171 from ryleykimmel/consistent-tests
Make test class and method names consistent
2016-02-09 16:10:43 +00:00
Major 3e08a62672 Merge pull request #167 from ryleykimmel/issue165
Fix String attribute encoding delimiter
2016-02-09 16:09:12 +00:00