This commit is contained in:
aozhiwei 2023-05-23 14:28:08 +08:00
parent a009046449
commit cbf57dccc9

View File

@ -3380,23 +3380,23 @@ void Human::ProcBlueStoneItem(AddItemDTO& dto)
if (entity && entity->IsEntityType(ET_Loot)) {
((Loot*)entity)->count -= add_num;
}
SyncVolume(IS_BLUE_STONE);
dto.handled = true;
}
void Human::ProcPurpleStoneItem(AddItemDTO& dto)
{
//护盾
if (GetInventory(IS_BLUE_STONE) >= GetVolume(IS_BLUE_STONE)) {
if (GetInventory(IS_PURPLE_STONE) >= GetVolume(IS_PURPLE_STONE)) {
return;
}
AddInventory(IS_BLUE_STONE, 1);
gemstone += 1;
AddInventory(IS_PURPLE_STONE, 1);
room->frame_event.AddPropChg
(
GetWeakPtrRef(),
kPropYellowStone,
kPropPurpleStone,
0,
gemstone,
GetInventory(IS_PURPLE_STONE),
false);
//刷新数量
@ -3405,6 +3405,7 @@ void Human::ProcPurpleStoneItem(AddItemDTO& dto)
if (entity && entity->IsEntityType(ET_Loot)) {
((Loot*)entity)->count -= add_num;
}
SyncVolume(IS_PURPLE_STONE);
dto.handled = true;
}