Interface IMaplePlayerShop
- All Known Implementing Classes:
AbstractPlayerStore, HiredMerchant, MapleMiniGame, MaplePlayerShop
public interface IMaplePlayerShop
玩家自設商店與小遊戲攤位的統一介面。
定義個人商店(PLAYER_SHOP)、精靈商人(HIRED_MERCHANT)、
五目棋(OMOK)與翻牌配對(MATCH_CARD)四種互動攤位的共同合約,
包含訪客管理、道具清單存取、楓幣操作與商店開關流程。
所有具體實作皆繼承自 AbstractPlayerStore,並以
MapleCharacter.setPlayerShop(IMaplePlayerShop) 掛載於玩家實例上。
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final byte -
Method Summary
Modifier and TypeMethodDescriptionvoidaddItem(MaplePlayerShopItem item) voidaddVisitor(MapleCharacter visitor) voidbroadcastToVisitors(byte[] packet) voidbuy(MapleClient c, int item, short quantity) voidcloseShop(boolean saveItems, boolean remove) byteintintgetItems()intintgetMeso()intintbyteintgetSize()bytegetVisitorSlot(MapleCharacter visitor) booleanbooleanisOpen()booleanisOwner(MapleCharacter chr) voidremoveAllVisitors(int error, int type) voidremoveFromSlot(int slot) booleanremoveItem(int item) voidremoveVisitor(MapleCharacter visitor) voidsetAvailable(boolean b) voidsetMeso(int meso) voidsetOpen(boolean open) voidupdate()
-
Field Details
-
HIRED_MERCHANT
static final byte HIRED_MERCHANT- See Also:
-
PLAYER_SHOP
static final byte PLAYER_SHOP- See Also:
-
OMOK
static final byte OMOK- See Also:
-
MATCH_CARD
static final byte MATCH_CARD- See Also:
-
-
Method Details
-
getOwnerName
String getOwnerName() -
getDescription
String getDescription() -
getVisitors
List<Pair<Byte, MapleCharacter>> getVisitors() -
getItems
List<MaplePlayerShopItem> getItems() -
isOpen
boolean isOpen() -
removeItem
boolean removeItem(int item) -
isOwner
-
getShopType
byte getShopType() -
getVisitorSlot
-
getFreeSlot
byte getFreeSlot() -
getItemId
int getItemId() -
getMeso
int getMeso() -
getOwnerId
int getOwnerId() -
getOwnerAccId
int getOwnerAccId() -
setOpen
void setOpen(boolean open) -
setMeso
void setMeso(int meso) -
addItem
-
removeFromSlot
void removeFromSlot(int slot) -
broadcastToVisitors
void broadcastToVisitors(byte[] packet) -
addVisitor
-
removeVisitor
-
removeAllVisitors
void removeAllVisitors(int error, int type) -
buy
-
closeShop
void closeShop(boolean saveItems, boolean remove) -
getPassword
String getPassword() -
getMaxSize
int getMaxSize() -
getSize
int getSize() -
getGameType
int getGameType() -
update
void update() -
setAvailable
void setAvailable(boolean b) -
isAvailable
boolean isAvailable() -
getBoughtItems
List<AbstractPlayerStore.BoughtItem> getBoughtItems()
-