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

View File

@ -497,3 +497,14 @@ bool Skill::IsMainSkill()
{ {
return owner->GetBattleContext()->IsMainSkill(this); 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 CancelMinorMode();
void ProcSkillPhase(const mt::SkillPhase* phase); void ProcSkillPhase(const mt::SkillPhase* phase);
bool Actived() { return actived_; } bool Actived() { return actived_; }
void Active();
void Deactive() { actived_ = false; }
bool IsMainSkill(); bool IsMainSkill();
void LevelUp();
private: private:
void InitActiveSkill(); void InitActiveSkill();