Package net.sf.l2j.gameserver.model.entity

Examples of net.sf.l2j.gameserver.model.entity.Couple


            statement = con.prepareStatement("Select id from mods_wedding order by id");
            rs = statement.executeQuery();

            while (rs.next())
            {
                getCouples().add(new Couple(rs.getInt("id")));
            }

            statement.close();

            _log.info("Loaded: " + getCouples().size() + " couples(s)");
View Full Code Here


            if(player1.getPartnerId()==0 && player2.getPartnerId()==0)
            {
                int _player1id = player1.getObjectId();
                int _player2id = player2.getObjectId();

                Couple _new = new Couple(player1,player2);
                getCouples().add(_new);
                player1.setPartnerId(_player2id);
                player2.setPartnerId(_player1id);
                player1.setCoupleId(_new.getId());
                player2.setCoupleId(_new.getId());
            }
        }
    }
View Full Code Here

    }

    public void deleteCouple(int coupleId)
    {
       int index = getCoupleIndex(coupleId);
       Couple couple = getCouples().get(index);
        if(couple!=null)
        {
           L2PcInstance player1 = (L2PcInstance)L2World.getInstance().findObject(couple.getPlayer1Id());
           L2PcInstance player2 = (L2PcInstance)L2World.getInstance().findObject(couple.getPlayer2Id());
            if (player1 != null)
            {
               player1.setPartnerId(0);
               player1.setMarried(false);
               player1.setCoupleId(0);

            }
            if (player2 != null)
            {
               player2.setPartnerId(0);
               player2.setMarried(false);
               player2.setCoupleId(0);

            }
            couple.divorce();
            getCouples().remove(index);
        }
    }
View Full Code Here

    }
    else if (command.startsWith("AcceptWedding"))
    {
        // accept the wedding request
        player.setMarryAccepted(true);
        Couple couple = CoupleManager.getInstance().getCouple(player.getCoupleId());
        couple.marry();

        //messages to the couple
        player.sendMessage("Congratulations you are married!");
        player.setMarried(true);
        player.setMaryRequest(false);
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.model.entity.Couple

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.