mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 05:07:46 +00:00
parent
0c53e71af6
commit
b2c93724b3
1 changed files with 13 additions and 0 deletions
|
|
@ -71,6 +71,10 @@ import { Buffer } from 'node:buffer';
|
|||
* @property {DeadlyList[]} list
|
||||
*/
|
||||
|
||||
|
||||
// 1x1像素透明,用于填充无图情况
|
||||
const BLANK_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
|
||||
|
||||
/**
|
||||
* @class Deadly.
|
||||
*/
|
||||
|
|
@ -169,6 +173,15 @@ export class Buddy {
|
|||
* @param {Buddy} data
|
||||
*/
|
||||
constructor(data) {
|
||||
//无邦布信息的时候使用默认空值
|
||||
if (!data) {
|
||||
this.id = 0;
|
||||
this.rarity = '';
|
||||
this.level = 0;
|
||||
//邦布使用透明图
|
||||
this.bangboo_rectangle_url = BLANK_IMAGE;
|
||||
return;
|
||||
}
|
||||
this.id = data.id;
|
||||
this.rarity = data.rarity;
|
||||
this.level = data.level;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue