添加自定义碰撞
This commit is contained in:
parent
92ab2b611c
commit
38e8a7b4e8
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -144,6 +144,15 @@ message MFPropertyChg
|
||||
optional float value = 4; //属性值
|
||||
}
|
||||
|
||||
|
||||
//碰撞体
|
||||
message MFCollider
|
||||
{
|
||||
optional int32 shape = 1; //形状 1:矩形 2:圆形(当是圆形的时候width=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; //碰撞体(有值的时候读取没值的时候还是读取配置表里的碰撞)
|
||||
}
|
||||
|
||||
//建筑物-部分
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user