mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
4df2ef69e5
@ -19,7 +19,7 @@ public class UpdateItemsCommand extends Command {
|
|||||||
|
|
||||||
synchronized (Emulator.getGameEnvironment().getRoomManager().getActiveRooms()) {
|
synchronized (Emulator.getGameEnvironment().getRoomManager().getActiveRooms()) {
|
||||||
for (Room room : Emulator.getGameEnvironment().getRoomManager().getActiveRooms()) {
|
for (Room room : Emulator.getGameEnvironment().getRoomManager().getActiveRooms()) {
|
||||||
if (room.isLoaded() && room.getUserCount() > 0) {
|
if (room.isLoaded() && room.getUserCount() > 0 && room.getLayout() != null) {
|
||||||
room.sendComposer(new RoomRelativeMapComposer(room).compose());
|
room.sendComposer(new RoomRelativeMapComposer(room).compose());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,5 +40,7 @@ public class InteractionBlackHole extends InteractionGate {
|
|||||||
AchievementManager.progressAchievement(this.getUserId(), holeCountAchievement, holeDifference);
|
AchievementManager.progressAchievement(this.getUserId(), holeCountAchievement, holeDifference);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super.onPlace(room);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -55,6 +55,8 @@ public class InteractionMoodLight extends HabboItem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super.onPlace(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -59,6 +59,7 @@ public class InteractionWater extends InteractionDefault {
|
|||||||
@Override
|
@Override
|
||||||
public void onPlace(Room room) {
|
public void onPlace(Room room) {
|
||||||
this.recalculate(room);
|
this.recalculate(room);
|
||||||
|
super.onPlace(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refreshWaters(Room room) {
|
public void refreshWaters(Room room) {
|
||||||
|
@ -25,6 +25,7 @@ public class InteractionWaterItem extends InteractionDefault {
|
|||||||
@Override
|
@Override
|
||||||
public void onPlace(Room room) {
|
public void onPlace(Room room) {
|
||||||
this.update();
|
this.update();
|
||||||
|
super.onPlace(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -143,6 +143,7 @@ public class InteractionWiredHighscore extends HabboItem {
|
|||||||
@Override
|
@Override
|
||||||
public void onPlace(Room room) {
|
public void onPlace(Room room) {
|
||||||
this.reloadData(room);
|
this.reloadData(room);
|
||||||
|
super.onPlace(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -138,6 +138,8 @@ public abstract class InteractionGameTimer extends HabboItem implements Runnable
|
|||||||
|
|
||||||
this.setExtradata(this.timeNow + "\t" + this.baseTime);
|
this.setExtradata(this.timeNow + "\t" + this.baseTime);
|
||||||
room.updateItem(this);
|
room.updateItem(this);
|
||||||
|
|
||||||
|
super.onPlace(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -88,6 +88,10 @@ public class WiredEffectWhisper extends InteractionWiredEffect {
|
|||||||
|
|
||||||
if (habbo != null) {
|
if (habbo != null) {
|
||||||
habbo.getClient().sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(this.message.replace("%user%", habbo.getHabboInfo().getUsername()).replace("%online_count%", Emulator.getGameEnvironment().getHabboManager().getOnlineCount() + "").replace("%room_count%", Emulator.getGameEnvironment().getRoomManager().getActiveRooms().size() + ""), habbo, habbo, RoomChatMessageBubbles.WIRED)));
|
habbo.getClient().sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(this.message.replace("%user%", habbo.getHabboInfo().getUsername()).replace("%online_count%", Emulator.getGameEnvironment().getHabboManager().getOnlineCount() + "").replace("%room_count%", Emulator.getGameEnvironment().getRoomManager().getActiveRooms().size() + ""), habbo, habbo, RoomChatMessageBubbles.WIRED)));
|
||||||
|
|
||||||
|
if (habbo.getRoomUnit().isIdle()) {
|
||||||
|
habbo.getRoomUnit().getRoom().unIdle(habbo);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -3994,6 +3994,16 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
return this.furniOwnerCount.get(userId);
|
return this.furniOwnerCount.get(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getUserUniqueFurniCount(int userId) {
|
||||||
|
THashSet<Item> items = new THashSet<>();
|
||||||
|
|
||||||
|
for (HabboItem item : this.roomItems.valueCollection()) {
|
||||||
|
if (!items.contains(item.getBaseItem()) && item.getUserId() == userId) items.add(item.getBaseItem());
|
||||||
|
}
|
||||||
|
|
||||||
|
return items.size();
|
||||||
|
}
|
||||||
|
|
||||||
public void ejectUserFurni(int userId) {
|
public void ejectUserFurni(int userId) {
|
||||||
THashSet<HabboItem> items = new THashSet<>();
|
THashSet<HabboItem> items = new THashSet<>();
|
||||||
|
|
||||||
|
@ -323,6 +323,24 @@ public abstract class HabboItem implements Runnable, IEventTriggers {
|
|||||||
AchievementManager.progressAchievement(this.getUserId(), roomDecoAchievement, difference);
|
AchievementManager.progressAchievement(this.getUserId(), roomDecoAchievement, difference);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Achievement roomDecoUniqueAchievement = Emulator.getGameEnvironment().getAchievementManager().getAchievement("RoomDecoFurniTypeCount");
|
||||||
|
|
||||||
|
int uniqueFurniCollecterProgress;
|
||||||
|
if (owner == null) {
|
||||||
|
uniqueFurniCollecterProgress = AchievementManager.getAchievementProgressForHabbo(this.getUserId(), roomDecoUniqueAchievement);
|
||||||
|
} else {
|
||||||
|
uniqueFurniCollecterProgress = owner.getHabboStats().getAchievementProgress(roomDecoUniqueAchievement);
|
||||||
|
}
|
||||||
|
|
||||||
|
int uniqueDifference = room.getUserUniqueFurniCount(this.getUserId()) - uniqueFurniCollecterProgress;
|
||||||
|
if (uniqueDifference > 0) {
|
||||||
|
if (owner != null) {
|
||||||
|
AchievementManager.progressAchievement(owner, roomDecoUniqueAchievement, uniqueDifference);
|
||||||
|
} else {
|
||||||
|
AchievementManager.progressAchievement(this.getUserId(), roomDecoUniqueAchievement, uniqueDifference);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPickUp(Room room) {
|
public void onPickUp(Room room) {
|
||||||
|
@ -74,6 +74,7 @@ public class RequestGuildBuyEvent extends MessageHandler {
|
|||||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().createGuild(this.client.getHabbo(), roomId, r.getName(), name, description, badge, colorOne, colorTwo);
|
Guild guild = Emulator.getGameEnvironment().getGuildManager().createGuild(this.client.getHabbo(), roomId, r.getName(), name, description, badge, colorOne, colorTwo);
|
||||||
|
|
||||||
r.setGuild(guild.getId());
|
r.setGuild(guild.getId());
|
||||||
|
r.removeAllRights();
|
||||||
r.setNeedsUpdate(true);
|
r.setNeedsUpdate(true);
|
||||||
|
|
||||||
if (Emulator.getConfig().getBoolean("imager.internal.enabled")) {
|
if (Emulator.getConfig().getBoolean("imager.internal.enabled")) {
|
||||||
|
@ -11,10 +11,9 @@ public class ModToolRequestRoomInfoEvent extends MessageHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void handle() throws Exception {
|
public void handle() throws Exception {
|
||||||
if (this.client.getHabbo().hasPermission(Permission.ACC_SUPPORTTOOL)) {
|
if (this.client.getHabbo().hasPermission(Permission.ACC_SUPPORTTOOL)) {
|
||||||
//int roomId = this.packet.readInt();
|
int roomId = this.packet.readInt();
|
||||||
|
|
||||||
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
|
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(roomId);
|
||||||
//Emulator.getGameEnvironment().getRoomManager().getRoom(roomId);
|
|
||||||
|
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
this.client.sendResponse(new ModToolRoomInfoComposer(room));
|
this.client.sendResponse(new ModToolRoomInfoComposer(room));
|
||||||
|
@ -12,7 +12,7 @@ public class RequestRoomHeightmapEvent extends MessageHandler {
|
|||||||
if (this.client.getHabbo().getHabboInfo().getLoadingRoom() > 0) {
|
if (this.client.getHabbo().getHabboInfo().getLoadingRoom() > 0) {
|
||||||
Room room = Emulator.getGameEnvironment().getRoomManager().loadRoom(this.client.getHabbo().getHabboInfo().getLoadingRoom());
|
Room room = Emulator.getGameEnvironment().getRoomManager().loadRoom(this.client.getHabbo().getHabboInfo().getLoadingRoom());
|
||||||
|
|
||||||
if (room != null) {
|
if (room != null && room.getLayout() != null) {
|
||||||
this.client.sendResponse(new RoomRelativeMapComposer(room));
|
this.client.sendResponse(new RoomRelativeMapComposer(room));
|
||||||
|
|
||||||
this.client.sendResponse(new RoomHeightMapComposer(room));
|
this.client.sendResponse(new RoomHeightMapComposer(room));
|
||||||
|
Loading…
Reference in New Issue
Block a user