1
This commit is contained in:
parent
123fbbfd2c
commit
b18ef9040b
@ -25,6 +25,11 @@ void Buff::FillMFBuff(cs::MFBuff* buff_pb)
|
||||
buff_pb->set_buff_id(meta->i->buff_id());
|
||||
buff_pb->set_left_time(GetLeftTime());
|
||||
buff_pb->set_lasting_time(GetLastingTime());
|
||||
if (owner->IsHuman() &&
|
||||
(meta->i->buff_effect() == kBET_Driver ||
|
||||
meta->i->buff_effect() == kBET_Passenger)) {
|
||||
buff_pb->add_params(((Human*)owner)->GetCar()->meta->i->id());
|
||||
}
|
||||
}
|
||||
|
||||
void Buff::ProcDelayAddBuff(Creature* caster)
|
||||
|
@ -32,6 +32,11 @@ cs::SMUpdate* FrameMaker::MakeUpdateMsg(Human* hum)
|
||||
}
|
||||
if (hum->IsPlayer()) {
|
||||
itr->FillMFObjectFull(room, (Human*)hum, msg->add_full_objects());
|
||||
#ifdef DEBUG
|
||||
if (itr->GetEntityType() == ET_Car) {
|
||||
hum->SendDebugMsg(a8::Format("载具出现", {}));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (App::Instance()->HasFlag(2) && itr->GetEntityType() == ET_Player) {
|
||||
|
@ -592,12 +592,12 @@ Car* Room::CreateCar(Human* driver,
|
||||
}
|
||||
car->Initialize();
|
||||
AddToEntityHash(car);
|
||||
AddToMoveableHash(car);
|
||||
grid_service->AddCreature(car);
|
||||
car->RefreshView();
|
||||
for (int buff_id : car->hero_meta_->init_buffs) {
|
||||
car->MustBeAddBuff(car, buff_id);
|
||||
}
|
||||
car->BroadcastFullState(this);
|
||||
return car;
|
||||
}
|
||||
|
||||
|
@ -707,6 +707,7 @@ message MFBuff
|
||||
optional int32 buff_id = 1; //buff id
|
||||
optional float left_time = 2; //剩余时间(单位毫秒)
|
||||
optional float lasting_time = 3; //持续时间(总时间毫秒)
|
||||
repeated float params = 4; //当是驾驶员或者乘客状时 params[0]:car_id
|
||||
}
|
||||
|
||||
//buff变更
|
||||
|
Loading…
x
Reference in New Issue
Block a user