From f85fdbebe7db448d895bb97ee5eafa393a1f6547 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 10 Mar 2012 20:53:26 +0100 Subject: Core/DBC: Remove store getters (useless since we don't have scripts as external dll) --- src/server/game/AI/EventAI/CreatureEventAI.cpp | 2 +- src/server/game/AI/ScriptedAI/ScriptedCreature.cpp | 2 +- src/server/game/Conditions/ConditionMgr.cpp | 2 +- src/server/game/DataStores/DBCStores.cpp | 9 --------- src/server/game/DataStores/DBCStores.h | 9 --------- src/server/game/Entities/Player/Player.cpp | 2 +- src/server/game/Scripting/ScriptMgr.cpp | 2 +- src/server/game/Scripting/ScriptSystem.cpp | 4 ++-- 8 files changed, 7 insertions(+), 25 deletions(-) (limited to 'src/server/game') diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp index 730606becb5..11887611ae8 100755 --- a/src/server/game/AI/EventAI/CreatureEventAI.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp @@ -1252,7 +1252,7 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t if ((*i).second.SoundId) { - if (GetSoundEntriesStore()->LookupEntry((*i).second.SoundId)) + if (sSoundEntriesStore.LookupEntry((*i).second.SoundId)) source->PlayDirectSound((*i).second.SoundId); else sLog->outErrorDb("CreatureEventAI: DoScriptText entry %i tried to process invalid sound id %u.", textEntry, (*i).second.SoundId); diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index bd6c901f99c..5c1bbf0ad06 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -171,7 +171,7 @@ void ScriptedAI::DoPlaySoundToSet(WorldObject* source, uint32 soundId) if (!source) return; - if (!GetSoundEntriesStore()->LookupEntry(soundId)) + if (!sSoundEntriesStore.LookupEntry(soundId)) { sLog->outError("TSCR: Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", soundId, source->GetTypeId(), source->GetGUIDLow()); return; diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index eadcc5c5fbb..7fe6df14679 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1545,7 +1545,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_ACHIEVEMENT: { - AchievementEntry const* achievement = GetAchievementStore()->LookupEntry(cond->ConditionValue1); + AchievementEntry const* achievement = sAchievementStore.LookupEntry(cond->ConditionValue1); if (!achievement) { sLog->outErrorDb("Achivement condition has non existing achivement id (%u), skipped", cond->ConditionValue1); diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index acc130dcddf..cbff5c900f6 100755 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -872,12 +872,3 @@ uint32 GetLiquidFlags(uint32 liquidType) return 0; } -// script support functions - DBCStorage const* GetSoundEntriesStore() { return &sSoundEntriesStore; } - DBCStorage const* GetSpellRangeStore() { return &sSpellRangeStore; } - DBCStorage const* GetFactionStore() { return &sFactionStore; } - DBCStorage const* GetItemDisplayStore() { return &sItemStore; } - DBCStorage const* GetCreatureDisplayStore() { return &sCreatureDisplayInfoStore; } - DBCStorage const* GetEmotesStore() { return &sEmotesStore; } - DBCStorage const* GetEmotesTextStore() { return &sEmotesTextStore; } - DBCStorage const* GetAchievementStore() { return &sAchievementStore; } diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 3f8d19c1f5e..cd30ed587f8 100755 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -175,13 +175,4 @@ extern DBCStorage sWorldSafeLocsStore; void LoadDBCStores(const std::string& dataPath); -// script support functions - DBCStorage const* GetSoundEntriesStore(); - DBCStorage const* GetSpellRangeStore(); - DBCStorage const* GetFactionStore(); - DBCStorage const* GetItemDisplayStore(); - DBCStorage const* GetCreatureDisplayStore(); - DBCStorage const* GetEmotesStore(); - DBCStorage const* GetEmotesTextStore(); - DBCStorage const* GetAchievementStore(); #endif diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 92a21dfb52c..8318bd246d0 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -23077,7 +23077,7 @@ void Player::UpdateUnderwaterState(Map* m, float x, float y, float z) if (liquid && liquid->SpellId) { if (res & (LIQUID_MAP_UNDER_WATER | LIQUID_MAP_IN_WATER)) - CastSpell(this, liquid->SpellId, this); + CastSpell(this, liquid->SpellId, true); else RemoveAurasDueToSpell(liquid->SpellId); } diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index ac15bd5c985..fba6b460ec9 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -181,7 +181,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* target) if (pData->uiSoundId) { - if (GetSoundEntriesStore()->LookupEntry(pData->uiSoundId)) + if (sSoundEntriesStore.LookupEntry(pData->uiSoundId)) pSource->SendPlaySound(pData->uiSoundId, false); else sLog->outError("TSCR: DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp index 65e855cd887..ecb82a80a8d 100755 --- a/src/server/game/Scripting/ScriptSystem.cpp +++ b/src/server/game/Scripting/ScriptSystem.cpp @@ -67,7 +67,7 @@ void SystemMgr::LoadScriptTexts() if (temp.uiSoundId) { - if (!GetSoundEntriesStore()->LookupEntry(temp.uiSoundId)) + if (!sSoundEntriesStore.LookupEntry(temp.uiSoundId)) sLog->outErrorDb("TSCR: Entry %i in table `script_texts` has soundId %u but sound does not exist.", iId, temp.uiSoundId); } @@ -129,7 +129,7 @@ void SystemMgr::LoadScriptTextsCustom() if (temp.uiSoundId) { - if (!GetSoundEntriesStore()->LookupEntry(temp.uiSoundId)) + if (!sSoundEntriesStore.LookupEntry(temp.uiSoundId)) sLog->outErrorDb("TSCR: Entry %i in table `custom_texts` has soundId %u but sound does not exist.", iId, temp.uiSoundId); } -- cgit v1.2.3