1
This commit is contained in:
parent
7e7d268be5
commit
bac281edd0
@ -58,6 +58,7 @@ void Buff::FillMFBuff(cs::MFBuff* buff_pb)
|
|||||||
buff_pb->set_buff_id(meta->i->buff_id());
|
buff_pb->set_buff_id(meta->i->buff_id());
|
||||||
buff_pb->set_left_time(GetLeftTime());
|
buff_pb->set_left_time(GetLeftTime());
|
||||||
buff_pb->set_lasting_time(GetLastingTime());
|
buff_pb->set_lasting_time(GetLastingTime());
|
||||||
|
buff_pb->set_buff_uniid(buff_uniid);
|
||||||
if (owner->IsHuman() &&
|
if (owner->IsHuman() &&
|
||||||
(meta->i->buff_effect() == kBET_Driver ||
|
(meta->i->buff_effect() == kBET_Driver ||
|
||||||
meta->i->buff_effect() == kBET_Passenger)) {
|
meta->i->buff_effect() == kBET_Passenger)) {
|
||||||
|
@ -354,12 +354,12 @@ int Creature::AddBuff(Creature* caster,
|
|||||||
buff_meta->i->duration_time() * SERVER_FRAME_RATE,
|
buff_meta->i->duration_time() * SERVER_FRAME_RATE,
|
||||||
a8::XParams()
|
a8::XParams()
|
||||||
.SetSender(this)
|
.SetSender(this)
|
||||||
.SetParam1(buff_meta->i->buff_id())
|
.SetParam1(buff->buff_uniid)
|
||||||
.SetParam2(buff),
|
.SetParam2(buff),
|
||||||
[] (const a8::XParams& param)
|
[] (const a8::XParams& param)
|
||||||
{
|
{
|
||||||
Creature* c = (Creature*)param.sender.GetUserData();
|
Creature* c = (Creature*)param.sender.GetUserData();
|
||||||
c->RemoveBuffById(param.param1);
|
c->RemoveBuffByUniId(param.param1);
|
||||||
},
|
},
|
||||||
&buff->xtimer_attacher.timer_list_,
|
&buff->xtimer_attacher.timer_list_,
|
||||||
[] (const a8::XParams& param)
|
[] (const a8::XParams& param)
|
||||||
@ -385,7 +385,7 @@ int Creature::AddBuff(Creature* caster,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
SendDebugMsg(a8::Format("添加buff_id:%d effect:%d %s params:%d,%d,%d,%d,%d",
|
SendDebugMsg(a8::Format("添加buff_id:%d effect:%d %s params:%d,%d,%d,%d,%d uniid:%d",
|
||||||
{
|
{
|
||||||
buff_meta->i->buff_id(),
|
buff_meta->i->buff_id(),
|
||||||
buff_meta->i->buff_effect(),
|
buff_meta->i->buff_effect(),
|
||||||
@ -395,6 +395,7 @@ int Creature::AddBuff(Creature* caster,
|
|||||||
buff_meta->int_param3,
|
buff_meta->int_param3,
|
||||||
buff_meta->int_param4,
|
buff_meta->int_param4,
|
||||||
buff_meta->int_param5,
|
buff_meta->int_param5,
|
||||||
|
buff->buff_uniid
|
||||||
}));
|
}));
|
||||||
#endif
|
#endif
|
||||||
return new_buff_uniid;
|
return new_buff_uniid;
|
||||||
@ -538,9 +539,10 @@ void Creature::RemoveBuffByUniId(int buff_uniid)
|
|||||||
}
|
}
|
||||||
RecalcBuffAttr();
|
RecalcBuffAttr();
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
SendDebugMsg(a8::Format("移除buff_id:%d",
|
SendDebugMsg(a8::Format("移除buff_id:%d uniid:%d",
|
||||||
{
|
{
|
||||||
buff_id
|
buff_id,
|
||||||
|
buff_uniid
|
||||||
}));
|
}));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -758,6 +758,7 @@ message MFBuff
|
|||||||
optional float left_time = 2; //剩余时间(单位毫秒)
|
optional float left_time = 2; //剩余时间(单位毫秒)
|
||||||
optional float lasting_time = 3; //持续时间(总时间毫秒)
|
optional float lasting_time = 3; //持续时间(总时间毫秒)
|
||||||
repeated float params = 4; //当是驾驶员或者乘客状时 params[0]:car_id
|
repeated float params = 4; //当是驾驶员或者乘客状时 params[0]:car_id
|
||||||
|
optional int32 buff_uniid = 5; //buff唯一id
|
||||||
}
|
}
|
||||||
|
|
||||||
//buff变更
|
//buff变更
|
||||||
|
Loading…
x
Reference in New Issue
Block a user