From 83ed77844a278eba6496c39bc0eddc6643c8465c Mon Sep 17 00:00:00 2001 From: NotAdam Date: Tue, 29 Jan 2019 19:04:24 +1100 Subject: [PATCH] fix bnpc kill events not being called in scripts --- src/world/Script/ScriptMgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/world/Script/ScriptMgr.cpp b/src/world/Script/ScriptMgr.cpp index d9021b9f..37967d1a 100644 --- a/src/world/Script/ScriptMgr.cpp +++ b/src/world/Script/ScriptMgr.cpp @@ -285,12 +285,12 @@ bool Sapphire::Scripting::ScriptMgr::onMobKill( Entity::Player& player, uint16_t if( !activeQuests ) continue; - uint16_t questId = activeQuests->c.questId; + uint32_t questId = activeQuests->c.questId | 0x00010000; auto script = m_nativeScriptMgr->getScript< Sapphire::ScriptAPI::EventScript >( questId ); if( script ) { - std::string objName = pEventMgr->getEventName( 0x00010000 | questId ); + std::string objName = pEventMgr->getEventName( questId ); player.sendDebug( "Calling: {0}.{1}", objName, eventName );