diff options
Diffstat (limited to 'src/server')
12 files changed, 11 insertions, 29 deletions
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 <SoundEntriesEntry>  const* GetSoundEntriesStore()   { return &sSoundEntriesStore;   } - DBCStorage <SpellRangeEntry>    const* GetSpellRangeStore()     { return &sSpellRangeStore;     } - DBCStorage <FactionEntry>       const* GetFactionStore()        { return &sFactionStore;        } - DBCStorage <ItemEntry>          const* GetItemDisplayStore()    { return &sItemStore;           } - DBCStorage <CreatureDisplayInfoEntry> const* GetCreatureDisplayStore() { return &sCreatureDisplayInfoStore; } - DBCStorage <EmotesEntry>        const* GetEmotesStore()         { return &sEmotesStore;         } - DBCStorage <EmotesTextEntry>    const* GetEmotesTextStore()     { return &sEmotesTextStore;     } - DBCStorage <AchievementEntry>   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 <WorldSafeLocsEntry>           sWorldSafeLocsStore;  void LoadDBCStores(const std::string& dataPath); -// script support functions - DBCStorage <SoundEntriesEntry>          const* GetSoundEntriesStore(); - DBCStorage <SpellRangeEntry>            const* GetSpellRangeStore(); - DBCStorage <FactionEntry>               const* GetFactionStore(); - DBCStorage <ItemEntry>                  const* GetItemDisplayStore(); - DBCStorage <CreatureDisplayInfoEntry>   const* GetCreatureDisplayStore(); - DBCStorage <EmotesEntry>                const* GetEmotesStore(); - DBCStorage <EmotesTextEntry>            const* GetEmotesTextStore(); - DBCStorage <AchievementEntry>           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);          } diff --git a/src/server/scripts/Commands/cs_achievement.cpp b/src/server/scripts/Commands/cs_achievement.cpp index f136cba46ab..7667e79ece7 100644 --- a/src/server/scripts/Commands/cs_achievement.cpp +++ b/src/server/scripts/Commands/cs_achievement.cpp @@ -67,7 +67,7 @@ public:              return false;          } -        if (AchievementEntry const* achievementEntry = GetAchievementStore()->LookupEntry(achievementId)) +        if (AchievementEntry const* achievementEntry = sAchievementStore.LookupEntry(achievementId))              target->CompletedAchievement(achievementEntry);          return true; diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp index ea2846185f8..23e64d756f5 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp @@ -315,7 +315,7 @@ public:                                  eventTimer = 3000;                                  if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))                                  { -                                    AchievementEntry const* AchievWC = GetAchievementStore()->LookupEntry(ACHIEVEMENT_WAILING_CAVERNS); +                                    AchievementEntry const* AchievWC = sAchievementStore.LookupEntry(ACHIEVEMENT_WAILING_CAVERNS);                                      if (AchievWC)                                      {                                          Map* map = me->GetMap(); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index 63f7c653c5a..abd16cd9c93 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -153,7 +153,7 @@ public:              CheckPlayersFrostResist();              if (CanTheHundredClub)              { -                AchievementEntry const* AchievTheHundredClub = GetAchievementStore()->LookupEntry(ACHIEVEMENT_THE_HUNDRED_CLUB); +                AchievementEntry const* AchievTheHundredClub = sAchievementStore.LookupEntry(ACHIEVEMENT_THE_HUNDRED_CLUB);                  if (AchievTheHundredClub)                  {                      if (map && map->IsDungeon()) diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp index 83604ed4153..13ba85f646c 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp @@ -152,7 +152,7 @@ public:              if (IsHeroic() && GolemsShattered < 5)              { -                AchievementEntry const* AchievShatterResistant = GetAchievementStore()->LookupEntry(ACHIEVEMENT_SHATTER_RESISTANT); +                AchievementEntry const* AchievShatterResistant = sAchievementStore.LookupEntry(ACHIEVEMENT_SHATTER_RESISTANT);                  if (AchievShatterResistant)                  {                      Map* map = me->GetMap();  | 
