19 #ifndef PS_SERVER_CHAR_MANAGER_H 20 #define PS_SERVER_CHAR_MANAGER_H 24 #include <iutil/vfs.h> 25 #include <csutil/ref.h> 26 #include <csutil/xmltiny.h> 68 virtual bool SendInventory(uint32_t clientNum,
bool sendUpdatesOnly=
true);
197 const char* trade,
const char* itemName, PID merchantID);
201 const char* trade,
const char* itemName, PID storageID);
Handles Drag and Drop Messages from the client.
void HandleStorageStore(psGUIStorageMessage &msg, Client *client)
Handles the request to store an item from the player.
SlotManager * slotManager
MathScript * calc_item_merchant_price_sell
void BeginStoring(Client *client, gemObject *target, const csString &type)
Handles a storing beginning.
void HandleMerchantView(psGUIMerchantMessage &msg, Client *client)
void HandleStorageRequest(psGUIStorageMessage &msg, Client *client)
Handles the request to access the storage from the player.
void ViewItem(Client *client, int containerID, INVENTORY_SLOT_NUMBER slotID)
void HandleMerchantSell(psGUIMerchantMessage &msg, Client *client)
void SendOutEquipmentMessages(gemActor *actor, INVENTORY_SLOT_NUMBER slotID, psItem *item, int equipped)
Sends out equipment messages to all the people around client.
A MathScript is a mini-program to run.
INVENTORY_SLOT_NUMBER
Holds a list of the possible socket identifiers that items can be attached to.
void HandleCraftTransInfo(MsgEntry *me, Client *client)
The structure of 1 queue entry (pointer to a message)
bool VerifyTrade(Client *client, psCharacter *character, psCharacter **merchant, psMerchantInfo **info, const char *trade, const char *itemName, PID merchantID)
Return true if all trade params are ok.
void HandleStorageView(psGUIStorageMessage &msg, Client *client)
Handles the request to check informations about a stored item.
virtual bool UpdateItemViews(uint32_t clientNum)
Update all views with items.
Manages character details over the net.
bool IsBanned(const char *name)
void HandleMerchantRequest(psGUIMerchantMessage &msg, Client *client)
bool HasConnected(csString name)
Checked if the character exists still or if it hasn't connected in two months.
void HandleMerchantMessage(MsgEntry *me, Client *client)
Any semi-autonomous object, either a player or an NPC.
void HandleFaction(MsgEntry *me, Client *client)
bool VerifyGoal(Client *client, psCharacter *character, psItem *goal)
verifies that item dropped in mind slot is a valid goal
void HandleInventoryMessage(MsgEntry *me, Client *client)
Handles any incoming messages about the character gui.
ServerCharManager(CacheManager *cachemanager, GEMSupervisor *gemsupervisor)
void UpdateSketch(MsgEntry *me, Client *client)
bool VerifyStorage(Client *client, psCharacter *character, psCharacter **storage, const char *trade, const char *itemName, PID storageID)
Return true if all storage params are ok.
This class collects data of a netclient.
bool SendMerchantItems(Client *client, psCharacter *merchant, psItemCategory *category)
bool SendStorageItems(Client *client, psCharacter *character, psItemCategory *category)
Sends to the client the stored items for this category.
void SendOutPlaySoundMessage(uint32_t clientNum, const char *itemsound, const char *action)
Sends out sound messages to the client.
virtual bool SendInventory(uint32_t clientNum, bool sendUpdatesOnly=true)
Sends the client an inventory.
void BeginTrading(Client *client, gemObject *target, const csString &type)
Start trading.
void UpdateMusicalSheet(MsgEntry *me, Client *client)
This class manages the caching of data that is unchanging during server operation.
CacheManager * cacheManager
int CalculateMerchantPrice(psItem *item, Client *client, bool sellPrice)
void HandleBookWrite(MsgEntry *me, Client *client)
A gemObject is any solid, graphical object visible in PS with normal physics and normal collision det...
This class holds the refs to the core factories, etc in CEL.
void HandleStorageWithdraw(psGUIStorageMessage &msg, Client *client)
Handles the request to withdraw an item from the NPC.
bool SendPlayerItems(Client *client, psItemCategory *category, bool storage)
void SendPlayerMoney(Client *client, bool storage=false)
MathScript * calc_item_merchant_price_buy
This class retrieves the merchant categories for an NPC.
void HandleMerchantBuy(psGUIMerchantMessage &msg, Client *client)
static bool TradingCheck(Client *client, gemObject *target, csString *errorMessage=NULL)
Check if trading is allowed.
void HandleStorageCategory(psGUIStorageMessage &msg, Client *client)
Handles the request to change category from the player.
void HandleMerchantCategory(psGUIMerchantMessage &msg, Client *client)
GEMSupervisor * gemSupervisor
This class embodies item instances in the game.
virtual ~ServerCharManager()
void HandleStorageMessage(MsgEntry *me, Client *client)
Handles a message coming from the client for making operations with his storage.
Provides a manager to facilitate subscriptions.