merge master

This commit is contained in:
aozhiwei 2020-08-10 11:42:03 +08:00
commit ecb07401af
7 changed files with 21 additions and 4 deletions

View File

@ -166,6 +166,7 @@ enum HumanAttrType_e
kHAT_FireRate = 9,
kHAT_Volume = 10,
kHAT_MaxHp = 11,
kHAT_ReloadTime = 14,
kHAT_BulletAngle = 20,
kHAT_End
};

View File

@ -829,7 +829,7 @@ void Human::AutoLoadingBullet(bool manual)
on_loading_bullet();
}
StartAction(AT_Reload,
p_weapon->meta->i->reload_time(),
p_weapon->GetAttrValue(kHAT_ReloadTime),
p_weapon->weapon_id,
p_weapon->weapon_idx);
}
@ -848,6 +848,7 @@ void Human::StartAction(ActionType_e action_type,
this->action_target_id == target_id) {
return;
}
action_duration = std::max(0, action_duration);
this->action_type = action_type;
this->action_frameno = room->GetFrameNo();
this->action_duration = action_duration;

View File

@ -46,4 +46,5 @@ void Loot::FillMFObjectFull(Room* room, Human* hum, cs::MFObjectFull* full_data)
p->set_item_id(item_id);
p->set_count(count);
p->set_item_level(item_level);
}

View File

@ -3,6 +3,8 @@
#include "metadata.h"
#include "metamgr.h"
#include "framework/cpp/utils.h"
namespace MetaData
{
void Parameter::Init()
@ -102,7 +104,11 @@ namespace MetaData
}
{
std::vector<std::string> strings;
if (f8::IsOnlineEnv()) {
a8::Split(i->attr_type(), strings, '|');
} else {
a8::Split(i->spera_type(), strings, '|');
}
int level = 1;
for (auto& str : strings) {
if (str.empty()) {

View File

@ -57,6 +57,12 @@ float Weapon::GetAttrValue(HumanAttrType_e attr_type)
(upgrade_meta ? upgrade_meta->GetAttrValue(weapon_lv, attr_type) : 0);
}
break;
case kHAT_ReloadTime:
{
return meta->i->reload_time() -
(upgrade_meta ? upgrade_meta->GetAttrValue(weapon_lv, attr_type) : 0);
}
break;
default:
return 0;
}

View File

@ -302,9 +302,10 @@ message MFLootFull
optional int32 obj_uniid = 1; //id
optional MFVec2 pos = 2; //
optional int32 item_id = 6;
optional int32 count = 7;
optional int32 item_id = 6; //id
optional int32 count = 7; //
optional int32 age_ms = 8;
optional int32 item_level = 9 [default = 1]; //
}
//-

View File

@ -104,6 +104,7 @@ message EquipUpgrade
{
optional int32 id = 1;
optional string attr_type = 4;
optional string spera_type = 5;
}
message Player