From d8c9569051145bc65e6b808dd7206c26ef5d4dd1 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 11 Oct 2021 11:10:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BF=A1=E5=8F=B7=E5=8F=91?= =?UTF-8?q?=E5=B0=84=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/constant.h | 1 + server/gameserver/human.cc | 18 +++++++----------- server/gameserver/human.h | 2 +- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/server/gameserver/constant.h b/server/gameserver/constant.h index a8f8f81..4104950 100644 --- a/server/gameserver/constant.h +++ b/server/gameserver/constant.h @@ -231,6 +231,7 @@ enum EquipType_e EQUIP_TYPE_SKIN = 10, EQUIP_TYPE_CAMOUFLAGE = 11, EQUIP_TYPE_SPOILS = 12, + EQUIP_TYPE_SINGAL_EMITTER = 13, EQUIP_TYPE_End }; diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index d7dde0f..bb2b6eb 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -2091,7 +2091,7 @@ void Human::ProcLootCar(AddItemDTO& dto) dto.handled = true; } -void Human::ProcCamoutflage(AddItemDTO& dto) +void Human::ProcNormalItem(AddItemDTO& dto) { AddItem(dto.item_meta->i->id(), 1); dto.handled = true; @@ -3541,11 +3541,6 @@ void Human::ProcAddItemDto(AddItemDTO& dto) #endif return; } - #ifdef DEBUG - if (dto.item_id == 30606) { - int i = 0; - } - #endif switch (dto.item_meta->i->equip_type()) { case EQUIP_TYPE_WEAPON: { @@ -3577,16 +3572,17 @@ void Human::ProcAddItemDto(AddItemDTO& dto) ProcLootCar(dto); } break; - case EQUIP_TYPE_CAMOUFLAGE: - { - ProcCamoutflage(dto); - } - break; case EQUIP_TYPE_SPOILS: { ProcSpoils(dto); } break; + case EQUIP_TYPE_CAMOUFLAGE: + case EQUIP_TYPE_SINGAL_EMITTER: + { + ProcNormalItem(dto); + } + break; default: { ProcLootSpecItem(dto); diff --git a/server/gameserver/human.h b/server/gameserver/human.h index 1d7ca5a..375f2b4 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -272,7 +272,7 @@ protected: void ProcLootWeapon(AddItemDTO& dto); void ProcLootSkin(AddItemDTO& dto); void ProcLootCar(AddItemDTO& dto); - void ProcCamoutflage(AddItemDTO& dto); + void ProcNormalItem(AddItemDTO& dto); void ProcSpoils(AddItemDTO& dto); void ProcLootBag(AddItemDTO& dto); void ProcLootProtection(AddItemDTO& dto);