This commit is contained in:
aozhiwei 2023-05-25 21:30:32 +08:00
parent fed649fad7
commit 9235793a69
2 changed files with 10 additions and 8 deletions

View File

@ -1906,7 +1906,7 @@ void Creature::SetHP(float hp)
void Creature::SetMaxHP(float max_hp)
{
ability.max_hp = max_hp;
#ifdef DEBUG1
#ifdef DEBUG
if (IsPlayer()) {
a8::XPrintf("hp:%f maxhp:%f\n",
{

View File

@ -3407,13 +3407,15 @@ void Human::ProcYellowStoneItem(AddItemDTO& dto)
GetMaxHP(),
true);
#endif
ClearGemStoneBuffs();
auto merge_item_meta = mt::MergeItem::GetById(mt::Equip::YELLOW_STONE_ID);
if (merge_item_meta) {
std::set<int>* buffs = merge_item_meta->GetBuffs(GetInventory(IS_YELLOW_STONE));
if (buffs) {
for (int buff_id : *buffs) {
gemstone_hold_buffs.push_back(TryAddBuff(this, buff_id, nullptr));
if (GetInventory(IS_YELLOW_STONE) % 3 == 0) {
ClearGemStoneBuffs();
auto merge_item_meta = mt::MergeItem::GetById(mt::Equip::YELLOW_STONE_ID);
if (merge_item_meta) {
std::set<int>* buffs = merge_item_meta->GetBuffs(GetInventory(IS_YELLOW_STONE) / 3);
if (buffs) {
for (int buff_id : *buffs) {
gemstone_hold_buffs.push_back(TryAddBuff(this, buff_id, nullptr));
}
}
}
}