添加自定义碰撞

This commit is contained in:
aozhiwei 2021-07-08 07:33:59 +00:00
parent 92ab2b611c
commit 38e8a7b4e8
4 changed files with 12 additions and 2 deletions

View File

@ -299,12 +299,10 @@ void Creature::TryAddBuff(Creature* caster, int buff_id)
void Creature::RemoveBuffById(int buff_id)
{
a8::XPrintf("RemoveBuffById :%d\n", {buff_id});
std::vector<std::tuple<MetaData::Buff*, Creature*>> removed_buffs;
for (auto itr = buff_list_.begin(); itr != buff_list_.end(); ++itr) {
Buff& buff = *itr;
if (buff.meta->i->buff_id() == buff_id) {
a8::XPrintf("RemoveBuffById2 :%d\n", {buff_id});
removed_buffs.push_back(std::make_tuple(buff.meta, buff.GetCaster().Get()));
OnBuffRemove(buff);
buff.UnInit();

View File

@ -263,6 +263,7 @@ private:
float skill_distance_ = 0.0f;
std::map<int, Skill*> skill_hash_;
std::map<int, Skill*> passive_skill_hash_;
std::map<int, long long> buff_interval_hash_;
std::array<Inventory, IS_END> inventory_ = {};
friend class Skill;
friend class Trigger;

View File

@ -144,6 +144,15 @@ message MFPropertyChg
optional float value = 4; //
}
//
message MFCollider
{
optional int32 shape = 1; // 1 2width=eight
optional int32 width = 2; //
optional int32 height = 3; //
}
//
message MFMapObject
{
@ -285,6 +294,7 @@ message MFObstacleFull
optional float door_height = 28; //
optional int32 door_open_times = 29; //,/ ++times 0:
optional string button_name = 30; //
optional MFCollider collider = 31; //
}
//-

View File

@ -251,6 +251,7 @@ message Buff
optional string child_buff = 17;
optional int32 coexist_num = 18;
optional int32 dead_valid = 23;
optional int32 buff_interval = 24;
}
message Drop