From aa4bf42b16ae5b81cbf5edc45b5bffa097f38e60 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 28 Apr 2020 15:19:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BC=AA=E8=A3=85=E6=8B=BE?= =?UTF-8?q?=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/human.cc | 5 +++++ server/gameserver/human.h | 1 + server/gameserver/player.cc | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 345c39f..2c63e81 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -2400,6 +2400,11 @@ void Human::ProcLootCar(Loot* entity, MetaData::Equip* item_meta) room->NotifyUiUpdate(); } +void Human::ProcCamoutflage(Loot* entity, MetaData::Equip* item_meta) +{ + AddItem(item_meta->i->id(), 1); +} + void Human::FindLocationWithTarget(Entity* target) { a8::Vec2 old_pos = GetPos(); diff --git a/server/gameserver/human.h b/server/gameserver/human.h index 86a7357..eef2f7e 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -249,6 +249,7 @@ protected: void ProcLootOldSkin(Loot* entity, MetaData::Equip* item_meta); void ProcLootSkin(Loot* entity, MetaData::Equip* item_meta); void ProcLootCar(Loot* entity, MetaData::Equip* item_meta); + void ProcCamoutflage(Loot* entity, MetaData::Equip* item_meta); void ResetTankSkin(); void SelectSkillTargets(const a8::Vec2& target_pos, std::set& target_list); Buff* GetBuffById(int buff_id); diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index a9764fb..323d643 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -626,6 +626,11 @@ void Player::LootInteraction(Loot* entity) ProcLootCar(entity, item_meta); } break; + case EQUIP_TYPE_CAMOUFLAGE: + { + ProcCamoutflage(entity, item_meta); + } + break; default: { if (item_meta->i->_inventory_slot() >= 0 &&