mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40:52 +01:00
Fix NullPointerException in WiredEffectMoveFurniTowards
This commit is contained in:
parent
577530ffe5
commit
efe1fd2258
@ -45,6 +45,7 @@ public class WiredEffectMoveFurniTowards extends InteractionWiredEffect
|
|||||||
{
|
{
|
||||||
super(id, userId, item, extradata, limitedStack, limitedSells);
|
super(id, userId, item, extradata, limitedStack, limitedSells);
|
||||||
this.items = new THashSet<>();
|
this.items = new THashSet<>();
|
||||||
|
this.lastDirections = new THashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<RoomUserRotation> getAvailableDirections(HabboItem item, Room room) {
|
public List<RoomUserRotation> getAvailableDirections(HabboItem item, Room room) {
|
||||||
@ -98,6 +99,9 @@ public class WiredEffectMoveFurniTowards extends InteractionWiredEffect
|
|||||||
|
|
||||||
for(HabboItem item : this.items) {
|
for(HabboItem item : this.items) {
|
||||||
|
|
||||||
|
if(item == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
// direction the furni will move in
|
// direction the furni will move in
|
||||||
RoomUserRotation moveDirection = null;
|
RoomUserRotation moveDirection = null;
|
||||||
RoomUserRotation lastDirection = lastDirections.get(item.getId());
|
RoomUserRotation lastDirection = lastDirections.get(item.getId());
|
||||||
|
Loading…
Reference in New Issue
Block a user