This commit is contained in:
aozhiwei 2022-10-09 20:56:40 +08:00
parent 6080b7fa0a
commit c32c47bc5b

View File

@ -1001,12 +1001,10 @@ namespace MetaData
}
}
{
#if 0
number_meta = MetaMgr::Instance()->GetSkillNumber(i->skill_id());
if (!number_meta) {
abort();
}
#endif
}
{
SkillHelper::GetMagicIdAndBaseSkillId(i->skill_id(), magic_id, base_skill_id);
@ -1709,6 +1707,61 @@ namespace MetaData
void SkillNumber::Init()
{
int_ratio = a8::XValue(pb->ratio());
float_ratio = a8::XValue(pb->ratio()).GetDouble();
if (pb->ratio().find('%') != std::string::npos) {
std::string tmp_str = pb->ratio();
a8::ReplaceString(tmp_str, "%", "");
float_ratio = a8::XValue(tmp_str).GetDouble() / 100;
}
int_ratio2 = a8::XValue(pb->ratio2());
float_ratio2 = a8::XValue(pb->ratio2()).GetDouble();
if (pb->ratio2().find('%') != std::string::npos) {
std::string tmp_str = pb->ratio2();
a8::ReplaceString(tmp_str, "%", "");
float_ratio2 = a8::XValue(tmp_str).GetDouble() / 100;
}
int_speed = a8::XValue(pb->speed());
float_speed = a8::XValue(pb->speed()).GetDouble();
if (pb->speed().find('%') != std::string::npos) {
std::string tmp_str = pb->speed();
a8::ReplaceString(tmp_str, "%", "");
float_speed = a8::XValue(tmp_str).GetDouble() / 100;
}
int_range = a8::XValue(pb->range());
float_range = a8::XValue(pb->range()).GetDouble();
if (pb->range().find('%') != std::string::npos) {
std::string tmp_str = pb->range();
a8::ReplaceString(tmp_str, "%", "");
float_range = a8::XValue(tmp_str).GetDouble() / 100;
}
int_range2 = a8::XValue(pb->range2());
float_range2 = a8::XValue(pb->range2()).GetDouble();
if (pb->range2().find('%') != std::string::npos) {
std::string tmp_str = pb->range2();
a8::ReplaceString(tmp_str, "%", "");
float_range2 = a8::XValue(tmp_str).GetDouble() / 100;
}
int_probability = a8::XValue(pb->probability());
float_probability = a8::XValue(pb->probability()).GetDouble();
if (pb->probability().find('%') != std::string::npos) {
std::string tmp_str = pb->probability();
a8::ReplaceString(tmp_str, "%", "");
float_probability = a8::XValue(tmp_str).GetDouble() / 100;
}
int_cd = a8::XValue(pb->cd());
float_cd = a8::XValue(pb->cd()).GetDouble();
if (pb->cd().find('%') != std::string::npos) {
std::string tmp_str = pb->cd();
a8::ReplaceString(tmp_str, "%", "");
float_cd = a8::XValue(tmp_str).GetDouble() / 100;
}
}