merge master
This commit is contained in:
commit
ecb07401af
@ -166,6 +166,7 @@ enum HumanAttrType_e
|
|||||||
kHAT_FireRate = 9,
|
kHAT_FireRate = 9,
|
||||||
kHAT_Volume = 10,
|
kHAT_Volume = 10,
|
||||||
kHAT_MaxHp = 11,
|
kHAT_MaxHp = 11,
|
||||||
|
kHAT_ReloadTime = 14,
|
||||||
kHAT_BulletAngle = 20,
|
kHAT_BulletAngle = 20,
|
||||||
kHAT_End
|
kHAT_End
|
||||||
};
|
};
|
||||||
|
@ -829,7 +829,7 @@ void Human::AutoLoadingBullet(bool manual)
|
|||||||
on_loading_bullet();
|
on_loading_bullet();
|
||||||
}
|
}
|
||||||
StartAction(AT_Reload,
|
StartAction(AT_Reload,
|
||||||
p_weapon->meta->i->reload_time(),
|
p_weapon->GetAttrValue(kHAT_ReloadTime),
|
||||||
p_weapon->weapon_id,
|
p_weapon->weapon_id,
|
||||||
p_weapon->weapon_idx);
|
p_weapon->weapon_idx);
|
||||||
}
|
}
|
||||||
@ -848,6 +848,7 @@ void Human::StartAction(ActionType_e action_type,
|
|||||||
this->action_target_id == target_id) {
|
this->action_target_id == target_id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
action_duration = std::max(0, action_duration);
|
||||||
this->action_type = action_type;
|
this->action_type = action_type;
|
||||||
this->action_frameno = room->GetFrameNo();
|
this->action_frameno = room->GetFrameNo();
|
||||||
this->action_duration = action_duration;
|
this->action_duration = action_duration;
|
||||||
|
@ -46,4 +46,5 @@ void Loot::FillMFObjectFull(Room* room, Human* hum, cs::MFObjectFull* full_data)
|
|||||||
|
|
||||||
p->set_item_id(item_id);
|
p->set_item_id(item_id);
|
||||||
p->set_count(count);
|
p->set_count(count);
|
||||||
|
p->set_item_level(item_level);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
#include "metadata.h"
|
#include "metadata.h"
|
||||||
#include "metamgr.h"
|
#include "metamgr.h"
|
||||||
|
|
||||||
|
#include "framework/cpp/utils.h"
|
||||||
|
|
||||||
namespace MetaData
|
namespace MetaData
|
||||||
{
|
{
|
||||||
void Parameter::Init()
|
void Parameter::Init()
|
||||||
@ -102,7 +104,11 @@ namespace MetaData
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
a8::Split(i->attr_type(), strings, '|');
|
if (f8::IsOnlineEnv()) {
|
||||||
|
a8::Split(i->attr_type(), strings, '|');
|
||||||
|
} else {
|
||||||
|
a8::Split(i->spera_type(), strings, '|');
|
||||||
|
}
|
||||||
int level = 1;
|
int level = 1;
|
||||||
for (auto& str : strings) {
|
for (auto& str : strings) {
|
||||||
if (str.empty()) {
|
if (str.empty()) {
|
||||||
|
@ -57,6 +57,12 @@ float Weapon::GetAttrValue(HumanAttrType_e attr_type)
|
|||||||
(upgrade_meta ? upgrade_meta->GetAttrValue(weapon_lv, attr_type) : 0);
|
(upgrade_meta ? upgrade_meta->GetAttrValue(weapon_lv, attr_type) : 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case kHAT_ReloadTime:
|
||||||
|
{
|
||||||
|
return meta->i->reload_time() -
|
||||||
|
(upgrade_meta ? upgrade_meta->GetAttrValue(weapon_lv, attr_type) : 0);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -302,9 +302,10 @@ message MFLootFull
|
|||||||
optional int32 obj_uniid = 1; //唯一id
|
optional int32 obj_uniid = 1; //唯一id
|
||||||
optional MFVec2 pos = 2; //位置
|
optional MFVec2 pos = 2; //位置
|
||||||
|
|
||||||
optional int32 item_id = 6;
|
optional int32 item_id = 6; //道具id
|
||||||
optional int32 count = 7;
|
optional int32 count = 7; //数量
|
||||||
optional int32 age_ms = 8;
|
optional int32 age_ms = 8;
|
||||||
|
optional int32 item_level = 9 [default = 1]; //道具等级
|
||||||
}
|
}
|
||||||
|
|
||||||
//尸体-部分
|
//尸体-部分
|
||||||
|
@ -104,6 +104,7 @@ message EquipUpgrade
|
|||||||
{
|
{
|
||||||
optional int32 id = 1;
|
optional int32 id = 1;
|
||||||
optional string attr_type = 4;
|
optional string attr_type = 4;
|
||||||
|
optional string spera_type = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Player
|
message Player
|
||||||
|
Loading…
x
Reference in New Issue
Block a user