mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40:52 +01:00
Made WiredEffectTeleport keep the previous enable (LIKE HABBO) when the sparkle effect is over. - Credits to Beny
This commit is contained in:
parent
ca2e5ef500
commit
f347289139
@ -14,7 +14,9 @@ import com.eu.habbo.habbohotel.wired.WiredEffectType;
|
||||
import com.eu.habbo.habbohotel.wired.WiredHandler;
|
||||
import com.eu.habbo.messages.ClientMessage;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserEffectComposer;
|
||||
import com.eu.habbo.threading.runnables.RoomUnitTeleport;
|
||||
import com.eu.habbo.threading.runnables.SendRoomUnitEffectComposer;
|
||||
import gnu.trove.procedure.TObjectProcedure;
|
||||
import gnu.trove.set.hash.THashSet;
|
||||
|
||||
@ -146,7 +148,10 @@ public class WiredEffectTeleport extends InteractionWiredEffect
|
||||
|
||||
int currentEffect = roomUnit.getEffectId();
|
||||
|
||||
room.giveEffect(roomUnit, 4, 2);
|
||||
// makes a temporary effect
|
||||
room.sendComposer(new RoomUserEffectComposer(roomUnit, 4).compose());
|
||||
Emulator.getThreading().run(new SendRoomUnitEffectComposer(room, roomUnit), 2000);
|
||||
|
||||
final WiredEffectTeleport teleportWired = this;
|
||||
RoomTile targetTile = room.getLayout().getTile(item.getX(), item.getY());
|
||||
boolean foundTile = false;
|
||||
@ -172,6 +177,7 @@ public class WiredEffectTeleport extends InteractionWiredEffect
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Emulator.getThreading().run(new RoomUnitTeleport(roomUnit, room, targetTile.x, targetTile.y, targetTile.getStackHeight() + (targetTile.state == RoomTileState.SIT ? -0.5 : 0) , currentEffect), WiredHandler.TELEPORT_DELAY);
|
||||
Emulator.getThreading().run(new Runnable()
|
||||
{
|
||||
|
@ -687,9 +687,7 @@ public class RoomManager
|
||||
}
|
||||
habbo.getHabboInfo().setRoomQueueId(0);
|
||||
habbo.getClient().sendResponse(new HideDoorbellComposer(""));
|
||||
|
||||
if (habbo.getRoomUnit() == null)
|
||||
habbo.setRoomUnit(new RoomUnit());
|
||||
habbo.setRoomUnit(new RoomUnit());
|
||||
|
||||
habbo.getRoomUnit().clearStatus();
|
||||
if (habbo.getRoomUnit().getCurrentLocation() == null)
|
||||
|
@ -8,10 +8,17 @@ import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
public class RoomUserEffectComposer extends MessageComposer
|
||||
{
|
||||
private final RoomUnit roomUnit;
|
||||
private final int effectId;
|
||||
|
||||
public RoomUserEffectComposer(RoomUnit roomUnit)
|
||||
{
|
||||
this.roomUnit = roomUnit;
|
||||
this.effectId = -1;
|
||||
}
|
||||
public RoomUserEffectComposer(RoomUnit roomUnit, int effectId)
|
||||
{
|
||||
this.roomUnit = roomUnit;
|
||||
this.effectId = effectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -19,7 +26,7 @@ public class RoomUserEffectComposer extends MessageComposer
|
||||
{
|
||||
this.response.init(Outgoing.RoomUserEffectComposer);
|
||||
this.response.appendInt(this.roomUnit.getId());
|
||||
this.response.appendInt(this.roomUnit.getEffectId());
|
||||
this.response.appendInt(this.effectId == -1 ? this.roomUnit.getEffectId() : this.effectId);
|
||||
this.response.appendInt(0);
|
||||
return this.response;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user