mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-19 07:56:26 +01:00
Guild purchase restrictions - Room in use and HC Required
This commit is contained in:
parent
54cf0b1109
commit
d0e12d6871
@ -65,4 +65,6 @@ UPDATE `users_pets` LEFT JOIN `rooms` ON `users_pets`.`room_id` = `rooms`.`id` S
|
|||||||
|
|
||||||
ALTER TABLE `users_settings` ADD COLUMN `forums_post_count` int(11) NULL DEFAULT 0 AFTER `perk_trade`;
|
ALTER TABLE `users_settings` ADD COLUMN `forums_post_count` int(11) NULL DEFAULT 0 AFTER `perk_trade`;
|
||||||
|
|
||||||
|
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('catalog.guild.hc_required', '1');
|
||||||
|
|
||||||
#END DATABASE UPDATE: 2.0.0 -> DEV
|
#END DATABASE UPDATE: 2.0.0 -> DEV
|
@ -8,6 +8,7 @@ import com.eu.habbo.messages.incoming.MessageHandler;
|
|||||||
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
import com.eu.habbo.messages.outgoing.catalog.AlertPurchaseFailedComposer;
|
||||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKComposer;
|
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildBoughtComposer;
|
import com.eu.habbo.messages.outgoing.guilds.GuildBoughtComposer;
|
||||||
|
import com.eu.habbo.messages.outgoing.guilds.GuildEditFailComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
||||||
import com.eu.habbo.plugin.events.guilds.GuildPurchasedEvent;
|
import com.eu.habbo.plugin.events.guilds.GuildPurchasedEvent;
|
||||||
|
|
||||||
@ -30,6 +31,11 @@ public class RequestGuildBuyEvent extends MessageHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Emulator.getConfig().getBoolean("catalog.guild.hc_required", true) && this.client.getHabbo().getHabboStats().getClubExpireTimestamp() < Emulator.getIntUnixTimestamp()) {
|
||||||
|
this.client.sendResponse(new GuildEditFailComposer(GuildEditFailComposer.HC_REQUIRED));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String name = this.packet.readString();
|
String name = this.packet.readString();
|
||||||
String description = this.packet.readString();
|
String description = this.packet.readString();
|
||||||
|
|
||||||
@ -39,6 +45,11 @@ public class RequestGuildBuyEvent extends MessageHandler
|
|||||||
|
|
||||||
if(r != null)
|
if(r != null)
|
||||||
{
|
{
|
||||||
|
if(r.hasGuild()) {
|
||||||
|
this.client.sendResponse(new GuildEditFailComposer(GuildEditFailComposer.ROOM_ALREADY_IN_USE));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(r.getOwnerId() == this.client.getHabbo().getHabboInfo().getId())
|
if(r.getOwnerId() == this.client.getHabbo().getHabboInfo().getId())
|
||||||
{
|
{
|
||||||
if (r.getGuildId() == 0)
|
if (r.getGuildId() == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user