1
This commit is contained in:
parent
65d0b4e7a2
commit
46450d8384
@ -3301,3 +3301,11 @@ Skill* Creature::GetMainSkill()
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Creature::ClearGemStoneBuffs()
|
||||
{
|
||||
for (int buff_uniid : gemstone_hold_buffs) {
|
||||
RemoveBuffByUniId(buff_uniid);
|
||||
}
|
||||
gemstone_hold_buffs.clear();
|
||||
}
|
||||
|
@ -118,6 +118,7 @@ class Creature : public MoveableEntity
|
||||
int shield_max_hp_ = 0;
|
||||
|
||||
int gemstone = 0;
|
||||
std::vector<int> gemstone_hold_buffs;
|
||||
bool shot_start = false;
|
||||
bool shot_hold = false;
|
||||
|
||||
@ -357,6 +358,7 @@ class Creature : public MoveableEntity
|
||||
void AdjustPos();
|
||||
void OnLand();
|
||||
std::shared_ptr<Compose> GetCompose() { return compose_; }
|
||||
void ClearGemStoneBuffs();
|
||||
|
||||
protected:
|
||||
virtual void OnBuffRemove(Buff& buff);
|
||||
|
@ -3344,8 +3344,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));
|
||||
}
|
||||
}
|
||||
}
|
||||
SyncVolume(IS_YELLOW_STONE);
|
||||
//刷新数量
|
||||
|
Loading…
x
Reference in New Issue
Block a user