This commit is contained in:
aozhiwei 2023-05-18 14:25:50 +08:00
parent 79cec69263
commit 34ae57b544
3 changed files with 10 additions and 7 deletions

View File

@ -81,7 +81,9 @@ enum InventorySlot_e
IS_SINGAL_GUN = 23, //信号枪
IS_OIL_BUCKET = 24, //汽油桶
IS_GEMSTONE = 25, //能量宝石
IS_YELLOW_STONE = 25, //黄宝石
IS_BLUE_STONE = 26, //蓝宝石
IS_PURPLE_STONE = 27, //紫宝石
IS_MAX = 30,
IS_END

View File

@ -1249,7 +1249,7 @@ void Human::DeadDrop()
on_dead_remove_objects_.clear();
}
{
if (GetInventory(IS_GEMSTONE) > 0 && gemstone > 0) {
if (GetInventory(IS_YELLOW_STONE) > 0 && gemstone > 0) {
room->frame_event.AddPropChg
(
GetWeakPtrRef(),
@ -1266,8 +1266,8 @@ void Human::DeadDrop()
SetMaxHP(GetBattleContext()->GetMaxHP());
gemstone = 0;
DecInventory(IS_GEMSTONE, GetInventory(IS_GEMSTONE));
SyncVolume(IS_GEMSTONE);
DecInventory(IS_YELLOW_STONE, GetInventory(IS_YELLOW_STONE));
SyncVolume(IS_YELLOW_STONE);
}
}
MarkSyncActivePlayer(__FILE__, __LINE__, __func__);
@ -3235,10 +3235,10 @@ void Human::SyncVolume(int slot_id)
void Human::ProcGemStoneItem(AddItemDTO& dto)
{
if (GetInventory(IS_GEMSTONE) >= GetVolume(IS_GEMSTONE)) {
if (GetInventory(IS_YELLOW_STONE) >= GetVolume(IS_YELLOW_STONE)) {
return;
}
AddInventory(IS_GEMSTONE, 1);
AddInventory(IS_YELLOW_STONE, 1);
gemstone += 1;
room->frame_event.AddPropChg
(
@ -3283,7 +3283,7 @@ void Human::ProcGemStoneItem(AddItemDTO& dto)
0,
GetMaxHP(),
true);
SyncVolume(IS_GEMSTONE);
SyncVolume(IS_YELLOW_STONE);
//刷新数量
int add_num = 1;
Entity* entity = room->GetEntityByUniId(dto.uniid);

View File

@ -253,6 +253,7 @@ message MFWeapon
optional string weapon_uniid = 3; //id
optional int32 ammo = 4; //
optional int32 volume = 5; //
optional int32 weapon_battle_lv = 6 [default = 0]; //()
}
//