1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-28 07:07:45 +00:00

fix bnpc kill events not being called in scripts

This commit is contained in:
NotAdam 2019-01-29 19:04:24 +11:00
parent 5605a2227a
commit 83ed77844a

View file

@ -285,12 +285,12 @@ bool Sapphire::Scripting::ScriptMgr::onMobKill( Entity::Player& player, uint16_t
if( !activeQuests ) if( !activeQuests )
continue; continue;
uint16_t questId = activeQuests->c.questId; uint32_t questId = activeQuests->c.questId | 0x00010000;
auto script = m_nativeScriptMgr->getScript< Sapphire::ScriptAPI::EventScript >( questId ); auto script = m_nativeScriptMgr->getScript< Sapphire::ScriptAPI::EventScript >( questId );
if( script ) if( script )
{ {
std::string objName = pEventMgr->getEventName( 0x00010000 | questId ); std::string objName = pEventMgr->getEventName( questId );
player.sendDebug( "Calling: {0}.{1}", objName, eventName ); player.sendDebug( "Calling: {0}.{1}", objName, eventName );