SHARE
TWEET

com.l2jserver.gameserver.model.itemauction.ItemAuctionBid

fforc9e Apr 28th, 2014 165 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * This program is free software: you can redistribute it and/or modify it under
  3.  * the terms of the GNU General Public License as published by the Free Software
  4.  * Foundation, either version 3 of the License, or (at your option) any later
  5.  * version.
  6.  *
  7.  * This program is distributed in the hope that it will be useful, but WITHOUT
  8.  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9.  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10.  * details.
  11.  *
  12.  * You should have received a copy of the GNU General Public License along with
  13.  * this program. If not, see <http://www.gnu.org/licenses/>.
  14.  */
  15. package com.l2jserver.gameserver.model.itemauction;
  16.  
  17. import com.l2jserver.gameserver.model.L2World;
  18. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  19.  
  20. /**
  21.  * @author Forsaiken
  22.  */
  23. public final class ItemAuctionBid
  24. {
  25.         private final int _playerObjId;
  26.         private long _lastBid;
  27.        
  28.         public ItemAuctionBid(final int playerObjId, final long lastBid)
  29.         {
  30.                 _playerObjId = playerObjId;
  31.                 _lastBid = lastBid;
  32.         }
  33.        
  34.         public final int getPlayerObjId()
  35.         {
  36.                 return _playerObjId;
  37.         }
  38.        
  39.         public final long getLastBid()
  40.         {
  41.                 return _lastBid;
  42.         }
  43.        
  44.         final void setLastBid(final long lastBid)
  45.         {
  46.                 _lastBid = lastBid;
  47.         }
  48.        
  49.         final void cancelBid()
  50.         {
  51.                 _lastBid = -1;
  52.         }
  53.        
  54.         final boolean isCanceled()
  55.         {
  56.                 return _lastBid <= 0;
  57.         }
  58.        
  59.         final L2PcInstance getPlayer()
  60.         {
  61.                 return L2World.getInstance().getPlayer(_playerObjId);
  62.         }
  63. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top