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

Method removeEphemeralEffect

source/game/StarStatusController.cpp:315–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315bool StatusController::removeEphemeralEffect(UniqueStatusEffect const& effect) {
316 if (auto uniqueEffect = m_uniqueEffects.ptr(effect)) {
317 auto metadata = m_uniqueEffectMetadata.getNetElement(uniqueEffect->metadataId);
318 if (metadata->duration) {
319 removeUniqueEffect(effect);
320 return true;
321 }
322 }
323
324 return false;
325}
326
327void StatusController::clearEphemeralEffects() {
328 for (auto const& key : m_uniqueEffects.keys())

Callers

nothing calls this directly

Calls 2

getNetElementMethod · 0.80
ptrMethod · 0.45

Tested by

no test coverage detected