Commit 4d2ddbde authored by skeletor's avatar skeletor
Browse files

fixed more variables

parent 047344bf
......@@ -322,7 +322,7 @@ export class CatalogService implements OnDestroy
this._purse.clubPeriods = Math.max(0, parser.months);
this._purse.isVip = parser.isVip;
this._purse.pastClubDays = parser.pastVIPDays;
this._purse.Str_14389 = parser.years == UserSubscriptionParser._Str_14729;
this._purse.Str_14389 = parser.years == UserSubscriptionParser.RESPONSE_TYPE_LOGIN;
this._purse.minutesUntilExpiration = parser.totalSeconds;
}
......
import { Injectable, NgZone, OnDestroy } from '@angular/core';
import { IMessageEvent } from 'nitro-renderer/src/core/communication/messages/IMessageEvent';
import { AdvancedMap } from 'nitro-renderer/src/core/utils/AdvancedMap';
import { MarketplaceAfterOrderStatusEvent } from 'nitro-renderer/src/nitro/communication/messages/incoming/catalog/marketplace/MarketplaceAfterOrderStatusEvent';
import { MarketplaceBuyOfferResultEvent } from 'nitro-renderer/src/nitro/communication/messages/incoming/catalog/marketplace/MarketplaceBuyOfferResultEvent';
import { MarketplaceCancelItemEvent } from 'nitro-renderer/src/nitro/communication/messages/incoming/catalog/marketplace/MarketplaceCancelItemEvent';
import { MarketplaceOffersReceivedEvent } from 'nitro-renderer/src/nitro/communication/messages/incoming/catalog/marketplace/MarketplaceOffersReceivedEvent';
import { MarketplaceOwnItemsEvent } from 'nitro-renderer/src/nitro/communication/messages/incoming/catalog/marketplace/MarketplaceOwnItemsEvent';
......@@ -51,7 +51,7 @@ export class MarketplaceService implements OnDestroy
new MarketplaceOwnItemsEvent(this.onMarketplaceOwnItemsEvent.bind(this)),
new MarketplaceCancelItemEvent(this.onMarketplaceCancelItemEvent.bind(this)),
new MarketplaceOffersReceivedEvent(this.onMarketplaceOffersReceivedEvent.bind(this)),
new MarketplaceAfterOrderStatusEvent(this.onMarketplaceAfterOrderStatusEvent.bind(this)),
new MarketplaceBuyOfferResultEvent(this.onMarketplaceAfterOrderStatusEvent.bind(this)),
];
for(const message of this._messages) Nitro.instance.communication.registerMessageEvent(message);
......@@ -95,7 +95,7 @@ export class MarketplaceService implements OnDestroy
});
}
private onMarketplaceAfterOrderStatusEvent(event: MarketplaceAfterOrderStatusEvent): void
private onMarketplaceAfterOrderStatusEvent(event: MarketplaceBuyOfferResultEvent): void
{
if(!event) return;
......@@ -111,7 +111,7 @@ export class MarketplaceService implements OnDestroy
if(parser.result == 2)
{
const offerId = parser._Str_7501;
const offerId = parser.requestedOfferId;
const nonRemovedOffers = [];
for(const offer of this._offerOnMarket)
{
......
......@@ -274,7 +274,7 @@ export class InventoryFurnitureService implements OnDestroy
if(!parser) return;
switch(parser._Str_3278)
switch(parser.resultCode)
{
case 2:
this._notificationService.alert(this.getTranslation('inventory.marketplace.no_trading_privilege.info'), this.getTranslation('inventory.marketplace.no_trading_privilege.title'));
......
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
import { ModtoolUserVisitedRoomsRoom } from 'nitro-renderer/src/nitro/communication/messages/parser/modtool/utils/ModtoolUserVisitedRoomsRoom';
import { RoomVisitData } from 'nitro-renderer/src/nitro/communication/messages/parser/modtool/utils/RoomVisitData';
import { NavigatorService } from '../../../../navigator/services/navigator.service';
import { ModToolUserInfoService } from '../../../services/mod-tool-user-info.service';
import { ModToolService } from '../../../services/mod-tool.service';
......@@ -39,17 +39,17 @@ export class ModToolUserVisitedRoomsComponent extends ModTool implements OnInit,
this._modToolService.closeRoomVisitedTool();
}
public get roomVisitedForUser(): ModtoolUserVisitedRoomsRoom[]
public get roomVisitedForUser(): RoomVisitData[]
{
if(!this._modToolService.roomUserVisitedData) return [];
return this._modToolService.roomUserVisitedData.rooms;
}
public showTime(room: ModtoolUserVisitedRoomsRoom): string
public showTime(room: RoomVisitData): string
{
const a = room._Str_22929;
const b = room._Str_25550;
const a = room.enterHour;
const b = room.enterMinute;
return this.prependZero(a) + ':' + this.prependZero(b);
}
......@@ -58,7 +58,7 @@ export class ModToolUserVisitedRoomsComponent extends ModTool implements OnInit,
return (k < 10) ? `0${k}` : k.toString();
}
public goToRoom(room: ModtoolUserVisitedRoomsRoom): void
public goToRoom(room: RoomVisitData): void
{
this._navigatorService.goToPrivateRoom(room.roomId);
}
......
......@@ -33,7 +33,7 @@ import { RoomInfoComposer } from 'nitro-renderer/src/nitro/communication/message
import { NavigatorCategoryDataParser } from 'nitro-renderer/src/nitro/communication/messages/parser/navigator/NavigatorCategoryDataParser';
import { NavigatorSearchResultList } from 'nitro-renderer/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultList';
import { NavigatorTopLevelContext } from 'nitro-renderer/src/nitro/communication/messages/parser/navigator/utils/NavigatorTopLevelContext';
import { RoomEnterErrorParser } from 'nitro-renderer/src/nitro/communication/messages/parser/room/access/RoomEnterErrorParser';
import { CantConnectMessageParser } from 'nitro-renderer/src/nitro/communication/messages/parser/room/access/CantConnectMessageParser';
import { RoomDataParser } from 'nitro-renderer/src/nitro/communication/messages/parser/room/data/RoomDataParser';
import { ToolbarIconEnum } from 'nitro-renderer/src/nitro/enums/ToolbarIconEnum';
import { NitroToolbarEvent } from 'nitro-renderer/src/nitro/events/NitroToolbarEvent';
......@@ -306,13 +306,13 @@ export class NavigatorService implements OnDestroy, ILinkEventTracker
{
switch(parser.reason)
{
case RoomEnterErrorParser.FULL_ERROR:
case CantConnectMessageParser.REASON_FULL:
this._notificationService.alert('${navigator.guestroomfull.text}', '${navigator.guestroomfull.title}');
break;
case RoomEnterErrorParser.QUEUE_ERROR:
case CantConnectMessageParser.REASON_QUEUE_ERROR:
this._notificationService.alert('${room.queue.error. ' + parser.parameter + '}', '${room.queue.error.title}');
break;
case RoomEnterErrorParser.BANNED:
case CantConnectMessageParser.REASON_BANNED:
this._notificationService.alert('${navigator.banned.text}', '${navigator.banned.title}');
break;
default:
......
......@@ -4,7 +4,7 @@ import { PetType } from 'nitro-renderer/src/nitro/avatar/pets/PetType';
import { RoomAdsUpdateComposer } from 'nitro-renderer/src/nitro/communication/messages/outgoing/room/furniture/ads/RoomAdsUpdateComposer';
import { RoomUnitDropHandItemComposer } from 'nitro-renderer/src/nitro/communication/messages/outgoing/room/unit/RoomUnitDropHandItemComposer';
import { RoomUnitGiveHandItemComposer } from 'nitro-renderer/src/nitro/communication/messages/outgoing/room/unit/RoomUnitGiveHandItemComposer';
import { RoomModerationParser } from 'nitro-renderer/src/nitro/communication/messages/parser/room/data/RoomModerationParser';
import { RoomModerationSettings } from 'nitro-renderer/src/nitro/communication/messages/parser/room/data/RoomModerationSettings';
import { Nitro } from 'nitro-renderer/src/nitro/Nitro';
import { ObjectDataFactory } from 'nitro-renderer/src/nitro/room/object/data/ObjectDataFactory';
import { RoomObjectCategory } from 'nitro-renderer/src/nitro/room/object/RoomObjectCategory';
......@@ -644,14 +644,14 @@ export class InfoStandWidgetHandler implements IRoomWidgetHandler
{
switch(tradeMode)
{
case RoomTradingLevelEnum._Str_14475: {
case RoomTradingLevelEnum.ROOM_CONTROLLER_REQUIRED: {
const _local_15 = ((event.roomControllerLevel !== RoomControllerLevel.NONE) && (event.roomControllerLevel !== RoomControllerLevel.GUILD_MEMBER));
const _local_16 = ((event.flatControl !== RoomControllerLevel.NONE) && (event.flatControl !== RoomControllerLevel.GUILD_MEMBER));
event.canTrade = ((_local_15) || (_local_16));
break;
}
case RoomTradingLevelEnum._Str_9173:
case RoomTradingLevelEnum.FREE_TRADING:
event.canTrade = true;
break;
default:
......@@ -664,7 +664,7 @@ export class InfoStandWidgetHandler implements IRoomWidgetHandler
if(isShuttingDown) event._Str_6622 = RoomWidgetUpdateInfostandUserEvent._Str_14161;
if(tradeMode !== RoomTradingLevelEnum._Str_9173) event._Str_6622 = RoomWidgetUpdateInfostandUserEvent._Str_13798;
if(tradeMode !== RoomTradingLevelEnum.FREE_TRADING) event._Str_6622 = RoomWidgetUpdateInfostandUserEvent._Str_13798;
// const _local_12 = this._container.sessionDataManager.userId;
// _local_13 = this._container.sessionDataManager._Str_18437(_local_12);
......@@ -748,11 +748,11 @@ export class InfoStandWidgetHandler implements IRoomWidgetHandler
private _Str_23100(userInfo:RoomWidgetUpdateInfostandUserEvent): boolean
{
const settingsFunction = function (event: RoomWidgetUpdateInfostandUserEvent, moderation: RoomModerationParser): boolean
const settingsFunction = function (event: RoomWidgetUpdateInfostandUserEvent, moderation: RoomModerationSettings): boolean
{
switch(moderation.allowMute)
{
case RoomModerationParser._Str_5047:
case RoomModerationSettings.MODERATION_LEVEL_USER_WITH_RIGHTS:
return this._Str_9213(event);
default:
return (event.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER);
......@@ -764,13 +764,13 @@ export class InfoStandWidgetHandler implements IRoomWidgetHandler
private _Str_22729(userInfo:RoomWidgetUpdateInfostandUserEvent): boolean
{
const settingsFunction = function(event: RoomWidgetUpdateInfostandUserEvent, _arg_2: RoomModerationParser): boolean
const settingsFunction = function(event: RoomWidgetUpdateInfostandUserEvent, _arg_2: RoomModerationSettings): boolean
{
switch(_arg_2.allowKick)
{
case RoomModerationParser._Str_11537:
case RoomModerationSettings.MODERATION_LEVEL_ALL:
return true;
case RoomModerationParser._Str_5047:
case RoomModerationSettings.MODERATION_LEVEL_USER_WITH_RIGHTS:
return this._Str_9213(event);
default:
return (event.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER);
......@@ -782,11 +782,11 @@ export class InfoStandWidgetHandler implements IRoomWidgetHandler
private _Str_23573(userInfo:RoomWidgetUpdateInfostandUserEvent): boolean
{
const settingsFunction = function(event: RoomWidgetUpdateInfostandUserEvent, _arg_2: RoomModerationParser): boolean
const settingsFunction = function(event: RoomWidgetUpdateInfostandUserEvent, _arg_2: RoomModerationSettings): boolean
{
switch(_arg_2.allowBan)
{
case RoomModerationParser._Str_5047:
case RoomModerationSettings.MODERATION_LEVEL_USER_WITH_RIGHTS:
return this._Str_9213(event);
default:
return (event.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER);
......@@ -825,7 +825,7 @@ export class InfoStandWidgetHandler implements IRoomWidgetHandler
{
if(!event || !this._container || !this._container.events) return;
const petData = event._Str_24727;
const petData = event.petInfo;
if(!petData) return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment