MCPcopy Create free account
hub / github.com/SapphireServer/Sapphire / onStatusReceive

Method onStatusReceive

src/world/Script/ScriptMgr.cpp:368–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366}
367
368bool Sapphire::Scripting::ScriptMgr::onStatusReceive( Entity::CharaPtr pActor, uint32_t effectId )
369{
370 auto script = m_nativeScriptMgr->getScript< Sapphire::ScriptAPI::StatusEffectScript >( effectId );
371
372 if( script )
373 {
374 if( pActor->isPlayer() )
375 pActor->getAsPlayer()->sendDebug( "Calling status receive for statusid#{0}", effectId );
376
377 script->onApply( *pActor );
378 return true;
379 }
380
381 return false;
382}
383
384bool Sapphire::Scripting::ScriptMgr::onStatusTick( Entity::CharaPtr pChara, Sapphire::StatusEffect::StatusEffect& effect )
385{

Callers 1

applyStatusMethod · 0.80

Calls 4

isPlayerMethod · 0.80
getAsPlayerMethod · 0.80
onApplyMethod · 0.80
sendDebugMethod · 0.45

Tested by

no test coverage detected