1
This commit is contained in:
parent
d56c31b355
commit
f80db8d440
@ -2686,7 +2686,8 @@ void Human::ProcLootWeapon(AddItemDTO& dto)
|
||||
|
||||
void Human::ProcLootWeaponNew(AddItemDTO& dto)
|
||||
{
|
||||
if (GetCurrWeapon()->weapon_idx == GUN_SLOT1 ||
|
||||
if (GetCurrWeapon()->weapon_idx == GUN_SLOT0 ||
|
||||
GetCurrWeapon()->weapon_idx == GUN_SLOT1 ||
|
||||
GetCurrWeapon()->weapon_idx == GUN_SLOT2) {
|
||||
if (GetCurrWeapon()->weapon_id == dto.item_meta->id()) {
|
||||
if (!GetCompose()->CanAdd()) {
|
||||
@ -2698,7 +2699,12 @@ void Human::ProcLootWeaponNew(AddItemDTO& dto)
|
||||
dto.handled = true;
|
||||
} else {
|
||||
int old_weapon_idx = GetCurrWeapon()->weapon_idx;
|
||||
DropWeapon(GetCurrWeapon()->weapon_idx, 1);
|
||||
if (GetCurrWeapon()->weapon_idx == GUN_SLOT0) {
|
||||
old_weapon_idx = GUN_SLOT0;
|
||||
DropWeapon(old_weapon_idx, 1);
|
||||
} else {
|
||||
DropWeapon(GetCurrWeapon()->weapon_idx, 1);
|
||||
}
|
||||
GetCompose()->Reset();
|
||||
Weapon* weapon = &weapons[old_weapon_idx];
|
||||
weapon->weapon_id = dto.item_id;
|
||||
|
14
server/gameserver/mt/MapThingGroup.cc
Normal file
14
server/gameserver/mt/MapThingGroup.cc
Normal file
@ -0,0 +1,14 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include "mt/MapThingGroup.h"
|
||||
|
||||
IMPL_TABLE(mt::MapThingGroup)
|
||||
|
||||
namespace mt
|
||||
{
|
||||
|
||||
void MapThingGroup::Init1()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
18
server/gameserver/mt/MapThingGroup.h
Normal file
18
server/gameserver/mt/MapThingGroup.h
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "mt/macro.h"
|
||||
#include "mtb/MapThingGroup.h"
|
||||
|
||||
namespace mt
|
||||
{
|
||||
|
||||
DECLARE_ID_TABLE(MapThingGroup, mtb::MapThingGroup,
|
||||
"mapThingGroup@mapThingGroup.json",
|
||||
"mtGroupId")
|
||||
public:
|
||||
|
||||
void Init1();
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -39,6 +39,7 @@
|
||||
#include "mt/GraspBuff.h"
|
||||
#include "mt/GuideStep.h"
|
||||
#include "mt/MergeItem.h"
|
||||
#include "mt/MapThingGroup.h"
|
||||
|
||||
#include "app.h"
|
||||
|
||||
@ -107,6 +108,7 @@ namespace mt
|
||||
RegMetaTable<GraspBuff>(res_path_);
|
||||
RegMetaTable<GuideStep>(res_path_);
|
||||
RegMetaTable<MergeItem>(res_path_);
|
||||
//RegMetaTable<MapThingGroup>(res_path_);
|
||||
}
|
||||
|
||||
void MetaMgr::Load()
|
||||
|
Loading…
x
Reference in New Issue
Block a user