mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Offer ID fix for catalog page highlights
This commit is contained in:
parent
20120ea6bb
commit
d2fc1d6827
@ -11,14 +11,14 @@ public class RequestCatalogPageEvent extends MessageHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void handle() throws Exception {
|
public void handle() throws Exception {
|
||||||
int catalogPageId = this.packet.readInt();
|
int catalogPageId = this.packet.readInt();
|
||||||
int unknown = this.packet.readInt();
|
int offerId = this.packet.readInt();
|
||||||
String mode = this.packet.readString();
|
String mode = this.packet.readString();
|
||||||
|
|
||||||
CatalogPage page = Emulator.getGameEnvironment().getCatalogManager().catalogPages.get(catalogPageId);
|
CatalogPage page = Emulator.getGameEnvironment().getCatalogManager().catalogPages.get(catalogPageId);
|
||||||
|
|
||||||
if (catalogPageId > 0 && page != null) {
|
if (catalogPageId > 0 && page != null) {
|
||||||
if (page.getRank() <= this.client.getHabbo().getHabboInfo().getRank().getId() && page.isEnabled()) {
|
if (page.getRank() <= this.client.getHabbo().getHabboInfo().getRank().getId() && page.isEnabled()) {
|
||||||
this.client.sendResponse(new CatalogPageComposer(page, this.client.getHabbo(), mode));
|
this.client.sendResponse(new CatalogPageComposer(page, this.client.getHabbo(), offerId, mode));
|
||||||
} else {
|
} else {
|
||||||
if (!page.isVisible()) {
|
if (!page.isVisible()) {
|
||||||
ScripterManager.scripterDetected(this.client, Emulator.getTexts().getValue("scripter.warning.catalog.page").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername()).replace("%pagename%", page.getCaption()));
|
ScripterManager.scripterDetected(this.client, Emulator.getTexts().getValue("scripter.warning.catalog.page").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername()).replace("%pagename%", page.getCaption()));
|
||||||
|
@ -20,11 +20,13 @@ import java.util.Map;
|
|||||||
public class CatalogPageComposer extends MessageComposer {
|
public class CatalogPageComposer extends MessageComposer {
|
||||||
private final CatalogPage page;
|
private final CatalogPage page;
|
||||||
private final Habbo habbo;
|
private final Habbo habbo;
|
||||||
|
private final int offerId;
|
||||||
private final String mode;
|
private final String mode;
|
||||||
|
|
||||||
public CatalogPageComposer(CatalogPage page, Habbo habbo, String mode) {
|
public CatalogPageComposer(CatalogPage page, Habbo habbo, int offerId, String mode) {
|
||||||
this.page = page;
|
this.page = page;
|
||||||
this.habbo = habbo;
|
this.habbo = habbo;
|
||||||
|
this.offerId = offerId;
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +51,7 @@ public class CatalogPageComposer extends MessageComposer {
|
|||||||
item.serialize(this.response);
|
item.serialize(this.response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.response.appendInt(0);
|
this.response.appendInt(offerId);
|
||||||
this.response.appendBoolean(false); //acceptSeasonCurrencyAsCredits
|
this.response.appendBoolean(false); //acceptSeasonCurrencyAsCredits
|
||||||
|
|
||||||
if (this.page instanceof FrontPageFeaturedLayout || this.page instanceof FrontpageLayout) {
|
if (this.page instanceof FrontPageFeaturedLayout || this.page instanceof FrontpageLayout) {
|
||||||
|
Loading…
Reference in New Issue
Block a user