This commit is contained in:
aozhiwei 2024-05-23 18:00:33 +08:00
parent c23bc0c0e3
commit c6c7b700e5
3 changed files with 17 additions and 0 deletions

View File

@ -16,6 +16,7 @@
#include "stats.h"
#include "android.h"
#include "skill.h"
#include "trigger.h"
#include "buff/distance_dmg_addition.h"
@ -811,6 +812,7 @@ float BattleDataContext::CalcDmg(Creature* target, IBullet* bullet)
}
#endif
owner_.Get()->GetTrigger()->BulletDmgStart(target);
float vEbc = 1.0f;
float vEd = 1 - target->GetNetData()->GetDef();
float X = (1 + hero_ability_->GetCrit()) * (1 - target->GetNetData()->GetBlock()) - 1;
@ -881,6 +883,7 @@ float BattleDataContext::CalcDmg(Creature* target, IBullet* bullet)
}
}
#endif
owner_.Get()->GetTrigger()->BulletDmgEnd(target);
return std::max(1.0f, std::round(finaly_dmg));
}

View File

@ -723,3 +723,13 @@ void Trigger::BeAttack(int attacker_id)
}
});
}
void Trigger::BulletDmgStart(Creature* target)
{
}
void Trigger::BulletDmgEnd(Creature* target)
{
}

View File

@ -36,6 +36,8 @@ enum EventId_e
kDownedEvent,
kUpdateEnergyShieldEvent,
kDestoryEnergyShieldEvent,
kBulletDmgStartEvent,
kBulletDmgEndEvent,
kCrazeModeEvent,
};
@ -90,6 +92,8 @@ public:
void EnterBattleMode();
void LeaveBattleMode();
void BeAttack(int attacker_id);
void BulletDmgStart(Creature* target);
void BulletDmgEnd(Creature* target);
std::weak_ptr<EventHandler> AddListener(int event_id, a8::CommonCbProc cb);
void RemoveEventHandler(std::weak_ptr<EventHandler> handler_ptr);