71 const std::string &name = being->
getName();
80 name.c_str()).c_str()));
84 name.c_str()).c_str()));
88 name.c_str()).c_str()));
97 name.c_str()).c_str()));
102 name.c_str()).c_str()));
105 name.c_str()).c_str()));
111 name.c_str()).c_str()));
114 name.c_str()).c_str()));
120 name.c_str()).c_str()));
127 name.c_str()).c_str()));
133 name.c_str()).c_str()));
150 name.c_str()).c_str()));
158 name.c_str()).c_str()));
185 const std::string &name = floorItem->
getInfo().
name;
187 name.c_str()).c_str()));
202 if (link ==
"talk" && being && being->
canTalk())
208 else if (link ==
"trade" && being &&
215 else if (link ==
"attack" && being)
219 else if (link ==
"whisper" && being)
223 else if (link ==
"unignore" && being &&
229 else if (link ==
"ignore" && being &&
235 else if (link ==
"disregard" && being &&
241 else if (link ==
"friend" && being &&
247 else if (link ==
"guild" && being &&
258 else if (link ==
"look")
261 else if (link ==
"activate" || link ==
"equip" || link ==
"unequip")
281 else if (link ==
"chat")
288 else if (link ==
"drop")
293 else if (link ==
"store")
298 else if (link ==
"retrieve")
303 else if (link ==
"party" && being &&
308 else if (link ==
"name" && being)
310 const std::string &name = being->
getName();
313 else if (link ==
"admin-kick" && being &&
319 else if (link !=
"cancel")
321 Log::info(
"PopupMenu: Warning, unknown action '%s'", link.c_str());
332 bool isInventory,
bool canDrop)
ActorSpriteManager * actorSpriteManager
Being * findBeing(int id) const
Returns a specific Being, by id;.
Type getType() const final
Returns the type of the ActorSprite.
bool isGM() const
Whether or not this player is a GM.
const std::string & getName() const
Returns the name of the being.
short getNumberOfGuilds() const
Get number of guilds the being belongs to.
A simple browser box able to handle links and forward events to the parent conteiner.
void setHighlightMode(unsigned int mode)
Sets the Highlight mode for links.
void addRow(std::string_view row)
Adds a text row to the browser.
void setLinkHandler(LinkHandler *handler)
Sets the handler for links.
void clearRows()
Remove all rows.
void addItemText(const std::string &item)
Called to add item to chat.
void addInputText(const std::string &text)
Add the given text to the chat input.
int getSelected() const
Returns the current selected slot or -1 if none.
void triggerUnequip(int slotIndex) const
An item lying on the floor.
const ItemInfo & getInfo() const
Returns the item info for this floor item.
int getHeight() const
Returns the logical height of the screen.
int getWidth() const
Returns the logical width of the screen.
static void showWindow(Usage usage, Window *parent, Item *item, int maxRange=0)
Creates the dialog, or bypass it if there aren't enough items.
bool activatable
Whether this item can be activated.
Represents one or more instances of a certain item type.
void doEvent(Event::Type eventType)
bool isEquipped() const
Returns whether this item is equipped.
int getQuantity() const
Returns the number of items.
bool isEquippable() const
Returns whether this item is equippable.
const ItemInfo & getInfo() const
Returns information about this item type.
void inviteToGuild(Being *being)
Invite a player to join guild.
void pickUp(FloorItem *item)
void attack(Being *target=nullptr, bool keep=false)
virtual void kick(const std::string &name)=0
virtual void invite(Being *player)=0
virtual void request(Being *being)
PlayerRelation getRelation(const std::string &name) const
Updates the relationship with this player.
void setRelation(const std::string &name, PlayerRelation relation)
Updates the relationship with this player.
InventoryWindow * inventoryWindow
EquipmentWindow * equipmentWindow
LocalPlayer * local_player
void info(const char *log_text,...) LOG_PRINTF_ATTR
ServerType getNetworkType()
TradeHandler * getTradeHandler()
AdminHandler * getAdminHandler()
PartyHandler * getPartyHandler()
int getStorageCount()
Returns the number of currently open storage windows.
Equipment * getEquipment()
Returns the player's equipment.
PlayerRelationsManager player_relations
std::string strprintf(char const *format,...)
A safe version of sprintf that returns a std::string of the result.