PartyOperationHandler fix XeonMS V97

Results 1 to 18 of 18
  1. #1
    I'm The God pauljeki is offline
    MemberRank
    Oct 2011 Join Date
    IsraelLocation
    736Posts

    PartyOperationHandler fix XeonMS V97

    just replace and compile.
    this is a fix for the bug that u cant make party

    Code:
    /*
    	This file is part of the OdinMS Maple Story Server
        Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
    		       Matthias Butz <matze@odinms.de>
    		       Jan Christian Meyer <vimes@odinms.de>
    
        This program is free software: you can redistribute it and/or modify
        it under the terms of the GNU Affero General Public License as
        published by the Free Software Foundation version 3 as published by
        the Free Software Foundation. You may not use, modify or distribute
        this program under any other version of the GNU Affero General Public
        License.
    
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU Affero General Public License for more details.
    
        You should have received a copy of the GNU Affero General Public License
        along with this program.  If not, see <http://www.gnu.org/licenses/>.
    */
    package net.channel.handler;
    
    import client.MapleCharacter;
    import client.MapleClient;
    import net.AbstractMaplePacketHandler;
    import net.world.MapleParty;
    import net.world.MaplePartyCharacter;
    import net.world.PartyOperation;
    import net.world.remote.WorldChannelInterface;
    import tools.MaplePacketCreator;
    import tools.data.input.SeekableLittleEndianAccessor;
    
    public final class PartyOperationHandler extends AbstractMaplePacketHandler {
        public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
            int operation = slea.readByte();
            MapleCharacter player = c.getPlayer();
            WorldChannelInterface wci = c.getChannelServer().getWorldInterface();
            MapleParty party = player.getParty();
            MaplePartyCharacter partyplayer = new MaplePartyCharacter(player);
            switch (operation) {
                case 1: { // create
                    if (c.getPlayer().getParty() == null) {
                        try {
                            party = wci.createParty(partyplayer);
                            player.setParty(party);
                        } catch (Exception e) {
                            c.getChannelServer().reconnectWorld();
                        }
                        c.getSession().write(MaplePacketCreator.partyCreated(party));
                    } else {
                        c.getPlayer().dropMessage(5, "You can't create a party as you are already in one");
                    }
                    break;
                }
                case 2: { // leave
                    if (party != null) {
                        try {
                            if (partyplayer.equals(party.getLeader())) {
                                wci.updateParty(party.getId(), PartyOperation.DISBAND, partyplayer);
                                if (player.getEventInstance() != null) {
                                    player.getEventInstance().disbandParty();
                                }
                            } else {
                                wci.updateParty(party.getId(), PartyOperation.LEAVE, partyplayer);
                                if (player.getEventInstance() != null) {
                                    player.getEventInstance().leftParty(player);
                                }
                            }
                        } catch (Exception e) {
                            c.getChannelServer().reconnectWorld();
                        }
                        player.setParty(null);
                    }
                    break;
                }
                case 3: { // accept invitation
                    int partyid = slea.readInt();
                    if (c.getPlayer().getParty() == null) {
                        try {
                            party = wci.getParty(partyid);
                            if (party != null) {
                                if (party.getMembers().size() < 6) {
                                    wci.updateParty(party.getId(), PartyOperation.JOIN, partyplayer);
                                    player.receivePartyMemberHP();
                                    player.updatePartyMemberHP();
                                } else {
                                    c.getSession().write(MaplePacketCreator.partyStatusMessage((byte) 17));
                                }
                            } else {
                                c.getPlayer().dropMessage(5, "The party you are trying to join does not exist");
                            }
                        } catch (Exception e) {
                            c.getChannelServer().reconnectWorld();
                        }
                    } else {
                        c.getPlayer().dropMessage(5, "You can't join the party as you are already in one");
                    }
                    break;
                }
                case 4: { // invite
                    String name = slea.readMapleAsciiString();
                    MapleCharacter invited = c.getChannelServer().getPlayerStorage().getCharacterByName(name);
                    if (invited != null) {
                        if (invited.getParty() == null) {
                            if (party.getMembers().size() < 6) {
                                invited.getClient().getSession().write(MaplePacketCreator.partyInvite(player));
                            }
                        } else {
                            c.getSession().write(MaplePacketCreator.partyStatusMessage((byte) 16));
                        }
                    } else {
                        c.getSession().write(MaplePacketCreator.partyStatusMessage((byte) 18));
                    }
                    break;
                }
                case 5: { // expel
                    int cid = slea.readInt();
                    if (partyplayer.equals(party.getLeader())) {
                        MaplePartyCharacter expelled = party.getMemberById(cid);
                        if (expelled != null) {
                            try {
                                wci.updateParty(party.getId(), PartyOperation.EXPEL, expelled);
                                if (player.getEventInstance() != null) {
                                    if (expelled.isOnline()) {
                                        player.getEventInstance().disbandParty();
                                    }
                                }
                            } catch (Exception e) {
                                c.getChannelServer().reconnectWorld();
                            }
                        }
                    }
                    break;
                }
                case 6: {
                    int newLeader = slea.readInt();
                    MaplePartyCharacter newLeadr = party.getMemberById(newLeader);
                    try {
                        party.setLeader(newLeadr);
                        wci.updateParty(party.getId(), PartyOperation.CHANGE_LEADER, newLeadr);
                    } catch (Exception e) {
                        c.getChannelServer().reconnectWorld();
                    }
                    break;
                }
            }
        }
    }


  2. #2
    Enthusiast IATz is offline
    MemberRank
    Dec 2011 Join Date
    37Posts

    Re: PartyOperationHandler fix XeonMS V97

    Invite Party not work

  3. #3
    I'm The God pauljeki is offline
    MemberRank
    Oct 2011 Join Date
    IsraelLocation
    736Posts

    Re: PartyOperationHandler fix XeonMS V97

    i will fix that

  4. #4
    Account Upgraded | Title Enabled! TamirIsHere is offline
    MemberRank
    Feb 2010 Join Date
    223Posts

    Re: PartyOperationHandler fix XeonMS V97

    Quote Originally Posted by pauljeki View Post
    i will fix that
    What have you fixed? I'm still getting id errors while trying to add someone to party...

  5. #5
    I'm The God pauljeki is offline
    MemberRank
    Oct 2011 Join Date
    IsraelLocation
    736Posts

    Re: PartyOperationHandler fix XeonMS V97

    I Fixed that u will be able to create party and soon i will release the fixed file for invite and leave and put some one leader

  6. #6
    Account Upgraded | Title Enabled! iem214u is offline
    MemberRank
    Jun 2010 Join Date
    328Posts

    Re: PartyOperationHandler fix XeonMS V97

    Good luck fixing zakum :P

  7. #7
    Account Upgraded | Title Enabled! TamirIsHere is offline
    MemberRank
    Feb 2010 Join Date
    223Posts

    Re: PartyOperationHandler fix XeonMS V97

    What's wrong with the Zakum ?

  8. #8
    Account Upgraded | Title Enabled! iem214u is offline
    MemberRank
    Jun 2010 Join Date
    328Posts

    Re: PartyOperationHandler fix XeonMS V97

    Quote Originally Posted by TamirIsHere View Post
    What's wrong with the Zakum ?
    Hes a bad guy and will dc you

  9. #9
    while(true) spam(); kevintjuh93 is offline
    MemberRank
    Jun 2008 Join Date
    The NetherlandsLocation
    4,119Posts

    Re: PartyOperationHandler fix XeonMS V97

    Quote Originally Posted by iem214u View Post
    Hes a bad guy and will dc you
    spawnFakeMonster is probably outdated.

  10. #10
    Enthusiast IATz is offline
    MemberRank
    Dec 2011 Join Date
    37Posts

    Re: PartyOperationHandler fix XeonMS V97

    anyone can help me invite Party LOl
    Last edited by IATz; 17-01-12 at 02:12 PM.

  11. #11
    Account Upgraded | Title Enabled! iem214u is offline
    MemberRank
    Jun 2010 Join Date
    328Posts

    Re: PartyOperationHandler fix XeonMS V97

    Quote Originally Posted by IATz View Post
    Code:
    public static MaplePacket spawnFakeMonster(MapleMonster life, int effect) {
            MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(38);
            mplew.writeShort(SendOpcode.SPAWN_MONSTER_CONTROL.getValue());
            mplew.write(1);
            mplew.writeInt(life.getObjectId());
            mplew.write(life.getController() == null ? 5 : 1); // ????!? either 5 or 1?  5 if has no controller, 1 if so
            //mplew.write(5); // v98
            mplew.writeInt(life.getId());
            mplew.writeLong(0);
            mplew.writeInt(0);
            mplew.writeShort(0);
            mplew.writeInt(0);
            mplew.write(0);
            mplew.write(0x88);
            mplew.writeShort(0);
            mplew.writeInt(0);
            mplew.writeShort(life.getPosition().x);
            mplew.writeShort(life.getPosition().y);
            mplew.write(life.getStance());
            mplew.writeShort(life.getStartFh());
            mplew.writeShort(life.getFh());
            if (effect > 0) {
                mplew.write(effect);
                mplew.write(0);
                mplew.writeShort(0);
            }
            mplew.writeShort(-2);
           // mplew.writeLong(0); // v98 , now a long instead of two ints
            mplew.writeInt(0);
            mplew.writeInt(0);
            mplew.write(-1);
            return mplew.getPacket();
        }
    Zakum Fixed and Enjoy anyone can help me invite Party LOl
    He will still dc you

  12. #12
    Account Upgraded | Title Enabled! TamirIsHere is offline
    MemberRank
    Feb 2010 Join Date
    223Posts

    Re: PartyOperationHandler fix XeonMS V97

    Quote Originally Posted by kevintjuh93 View Post
    spawnFakeMonster is probably outdated.
    So may you release the right one?

  13. #13
    Valued Member tonynguyenpro is offline
    MemberRank
    Aug 2009 Join Date
    137Posts

    Re: PartyOperationHandler fix XeonMS V97

    Quote Originally Posted by IATz View Post
    Invite Party not work
    any ideas for this?

  14. #14
    Apprentice poloness is offline
    MemberRank
    Jan 2012 Join Date
    8Posts

    Re: PartyOperationHandler fix XeonMS V97

    Quote Originally Posted by iem214u View Post
    Good luck fixing zakum :P
    Is XeonMS source that shitty that not even general mob packets are updated?

  15. #15
    Apprentice siwon1459 is offline
    MemberRank
    Jun 2011 Join Date
    20Posts

    Re: PartyOperationHandler fix XeonMS V97

    Nice release

  16. #16
    Member BillowThisMe is offline
    MemberRank
    Nov 2012 Join Date
    92Posts

    Re: PartyOperationHandler fix XeonMS V97

    Some one can release fix for zakum too ? because he dc you .. and not just him .. alot of mobs dc you when they attack you.

  17. #17
    Account Upgraded | Title Enabled! AristoCat is offline
    MemberRank
    Apr 2012 Join Date
    947Posts

    Re: PartyOperationHandler fix XeonMS V97

    Quote Originally Posted by BillowThisMe View Post
    Some one can release fix for zakum too ? because he dc you .. and not just him .. alot of mobs dc you when they attack you.
    Have you ever heard of... common sense?

  18. #18
    Banned SilentThief is offline
    BannedRank
    Sep 2012 Join Date
    The MatrixLocation
    466Posts

    Re: PartyOperationHandler fix XeonMS V97

    So, a release that has bugs? And it is a bug fix, classical.



Advertisement