fix(Core/Spell): Glyph of Eternal Water (#2508)
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1576535250226124911');
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 70937;
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`)
|
||||||
|
VALUES
|
||||||
|
(70937, 'spell_mage_glyph_of_eternal_water');
|
||||||
@@ -929,7 +929,18 @@ void WorldSession::SendPetNameQuery(uint64 petguid, uint32 petnumber)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string name = pet->GetName();
|
std::string name;
|
||||||
|
if (pet->GetEntry() == NPC_WATER_ELEMENTAL_PERM)
|
||||||
|
{
|
||||||
|
// Use localized creature name for the mage pet
|
||||||
|
LocaleConstant loc_idx = GetSessionDbLocaleIndex();
|
||||||
|
if (loc_idx != DEFAULT_LOCALE)
|
||||||
|
name = pet->GetNameForLocaleIdx(loc_idx);
|
||||||
|
else
|
||||||
|
name = pet->GetCreatureTemplate()->Name;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
name = pet->GetName();
|
||||||
|
|
||||||
WorldPacket data(SMSG_PET_NAME_QUERY_RESPONSE, (4+4+name.size()+1));
|
WorldPacket data(SMSG_PET_NAME_QUERY_RESPONSE, (4+4+name.size()+1));
|
||||||
data << uint32(petnumber);
|
data << uint32(petnumber);
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "SpellMgr.h"
|
#include "SpellMgr.h"
|
||||||
#include "TemporarySummon.h"
|
#include "TemporarySummon.h"
|
||||||
|
#include "Pet.h"
|
||||||
|
|
||||||
enum MageSpells
|
enum MageSpells
|
||||||
{
|
{
|
||||||
@@ -465,6 +466,36 @@ class spell_mage_brain_freeze : public SpellScriptLoader
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class spell_mage_glyph_of_eternal_water : public SpellScriptLoader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
spell_mage_glyph_of_eternal_water() : SpellScriptLoader("spell_mage_glyph_of_eternal_water") { }
|
||||||
|
|
||||||
|
class spell_mage_glyph_of_eternal_water_AuraScript : public AuraScript
|
||||||
|
{
|
||||||
|
PrepareAuraScript(spell_mage_glyph_of_eternal_water_AuraScript);
|
||||||
|
|
||||||
|
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
{
|
||||||
|
if (Unit* target = GetTarget())
|
||||||
|
if (Player* player = target->ToPlayer())
|
||||||
|
if (Pet* pet = player->GetPet())
|
||||||
|
if (pet->GetEntry() == NPC_WATER_ELEMENTAL_PERM)
|
||||||
|
pet->Remove(PET_SAVE_NOT_IN_SLOT);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register()
|
||||||
|
{
|
||||||
|
OnEffectRemove += AuraEffectRemoveFn(spell_mage_glyph_of_eternal_water_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
AuraScript* GetAuraScript() const
|
||||||
|
{
|
||||||
|
return new spell_mage_glyph_of_eternal_water_AuraScript();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// Theirs
|
// Theirs
|
||||||
// Incanter's Absorbtion
|
// Incanter's Absorbtion
|
||||||
@@ -1091,6 +1122,7 @@ void AddSC_mage_spell_scripts()
|
|||||||
new spell_mage_burnout_trigger();
|
new spell_mage_burnout_trigger();
|
||||||
new spell_mage_pet_scaling();
|
new spell_mage_pet_scaling();
|
||||||
new spell_mage_brain_freeze();
|
new spell_mage_brain_freeze();
|
||||||
|
new spell_mage_glyph_of_eternal_water();
|
||||||
|
|
||||||
// Theirs
|
// Theirs
|
||||||
new spell_mage_blast_wave();
|
new spell_mage_blast_wave();
|
||||||
|
|||||||
Reference in New Issue
Block a user