Skip to content

Commit

Permalink
update packet data (#90)
Browse files Browse the repository at this point in the history
* update builderclub packet

* update targeted offer var names

* update var names
  • Loading branch information
dank074 authored Jan 3, 2023
1 parent f4c7c3c commit 3371f08
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion src/api/purse/IPurse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface IPurse
activityPoints: Map<number, number>;
clubDays: number;
clubPeriods: number;
_Str_13571: boolean;
hasClubLeft: boolean;
isVip: boolean;
pastClubDays: number;
pastVipDays: number;
Expand Down
2 changes: 1 addition & 1 deletion src/api/purse/Purse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class Purse implements IPurse
this._clubPeriods = k;
}

public get _Str_13571(): boolean
public get hasClubLeft(): boolean
{
return (this._clubDays > 0) || (this._clubPeriods > 0);
}
Expand Down
12 changes: 6 additions & 6 deletions src/api/room/widgets/AvatarInfoUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class AvatarInfoUtilities
if(guildId !== 0)
{
furniInfo.groupId = guildId;
//this.container.connection.send(new _Str_2863(guildId, false));
//this.container.connection.send(new GroupInformationComposer(guildId, false));
}

if(IsOwnerOfFurniture(roomObject)) furniInfo.isOwner = true;
Expand Down Expand Up @@ -250,7 +250,7 @@ export class AvatarInfoUtilities
if(tradeMode !== RoomTradingLevelEnum.FREE_TRADING) userInfo.canTradeReason = AvatarInfoUser.TRADE_REASON_NO_TRADING;

// const _local_12 = GetSessionDataManager().userId;
// _local_13 = GetSessionDataManager()._Str_18437(_local_12);
// _local_13 = GetSessionDataManager().getUserTags(_local_12);
// this._Str_16287(_local_12, _local_13);
}

Expand All @@ -259,10 +259,10 @@ export class AvatarInfoUtilities
userInfo.groupName = userData.groupName;
userInfo.badges = roomSession.userDataManager.getUserBadges(userData.webID);
userInfo.figure = userData.figure;
//var _local_8:Array = GetSessionDataManager()._Str_18437(userData.webID);
//this._Str_16287(userData._Str_2394, _local_8);
//this._container._Str_8097._Str_14387(userData.webID);
//this._container.connection.send(new _Str_8049(userData._Str_2394));
//var _local_8:Array = GetSessionDataManager().getUserTags(userData.webID);
//this._Str_16287(userData.webId, _local_8);
//this._container.habboGroupsManager.updateVisibleExtendedProfile(userData.webID);
//this._container.connection.send(new GetRelationshipStatusInfoMessageComposer(userData.webId));

return userInfo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const OfferBubbleView = (props: { offer: TargetedOfferData, setOpen: Disp
if (!offer) return;

return <LayoutNotificationBubbleView fadesOut={ false } onClose={ null } onClick={ evt => setOpen(true) } gap={ 2 }>
<Base className="nitro-targeted-offer-icon" style={ { backgroundImage: `url(${ GetConfiguration('image.library.url') + offer._Str_13452 })` } }/>
<Base className="nitro-targeted-offer-icon" style={ { backgroundImage: `url(${ GetConfiguration('image.library.url') + offer.iconImageUrl })` } }/>
<Text variant="light" className="ubuntu-bold">{ offer.title }</Text>
</LayoutNotificationBubbleView>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ interface AvatarInfoUseProductConfirmViewProps
onClose: () => void;
}

const _Str_5091: number = -1;
const _Str_11906: number = 0;
const _Str_11214: number = 1;
const _Str_11733: number = 2;
const _Str_11369: number = 3;
const _Str_8759: number = 4;
const _Str_8432: number = 5;
const _Str_9653: number = 6;
const PRODUCT_PAGE_UKNOWN: number = -1;
const PRODUCT_PAGE_SHAMPOO: number = 0;
const PRODUCT_PAGE_CUSTOM_PART: number = 1;
const PRODUCT_PAGE_CUSTOM_PART_SHAMPOO: number = 2;
const PRODUCT_PAGE_SADDLE: number = 3;
const PRODUCT_PAGE_REVIVE: number = 4;
const PRODUCT_PAGE_REBREED: number = 5;
const PRODUCT_PAGE_FERTILIZE: number = 6;

export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmViewProps> = props =>
{
const { item = null, onClose = null } = props;
const [ mode, setMode ] = useState(_Str_5091);
const [ mode, setMode ] = useState(PRODUCT_PAGE_UKNOWN);
const [ petData, setPetData ] = useState<IRoomUserData>(null);
const [ furniData, setFurniData ] = useState<IFurnitureData>(null);
const { roomSession = null } = useRoom();
Expand Down Expand Up @@ -189,30 +189,30 @@ export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmView

setFurniData(furniData);

let mode = _Str_5091;
let mode = PRODUCT_PAGE_UKNOWN;

switch(furniData.specialType)
{
case FurniCategory.PET_SHAMPOO:
mode = _Str_11906;
mode = PRODUCT_PAGE_SHAMPOO;
break;
case FurniCategory.PET_CUSTOM_PART:
mode = _Str_11214;
mode = PRODUCT_PAGE_CUSTOM_PART;
break;
case FurniCategory.PET_CUSTOM_PART_SHAMPOO:
mode = _Str_11733;
mode = PRODUCT_PAGE_CUSTOM_PART_SHAMPOO;
break;
case FurniCategory.PET_SADDLE:
mode = _Str_11369;
mode = PRODUCT_PAGE_SADDLE;
break;
case FurniCategory.MONSTERPLANT_REVIVAL:
mode = _Str_8759;
mode = PRODUCT_PAGE_REVIVE;
break;
case FurniCategory.MONSTERPLANT_REBREED:
mode = _Str_8432;
mode = PRODUCT_PAGE_REBREED;
break;
case FurniCategory.MONSTERPLANT_FERTILIZE:
mode = _Str_9653;
mode = PRODUCT_PAGE_FERTILIZE;
break;
}

Expand All @@ -233,37 +233,37 @@ export const AvatarInfoUseProductConfirmView: FC<AvatarInfoUseProductConfirmView
</Column>
<Column justifyContent="between" overflow="auto">
<Column gap={ 2 }>
{ (mode === _Str_11906) &&
{ (mode === PRODUCT_PAGE_SHAMPOO) &&
<>
<Text>{ LocalizeText('useproduct.widget.text.shampoo', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.shampoo') }</Text>
</> }
{ (mode === _Str_11214) &&
{ (mode === PRODUCT_PAGE_CUSTOM_PART) &&
<>
<Text>{ LocalizeText('useproduct.widget.text.custompart', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.custompart') }</Text>
</> }
{ (mode === _Str_11733) &&
{ (mode === PRODUCT_PAGE_CUSTOM_PART_SHAMPOO) &&
<>
<Text>{ LocalizeText('useproduct.widget.text.custompartshampoo', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.custompartshampoo') }</Text>
</> }
{ (mode === _Str_11369) &&
{ (mode === PRODUCT_PAGE_SADDLE) &&
<>
<Text>{ LocalizeText('useproduct.widget.text.saddle', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.saddle') }</Text>
</> }
{ (mode === _Str_8759) &&
{ (mode === PRODUCT_PAGE_REVIVE) &&
<>
<Text>{ LocalizeText('useproduct.widget.text.revive_monsterplant', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.revive_monsterplant') }</Text>
</> }
{ (mode === _Str_8432) &&
{ (mode === PRODUCT_PAGE_REBREED) &&
<>
<Text>{ LocalizeText('useproduct.widget.text.rebreed_monsterplant', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.rebreed_monsterplant') }</Text>
</> }
{ (mode === _Str_9653) &&
{ (mode === PRODUCT_PAGE_FERTILIZE) &&
<>
<Text>{ LocalizeText('useproduct.widget.text.fertilize_monsterplant', [ 'productName' ], [ furniData.name ] ) }</Text>
<Text>{ LocalizeText('useproduct.widget.info.fertilize_monsterplant') }</Text>
Expand Down
30 changes: 15 additions & 15 deletions src/hooks/catalog/useCatalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ const useCatalogState = () =>
const loadCatalogPage = useCallback((pageId: number, offerId: number) =>
{
if(pageId < 0) return;

setIsBusy(true);
setPageId(pageId);

Expand All @@ -285,9 +285,9 @@ const useCatalogState = () =>
for(const offer of catalogPage.offers)
{
if(offer.offerId !== offerId) continue;

setCurrentOffer(offer)

break;
}
}
Expand Down Expand Up @@ -351,7 +351,7 @@ const useCatalogState = () =>

return nodes;
});

if(targetNode.pageId > -1) loadCatalogPage(targetNode.pageId, offerId);
}, [ setActiveNodes, loadCatalogPage, cancelObjectMover ]);

Expand Down Expand Up @@ -544,9 +544,9 @@ const useCatalogState = () =>
setPurchaseOptions(prevValue =>
{
const newValue = { ...prevValue };

newValue.extraData =( offer.product.extraParam || null);

return newValue;
});
}
Expand Down Expand Up @@ -576,7 +576,7 @@ const useCatalogState = () =>
break;
}
}

petPalettes.push(petPalette);

return { ...prevValue, petPalettes };
Expand Down Expand Up @@ -636,7 +636,7 @@ const useCatalogState = () =>
}

const message = LocalizeText(`inventory.marketplace.result.${ parser.result }`);

simpleAlert(message, NotificationAlertType.DEFAULT, null, null, title);
});

Expand Down Expand Up @@ -674,11 +674,11 @@ const useCatalogState = () =>
{
const parser = event.getParser();

setFurniLimit(parser._Str_15864);
setMaxFurniLimit(parser._Str_24094);
setSecondsLeft(parser._Str_3709);
setFurniLimit(parser.furniLimit);
setMaxFurniLimit(parser.maxFurniLimit);
setSecondsLeft(parser.secondsLeft);
setUpdateTime(GetTickerTime());
setSecondsLeftWithGrace(parser._Str_24379);
setSecondsLeftWithGrace(parser.secondsLeftWithGrace);

refreshBuilderStatus();
});
Expand Down Expand Up @@ -757,7 +757,7 @@ const useCatalogState = () =>

if(roomObject) roomObject.model.setValue(RoomObjectVariable.FURNITURE_ALPHA_MULTIPLIER, 0.5);

if(catalogSkipPurchaseConfirmation)
if(catalogSkipPurchaseConfirmation)
{
SendMessageComposer(new PurchaseFromCatalogComposer(pageId, purchasableOffer.offerId, product.extraParam, 1));

Expand Down Expand Up @@ -832,7 +832,7 @@ const useCatalogState = () =>
{
return () => setCurrentOffer(null);
}, [ currentPage ]);

useEffect(() =>
{
if(!isVisible || !rootNode || !offersToNodes || !requestedPage.current) return;
Expand Down Expand Up @@ -881,7 +881,7 @@ const useCatalogState = () =>

setPurchaseOptions({ quantity: 1, extraData: null, extraParamRequired: false, previewStuffData: null });
}, [ currentOffer ]);

useEffect(() =>
{
if(!isVisible || rootNode) return;
Expand Down

0 comments on commit 3371f08

Please sign in to comment.