From 0d6ca48b79a596bec11fc7351fadbf3b1fc1f67b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 19 May 2014 01:11:52 +0300 Subject: Move itemsoundevent into separate file. --- src/resources/db/itemdb.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/resources/db/itemdb.cpp') diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 234225fb0..c077f58fe 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -45,7 +45,7 @@ namespace bool mConstructed = false; StringVect mTagNames; std::map mTags; - std::map mSoundNames; + std::map mSoundNames; } // namespace extern int serverVersion; @@ -184,16 +184,16 @@ static ItemType::Type itemTypeFromString(const std::string &name) static void initStatic() { mConstructed = true; - mSoundNames["hit"] = SOUND_EVENT_HIT; - mSoundNames["strike"] = SOUND_EVENT_MISS; - mSoundNames["miss"] = SOUND_EVENT_MISS; - mSoundNames["use"] = SOUND_EVENT_USE; - mSoundNames["equip"] = SOUND_EVENT_EQUIP; - mSoundNames["unequip"] = SOUND_EVENT_UNEQUIP; - mSoundNames["drop"] = SOUND_EVENT_DROP; - mSoundNames["pickup"] = SOUND_EVENT_PICKUP; - mSoundNames["take"] = SOUND_EVENT_TAKE; - mSoundNames["put"] = SOUND_EVENT_PUT; + mSoundNames["hit"] = ItemSoundEvent::HIT; + mSoundNames["strike"] = ItemSoundEvent::MISS; + mSoundNames["miss"] = ItemSoundEvent::MISS; + mSoundNames["use"] = ItemSoundEvent::USE; + mSoundNames["equip"] = ItemSoundEvent::EQUIP; + mSoundNames["unequip"] = ItemSoundEvent::UNEQUIP; + mSoundNames["drop"] = ItemSoundEvent::DROP; + mSoundNames["pickup"] = ItemSoundEvent::PICKUP; + mSoundNames["take"] = ItemSoundEvent::TAKE; + mSoundNames["put"] = ItemSoundEvent::PUT; } void ItemDB::load() @@ -763,7 +763,7 @@ void loadSoundRef(ItemInfo *const itemInfo, const XmlNodePtr node) node->xmlChildrenNode->content); const int delay = XML::getProperty(node, "delay", 0); - const std::map::const_iterator + const std::map::const_iterator it = mSoundNames.find(event); if (it != mSoundNames.end()) { -- cgit v1.2.3-70-g09d2