mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-26 16:30:52 +01:00
Updated HC Badge Achievement so it no longer requires payday to be enabled.
This commit is contained in:
parent
ac83132b75
commit
3c18b060cc
@ -85,9 +85,11 @@ public class SubscriptionHabboClub extends Subscription {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((Emulator.getIntUnixTimestamp() - habbo.getHabboStats().hcMessageLastModified) < 60) {
|
if ((Emulator.getIntUnixTimestamp() - habbo.getHabboStats().hcMessageLastModified) < 60) {
|
||||||
Emulator.getThreading().run(() -> { habbo.getClient().sendResponse(new UserClubComposer(habbo)); habbo.getClient().sendResponse(new UserPermissionsComposer(habbo)); }, (Emulator.getIntUnixTimestamp() - habbo.getHabboStats().hcMessageLastModified));
|
Emulator.getThreading().run(() -> {
|
||||||
}
|
habbo.getClient().sendResponse(new UserClubComposer(habbo));
|
||||||
else {
|
habbo.getClient().sendResponse(new UserPermissionsComposer(habbo));
|
||||||
|
}, (Emulator.getIntUnixTimestamp() - habbo.getHabboStats().hcMessageLastModified));
|
||||||
|
} else {
|
||||||
habbo.getClient().sendResponse(new UserClubComposer(habbo, SubscriptionHabboClub.HABBO_CLUB, UserClubComposer.RESPONSE_TYPE_NORMAL));
|
habbo.getClient().sendResponse(new UserClubComposer(habbo, SubscriptionHabboClub.HABBO_CLUB, UserClubComposer.RESPONSE_TYPE_NORMAL));
|
||||||
habbo.getClient().sendResponse(new UserPermissionsComposer(habbo));
|
habbo.getClient().sendResponse(new UserPermissionsComposer(habbo));
|
||||||
}
|
}
|
||||||
@ -172,6 +174,7 @@ public class SubscriptionHabboClub extends Subscription {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate's a users upcoming HC Pay day rewards
|
* Calculate's a users upcoming HC Pay day rewards
|
||||||
|
*
|
||||||
* @param habbo User to calculate for
|
* @param habbo User to calculate for
|
||||||
* @return ClubCenterDataComposer
|
* @return ClubCenterDataComposer
|
||||||
*/
|
*/
|
||||||
@ -272,8 +275,7 @@ public class SubscriptionHabboClub extends Subscription {
|
|||||||
}
|
}
|
||||||
stats.lastHCPayday = timestampNow;
|
stats.lastHCPayday = timestampNow;
|
||||||
Emulator.getThreading().run(stats);
|
Emulator.getThreading().run(stats);
|
||||||
}
|
} catch (Exception e) {
|
||||||
catch (Exception e) {
|
|
||||||
SubscriptionManager.LOGGER.error("Exception processing HC payday for user #" + set.getInt("user_id"), e);
|
SubscriptionManager.LOGGER.error("Exception processing HC payday for user #" + set.getInt("user_id"), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -297,8 +299,7 @@ public class SubscriptionHabboClub extends Subscription {
|
|||||||
stm2.execute();
|
stm2.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} catch (SQLException e) {
|
||||||
catch (SQLException e) {
|
|
||||||
SubscriptionManager.LOGGER.error("Caught SQL exception", e);
|
SubscriptionManager.LOGGER.error("Caught SQL exception", e);
|
||||||
}
|
}
|
||||||
isExecuting = false;
|
isExecuting = false;
|
||||||
@ -306,6 +307,7 @@ public class SubscriptionHabboClub extends Subscription {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a user logs in. Checks for any unclaimed HC Pay day rewards and issues rewards.
|
* Called when a user logs in. Checks for any unclaimed HC Pay day rewards and issues rewards.
|
||||||
|
*
|
||||||
* @param habbo User to process
|
* @param habbo User to process
|
||||||
*/
|
*/
|
||||||
public static void processUnclaimed(Habbo habbo) {
|
public static void processUnclaimed(Habbo habbo) {
|
||||||
@ -334,19 +336,25 @@ public class SubscriptionHabboClub extends Subscription {
|
|||||||
stm2.execute();
|
stm2.execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} catch (Exception e) {
|
||||||
catch (Exception e) {
|
|
||||||
SubscriptionManager.LOGGER.error("Exception processing HC payday for user #" + set.getInt("user_id"), e);
|
SubscriptionManager.LOGGER.error("Exception processing HC payday for user #" + set.getInt("user_id"), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} catch (SQLException e) {
|
||||||
catch (SQLException e) {
|
|
||||||
SubscriptionManager.LOGGER.error("Caught SQL exception", e);
|
SubscriptionManager.LOGGER.error("Caught SQL exception", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Seperated these because Beny shouldn't have tied them to Payday.
|
||||||
|
*/
|
||||||
|
public static void processClubBadge(Habbo habbo) {
|
||||||
|
progressAchievement(habbo.getHabboInfo());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Issues rewards to user.
|
* Issues rewards to user.
|
||||||
* @param habbo User to reward to
|
* @param habbo User to reward to
|
||||||
|
@ -205,6 +205,8 @@ public class SecureLoginEvent extends MessageHandler {
|
|||||||
SubscriptionHabboClub.processUnclaimed(habbo);
|
SubscriptionHabboClub.processUnclaimed(habbo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SubscriptionHabboClub.processClubBadge(habbo);
|
||||||
|
|
||||||
Messenger.checkFriendSizeProgress(habbo);
|
Messenger.checkFriendSizeProgress(habbo);
|
||||||
|
|
||||||
if (!habbo.getHabboStats().hasGottenDefaultSavedSearches) {
|
if (!habbo.getHabboStats().hasGottenDefaultSavedSearches) {
|
||||||
|
Loading…
Reference in New Issue
Block a user