This commit is contained in:
aozhiwei 2023-05-23 11:36:38 +08:00
parent 16971ee6d8
commit 98298b8722
3 changed files with 23 additions and 14 deletions

View File

@ -2786,18 +2786,6 @@ void Human::ProcAddItemDto(AddItemDTO& dto)
ProcLoveItem(dto);
}
break;
#if 0
case EQUIP_TYPE_BLUE_STONE:
{
ProcBlueStoneItem(dto);
}
break;
case EQUIP_TYPE_PURPLE_STONE:
{
ProcPurpleStoneItem(dto);
}
break;
#endif
default:
{
ProcLootSpecItem(dto);
@ -3359,14 +3347,21 @@ void Human::ProcBlueStoneItem(AddItemDTO& dto)
if (GetInventory(IS_BLUE_STONE) >= GetVolume(IS_BLUE_STONE)) {
return;
}
Skill* skill = GetMainSkill();
if (!skill) {
return;
}
if (!skill->Actived()) {
skill->Active();
}
AddInventory(IS_BLUE_STONE, 1);
gemstone += 1;
skill->LevelUp();
room->frame_event.AddPropChg
(
GetWeakPtrRef(),
kPropYellowStone,
0,
gemstone,
GetInventory(IS_BLUE_STONE),
false);
//刷新数量

View File

@ -497,3 +497,14 @@ bool Skill::IsMainSkill()
{
return owner->GetBattleContext()->IsMainSkill(this);
}
void Skill::Active()
{
actived_ = true;
NotifySkillState();
}
void Skill::LevelUp()
{
}

View File

@ -45,7 +45,10 @@ class Skill
void CancelMinorMode();
void ProcSkillPhase(const mt::SkillPhase* phase);
bool Actived() { return actived_; }
void Active();
void Deactive() { actived_ = false; }
bool IsMainSkill();
void LevelUp();
private:
void InitActiveSkill();