Class MaplePlayerShop
java.lang.Object
server.maps.MapleMapObject
server.shops.AbstractPlayerStore
server.shops.MaplePlayerShop
- All Implemented Interfaces:
IMaplePlayerShop
個人商店(Player Shop)的伺服端實作,提供玩家在線擺攤即時交易。
以 IMaplePlayerShop.PLAYER_SHOP 型別標識,最多容納 3 名訪客同時瀏覽。
主要行為如下:
- 購買時楓幣直接轉給在線店主(
getMCOwner().gainMeso(...)), 扣除手續費後即時生效;店主離線則無法成立交易(精靈商人才支援離線)。 - 道具售完時
boughtnumber達到清單大小,自動呼叫closeShop收攤。 - 支援禁止清單(
bannedList)阻擋特定玩家進入。 - 選擇性輸出購買紀錄至
logs/data/個人商店.txt(受ServerConstants.log_mshop控制)。
PlayerShopPacket 組裝;
與 HiredMerchant 同屬 AbstractPlayerStore 體系。-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractPlayerStore
AbstractPlayerStore.BoughtItem -
Field Summary
Fields inherited from class AbstractPlayerStore
available, bought, channel, chrs, des, itemId, items, map, meso, open, owneraccount, ownerId, ownerName, pass, visitorsFields inherited from interface IMaplePlayerShop
HIRED_MERCHANT, MATCH_CARD, OMOK, PLAYER_SHOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbuy(MapleClient c, int item, short quantity) voidcloseShop(boolean saveItems, boolean remove) bytebooleanMethods inherited from class AbstractPlayerStore
addItem, addVisitor, broadcastToVisitors, broadcastToVisitors, broadcastToVisitors, getBoughtItems, getDescription, getFreeSlot, getGameType, getItemId, getItems, getMap, getMaxSize, getMCOwner, getMCOwnerChannel, getMCOwnerWorld, getMeso, getOwnerAccId, getOwnerId, getOwnerName, getPassword, getSize, getType, getVisitor, getVisitors, getVisitorSlot, isAvailable, isOpen, isOwner, removeAllVisitors, removeFromSlot, removeItem, removeVisitor, saveItems, sendDestroyData, sendSpawnData, setAvailable, setMeso, setOpen, updateMethods inherited from class MapleMapObject
getObjectId, getPosition, getRange, getTruePosition, setObjectId, setPosition
-
Constructor Details
-
MaplePlayerShop
-
-
Method Details
-
buy
-
getShopType
public byte getShopType() -
closeShop
public void closeShop(boolean saveItems, boolean remove) -
banPlayer
-
isBanned
-