MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / applyDamageRequest

Method applyDamageRequest

source/game/StarStatusController.cpp:368–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366}
367
368List<DamageNotification> StatusController::applyDamageRequest(DamageRequest const& damageRequest) {
369 if (auto damageNotifications = m_primaryScript.invoke<List<DamageNotification>>("applyDamageRequest", damageRequest)) {
370 for (auto const& dn : *damageNotifications)
371 m_recentDamageTaken.add(dn);
372 return damageNotifications.take();
373 }
374 return {};
375}
376
377void StatusController::hitOther(EntityId targetEntityId, DamageRequest damageRequest) {
378 m_recentHitsGiven.add({targetEntityId, std::move(damageRequest)});

Callers 3

applyDamageMethod · 0.80
applyDamageMethod · 0.80
applyDamageMethod · 0.80

Calls 2

addMethod · 0.45
takeMethod · 0.45

Tested by

no test coverage detected