diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2016-10-30 07:18:57 -0300 |
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2016-10-30 07:31:42 -0300 |
| commit | e84dfff4cee74baf2c02cc7752df5bf392eae180 (patch) | |
| tree | 9d9bd857a29cd4da03fe3ec4541659b3144dd9f8 /src/server/scripts | |
| parent | 5d9d25d5960a29d098035f9382a7b022e5294229 (diff) | |
Core/Auras: don't save auras casted by items
- Drop useless field from DB (itemGuid was being saved, but never used, see Prepared Statements)
- This type of auras (like Water Bucket, Precious Ribbon, etc) will be recasted on login anyways.
This reverts commit 16cfd59f5b368fd1d05eeeab3afbacfccf0a6870
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Events/events_script_loader.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Events/hallows_end.cpp | 69 |
2 files changed, 0 insertions, 71 deletions
diff --git a/src/server/scripts/Events/events_script_loader.cpp b/src/server/scripts/Events/events_script_loader.cpp index 33683aa6522..625c08f5389 100644 --- a/src/server/scripts/Events/events_script_loader.cpp +++ b/src/server/scripts/Events/events_script_loader.cpp @@ -17,12 +17,10 @@ // This is where scripts' loading functions should be declared: void AddSC_event_childrens_week(); -void AddSC_event_hallows_end(); // The name of this function should match: // void Add${NameOfDirectory}Scripts() void AddEventsScripts() { AddSC_event_childrens_week(); - AddSC_event_hallows_end(); } diff --git a/src/server/scripts/Events/hallows_end.cpp b/src/server/scripts/Events/hallows_end.cpp deleted file mode 100644 index aa0aca24708..00000000000 --- a/src/server/scripts/Events/hallows_end.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* -* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "SpellScript.h" -#include "SpellAuraEffects.h" - -enum HallowsEnd -{ - ITEM_WATER_BUCKET = 32971, - SPELL_HAS_WATER_BUCKET = 42336, -}; - -class spell_hallows_end_has_water_bucket : public SpellScriptLoader -{ -public: - spell_hallows_end_has_water_bucket() : SpellScriptLoader("spell_hallows_end_has_water_bucket") {} - - class spell_hallows_end_has_water_bucket_AuraScript : public AuraScript - { - PrepareAuraScript(spell_hallows_end_has_water_bucket_AuraScript); - - bool Validate(SpellInfo const* /*spellInfo*/) override - { - if (!sSpellMgr->GetSpellInfo(SPELL_HAS_WATER_BUCKET)) - return false; - return true; - } - - void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) - { - if (Unit* caster = GetCaster()) - if (caster->GetTypeId() == TYPEID_PLAYER) - if (!caster->ToPlayer()->HasItemCount(ITEM_WATER_BUCKET, 1, false)) - caster->RemoveAurasDueToSpell(SPELL_HAS_WATER_BUCKET); - } - - void Register() override - { - AfterEffectApply += AuraEffectApplyFn(spell_hallows_end_has_water_bucket_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); - } - }; - - AuraScript* GetAuraScript() const - { - return new spell_hallows_end_has_water_bucket_AuraScript(); - } -}; - -void AddSC_event_hallows_end() -{ - new spell_hallows_end_has_water_bucket(); -} |
