mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-19 11:10:34 +00:00
Implement rudimentary NPC scripting framework and Lord Fuse boss fight
This commit is contained in:
@@ -404,6 +404,11 @@ void MobManager::killMob(CNSocket *sock, Mob *mob) {
|
||||
// delay the despawn animation
|
||||
mob->despawned = false;
|
||||
|
||||
// fire any triggered events
|
||||
for (NPCEvent& event : NPCManager::NPCEvents)
|
||||
if (event.trigger == ON_KILLED && event.npcType == mob->appearanceData.iNPCType)
|
||||
event.handler(sock, mob);
|
||||
|
||||
auto it = TransportManager::NPCQueues.find(mob->appearanceData.iNPC_ID);
|
||||
if (it == TransportManager::NPCQueues.end() || it->second.empty())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user