1
This commit is contained in:
parent
6347baa5a4
commit
fe2924f943
@ -940,6 +940,9 @@ void Creature::ProcSkillPhase(MetaData::SkillPhase* phase)
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (CurrentSkill()->meta->GetMagicId() == MAGIC_YLZ) {
|
||||||
|
target_distance = std::max(0.0001f, target_distance);
|
||||||
|
}
|
||||||
if (bullet_meta && target_distance > 0.00001f) {
|
if (bullet_meta && target_distance > 0.00001f) {
|
||||||
a8::Vec2 old_attack_dir = GetAttackDir();
|
a8::Vec2 old_attack_dir = GetAttackDir();
|
||||||
a8::Vec2 attack_dir = skill_dir_;
|
a8::Vec2 attack_dir = skill_dir_;
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "buff.h"
|
#include "buff.h"
|
||||||
#include "human.h"
|
#include "human.h"
|
||||||
#include "bullet.h"
|
#include "bullet.h"
|
||||||
|
#include "collider.h"
|
||||||
|
|
||||||
void Skill::Initialzie()
|
void Skill::Initialzie()
|
||||||
{
|
{
|
||||||
@ -545,18 +546,34 @@ void Skill::ProcCMXD()
|
|||||||
Buff* hold_shield_buff = owner->GetBuffByEffectId(kBET_HoldShield);
|
Buff* hold_shield_buff = owner->GetBuffByEffectId(kBET_HoldShield);
|
||||||
if (hold_shield_buff) {
|
if (hold_shield_buff) {
|
||||||
MetaData::Skill* skill_meta = hold_shield_buff->skill_meta;
|
MetaData::Skill* skill_meta = hold_shield_buff->skill_meta;
|
||||||
|
MetaData::Skill* this_skill_meta = meta;
|
||||||
|
MetaData::Buff* shield_buff_meta = hold_shield_buff->meta;
|
||||||
CreatureWeakPtr sender = owner->GetWeakPtrRef();
|
CreatureWeakPtr sender = owner->GetWeakPtrRef();
|
||||||
|
|
||||||
std::shared_ptr<Explosion> e = EntityFactory::Instance()->MakeExplosion();
|
std::shared_ptr<Explosion> e = EntityFactory::Instance()->MakeExplosion();
|
||||||
e->SetThrough(true);
|
e->SetThrough(true);
|
||||||
e->SetCustomCheckCb
|
e->SetCustomCheckCb
|
||||||
(
|
(
|
||||||
[sender, skill_meta] (const std::vector<std::any>& params) mutable
|
[sender, skill_meta, this_skill_meta, shield_buff_meta] (const std::vector<std::any>& params) mutable
|
||||||
{
|
{
|
||||||
bool* is_hit = std::any_cast<bool*>(params.at(0));
|
bool* is_hit = std::any_cast<bool*>(params.at(0));
|
||||||
Entity* e = std::any_cast<Entity*>(params.at(1));
|
Entity* e = std::any_cast<Entity*>(params.at(1));
|
||||||
if (sender.Get() && e->IsCreature(sender.Get()->room)) {
|
if (sender.Get() && e->IsCreature(sender.Get()->room)) {
|
||||||
Creature* c = (Creature*)e;
|
Creature* c = (Creature*)e;
|
||||||
|
bool ret = Check2dRotationRectangle
|
||||||
|
(c->GetPos().x,
|
||||||
|
c->GetPos().y,
|
||||||
|
20,
|
||||||
|
sender.Get()->GetPos().x,
|
||||||
|
sender.Get()->GetPos().y,
|
||||||
|
shield_buff_meta->param4,
|
||||||
|
SkillHelper::GetCmxdRange(this_skill_meta),
|
||||||
|
sender.Get()->GetAttackDirRotate() * 180.0f
|
||||||
|
);
|
||||||
|
if (ret) {
|
||||||
|
*is_hit = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -868,6 +868,7 @@ message MFOverRewardItem
|
|||||||
{
|
{
|
||||||
optional string obtain_gold = 1 [default = "0"]; //实际获得金币数
|
optional string obtain_gold = 1 [default = "0"]; //实际获得金币数
|
||||||
optional string gold_limit = 2 [default = "0"]; //今天可获得的金币上限
|
optional string gold_limit = 2 [default = "0"]; //今天可获得的金币上限
|
||||||
|
optional int32 id = 3; //英雄或者武器id
|
||||||
}
|
}
|
||||||
|
|
||||||
//结算奖励
|
//结算奖励
|
||||||
|
Loading…
x
Reference in New Issue
Block a user