本文整理匯總了TypeScript中app/core/garland-tools.service.GarlandToolsService.getFishingSpot方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript service.GarlandToolsService.getFishingSpot方法的具體用法?TypeScript service.GarlandToolsService.getFishingSpot怎麽用?TypeScript service.GarlandToolsService.getFishingSpot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app/core/garland-tools.service.GarlandToolsService
的用法示例。
在下文中一共展示了service.GarlandToolsService.getFishingSpot方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: getGatheredBy
protected getGatheredBy(item: any): GatheredBy {
const gatheredBy: GatheredBy = {
icon: '',
stars_tooltip: '',
level: 0,
nodes: []
};
// If it's a node gather (not a fish)
if (item.nodes !== undefined) {
for (const node of item.nodes) {
const details = this.gt.getNode(node);
if (details.type <= 1) {
gatheredBy.icon = 'https://garlandtools.org/db/images/MIN.png';
} else if (details.type < 4) {
gatheredBy.icon = 'https://garlandtools.org/db/images/BTN.png';
} else {
gatheredBy.icon = 'https://garlandtools.org/db/images/FSH.png';
}
gatheredBy.stars_tooltip = this.generateStars(details.stars);
gatheredBy.level = details.lvl;
if (details.areaid !== undefined) {
gatheredBy.nodes.push(details);
}
}
} else {
// If it's a fish, we have to handle it in another way
for (const spot of item.fishingSpots) {
const details = this.gt.getFishingSpot(spot);
gatheredBy.icon = 'https://garlandtools.org/db/images/FSH.png';
if (details.areaid !== undefined) {
gatheredBy.nodes.push(details);
}
gatheredBy.level = details.lvl;
}
}
return gatheredBy;
}