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

Method onStatusTick

src/world/Script/ScriptMgr.cpp:384–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382}
383
384bool Sapphire::Scripting::ScriptMgr::onStatusTick( Entity::CharaPtr pChara, Sapphire::StatusEffect::StatusEffect& effect )
385{
386 auto script = m_nativeScriptMgr->getScript< Sapphire::ScriptAPI::StatusEffectScript >( effect.getId() );
387 if( script )
388 {
389 if( pChara->isPlayer() )
390 pChara->getAsPlayer()->sendDebug( "Calling status tick for statusid#{0}", effect.getId() );
391
392 script->onTick( *pChara );
393 return true;
394 }
395
396 return false;
397}
398
399bool Sapphire::Scripting::ScriptMgr::onStatusTimeOut( Entity::CharaPtr pChara, uint32_t effectId )
400{

Callers 1

onTickMethod · 0.80

Calls 5

isPlayerMethod · 0.80
getAsPlayerMethod · 0.80
getIdMethod · 0.45
sendDebugMethod · 0.45
onTickMethod · 0.45

Tested by

no test coverage detected