summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-02-11 17:02:16 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-02-11 17:02:16 +0100
commitf262dbd28f08001d70416e3cc4e62273d3fee2cd (patch)
tree539cbc8b27edf696120df0ac26531640c323692f /src/gui/popupmenu.cpp
parentd68f3fa13297cf4c8d29753e48c684496852ceba (diff)
parent63ac001daa7dfc0735dfefd9c2829c8786b4edaf (diff)
downloadmana-f262dbd28f08001d70416e3cc4e62273d3fee2cd.tar.gz
mana-f262dbd28f08001d70416e3cc4e62273d3fee2cd.tar.bz2
mana-f262dbd28f08001d70416e3cc4e62273d3fee2cd.tar.xz
mana-f262dbd28f08001d70416e3cc4e62273d3fee2cd.zip
Merge branch 'master' of git@gitorious.org:tmw/eathena
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index be5252f7..3503d0ea 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -148,7 +148,7 @@ void PopupMenu::handleLink(const std::string& link)
// Talk To action
if (link == "talk" &&
- being != NULL &&
+ being &&
being->getType() == Being::NPC &&
current_npc == 0)
{
@@ -157,7 +157,7 @@ void PopupMenu::handleLink(const std::string& link)
// Trade action
else if (link == "trade" &&
- being != NULL &&
+ being &&
being->getType() == Being::PLAYER)
{
player_node->trade(being);
@@ -166,35 +166,35 @@ void PopupMenu::handleLink(const std::string& link)
// Attack action
else if (link == "attack" &&
- being != NULL &&
+ being &&
being->getType() == Being::PLAYER)
{
player_node->attack(being, true);
}
else if (link == "unignore" &&
- being != NULL &&
+ being &&
being->getType() == Being::PLAYER)
{
player_relations.setRelation(being->getName(), PlayerRelation::NEUTRAL);
}
else if (link == "ignore" &&
- being != NULL &&
+ being &&
being->getType() == Being::PLAYER)
{
player_relations.setRelation(being->getName(), PlayerRelation::IGNORED);
}
else if (link == "disregard" &&
- being != NULL &&
+ being &&
being->getType() == Being::PLAYER)
{
player_relations.setRelation(being->getName(), PlayerRelation::DISREGARDED);
}
else if (link == "friend" &&
- being != NULL &&
+ being &&
being->getType() == Being::PLAYER)
{
player_relations.setRelation(being->getName(), PlayerRelation::FRIEND);
@@ -208,7 +208,7 @@ void PopupMenu::handleLink(const std::string& link)
/*
// Add Buddy action
- else if ((link == "buddy") && being != NULL && being->isPlayer())
+ else if ((link == "buddy") && being && being->isPlayer())
{
if (!buddyWindow->isVisible())
buddyWindow->setVisible(true);
@@ -217,7 +217,7 @@ void PopupMenu::handleLink(const std::string& link)
}*/
// Pick Up Floor Item action
- else if ((link == "pickup") && mFloorItem != NULL)
+ else if ((link == "pickup") && mFloorItem)
{
player_node->pickUp(mFloorItem);
}
@@ -257,7 +257,7 @@ void PopupMenu::handleLink(const std::string& link)
new ItemAmountWindow(AMOUNT_ITEM_DROP, inventoryWindow, mItem);
}
else if (link == "party-invite" &&
- being != NULL &&
+ being &&
being->getType() == Being::PLAYER)
{
MessageOut outMsg(player_node->getNetwork());