Elfocrash / L2ACP-Web

The website for L2ACP
GNU General Public License v2.0
46 stars 39 forks source link

Add support for L2OFF servers #9

Closed pjasicek closed 6 years ago

pjasicek commented 6 years ago

Hi, this commit makes running your L2ACP on L2OFF based servers possible with changes described in updated README.md

Since there would be way too much effort to integrate REST API client on L2OFF extender's side (it needs to be compiled with VS 2005 toolchain, I did not find any suitable REST API libs for that) I made it work with L2OFF's database directly - with some additions in enclosed L2OFF_L2ACP.SQL script.

This feature does not harm original L2ACP with L2J server in any way, if it is turned off, all its previous features are untouched. L2OFF server functionality is turned on by setting "TargetServerType" to "L2OFF" in appsettings.json. If it is set to "L2J" then everything works like if this feature was not there.

Some features in L2OFF are disabled (like spawning NPCs in admin control view) because without extender's modification there is no way to spawn NPCs in real time.

One important difference between L2OFF and L2J in access control (admin vs user): L2J uses Access Level to determine various user priviliges if I am not wrong, in L2OFF admin's account is determined via "builder level" set in database. That is why in L2OFF case if AccessLevel > 0, then it the account is considered as admin (if AccessLevel == 0 then it is regular user)

Things that do not work at the moment: Admin -> Analytics (This would require making a thread in the extender to log the information at set intervals) Admin -> Control Area -> Server Management (Again, I only work with database, for this I would need to make some job in database which extender would in effect process) User -> Services -> Player Services -> (*) (For these services to take effect server restart is required, same reason as above)

Video:

https://www.youtube.com/watch?v=A564-fvSj-s&feature=youtu.be

Elfocrash commented 6 years ago

This is so beautiful. I always wanted to make it L2OFF compatible but i don't know C++ in order to create a REST api and I also don't know how L2OFF works.

It is amazing and i cannot thank you enough for your contribution. I can see that some features are not implemented yet but this is more than perfect for starters.

Thank you so much.

pjasicek commented 6 years ago

Just one thing that came to my mind - to preserve L2ACP <-> L2J being the default configuration, please change TargetServerType to "L2J" once you merge it,

Elfocrash commented 6 years ago

Can you set it as part of this pull request?

pjasicek commented 6 years ago

Done. Some quick sanity-check that nothing got broken with L2J server would be great (although I am 99.9% sure it's as it was), I don't have L2J server setup nor did I ever set up L2J in past.

Elfocrash commented 6 years ago

Looks good mate. Merged and again, thank you.