Skip to content
Snippets Groups Projects
Commit d808ccda authored by Harmonic's avatar Harmonic
Browse files

Merge branch 'background-toner-fix' into 'dev'

fixed issue #698

See merge request morningstar/Arcturus-Community!260
parents cfcc2d0f 01651918
No related branches found
Tags 2-4-0-rc2
No related merge requests found
......@@ -33,6 +33,9 @@ INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.flood.mute.time',
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.jukebox.limit.large', '20');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.jukebox.limit.normal', '10');
-- Background Toner Scripter Warning
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('scripter.warning.item.bgtoner.permission', '%username% tried to change the background toner without rights in %room% owned by %owner%');
-- Table structure for room_trax
DROP TABLE IF EXISTS `room_trax`;
CREATE TABLE `room_trax` (
......
......@@ -3,6 +3,7 @@ package com.eu.habbo.habbohotel.items.interactions;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.gameclients.GameClient;
import com.eu.habbo.habbohotel.items.Item;
import com.eu.habbo.habbohotel.modtool.ScripterManager;
import com.eu.habbo.habbohotel.rooms.Room;
import com.eu.habbo.habbohotel.rooms.RoomUnit;
import com.eu.habbo.habbohotel.users.HabboItem;
......@@ -60,6 +61,16 @@ public class InteractionBackgroundToner extends HabboItem {
if(client != null)
{
if (!client.getHabbo().getRoomUnit().getRoom().hasRights(client.getHabbo())) {
ScripterManager.scripterDetected(
client,
Emulator.getTexts().getValue("scripter.warning.item.bgtoner.permission").replace("%username%", client.getHabbo().getHabboInfo().getUsername())
.replace("%room%", room.getName())
.replace("%owner%", room.getOwnerName())
);
return;
}
if (client.getHabbo().getRoomUnit().cmdSit && client.getHabbo().getRoomUnit().getEffectId() == 1337) {
new BackgroundAnimation(this, room).run();
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment