summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-19 01:11:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-19 01:11:52 +0300
commit0d6ca48b79a596bec11fc7351fadbf3b1fc1f67b (patch)
tree4d03ab1e6b655bccafbad06e5cc3386a4f6480d7 /src/being/being.cpp
parent29a93440367af32463f285ae5f0bd2aa23aadc92 (diff)
downloadmanaplus-0d6ca48b79a596bec11fc7351fadbf3b1fc1f67b.tar.gz
manaplus-0d6ca48b79a596bec11fc7351fadbf3b1fc1f67b.tar.bz2
manaplus-0d6ca48b79a596bec11fc7351fadbf3b1fc1f67b.tar.xz
manaplus-0d6ca48b79a596bec11fc7351fadbf3b1fc1f67b.zip
Move itemsoundevent into separate file.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index fbbbfecae..3446351c9 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -594,7 +594,7 @@ void Being::takeDamage(Being *const attacker, const int amount,
mDamageTaken += amount;
if (mInfo)
{
- playSfx(mInfo->getSound(SOUND_EVENT_HURT), this, false, mX, mY);
+ playSfx(mInfo->getSound(ItemSoundEvent::HURT), this, false, mX, mY);
if (!mInfo->isStaticMaxHP())
{
@@ -754,13 +754,13 @@ void Being::handleAttack(Being *const victim, const int damage,
weaponId = -100 - mSubType;
const ItemInfo &info = ItemDB::get(weaponId);
playSfx(info.getSound((damage > 0) ?
- SOUND_EVENT_HIT : SOUND_EVENT_MISS), victim, true, mX, mY);
+ ItemSoundEvent::HIT : ItemSoundEvent::MISS), victim, true, mX, mY);
}
}
else
{
playSfx(mInfo->getSound((damage > 0) ?
- SOUND_EVENT_HIT : SOUND_EVENT_MISS), victim, true, mX, mY);
+ ItemSoundEvent::HIT : ItemSoundEvent::MISS), victim, true, mX, mY);
}
}
@@ -804,7 +804,7 @@ void Being::handleSkill(Being *const victim, const int damage,
else
{
playSfx(mInfo->getSound((damage > 0) ?
- SOUND_EVENT_HIT : SOUND_EVENT_MISS), victim, true, mX, mY);
+ ItemSoundEvent::HIT : ItemSoundEvent::MISS), victim, true, mX, mY);
}
}
@@ -1135,7 +1135,7 @@ void Being::setAction(const BeingAction::Action &action, const int attackId)
if (mInfo)
{
playSfx(mInfo->getSound(
- SOUND_EVENT_MOVE), nullptr, true, mX, mY);
+ ItemSoundEvent::MOVE), nullptr, true, mX, mY);
}
currentAction = getMoveAction();
// Note: When adding a run action,
@@ -1146,11 +1146,11 @@ void Being::setAction(const BeingAction::Action &action, const int attackId)
currentAction = getSitAction();
if (mInfo)
{
- ItemSoundEvent event;
+ ItemSoundEvent::Type event;
if (currentAction == SpriteAction::SITTOP)
- event = SOUND_EVENT_SITTOP;
+ event = ItemSoundEvent::SITTOP;
else
- event = SOUND_EVENT_SIT;
+ event = ItemSoundEvent::SIT;
playSfx(mInfo->getSound(event), nullptr, true, mX, mY);
}
break;
@@ -1198,7 +1198,7 @@ void Being::setAction(const BeingAction::Action &action, const int attackId)
case BeingAction::HURT:
if (mInfo)
{
- playSfx(mInfo->getSound(SOUND_EVENT_HURT),
+ playSfx(mInfo->getSound(ItemSoundEvent::HURT),
this, false, mX, mY);
}
break;
@@ -1206,7 +1206,7 @@ void Being::setAction(const BeingAction::Action &action, const int attackId)
currentAction = getDeadAction();
if (mInfo)
{
- playSfx(mInfo->getSound(SOUND_EVENT_DIE), this, false, mX, mY);
+ playSfx(mInfo->getSound(ItemSoundEvent::DIE), this, false, mX, mY);
if (mType == ActorType::MONSTER || mType == ActorType::NPC)
mYDiff = mInfo->getDeadSortOffsetY();
}
@@ -1217,7 +1217,7 @@ void Being::setAction(const BeingAction::Action &action, const int attackId)
case BeingAction::SPAWN:
if (mInfo)
{
- playSfx(mInfo->getSound(SOUND_EVENT_SPAWN),
+ playSfx(mInfo->getSound(ItemSoundEvent::SPAWN),
nullptr, true, mX, mY);
}
currentAction = getSpawnAction();