This commit is contained in:
aozhiwei 2024-05-22 17:26:05 +08:00
parent 95bd67ec15
commit 15e2e37e5c
3 changed files with 6 additions and 6 deletions

View File

@ -100,6 +100,7 @@ void Buff::InternalTimerAddBuff()
[this, caster_state, skill, add_buff_id] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
int buff_id = meta->buff_id();
if (!caster_state->caster.Get()) {
return;
}

View File

@ -3589,12 +3589,11 @@ void Creature::RemoveSurplusObstacle(int id, int num)
void Creature::RemoveSurplusObstacleByUniid(int obj_uniid)
{
for (auto itr : slave_things2_) {
for (auto& itr : slave_things2_) {
list_head* pos = nullptr;
list_head* next = nullptr;
float new_val = 0.0f;
bool inited = false;
list_for_each_safe(pos, next, &itr.second) {
list_head* head = &itr.second;
list_for_each_safe(pos, next, head) {
RoomObstacle* ob = list_entry(pos,
RoomObstacle,
entry);

View File

@ -44,9 +44,9 @@ int Weapon::GetFireRate(Creature* c)
if (c->GetNetData()) {
rate = c->GetNetData()->GetFireRate(c, this);
} else {
rate = meta ? meta->fire_rate() :0;
rate = meta ? meta->fire_rate() : 0;
}
return rate * c->GetAbility()->GetAttrRuduce(kHVAT_FireRate);
return rate * (1.0f + c->GetAbility()->GetAttrRuduce(kHVAT_FireRate));
}
int Weapon::GetReloadTime(Creature* c)