This commit is contained in:
aozhiwei 2023-03-23 10:53:45 +08:00
parent 570a61dc5a
commit 32978b6669
2 changed files with 23 additions and 0 deletions

View File

@ -2675,6 +2675,11 @@ void Human::ProcAddItemDto(AddItemDTO& dto)
ProcGemStoneItem(dto);
}
break;
case EQUIP_TYPE_LOVE:
{
ProcLoveItem(dto);
}
break;
default:
{
ProcLootSpecItem(dto);
@ -3314,3 +3319,20 @@ void Human::CalcStats()
});
}
}
void Human::ProcLoveItem(AddItemDTO& dto)
{
dto.handled = true;
if (dto.item_meta->buffid()) {
Entity* e = room->GetEntityByUniId(dto.uniid);
if (e && e->IsEntityType(ET_Loot)) {
Loot* loot = (Loot*)e;
TryAddBuff(this,
dto.item_meta->buffid(),
loot->skill_meta,
nullptr,
loot->buff_vars
);
}
}
}

View File

@ -267,6 +267,7 @@ protected:
void ProcGiftPackage(AddItemDTO& dto);
void ProcLootSpecItem(AddItemDTO& dto);
void ProcGemStoneItem(AddItemDTO& dto);
void ProcLoveItem(AddItemDTO& dto);
void CancelRevive();
Weapon* TakeonWeapon(const mt::Equip* equip_meta);
void LootInteraction(Loot* entity);