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 to = bcutils.toNormalAddress(returnValues['to']);
const tokenId = returnValues['tokenId']; 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)) { if (bcutils.isSysAddress(from)) {
console.log(tokenId, this.getNetId()); console.log(tokenId, this.getNetId());
const airDropMeta = metaFactory.getAirDrop( const airDropMeta = metaFactory.getAirDrop(
tokenId, tokenId,
this.getNetId(), this.getNetId(),
bcconst.BC_NFT_HERO, bcconst.BC_NFT_NORMAL_HERO,
this.getContractAddress()); this.getContractAddress());
console.log(airDropMeta); console.log(airDropMeta);
if (airDropMeta) { if (airDropMeta) {
await this.apiMint(to, tokenId, airDropMeta); await this.apiMint(to, tokenId, airDropMeta);
await this.adjustHeroId(tokenId); await this.adjustHeroId(tokenId);
} else { } else {
await this.ingameActivate(from, to, tokenId, bcconst.BC_NFT_HERO); await this.ingameActivate(from, to, tokenId, bcconst.BC_NFT_NORMAL_HERO);
} }
} else { } else {
await this.add721NftRefresh await this.add721NftRefresh