本文整理汇总了C++中Block_Buffer::read_double方法的典型用法代码示例。如果您正苦于以下问题:C++ Block_Buffer::read_double方法的具体用法?C++ Block_Buffer::read_double怎么用?C++ Block_Buffer::read_double使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Block_Buffer
的用法示例。
在下文中一共展示了Block_Buffer::read_double方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deserialize
int Hero_Info_Detail::deserialize(Block_Buffer &r) {
if( r.read_int32(hero_id) || r.read_int32(hero_index) || r.read_int32(hero_facade_id) ||
r.read_string(hero_name) || r.read_int8(is_outer) || r.read_int8(is_fighter) ||
r.read_int32(level) || r.read_int32(formation) || r.read_int32(awake_lvl) ||
r.read_double(exp) )
return -1;
uint16_t __prop_value_vec_size;
if(r.read_uint16(__prop_value_vec_size) )
return -1;
prop_value.reserve(__prop_value_vec_size);
for(uint16_t i = 0; i < __prop_value_vec_size; ++i) {
Int_Double v;
if(v.deserialize(r))
return -1;
prop_value.push_back(v);
}
uint16_t size = 0;
Artifact_Detail artifact_detail;
r.read_uint16(size);
for(uint16_t i = 0; i < size; ++i) {
artifact_detail.reset();
if (artifact_detail.deserialize(r)) {
continue;
};
artifacts.insert(std::make_pair(artifact_detail.artifact_id, artifact_detail));
}
hero_fighter_detail.deserialize(r);
return 0;
}
示例2: deserialize
void Expedition_Scene_Demage_Rank_Data::deserialize(Block_Buffer &r) {
r.read_string(role_name);
r.read_int64(role_id);
r.read_int64(gang_id);
r.read_string(gang_name);
r.read_int64(uuid);
r.read_string(server_name);
r.read_int32(force);
r.read_int32(level);
r.read_double(demage);
}
示例3: handle_scope
v8::Local<v8::Value> Msg_Struct::build_object_arg(const Field_Info &field_info, Block_Buffer &buffer, Isolate* isolate) {
EscapableHandleScope handle_scope(isolate);
Local<Value> value;
if(field_info.field_type == "int8") {
int8_t val = 0;
buffer.read_int8(val);
value = Int32::New(isolate, val);
}
else if(field_info.field_type == "int16") {
int16_t val = 0;
buffer.read_int16(val);
value = Int32::New(isolate, val);
}
else if(field_info.field_type == "int32") {
int32_t val = 0;
buffer.read_int32(val);
value = Int32::New(isolate, val);
}
else if(field_info.field_type == "int64") {
int64_t val = 0;
buffer.read_int64(val);
value = Number::New(isolate, val);
}
else if(field_info.field_type == "double") {
double val = 0;
buffer.read_double(val);
value = Number::New(isolate, val);
}
else if(field_info.field_type == "bool") {
bool val = false;
buffer.read_bool(val);
value = Boolean::New(isolate, val);
}
else if(field_info.field_type == "string") {
std::string val = "";
buffer.read_string(val);
value = String::NewFromUtf8(isolate, val.c_str(), NewStringType::kNormal).ToLocalChecked();
}
else {
LOG_ERROR("Can not find the field_type:%s, struct_name:%s", field_info.field_type.c_str(), struct_name().c_str());
return handle_scope.Escape(Local<Value>());
}
return handle_scope.Escape(value);
}
示例4: deserialize
int Fighter_Detail::deserialize(Block_Buffer &buffer) {
buffer.read_int64(role_id);
power.deserialize(buffer);
agility.deserialize(buffer);
dexterity.deserialize(buffer);
armor.deserialize(buffer);
stamina.deserialize(buffer);
physical_attack.deserialize(buffer);
spell_attack.deserialize(buffer);
physical_defense.deserialize(buffer);
spell_defense.deserialize(buffer);
hit_rate.deserialize(buffer);
avoid.deserialize(buffer);
ignore_def.deserialize(buffer);
blood_max.deserialize(buffer);
cure.deserialize(buffer);
cure_rate.deserialize(buffer);
sing_rate.deserialize(buffer);
crit.deserialize(buffer);
crit_def.deserialize(buffer);
init_morale.deserialize(buffer);
morale_caps.deserialize(buffer);
crit_hurt.deserialize(buffer);
crit_hurt_sub.deserialize(buffer);
hit_rate_addition.deserialize(buffer);
avoid_rate_addition.deserialize(buffer);
crit_rate_addition.deserialize(buffer);
crit_def_rate_addition.deserialize(buffer);
speed.deserialize(buffer);
blood_current.deserialize(buffer);
morale_current.deserialize(buffer);
strength_current.deserialize(buffer);
strength_max.deserialize(buffer);
blood_pool_current.deserialize(buffer);
blood_pool_max.deserialize(buffer);
ignore_def_rate.deserialize(buffer);
status_hit_rate.deserialize(buffer);
status_def_rate.deserialize(buffer);
blood_steal.deserialize(buffer);
phy_hurt_fix.deserialize(buffer);
phy_hurt_rate.deserialize(buffer);
spell_hurt_fix.deserialize(buffer);
spell_hurt_rate.deserialize(buffer);
hurt_fix.deserialize(buffer);
hurt_rate.deserialize(buffer);
be_hurt_fix.deserialize(buffer);
be_hurt_rate.deserialize(buffer);
pk_hurt_add.deserialize(buffer);
pk_hurt_sub.deserialize(buffer);
phy_hurt_rate_sub.deserialize(buffer);
spell_hurt_rate_sub.deserialize(buffer);
skill_hurt_rate.deserialize(buffer);
human_add.deserialize(buffer);
elf_add.deserialize(buffer);
orc_add.deserialize(buffer);
dragon_add.deserialize(buffer);
undead_add.deserialize(buffer);
demon_add.deserialize(buffer);
human_sub.deserialize(buffer);
elf_sub.deserialize(buffer);
orc_sub.deserialize(buffer);
dragon_sub.deserialize(buffer);
undead_sub.deserialize(buffer);
demon_sub.deserialize(buffer);
summon_add.deserialize(buffer);
summon_sub.deserialize(buffer);
be_cure_rate.deserialize(buffer);
effect_rate.deserialize(buffer);
pve_hurt_add.deserialize(buffer);
pve_hurt_sub.deserialize(buffer);
dizz_strengthen.deserialize(buffer);
dizz_weaken.deserialize(buffer);
buffer.read_int32(phy_power_recover_time);
buffer.read_int32(phy_power_buy_times);
buffer.read_int32(level);
buffer.read_double(experience);
buffer.read_double(elite_btl_morale);
buffer.read_int32(force);
buffer.read_int32(highest_force);
buffer.read_int32(ttl_force);
buffer.read_int32(ttl_skill_points_);
buffer.read_int32(default_skill);
buffer.read_int32(cur_used_talent_);
buffer.read_int32(reset_skill_times);
uint16_t s = 0;
buffer.read_uint16(s);
Talent talent;
talent_map.clear();
//.........这里部分代码省略.........