This commit is contained in:
aozhiwei 2024-07-17 13:37:05 +08:00
parent 684eead1d9
commit e74d8764af

View File

@ -13,20 +13,20 @@ class Transfer extends BaseEventProcess {
const to = bcutils.toNormalAddress(returnValues['to']);
const tokenId = returnValues['tokenId'];
await this.mustBeMint(to, tokenId, bcconst.BC_NFT_HERO);
await this.mustBeMint(to, tokenId, bcconst.BC_NFT_NORMAL_HERO);
if (bcutils.isSysAddress(from)) {
console.log(tokenId, this.getNetId());
const airDropMeta = metaFactory.getAirDrop(
tokenId,
this.getNetId(),
bcconst.BC_NFT_HERO,
bcconst.BC_NFT_NORMAL_HERO,
this.getContractAddress());
console.log(airDropMeta);
if (airDropMeta) {
await this.apiMint(to, tokenId, airDropMeta);
await this.adjustHeroId(tokenId);
} else {
await this.ingameActivate(from, to, tokenId, bcconst.BC_NFT_HERO);
await this.ingameActivate(from, to, tokenId, bcconst.BC_NFT_NORMAL_HERO);
}
} else {
await this.add721NftRefresh