Skilled Illusionist
- Joined
- Dec 20, 2011
- Messages
- 313
- Reaction score
- 115
I've implemented netty a while back, but after some discussion with a friend i'm going to re-write it again. Trying to follow Eric 's advice removing the need for mapleclient and client_key attributes. I'm not 100% sure how i'm going to do that yet So far i only know the basics of netty/mina but I'm progressing I'm here to learn!
There is already no need for that stupid variable 'Client_Key' that odinms uses, there never has been.
Also MapleClient has never been needed, it was simply there to hold any functions related to the user and client. I don't think removing it is necessarily good because there is probably about 200 lines of useful code that you wold have to move somewhere else.
Also by now I got a little question: What would you prefer? I've been chatting with some people and they all told me their experience with RMI was that it was pretty slow. I'm thinking of splitting the server into loose instances using Netty instead. Idk how that would play out, but maybe it's a bit more interesting then just plain RMI. But I know for sure I want to split things, since i'd like to be able to run Servers seperately.
If executed properly, RMI can be very useful and successful. Don't go copying odinms and their keys like every repack over the last 7 years.
I've also started re-organising skills, not focussing too much on how they are handled yet. Why? Well i find it hard to find structure in the chaos that is MapleStatEffect. I want to organise that before I look into handling.
Incase you need ideas, this is how I do it. I removed what odinms called ifbuffstatisnotzero or something along those lines because my source has skill changes and it is more organized this way, but if you want hella less lines, make use of that function.
Code:
case EVAN8:
switch (sourceid) {
case Evan8.ONYX_SHROUD:
ret.statups.put(BuffStats.ONYX_SHROUD, ret.info.get(StatInfo.x));
break;
case Evan8.TELEPORT_MASTERY:
ret.statups.put(BuffStats.TELEPORT_MASTERY, ret.info.get(StatInfo.x));
break;
default:
break;
}
break;