summaryrefslogtreecommitdiff
path: root/src/playerrelations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/playerrelations.cpp')
-rw-r--r--src/playerrelations.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/playerrelations.cpp b/src/playerrelations.cpp
index 14d9eb6b..f5d3d01b 100644
--- a/src/playerrelations.cpp
+++ b/src/playerrelations.cpp
@@ -21,11 +21,10 @@
#include <algorithm>
+#include "actorspritemanager.h"
#include "being.h"
-#include "beingmanager.h"
#include "configuration.h"
#include "graphics.h"
-#include "player.h"
#include "playerrelations.h"
#include "utils/dtor.h"
@@ -214,7 +213,7 @@ unsigned int PlayerRelationsManager::checkPermissionSilently(const std::string &
bool PlayerRelationsManager::hasPermission(Being *being, unsigned int flags)
{
- if (being->getType() == Being::PLAYER)
+ if (being->getType() == ActorSprite::PLAYER)
return hasPermission(being->getName(), flags) == flags;
return true;
}
@@ -230,9 +229,10 @@ bool PlayerRelationsManager::hasPermission(const std::string &name,
// execute `ignore' strategy, if possible
if (mIgnoreStrategy)
{
- Being *b = beingManager->findBeingByName(name, Being::PLAYER);
- if (b && b->getType() == Being::PLAYER)
- mIgnoreStrategy->ignore(static_cast<Player *>(b), rejections);
+ Being *b = actorSpriteManager->findBeingByName(name,
+ ActorSprite::PLAYER);
+ if (b && b->getType() == ActorSprite::PLAYER)
+ mIgnoreStrategy->ignore(b, rejections);
}
}
@@ -313,7 +313,7 @@ public:
mShortName = PLAYER_IGNORE_STRATEGY_NOP;
}
- virtual void ignore(Player *player, unsigned int flags)
+ virtual void ignore(Being *being, unsigned int flags)
{
}
};
@@ -327,9 +327,9 @@ public:
mShortName = "dotdotdot";
}
- virtual void ignore(Player *player, unsigned int flags)
+ virtual void ignore(Being *being, unsigned int flags)
{
- player->setSpeech("...", 500);
+ being->setSpeech("...", 500);
}
};
@@ -343,9 +343,9 @@ public:
mShortName = "blinkname";
}
- virtual void ignore(Player *player, unsigned int flags)
+ virtual void ignore(Being *being, unsigned int flags)
{
- player->flashName(200);
+ being->flashName(200);
}
};
@@ -359,9 +359,9 @@ public:
mShortName = shortname;
}
- virtual void ignore(Player *player, unsigned int flags)
+ virtual void ignore(Being *being, unsigned int flags)
{
- player->setEmote(mEmotion, IGNORE_EMOTE_TIME);
+ being->setEmote(mEmotion, IGNORE_EMOTE_TIME);
}
private:
int mEmotion;