You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 15:06:20 +00:00
Merge remote-tracking branch 'origin/main' into feature/pr-20260327
This commit is contained in:
@@ -242,6 +242,8 @@ export class AvatarRenderManager implements IAvatarRenderManager
|
||||
const palette = figureData.getPalette(set.paletteID);
|
||||
const colors = container.getPartColorIds(part);
|
||||
|
||||
if(!palette) continue;
|
||||
|
||||
for(const colorId of colors)
|
||||
{
|
||||
const color = palette.getColor(colorId);
|
||||
|
||||
@@ -37,18 +37,18 @@ export class AvatarStructure
|
||||
|
||||
}
|
||||
|
||||
public initGeometry(k: any): void
|
||||
public initGeometry(data: any): void
|
||||
{
|
||||
if(!k) return;
|
||||
if(!data) return;
|
||||
|
||||
this._geometry = new AvatarModelGeometry(k);
|
||||
this._geometry = new AvatarModelGeometry(data);
|
||||
}
|
||||
|
||||
public initActions(k: IAssetManager, _arg_2: any): void
|
||||
public initActions(assets: IAssetManager, data: any): void
|
||||
{
|
||||
if(!_arg_2) return;
|
||||
if(!data) return;
|
||||
|
||||
this._actionManager = new AvatarActionManager(k, _arg_2);
|
||||
this._actionManager = new AvatarActionManager(assets, data);
|
||||
this._defaultAction = this._actionManager.getDefaultAction();
|
||||
}
|
||||
|
||||
@@ -59,11 +59,11 @@ export class AvatarStructure
|
||||
this._defaultAction = this._actionManager.getDefaultAction();
|
||||
}
|
||||
|
||||
public initPartSets(k: any): boolean
|
||||
public initPartSets(data: any): boolean
|
||||
{
|
||||
if(!k) return false;
|
||||
if(!data) return false;
|
||||
|
||||
if(this._partSetsData.parse(k))
|
||||
if(this._partSetsData.parse(data))
|
||||
{
|
||||
this._partSetsData.getPartDefinition('ri').appendToFigure = true;
|
||||
this._partSetsData.getPartDefinition('li').appendToFigure = true;
|
||||
@@ -74,18 +74,18 @@ export class AvatarStructure
|
||||
return false;
|
||||
}
|
||||
|
||||
public initAnimation(k: any): boolean
|
||||
public initAnimation(data: any): boolean
|
||||
{
|
||||
if(!k) return false;
|
||||
if(!data) return false;
|
||||
|
||||
return this._animationData.parse(k);
|
||||
return this._animationData.parse(data);
|
||||
}
|
||||
|
||||
public initFigureData(k: IFigureData): boolean
|
||||
public initFigureData(data: IFigureData): boolean
|
||||
{
|
||||
if(!k) return false;
|
||||
if(!data) return false;
|
||||
|
||||
return this._figureData.parse(k);
|
||||
return this._figureData.parse(data);
|
||||
}
|
||||
|
||||
public injectFigureData(data: IFigureData): void
|
||||
@@ -93,13 +93,13 @@ export class AvatarStructure
|
||||
this._figureData.injectJSON(data);
|
||||
}
|
||||
|
||||
public registerAnimations(k: IAssetManager, _arg_2: string = 'fx', _arg_3: number = 200): void
|
||||
public registerAnimations(assets: IAssetManager, prefix: string = 'fx', maxCount: number = 200): void
|
||||
{
|
||||
let index = 0;
|
||||
|
||||
while(index < _arg_3)
|
||||
while(index < maxCount)
|
||||
{
|
||||
const collection = k.getCollection((_arg_2 + index));
|
||||
const collection = assets.getCollection((prefix + index));
|
||||
|
||||
if(collection)
|
||||
{
|
||||
@@ -117,21 +117,21 @@ export class AvatarStructure
|
||||
this._animationManager.registerAnimation(this, data);
|
||||
}
|
||||
|
||||
public getPartColor(container: IAvatarFigureContainer, _arg_2: string, _arg_3: number = 0): IPartColor
|
||||
public getPartColor(figureContainer: IAvatarFigureContainer, partType: string, colorIndex: number = 0): IPartColor
|
||||
{
|
||||
const _local_4 = container.getPartColorIds(_arg_2);
|
||||
const colorIds = figureContainer.getPartColorIds(partType);
|
||||
|
||||
if((!(_local_4)) || (_local_4.length < _arg_3)) return null;
|
||||
if(!colorIds || (colorIds.length < colorIndex)) return null;
|
||||
|
||||
const _local_5 = this._figureData.getSetType(_arg_2);
|
||||
const setType = this._figureData.getSetType(partType);
|
||||
|
||||
if(_local_5 == null) return null;
|
||||
if(setType == null) return null;
|
||||
|
||||
const _local_6 = this._figureData.getPalette(_local_5.paletteID);
|
||||
const palette = this._figureData.getPalette(setType.paletteID);
|
||||
|
||||
if(!_local_6) return null;
|
||||
if(!palette) return null;
|
||||
|
||||
return _local_6.getColor(_local_4[_arg_3]);
|
||||
return palette.getColor(colorIds[colorIndex]);
|
||||
}
|
||||
|
||||
public getBodyPartData(animation: string, frameCount: number, spriteId: string): AvatarAnimationLayerData
|
||||
@@ -139,98 +139,98 @@ export class AvatarStructure
|
||||
return this._animationManager.getLayerData(animation, frameCount, spriteId) as AvatarAnimationLayerData;
|
||||
}
|
||||
|
||||
public getAnimation(k: string): Animation
|
||||
public getAnimation(name: string): Animation
|
||||
{
|
||||
return this._animationManager.getAnimation(k);
|
||||
return this._animationManager.getAnimation(name);
|
||||
}
|
||||
|
||||
public getActionDefinition(k: string): ActionDefinition
|
||||
public getActionDefinition(id: string): ActionDefinition
|
||||
{
|
||||
return this._actionManager.getActionDefinition(k);
|
||||
return this._actionManager.getActionDefinition(id);
|
||||
}
|
||||
|
||||
public getActionDefinitionWithState(k: string): ActionDefinition
|
||||
public getActionDefinitionWithState(state: string): ActionDefinition
|
||||
{
|
||||
return this._actionManager.getActionDefinitionWithState(k);
|
||||
return this._actionManager.getActionDefinitionWithState(state);
|
||||
}
|
||||
|
||||
public isMainAvatarSet(k: string): boolean
|
||||
public isMainAvatarSet(setType: string): boolean
|
||||
{
|
||||
return this._geometry.isMainAvatarSet(k);
|
||||
return this._geometry.isMainAvatarSet(setType);
|
||||
}
|
||||
|
||||
public sortActions(k: IActiveActionData[]): IActiveActionData[]
|
||||
public sortActions(actions: IActiveActionData[]): IActiveActionData[]
|
||||
{
|
||||
return this._actionManager.sortActions(k);
|
||||
return this._actionManager.sortActions(actions);
|
||||
}
|
||||
|
||||
public maxFrames(k: IActiveActionData[]): number
|
||||
public maxFrames(actions: IActiveActionData[]): number
|
||||
{
|
||||
let _local_2 = 0;
|
||||
let maxFrameCount = 0;
|
||||
|
||||
for(const _local_3 of k)
|
||||
for(const action of actions)
|
||||
{
|
||||
_local_2 = Math.max(_local_2, this._animationData.getFrameCount(_local_3.definition));
|
||||
}
|
||||
return _local_2;
|
||||
maxFrameCount = Math.max(maxFrameCount, this._animationData.getFrameCount(action.definition));
|
||||
}
|
||||
|
||||
public getMandatorySetTypeIds(k: string, _arg_2: number): string[]
|
||||
{
|
||||
if(!this._mandatorySetTypeIds[k])
|
||||
{
|
||||
this._mandatorySetTypeIds[k] = [];
|
||||
return maxFrameCount;
|
||||
}
|
||||
|
||||
if(this._mandatorySetTypeIds[k][_arg_2])
|
||||
public getMandatorySetTypeIds(gender: string, clubLevel: number): string[]
|
||||
{
|
||||
return this._mandatorySetTypeIds[k][_arg_2];
|
||||
if(!this._mandatorySetTypeIds[gender])
|
||||
{
|
||||
this._mandatorySetTypeIds[gender] = [];
|
||||
}
|
||||
|
||||
this._mandatorySetTypeIds[k][_arg_2] = this._figureData.getMandatorySetTypeIds(k, _arg_2);
|
||||
|
||||
return this._mandatorySetTypeIds[k][_arg_2];
|
||||
if(this._mandatorySetTypeIds[gender][clubLevel])
|
||||
{
|
||||
return this._mandatorySetTypeIds[gender][clubLevel];
|
||||
}
|
||||
|
||||
public getDefaultPartSet(k: string, _arg_2: string): IFigurePartSet
|
||||
{
|
||||
return this._figureData.getDefaultPartSet(k, _arg_2);
|
||||
this._mandatorySetTypeIds[gender][clubLevel] = this._figureData.getMandatorySetTypeIds(gender, clubLevel);
|
||||
|
||||
return this._mandatorySetTypeIds[gender][clubLevel];
|
||||
}
|
||||
|
||||
public getCanvasOffsets(k: IActiveActionData[], _arg_2: string, _arg_3: number): number[]
|
||||
public getDefaultPartSet(partType: string, gender: string): IFigurePartSet
|
||||
{
|
||||
return this._actionManager.getCanvasOffsets(k, _arg_2, _arg_3);
|
||||
return this._figureData.getDefaultPartSet(partType, gender);
|
||||
}
|
||||
|
||||
public getCanvas(k: string, _arg_2: string): AvatarCanvas
|
||||
public getCanvasOffsets(actions: IActiveActionData[], scale: string, direction: number): number[]
|
||||
{
|
||||
return this._geometry.getCanvas(k, _arg_2);
|
||||
return this._actionManager.getCanvasOffsets(actions, scale, direction);
|
||||
}
|
||||
|
||||
public removeDynamicItems(k: IAvatarImage): void
|
||||
public getCanvas(scale: string, geometryType: string): AvatarCanvas
|
||||
{
|
||||
this._geometry.removeDynamicItems(k);
|
||||
return this._geometry.getCanvas(scale, geometryType);
|
||||
}
|
||||
|
||||
public getActiveBodyPartIds(k: IActiveActionData, _arg_2: IAvatarImage): string[]
|
||||
public removeDynamicItems(avatar: IAvatarImage): void
|
||||
{
|
||||
let _local_3: string[] = [];
|
||||
this._geometry.removeDynamicItems(avatar);
|
||||
}
|
||||
|
||||
const _local_4: string[] = [];
|
||||
const _local_5 = k.definition.geometryType;
|
||||
|
||||
if(k.definition.isAnimation)
|
||||
public getActiveBodyPartIds(action: IActiveActionData, avatar: IAvatarImage): string[]
|
||||
{
|
||||
const _local_7 = ((k.definition.state + '.') + k.actionParameter);
|
||||
const _local_8 = this._animationManager.getAnimation(_local_7);
|
||||
let partTypeIds: string[] = [];
|
||||
const bodyPartIds: string[] = [];
|
||||
const geometryType = action.definition.geometryType;
|
||||
|
||||
if(_local_8)
|
||||
if(action.definition.isAnimation)
|
||||
{
|
||||
_local_3 = _local_8.getAnimatedBodyPartIds(0, k.overridingAction);
|
||||
const animationKey = ((action.definition.state + '.') + action.actionParameter);
|
||||
const animation = this._animationManager.getAnimation(animationKey);
|
||||
|
||||
if(_local_8.hasAddData())
|
||||
if(animation)
|
||||
{
|
||||
const _local_11 = {
|
||||
partTypeIds = animation.getAnimatedBodyPartIds(0, action.overridingAction);
|
||||
|
||||
if(animation.hasAddData())
|
||||
{
|
||||
const dynamicPart = {
|
||||
id: '',
|
||||
x: 0,
|
||||
y: 0,
|
||||
@@ -242,110 +242,121 @@ export class AvatarStructure
|
||||
double: 1
|
||||
};
|
||||
|
||||
const _local_12 = {
|
||||
const partSetDefinition = {
|
||||
setType: ''
|
||||
};
|
||||
|
||||
for(const _local_13 of _local_8.addData)
|
||||
for(const addData of animation.addData)
|
||||
{
|
||||
const _local_6 = this._geometry.getBodyPart(_local_5, _local_13.align);
|
||||
const bodyPart = this._geometry.getBodyPart(geometryType, addData.align);
|
||||
|
||||
if(_local_6)
|
||||
if(bodyPart)
|
||||
{
|
||||
_local_11.id = _local_13.id;
|
||||
_local_6.addPart(_local_11, _arg_2);
|
||||
dynamicPart.id = addData.id;
|
||||
bodyPart.addPart(dynamicPart, avatar);
|
||||
|
||||
_local_12.setType = _local_13.id;
|
||||
partSetDefinition.setType = addData.id;
|
||||
|
||||
const _local_10 = this._partSetsData.addPartDefinition(_local_12);
|
||||
_local_10.appendToFigure = true;
|
||||
const partDefinition = this._partSetsData.addPartDefinition(partSetDefinition);
|
||||
partDefinition.appendToFigure = true;
|
||||
|
||||
if(_local_13.base === '') _local_10.staticId = 1;
|
||||
if(addData.base === '') partDefinition.staticId = 1;
|
||||
|
||||
if(_local_4.indexOf(_local_6.id) === -1) _local_4.push(_local_6.id);
|
||||
if(bodyPartIds.indexOf(bodyPart.id) === -1) bodyPartIds.push(bodyPart.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(const _local_9 of _local_3)
|
||||
for(const partTypeId of partTypeIds)
|
||||
{
|
||||
const _local_6 = this._geometry.getBodyPart(_local_5, _local_9);
|
||||
const bodyPart = this._geometry.getBodyPart(geometryType, partTypeId);
|
||||
|
||||
if(_local_6 && (_local_4.indexOf(_local_6.id) === -1)) _local_4.push(_local_6.id);
|
||||
if(bodyPart && (bodyPartIds.indexOf(bodyPart.id) === -1)) bodyPartIds.push(bodyPart.id);
|
||||
}
|
||||
|
||||
if(bodyPartIds.length === 0)
|
||||
{
|
||||
partTypeIds = this._partSetsData.getActiveParts(action.definition);
|
||||
|
||||
for(const partType of partTypeIds)
|
||||
{
|
||||
const bodyPart = this._geometry.getBodyPartOfItem(geometryType, partType, avatar);
|
||||
|
||||
if(bodyPart && (bodyPartIds.indexOf(bodyPart.id) === -1)) bodyPartIds.push(bodyPart.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_local_3 = this._partSetsData.getActiveParts(k.definition);
|
||||
partTypeIds = this._partSetsData.getActiveParts(action.definition);
|
||||
|
||||
for(const _local_14 of _local_3)
|
||||
for(const partType of partTypeIds)
|
||||
{
|
||||
const _local_6 = this._geometry.getBodyPartOfItem(_local_5, _local_14, _arg_2);
|
||||
const bodyPart = this._geometry.getBodyPartOfItem(geometryType, partType, avatar);
|
||||
|
||||
if(_local_6 && (_local_4.indexOf(_local_6.id) === -1)) _local_4.push(_local_6.id);
|
||||
if(bodyPart && (bodyPartIds.indexOf(bodyPart.id) === -1)) bodyPartIds.push(bodyPart.id);
|
||||
}
|
||||
}
|
||||
|
||||
return _local_4;
|
||||
return bodyPartIds;
|
||||
}
|
||||
|
||||
public getBodyPartsUnordered(k: string): string[]
|
||||
public getBodyPartsUnordered(avatarSet: string): string[]
|
||||
{
|
||||
return this._geometry.getBodyPartIdsInAvatarSet(k);
|
||||
return this._geometry.getBodyPartIdsInAvatarSet(avatarSet);
|
||||
}
|
||||
|
||||
public getBodyParts(k: string, _arg_2: string, _arg_3: number): string[]
|
||||
public getBodyParts(avatarSet: string, geometryType: string, direction: number): string[]
|
||||
{
|
||||
const _local_4 = AvatarDirectionAngle.DIRECTION_TO_ANGLE[_arg_3];
|
||||
const angle = AvatarDirectionAngle.DIRECTION_TO_ANGLE[direction];
|
||||
|
||||
return this._geometry.getBodyPartsAtAngle(k, _local_4, _arg_2);
|
||||
return this._geometry.getBodyPartsAtAngle(avatarSet, angle, geometryType);
|
||||
}
|
||||
|
||||
public getFrameBodyPartOffset(k: IActiveActionData, _arg_2: number, _arg_3: number, _arg_4: string): Point
|
||||
public getFrameBodyPartOffset(action: IActiveActionData, direction: number, frameCount: number, bodyPartId: string): Point
|
||||
{
|
||||
const _local_5 = this._animationData.getAction(k.definition);
|
||||
const animationAction = this._animationData.getAction(action.definition);
|
||||
|
||||
if(_local_5) return _local_5.getFrameBodyPartOffset(_arg_2, _arg_3, _arg_4);
|
||||
if(animationAction) return animationAction.getFrameBodyPartOffset(direction, frameCount, bodyPartId);
|
||||
|
||||
return AnimationAction.DEFAULT_OFFSET;
|
||||
}
|
||||
|
||||
public getParts(k: string, _arg_2: IAvatarFigureContainer, _arg_3: IActiveActionData, _arg_4: string, _arg_5: number, removes: string[], _arg_7: IAvatarImage, _arg_8: Map<string, string> = null): AvatarImagePartContainer[]
|
||||
public getParts(bodyPartId: string, figureContainer: IAvatarFigureContainer, action: IActiveActionData, geometryType: string, direction: number, removes: string[], avatar: IAvatarImage, itemOverrides: Map<string, string> = null): AvatarImagePartContainer[]
|
||||
{
|
||||
const _local_10: Animation = null;
|
||||
let _local_34: IActionDefinition = null;
|
||||
const effectAnimation: Animation = null;
|
||||
let actionDefinition: IActionDefinition = null;
|
||||
let animationFrames: AvatarAnimationFrame[] = [];
|
||||
let partColor: IPartColor = null;
|
||||
|
||||
let _local_20: AvatarAnimationFrame[] = [];
|
||||
let _local_36: IPartColor = null;
|
||||
if(!action) return [];
|
||||
|
||||
if(!_arg_3) return [];
|
||||
const activePartTypes = this._partSetsData.getActiveParts(action.definition);
|
||||
const partContainers: AvatarImagePartContainer[] = [];
|
||||
let defaultFrames: any[] = [0];
|
||||
const animationAction = this._animationData.getAction(action.definition);
|
||||
|
||||
const _local_9 = this._partSetsData.getActiveParts(_arg_3.definition);
|
||||
const _local_11: AvatarImagePartContainer[] = [];
|
||||
let _local_14: any[] = [0];
|
||||
const _local_15 = this._animationData.getAction(_arg_3.definition);
|
||||
|
||||
if(_arg_3.definition.isAnimation)
|
||||
if(action.definition.isAnimation)
|
||||
{
|
||||
const _local_24 = ((_arg_3.definition.state + '.') + _arg_3.actionParameter);
|
||||
const _local_10 = this._animationManager.getAnimation(_local_24);
|
||||
const animationKey = ((action.definition.state + '.') + action.actionParameter);
|
||||
const spriteAnimation = this._animationManager.getAnimation(animationKey);
|
||||
|
||||
if(_local_10)
|
||||
if(spriteAnimation)
|
||||
{
|
||||
_local_14 = this.getPopulatedArray(_local_10.frameCount(_arg_3.overridingAction));
|
||||
defaultFrames = this.getPopulatedArray(spriteAnimation.frameCount(action.overridingAction));
|
||||
|
||||
for(const _local_25 of _local_10.getAnimatedBodyPartIds(0, _arg_3.overridingAction))
|
||||
for(const animatedPartId of spriteAnimation.getAnimatedBodyPartIds(0, action.overridingAction))
|
||||
{
|
||||
if(_local_25 === k)
|
||||
if(animatedPartId === bodyPartId)
|
||||
{
|
||||
const _local_26 = this._geometry.getBodyPart(_arg_4, _local_25);
|
||||
const geometryBodyPart = this._geometry.getBodyPart(geometryType, animatedPartId);
|
||||
|
||||
if(_local_26)
|
||||
if(geometryBodyPart)
|
||||
{
|
||||
for(const _local_27 of _local_26.getDynamicParts(_arg_7))
|
||||
for(const dynamicPart of geometryBodyPart.getDynamicParts(avatar))
|
||||
{
|
||||
_local_9.push(_local_27.id);
|
||||
activePartTypes.push(dynamicPart.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -353,75 +364,73 @@ export class AvatarStructure
|
||||
}
|
||||
}
|
||||
|
||||
const _local_16 = this._geometry.getParts(_arg_4, k, _arg_5, _local_9, _arg_7);
|
||||
const _local_21 = _arg_2.getPartTypeIds();
|
||||
const visiblePartTypes = this._geometry.getParts(geometryType, bodyPartId, direction, activePartTypes, avatar);
|
||||
const figurePartTypeIds = figureContainer.getPartTypeIds();
|
||||
|
||||
for(const _local_17 of _local_21)
|
||||
for(const figurePartType of figurePartTypeIds)
|
||||
{
|
||||
if(_arg_8)
|
||||
if(itemOverrides)
|
||||
{
|
||||
if(_arg_8.get(_local_17)) continue;
|
||||
if(itemOverrides.get(figurePartType)) continue;
|
||||
}
|
||||
|
||||
const _local_28 = _arg_2.getPartSetId(_local_17);
|
||||
const _local_29 = _arg_2.getPartColorIds(_local_17);
|
||||
const _local_30 = this._figureData.getSetType(_local_17);
|
||||
const partSetId = figureContainer.getPartSetId(figurePartType);
|
||||
const partColorIds = figureContainer.getPartColorIds(figurePartType);
|
||||
const setType = this._figureData.getSetType(figurePartType);
|
||||
|
||||
if(setType)
|
||||
{
|
||||
const palette = this._figureData.getPalette(setType.paletteID);
|
||||
|
||||
if(palette)
|
||||
{
|
||||
const figurePartSet = setType.getPartSet(partSetId);
|
||||
|
||||
if(_local_30)
|
||||
if(figurePartSet)
|
||||
{
|
||||
const _local_31 = this._figureData.getPalette(_local_30.paletteID);
|
||||
removes = removes.concat(figurePartSet.hiddenLayers);
|
||||
|
||||
if(_local_31)
|
||||
for(const figurePart of figurePartSet.parts)
|
||||
{
|
||||
const _local_32 = _local_30.getPartSet(_local_28);
|
||||
if(visiblePartTypes.indexOf(figurePart.type) > -1)
|
||||
{
|
||||
if(animationAction)
|
||||
{
|
||||
const animationPart = animationAction.getPart(figurePart.type);
|
||||
|
||||
if(_local_32)
|
||||
if(animationPart)
|
||||
{
|
||||
removes = removes.concat(_local_32.hiddenLayers);
|
||||
|
||||
for(const _local_33 of _local_32.parts)
|
||||
{
|
||||
if(_local_16.indexOf(_local_33.type) > -1)
|
||||
{
|
||||
if(_local_15)
|
||||
{
|
||||
const _local_19 = _local_15.getPart(_local_33.type);
|
||||
|
||||
if(_local_19)
|
||||
{
|
||||
_local_20 = _local_19.frames;
|
||||
animationFrames = animationPart.frames;
|
||||
}
|
||||
else
|
||||
{
|
||||
_local_20 = _local_14;
|
||||
animationFrames = defaultFrames;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_local_20 = _local_14;
|
||||
animationFrames = defaultFrames;
|
||||
}
|
||||
|
||||
_local_34 = _arg_3.definition;
|
||||
actionDefinition = action.definition;
|
||||
|
||||
if(_local_9.indexOf(_local_33.type) === -1) _local_34 = this._defaultAction;
|
||||
if(activePartTypes.indexOf(figurePart.type) === -1) actionDefinition = this._defaultAction;
|
||||
|
||||
const _local_13 = this._partSetsData.getPartDefinition(_local_33.type);
|
||||
const partDefinition = this._partSetsData.getPartDefinition(figurePart.type);
|
||||
|
||||
let _local_35 = (!_local_13) ? _local_33.type : _local_13.flippedSetType;
|
||||
let flippedPartType = (!partDefinition) ? figurePart.type : partDefinition.flippedSetType;
|
||||
|
||||
if(!_local_35 || (_local_35 === '')) _local_35 = _local_33.type;
|
||||
if(!flippedPartType || (flippedPartType === '')) flippedPartType = figurePart.type;
|
||||
|
||||
if(_local_29 && (_local_29.length > (_local_33.colorLayerIndex - 1)))
|
||||
if(partColorIds && (partColorIds.length > (figurePart.colorLayerIndex - 1)))
|
||||
{
|
||||
_local_36 = _local_31.getColor(_local_29[(_local_33.colorLayerIndex - 1)]);
|
||||
partColor = palette.getColor(partColorIds[(figurePart.colorLayerIndex - 1)]);
|
||||
}
|
||||
|
||||
const _local_37 = (_local_33.colorLayerIndex > 0);
|
||||
const _local_18 = new AvatarImagePartContainer(k, _local_33.type, _local_33.id.toString(), _local_36, _local_20, _local_34, _local_37, _local_33.paletteMap, _local_35);
|
||||
const isColorable = (figurePart.colorLayerIndex > 0);
|
||||
const container = new AvatarImagePartContainer(bodyPartId, figurePart.type, figurePart.id.toString(), partColor, animationFrames, actionDefinition, isColorable, figurePart.paletteMap, flippedPartType);
|
||||
|
||||
_local_11.push(_local_18);
|
||||
partContainers.push(container);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -429,132 +438,132 @@ export class AvatarStructure
|
||||
}
|
||||
}
|
||||
|
||||
const _local_22: AvatarImagePartContainer[] = [];
|
||||
const sortedContainers: AvatarImagePartContainer[] = [];
|
||||
|
||||
for(const _local_12 of _local_16)
|
||||
for(const visiblePartType of visiblePartTypes)
|
||||
{
|
||||
let _local_39: IPartColor = null;
|
||||
let _local_38 = false;
|
||||
let overrideColor: IPartColor = null;
|
||||
let partFound = false;
|
||||
|
||||
const _local_40 = ((_arg_8) && (_arg_8.get(_local_12)));
|
||||
const hasItemOverride = ((itemOverrides) && (itemOverrides.get(visiblePartType)));
|
||||
|
||||
for(const _local_23 of _local_11)
|
||||
for(const container of partContainers)
|
||||
{
|
||||
if(_local_23.partType === _local_12)
|
||||
if(container.partType === visiblePartType)
|
||||
{
|
||||
if(_local_40)
|
||||
if(hasItemOverride)
|
||||
{
|
||||
_local_39 = _local_23.color;
|
||||
overrideColor = container.color;
|
||||
}
|
||||
else
|
||||
{
|
||||
_local_38 = true;
|
||||
partFound = true;
|
||||
|
||||
if(removes.indexOf(_local_12) === -1) _local_22.push(_local_23);
|
||||
if(removes.indexOf(visiblePartType) === -1) sortedContainers.push(container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!_local_38)
|
||||
if(!partFound)
|
||||
{
|
||||
if(_local_40)
|
||||
if(hasItemOverride)
|
||||
{
|
||||
const _local_41 = _arg_8.get(_local_12);
|
||||
const itemId = itemOverrides.get(visiblePartType);
|
||||
|
||||
let _local_42 = 0;
|
||||
let _local_43 = 0;
|
||||
let charCodeSum = 0;
|
||||
let charIndex = 0;
|
||||
|
||||
while(_local_43 < _local_41.length)
|
||||
while(charIndex < itemId.length)
|
||||
{
|
||||
_local_42 = (_local_42 + _local_41.charCodeAt(_local_43));
|
||||
_local_43++;
|
||||
charCodeSum = (charCodeSum + itemId.charCodeAt(charIndex));
|
||||
charIndex++;
|
||||
}
|
||||
|
||||
if(_local_15)
|
||||
if(animationAction)
|
||||
{
|
||||
const _local_19 = _local_15.getPart(_local_12);
|
||||
const animationPart = animationAction.getPart(visiblePartType);
|
||||
|
||||
if(_local_19)
|
||||
if(animationPart)
|
||||
{
|
||||
_local_20 = _local_19.frames;
|
||||
animationFrames = animationPart.frames;
|
||||
}
|
||||
else
|
||||
{
|
||||
_local_20 = _local_14;
|
||||
animationFrames = defaultFrames;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_local_20 = _local_14;
|
||||
animationFrames = defaultFrames;
|
||||
}
|
||||
|
||||
const _local_18 = new AvatarImagePartContainer(k, _local_12, _local_41, _local_39, _local_20, _arg_3.definition, (!(_local_39 == null)), -1, _local_12, false, 1);
|
||||
const container = new AvatarImagePartContainer(bodyPartId, visiblePartType, itemId, overrideColor, animationFrames, action.definition, (!(overrideColor == null)), -1, visiblePartType, false, 1);
|
||||
|
||||
_local_22.push(_local_18);
|
||||
sortedContainers.push(container);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_local_9.indexOf(_local_12) > -1)
|
||||
if(activePartTypes.indexOf(visiblePartType) > -1)
|
||||
{
|
||||
const _local_44 = this._geometry.getBodyPartOfItem(_arg_4, _local_12, _arg_7);
|
||||
const ownerBodyPart = this._geometry.getBodyPartOfItem(geometryType, visiblePartType, avatar);
|
||||
|
||||
if(k !== _local_44.id)
|
||||
if(bodyPartId !== ownerBodyPart.id)
|
||||
{
|
||||
//
|
||||
}
|
||||
else
|
||||
{
|
||||
const _local_13 = this._partSetsData.getPartDefinition(_local_12);
|
||||
const partDefinition = this._partSetsData.getPartDefinition(visiblePartType);
|
||||
|
||||
let _local_45 = false;
|
||||
let _local_46 = 1;
|
||||
let isBlended = false;
|
||||
let blendFactor = 1;
|
||||
|
||||
if(_local_13.appendToFigure)
|
||||
if(partDefinition.appendToFigure)
|
||||
{
|
||||
let _local_47 = '1';
|
||||
let partId = '1';
|
||||
|
||||
if(_arg_3.actionParameter !== '')
|
||||
if(action.actionParameter !== '')
|
||||
{
|
||||
_local_47 = _arg_3.actionParameter;
|
||||
partId = action.actionParameter;
|
||||
}
|
||||
|
||||
if(_local_13.hasStaticId())
|
||||
if(partDefinition.hasStaticId())
|
||||
{
|
||||
_local_47 = _local_13.staticId.toString();
|
||||
partId = partDefinition.staticId.toString();
|
||||
}
|
||||
|
||||
if(_local_10 != null)
|
||||
if(effectAnimation != null)
|
||||
{
|
||||
const _local_48 = _local_10.getAddData(_local_12);
|
||||
const addData = effectAnimation.getAddData(visiblePartType);
|
||||
|
||||
if(_local_48)
|
||||
if(addData)
|
||||
{
|
||||
_local_45 = _local_48.isBlended;
|
||||
_local_46 = _local_48.blend;
|
||||
isBlended = addData.isBlended;
|
||||
blendFactor = addData.blend;
|
||||
}
|
||||
}
|
||||
|
||||
if(_local_15)
|
||||
if(animationAction)
|
||||
{
|
||||
const _local_19 = _local_15.getPart(_local_12);
|
||||
const animationPart = animationAction.getPart(visiblePartType);
|
||||
|
||||
if(_local_19)
|
||||
if(animationPart)
|
||||
{
|
||||
_local_20 = _local_19.frames;
|
||||
animationFrames = animationPart.frames;
|
||||
}
|
||||
else
|
||||
{
|
||||
_local_20 = _local_14;
|
||||
animationFrames = defaultFrames;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_local_20 = _local_14;
|
||||
animationFrames = defaultFrames;
|
||||
}
|
||||
|
||||
const _local_18 = new AvatarImagePartContainer(k, _local_12, _local_47, null, _local_20, _arg_3.definition, false, -1, _local_12, _local_45, _local_46);
|
||||
const container = new AvatarImagePartContainer(bodyPartId, visiblePartType, partId, null, animationFrames, action.definition, false, -1, visiblePartType, isBlended, blendFactor);
|
||||
|
||||
_local_22.push(_local_18);
|
||||
sortedContainers.push(container);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -562,36 +571,36 @@ export class AvatarStructure
|
||||
}
|
||||
}
|
||||
|
||||
return _local_22;
|
||||
return sortedContainers;
|
||||
}
|
||||
|
||||
private getPopulatedArray(k: number): number[]
|
||||
private getPopulatedArray(count: number): number[]
|
||||
{
|
||||
const _local_2: number[] = [];
|
||||
const result: number[] = [];
|
||||
|
||||
let index = 0;
|
||||
|
||||
while(index < k)
|
||||
while(index < count)
|
||||
{
|
||||
_local_2.push(index);
|
||||
result.push(index);
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
return _local_2;
|
||||
return result;
|
||||
}
|
||||
|
||||
public getItemIds(): string[]
|
||||
{
|
||||
if(this._actionManager)
|
||||
{
|
||||
const k = this._actionManager.getActionDefinition('CarryItem').params;
|
||||
const params = this._actionManager.getActionDefinition('CarryItem').params;
|
||||
|
||||
const _local_2 = [];
|
||||
const itemIds = [];
|
||||
|
||||
for(const _local_3 of k.values()) _local_2.push(_local_3);
|
||||
for(const value of params.values()) itemIds.push(value);
|
||||
|
||||
return _local_2;
|
||||
return itemIds;
|
||||
}
|
||||
|
||||
return [];
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -20,6 +20,7 @@ export * from './messages/incoming/competition';
|
||||
export * from './messages/incoming/crafting';
|
||||
export * from './messages/incoming/desktop';
|
||||
export * from './messages/incoming/friendlist';
|
||||
export * from './messages/incoming/furnieditor';
|
||||
export * from './messages/incoming/game';
|
||||
export * from './messages/incoming/game/directory';
|
||||
export * from './messages/incoming/game/lobby';
|
||||
@@ -94,6 +95,7 @@ export * from './messages/outgoing/crafting';
|
||||
export * from './messages/outgoing/desktop';
|
||||
export * from './messages/outgoing/friendfurni';
|
||||
export * from './messages/outgoing/friendlist';
|
||||
export * from './messages/outgoing/furnieditor';
|
||||
export * from './messages/outgoing/game';
|
||||
export * from './messages/outgoing/game/arena';
|
||||
export * from './messages/outgoing/game/directory';
|
||||
@@ -173,6 +175,7 @@ export * from './messages/parser/competition';
|
||||
export * from './messages/parser/crafting';
|
||||
export * from './messages/parser/desktop';
|
||||
export * from './messages/parser/friendlist';
|
||||
export * from './messages/parser/furnieditor';
|
||||
export * from './messages/parser/game';
|
||||
export * from './messages/parser/game/directory';
|
||||
export * from './messages/parser/game/lobby';
|
||||
|
||||
@@ -477,6 +477,12 @@ export class IncomingHeader
|
||||
public static RENTABLE_FURNI_RENT_OR_BUYOUT_OFFER = 35;
|
||||
public static HANDSHAKE_IDENTITY_ACCOUNT = 3523;
|
||||
|
||||
// Furni Editor
|
||||
public static FURNI_EDITOR_SEARCH_RESULT = 10040;
|
||||
public static FURNI_EDITOR_DETAIL_RESULT = 10041;
|
||||
public static FURNI_EDITOR_INTERACTIONS_RESULT = 10043;
|
||||
public static FURNI_EDITOR_RESULT = 10044;
|
||||
|
||||
// Catalog Admin
|
||||
public static CATALOG_ADMIN_RESULT = 10059;
|
||||
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { FurniEditorDetailResultMessageParser } from '../../parser';
|
||||
|
||||
export class FurniEditorDetailResultEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, FurniEditorDetailResultMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): FurniEditorDetailResultMessageParser
|
||||
{
|
||||
return this.parser as FurniEditorDetailResultMessageParser;
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { FurniEditorInteractionsResultMessageParser } from '../../parser';
|
||||
|
||||
export class FurniEditorInteractionsResultEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, FurniEditorInteractionsResultMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): FurniEditorInteractionsResultMessageParser
|
||||
{
|
||||
return this.parser as FurniEditorInteractionsResultMessageParser;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { FurniEditorResultMessageParser } from '../../parser';
|
||||
|
||||
export class FurniEditorResultEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, FurniEditorResultMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): FurniEditorResultMessageParser
|
||||
{
|
||||
return this.parser as FurniEditorResultMessageParser;
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { FurniEditorSearchResultMessageParser } from '../../parser';
|
||||
|
||||
export class FurniEditorSearchResultEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, FurniEditorSearchResultMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): FurniEditorSearchResultMessageParser
|
||||
{
|
||||
return this.parser as FurniEditorSearchResultMessageParser;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export * from './FurniEditorDetailResultEvent';
|
||||
export * from './FurniEditorInteractionsResultEvent';
|
||||
export * from './FurniEditorResultEvent';
|
||||
export * from './FurniEditorSearchResultEvent';
|
||||
@@ -13,6 +13,7 @@ export * from './competition';
|
||||
export * from './crafting';
|
||||
export * from './desktop';
|
||||
export * from './friendlist';
|
||||
export * from './furnieditor';
|
||||
export * from './game';
|
||||
export * from './game/directory';
|
||||
export * from './game/lobby';
|
||||
|
||||
@@ -65,8 +65,8 @@ export class OutgoingHeader
|
||||
public static GROUP_CREATE_OPTIONS = 798;
|
||||
public static GROUP_FAVORITE = 3549;
|
||||
public static GET_FORUM_STATS = 3149;
|
||||
public static GET_FORUM_THREADS = 873;
|
||||
public static GET_FORUMS_LIST = 436;
|
||||
public static GET_FORUM_THREADS = 436;
|
||||
public static GET_FORUMS_LIST = 873;
|
||||
public static GET_FORUM_MESSAGES = 232;
|
||||
public static GET_FORUM_THREAD = 3900;
|
||||
public static GET_UNREAD_FORUMS_COUNT = 2908;
|
||||
@@ -476,6 +476,14 @@ export class OutgoingHeader
|
||||
|
||||
public static FURNITURE_PICKUP_ALL = 10017;
|
||||
|
||||
// Furni Editor
|
||||
public static FURNI_EDITOR_SEARCH = 10040;
|
||||
public static FURNI_EDITOR_DETAIL = 10041;
|
||||
public static FURNI_EDITOR_BY_SPRITE = 10042;
|
||||
public static FURNI_EDITOR_INTERACTIONS = 10043;
|
||||
public static FURNI_EDITOR_UPDATE = 10044;
|
||||
public static FURNI_EDITOR_DELETE = 10045;
|
||||
|
||||
public static CATALOG_ADMIN_SAVE_PAGE = 10050;
|
||||
public static CATALOG_ADMIN_CREATE_PAGE = 10051;
|
||||
public static CATALOG_ADMIN_DELETE_PAGE = 10052;
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class FurniEditorBySpriteComposer implements IMessageComposer<ConstructorParameters<typeof FurniEditorBySpriteComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof FurniEditorBySpriteComposer>;
|
||||
|
||||
constructor(spriteId: number)
|
||||
{
|
||||
this._data = [ spriteId ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
{
|
||||
this._data = null;
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class FurniEditorDeleteComposer implements IMessageComposer<ConstructorParameters<typeof FurniEditorDeleteComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof FurniEditorDeleteComposer>;
|
||||
|
||||
constructor(id: number)
|
||||
{
|
||||
this._data = [ id ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
{
|
||||
this._data = null;
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class FurniEditorDetailComposer implements IMessageComposer<ConstructorParameters<typeof FurniEditorDetailComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof FurniEditorDetailComposer>;
|
||||
|
||||
constructor(id: number)
|
||||
{
|
||||
this._data = [ id ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
{
|
||||
this._data = null;
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class FurniEditorInteractionsComposer implements IMessageComposer<ConstructorParameters<typeof FurniEditorInteractionsComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof FurniEditorInteractionsComposer>;
|
||||
|
||||
constructor()
|
||||
{
|
||||
this._data = [];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
{
|
||||
this._data = null;
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class FurniEditorSearchComposer implements IMessageComposer<ConstructorParameters<typeof FurniEditorSearchComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof FurniEditorSearchComposer>;
|
||||
|
||||
constructor(query: string, type: string, page: number)
|
||||
{
|
||||
this._data = [ query, type, page ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
{
|
||||
this._data = null;
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class FurniEditorUpdateComposer implements IMessageComposer<ConstructorParameters<typeof FurniEditorUpdateComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof FurniEditorUpdateComposer>;
|
||||
|
||||
constructor(id: number, jsonFields: string)
|
||||
{
|
||||
this._data = [ id, jsonFields ];
|
||||
}
|
||||
|
||||
dispose(): void
|
||||
{
|
||||
this._data = null;
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export * from './FurniEditorBySpriteComposer';
|
||||
export * from './FurniEditorDeleteComposer';
|
||||
export * from './FurniEditorDetailComposer';
|
||||
export * from './FurniEditorInteractionsComposer';
|
||||
export * from './FurniEditorSearchComposer';
|
||||
export * from './FurniEditorUpdateComposer';
|
||||
@@ -4,9 +4,9 @@ export class GroupSavePreferencesComposer implements IMessageComposer<Constructo
|
||||
{
|
||||
private _data: ConstructorParameters<typeof GroupSavePreferencesComposer>;
|
||||
|
||||
constructor(groupId: number, state: number, onlyAdminCanDecorate: number)
|
||||
constructor(groupId: number, state: number, onlyAdminCanDecorate: number, forumEnabled: boolean)
|
||||
{
|
||||
this._data = [groupId, state, onlyAdminCanDecorate];
|
||||
this._data = [groupId, state, onlyAdminCanDecorate, forumEnabled];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
|
||||
@@ -9,6 +9,7 @@ export * from './crafting';
|
||||
export * from './desktop';
|
||||
export * from './friendfurni';
|
||||
export * from './friendlist';
|
||||
export * from './furnieditor';
|
||||
export * from './game';
|
||||
export * from './game/arena';
|
||||
export * from './game/directory';
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import { IMessageDataWrapper } from '@nitrots/api';
|
||||
|
||||
export class CatalogRefData
|
||||
{
|
||||
public id: number;
|
||||
public catalogName: string;
|
||||
public costCredits: number;
|
||||
public costPoints: number;
|
||||
public pointsType: number;
|
||||
public pageId: number;
|
||||
public pageName: string;
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): void
|
||||
{
|
||||
this.id = wrapper.readInt();
|
||||
this.catalogName = wrapper.readString();
|
||||
this.costCredits = wrapper.readInt();
|
||||
this.costPoints = wrapper.readInt();
|
||||
this.pointsType = wrapper.readInt();
|
||||
this.pageId = wrapper.readInt();
|
||||
this.pageName = wrapper.readString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import { IMessageDataWrapper } from '@nitrots/api';
|
||||
import { FurniItemData } from './FurniItemData';
|
||||
|
||||
export class FurniDetailData extends FurniItemData
|
||||
{
|
||||
public allowGift: boolean;
|
||||
public allowTrade: boolean;
|
||||
public allowRecycle: boolean;
|
||||
public allowMarketplaceSell: boolean;
|
||||
public allowInventoryStack: boolean;
|
||||
public vendingIds: string;
|
||||
public customparams: string;
|
||||
public effectIdMale: number;
|
||||
public effectIdFemale: number;
|
||||
public clothingOnWalk: string;
|
||||
public multiheight: string;
|
||||
public description: string;
|
||||
public usageCount: number;
|
||||
|
||||
public override parse(wrapper: IMessageDataWrapper): void
|
||||
{
|
||||
super.parse(wrapper);
|
||||
|
||||
this.allowGift = wrapper.readBoolean();
|
||||
this.allowTrade = wrapper.readBoolean();
|
||||
this.allowRecycle = wrapper.readBoolean();
|
||||
this.allowMarketplaceSell = wrapper.readBoolean();
|
||||
this.allowInventoryStack = wrapper.readBoolean();
|
||||
this.vendingIds = wrapper.readString();
|
||||
this.customparams = wrapper.readString();
|
||||
this.effectIdMale = wrapper.readInt();
|
||||
this.effectIdFemale = wrapper.readInt();
|
||||
this.clothingOnWalk = wrapper.readString();
|
||||
this.multiheight = wrapper.readString();
|
||||
this.description = wrapper.readString();
|
||||
this.usageCount = wrapper.readInt();
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
import { CatalogRefData } from './CatalogRefData';
|
||||
import { FurniDetailData } from './FurniDetailData';
|
||||
|
||||
export class FurniEditorDetailResultMessageParser implements IMessageParser
|
||||
{
|
||||
private _item: FurniDetailData;
|
||||
private _catalogItems: CatalogRefData[];
|
||||
private _furniDataJson: string;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._item = null;
|
||||
this._catalogItems = [];
|
||||
this._furniDataJson = '';
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._item = new FurniDetailData();
|
||||
this._item.parse(wrapper);
|
||||
|
||||
const catalogCount = wrapper.readInt();
|
||||
|
||||
this._catalogItems = [];
|
||||
|
||||
for(let i = 0; i < catalogCount; i++)
|
||||
{
|
||||
const ref = new CatalogRefData();
|
||||
ref.parse(wrapper);
|
||||
this._catalogItems.push(ref);
|
||||
}
|
||||
|
||||
this._furniDataJson = wrapper.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get item(): FurniDetailData
|
||||
{
|
||||
return this._item;
|
||||
}
|
||||
|
||||
public get catalogItems(): CatalogRefData[]
|
||||
{
|
||||
return this._catalogItems;
|
||||
}
|
||||
|
||||
public get furniDataJson(): string
|
||||
{
|
||||
return this._furniDataJson;
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export class FurniEditorInteractionsResultMessageParser implements IMessageParser
|
||||
{
|
||||
private _interactions: string[];
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._interactions = [];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
const count = wrapper.readInt();
|
||||
|
||||
this._interactions = [];
|
||||
|
||||
for(let i = 0; i < count; i++)
|
||||
{
|
||||
this._interactions.push(wrapper.readString());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get interactions(): string[]
|
||||
{
|
||||
return this._interactions;
|
||||
}
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export class FurniEditorResultMessageParser implements IMessageParser
|
||||
{
|
||||
private _success: boolean;
|
||||
private _message: string;
|
||||
private _id: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._success = false;
|
||||
this._message = '';
|
||||
this._id = -1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._success = wrapper.readBoolean();
|
||||
this._message = wrapper.readString();
|
||||
this._id = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get success(): boolean
|
||||
{
|
||||
return this._success;
|
||||
}
|
||||
|
||||
public get message(): string
|
||||
{
|
||||
return this._message;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
import { FurniItemData } from './FurniItemData';
|
||||
|
||||
export class FurniEditorSearchResultMessageParser implements IMessageParser
|
||||
{
|
||||
private _items: FurniItemData[];
|
||||
private _total: number;
|
||||
private _page: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._items = [];
|
||||
this._total = 0;
|
||||
this._page = 1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
const count = wrapper.readInt();
|
||||
|
||||
this._items = [];
|
||||
|
||||
for(let i = 0; i < count; i++)
|
||||
{
|
||||
const item = new FurniItemData();
|
||||
item.parse(wrapper);
|
||||
this._items.push(item);
|
||||
}
|
||||
|
||||
this._total = wrapper.readInt();
|
||||
this._page = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get items(): FurniItemData[]
|
||||
{
|
||||
return this._items;
|
||||
}
|
||||
|
||||
public get total(): number
|
||||
{
|
||||
return this._total;
|
||||
}
|
||||
|
||||
public get page(): number
|
||||
{
|
||||
return this._page;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import { IMessageDataWrapper } from '@nitrots/api';
|
||||
|
||||
export class FurniItemData
|
||||
{
|
||||
public id: number;
|
||||
public spriteId: number;
|
||||
public itemName: string;
|
||||
public publicName: string;
|
||||
public type: string;
|
||||
public width: number;
|
||||
public length: number;
|
||||
public stackHeight: number;
|
||||
public allowStack: boolean;
|
||||
public allowWalk: boolean;
|
||||
public allowSit: boolean;
|
||||
public allowLay: boolean;
|
||||
public interactionType: string;
|
||||
public interactionModesCount: number;
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): void
|
||||
{
|
||||
this.id = wrapper.readInt();
|
||||
this.spriteId = wrapper.readInt();
|
||||
this.itemName = wrapper.readString();
|
||||
this.publicName = wrapper.readString();
|
||||
this.type = wrapper.readString();
|
||||
this.width = wrapper.readInt();
|
||||
this.length = wrapper.readInt();
|
||||
this.stackHeight = wrapper.readDouble();
|
||||
this.allowStack = wrapper.readBoolean();
|
||||
this.allowWalk = wrapper.readBoolean();
|
||||
this.allowSit = wrapper.readBoolean();
|
||||
this.allowLay = wrapper.readBoolean();
|
||||
this.interactionType = wrapper.readString();
|
||||
this.interactionModesCount = wrapper.readInt();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export * from './CatalogRefData';
|
||||
export * from './FurniDetailData';
|
||||
export * from './FurniEditorDetailResultMessageParser';
|
||||
export * from './FurniEditorInteractionsResultMessageParser';
|
||||
export * from './FurniEditorResultMessageParser';
|
||||
export * from './FurniEditorSearchResultMessageParser';
|
||||
export * from './FurniItemData';
|
||||
@@ -19,6 +19,7 @@ export class GroupInformationParser implements IMessageParser
|
||||
private _flag: boolean;
|
||||
private _canMembersDecorate: boolean;
|
||||
private _pendingRequestsCount: number;
|
||||
private _hasForum: boolean;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
@@ -39,6 +40,7 @@ export class GroupInformationParser implements IMessageParser
|
||||
this._flag = false;
|
||||
this._canMembersDecorate = false;
|
||||
this._pendingRequestsCount = 0;
|
||||
this._hasForum = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -65,6 +67,7 @@ export class GroupInformationParser implements IMessageParser
|
||||
this._flag = wrapper.readBoolean();
|
||||
this._canMembersDecorate = wrapper.readBoolean();
|
||||
this._pendingRequestsCount = wrapper.readInt();
|
||||
this._hasForum = wrapper.readBoolean();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -153,4 +156,9 @@ export class GroupInformationParser implements IMessageParser
|
||||
{
|
||||
return this._pendingRequestsCount;
|
||||
}
|
||||
|
||||
public get hasForum(): boolean
|
||||
{
|
||||
return this._hasForum;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ export class GroupSettingsParser implements IMessageParser
|
||||
private _badgeParts: Map<number, GroupDataBadgePart>;
|
||||
private _badgeCode: string;
|
||||
private _membersCount: number;
|
||||
private _hasForum: boolean;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
@@ -30,6 +31,7 @@ export class GroupSettingsParser implements IMessageParser
|
||||
this._badgeParts = new Map();
|
||||
this._badgeCode = null;
|
||||
this._membersCount = 0;
|
||||
this._hasForum = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -83,6 +85,7 @@ export class GroupSettingsParser implements IMessageParser
|
||||
|
||||
this._badgeCode = wrapper.readString();
|
||||
this._membersCount = wrapper.readInt();
|
||||
this._hasForum = wrapper.readBoolean();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -146,4 +149,9 @@ export class GroupSettingsParser implements IMessageParser
|
||||
{
|
||||
return this._membersCount;
|
||||
}
|
||||
|
||||
public get hasForum(): boolean
|
||||
{
|
||||
return this._hasForum;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ export * from './competition';
|
||||
export * from './crafting';
|
||||
export * from './desktop';
|
||||
export * from './friendlist';
|
||||
export * from './furnieditor';
|
||||
export * from './game';
|
||||
export * from './game/directory';
|
||||
export * from './game/lobby';
|
||||
|
||||
Reference in New Issue
Block a user