otland / forgottenserver

A free and open-source MMORPG server emulator written in C++
https://otland.net
GNU General Public License v2.0
1.58k stars 1.05k forks source link

[Revscriptsys] RevNpcSys version 1.0 (lua npcs / NpcType / new npc system) #4671

Closed EvilHero90 closed 4 months ago

EvilHero90 commented 5 months ago

Pull Request Prelude

Changes Proposed

Finaly introducing lua npcs with an oop based new npc system. Both systems lua and xml are now based on NpcType. This pr doesn't change anything on the already existing xml npcs and jiddos npc system, that's still valid and functional. Fixed a memory leak regarding xml npcs. I've included 2 example npcs in data/npc/lua/#test.lua

Issues addressed: none

EvilHero90 commented 4 months ago

This is a good base for version 1.0 Time to review and merge.

EvilHero90 commented 4 months ago

Really cool to have Lua NPCs, it's one step further away from XML. I don't have enough knowledge to do a proper review here though.

Feel free to just review the .cpp/h changes, those are mostly the critical changes, we still have the old npc system if something shouldn't correctly work at some point I can just push fixes and increase the version

ranisalt commented 4 months ago

Let's go 🚀