1
This commit is contained in:
parent
8f95445a45
commit
8a8d5370b5
@ -363,7 +363,10 @@ void Buff::ProcSprint()
|
|||||||
std::set<Creature*> enemys;
|
std::set<Creature*> enemys;
|
||||||
buff->owner->GetHitEnemys(enemys, buff->meta->param4);
|
buff->owner->GetHitEnemys(enemys, buff->meta->param4);
|
||||||
for (auto& enemy : enemys) {
|
for (auto& enemy : enemys) {
|
||||||
if (enemy->IsEntityType(ET_Car)) {
|
if (!buff->meta->int_param5 && enemy->IsEntityType(ET_Car)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (enemy->IsHuman() && enemy->AsHuman()->GetCar()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (hited_objects->find(enemy->GetUniId()) == hited_objects->end()) {
|
if (hited_objects->find(enemy->GetUniId()) == hited_objects->end()) {
|
||||||
|
@ -303,6 +303,16 @@ int Creature::AddBuff(Creature* caster,
|
|||||||
int skill_lv,
|
int skill_lv,
|
||||||
MetaData::Skill* buff_skill_meta)
|
MetaData::Skill* buff_skill_meta)
|
||||||
{
|
{
|
||||||
|
if (buff_meta->only_spec_race) {
|
||||||
|
if (!a8::HasBitFlag(buff_meta->only_spec_race, GetEntityType())) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (buff_meta->exclude_spec_race) {
|
||||||
|
if (a8::HasBitFlag(buff_meta->exclude_spec_race, GetEntityType())) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (buff_meta->i->buff_interval() > 0) {
|
if (buff_meta->i->buff_interval() > 0) {
|
||||||
if (buff_interval_hash_.find(buff_meta->i->buff_id()) != buff_interval_hash_.end()) {
|
if (buff_interval_hash_.find(buff_meta->i->buff_id()) != buff_interval_hash_.end()) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -934,6 +934,28 @@ namespace MetaData
|
|||||||
param4_int_list.push_back(a8::XValue(str).GetInt());
|
param4_int_list.push_back(a8::XValue(str).GetInt());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
std::vector<std::string> strings;
|
||||||
|
a8::Split(i->only_spec_race(), strings, '|');
|
||||||
|
for (auto& str : strings) {
|
||||||
|
int n = a8::XValue(str);
|
||||||
|
if (n <= 0 || n > 63) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
a8::SetBitFlag(only_spec_race, n);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
std::vector<std::string> strings;
|
||||||
|
a8::Split(i->exclude_spec_race(), strings, '|');
|
||||||
|
for (auto& str : strings) {
|
||||||
|
int n = a8::XValue(str);
|
||||||
|
if (n <= 0 || n > 63) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
a8::SetBitFlag(exclude_spec_race, n);
|
||||||
|
}
|
||||||
|
}
|
||||||
{
|
{
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
a8::Split(i->tag(), strings, '|');
|
a8::Split(i->tag(), strings, '|');
|
||||||
|
@ -237,6 +237,8 @@ namespace MetaData
|
|||||||
std::set<int> immune_buffeffect;
|
std::set<int> immune_buffeffect;
|
||||||
std::vector<std::tuple<int, float, float, int, int, int>> hero_infos;
|
std::vector<std::tuple<int, float, float, int, int, int>> hero_infos;
|
||||||
std::set<int> tags;
|
std::set<int> tags;
|
||||||
|
long long only_spec_race = 0;
|
||||||
|
long long exclude_spec_race = 0;
|
||||||
|
|
||||||
std::vector<int> child_buff_list;
|
std::vector<int> child_buff_list;
|
||||||
};
|
};
|
||||||
|
@ -288,6 +288,8 @@ message Buff
|
|||||||
optional int32 buff_interval = 24;
|
optional int32 buff_interval = 24;
|
||||||
optional string tag = 25;
|
optional string tag = 25;
|
||||||
optional int32 post_battle_valid = 26;
|
optional int32 post_battle_valid = 26;
|
||||||
|
optional string only_spec_race = 27;
|
||||||
|
optional string exclude_spec_race = 28;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Drop
|
message Drop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user