aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp2
-rw-r--r--src/server/scripts/Commands/cs_learn.cpp37
-rw-r--r--src/server/scripts/Commands/cs_list.cpp2
-rw-r--r--src/server/scripts/Commands/cs_lookup.cpp242
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp18
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp14
-rw-r--r--src/server/scripts/Spells/spell_item.cpp2
7 files changed, 186 insertions, 131 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index b2094df08ef..59eb97d1476 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -171,7 +171,7 @@ public:
uint32 soundId = atoi((char*)args);
- if (!sSoundEntriesStore.LookupEntry(soundId))
+ if (!sSoundKitStore.LookupEntry(soundId))
{
handler->PSendSysMessage(LANG_SOUND_NOT_EXIST, soundId);
handler->SetSentErrorMessage(true);
diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp
index 16e94242021..5f31d7f806f 100644
--- a/src/server/scripts/Commands/cs_learn.cpp
+++ b/src/server/scripts/Commands/cs_learn.cpp
@@ -325,7 +325,7 @@ public:
if ((skillInfo->CategoryID == SKILL_CATEGORY_PROFESSION || skillInfo->CategoryID == SKILL_CATEGORY_SECONDARY) &&
skillInfo->CanLink) // only prof. with recipes have
{
- HandleLearnSkillRecipesHelper(target, skillInfo->ID);
+ HandleLearnSkillRecipesHelper(target, i);
}
}
@@ -358,7 +358,7 @@ public:
std::string name;
- SkillLineEntry const* targetSkillInfo = NULL;
+ uint32 skillId = 0;
for (uint32 i = 1; i < sSkillLineStore.GetNumRows(); ++i)
{
SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(i);
@@ -370,23 +370,42 @@ public:
!skillInfo->CanLink) // only prof with recipes have set
continue;
- name = skillInfo->DisplayName_lang;
+ int locale = handler->GetSessionDbcLocale();
+ name = skillInfo->DisplayName->Str[locale];
if (name.empty())
continue;
if (!Utf8FitTo(name, namePart))
- continue;
+ {
+ locale = 0;
+ for (; locale < TOTAL_LOCALES; ++locale)
+ {
+ if (locale == handler->GetSessionDbcLocale())
+ continue;
- targetSkillInfo = skillInfo;
+ name = skillInfo->DisplayName->Str[locale];
+ if (name.empty())
+ continue;
+
+ if (Utf8FitTo(name, namePart))
+ break;
+ }
+ }
+
+ if (locale < TOTAL_LOCALES)
+ {
+ skillId = i;
+ break;
+ }
}
- if (!targetSkillInfo)
+ if (!skillId)
return false;
- HandleLearnSkillRecipesHelper(target, targetSkillInfo->ID);
+ HandleLearnSkillRecipesHelper(target, skillId);
- uint16 maxLevel = target->GetPureMaxSkillValue(targetSkillInfo->ID);
- target->SetSkill(targetSkillInfo->ID, target->GetSkillStep(targetSkillInfo->ID), maxLevel, maxLevel);
+ uint16 maxLevel = target->GetPureMaxSkillValue(skillId);
+ target->SetSkill(skillId, target->GetSkillStep(skillId), maxLevel, maxLevel);
handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_RECIPES, name.c_str());
return true;
}
diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp
index 67c89a2f10c..b66fc95c407 100644
--- a/src/server/scripts/Commands/cs_list.cpp
+++ b/src/server/scripts/Commands/cs_list.cpp
@@ -436,7 +436,7 @@ public:
AuraApplication const* aurApp = itr->second;
Aura const* aura = aurApp->GetBase();
- char const* name = aura->GetSpellInfo()->SpellName;
+ char const* name = aura->GetSpellInfo()->SpellName->Str[handler->GetSessionDbcLocale()];
bool talent = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR0_CU_IS_TALENT);
std::ostringstream ss_name;
diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp
index 57bf557771b..b032aa8ef2e 100644
--- a/src/server/scripts/Commands/cs_lookup.cpp
+++ b/src/server/scripts/Commands/cs_lookup.cpp
@@ -688,41 +688,59 @@ public:
SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(id);
if (skillInfo)
{
- std::string name = skillInfo->DisplayName_lang;
+ int locale = handler->GetSessionDbcLocale();
+ std::string name = skillInfo->DisplayName->Str[locale];
if (name.empty())
continue;
if (!Utf8FitTo(name, wNamePart))
- continue;
-
- if (maxResults && count++ == maxResults)
{
- handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
+ locale = 0;
+ for (; locale < TOTAL_LOCALES; ++locale)
+ {
+ if (locale == handler->GetSessionDbcLocale())
+ continue;
+
+ name = skillInfo->DisplayName->Str[locale];
+ if (name.empty())
+ continue;
+
+ if (Utf8FitTo(name, wNamePart))
+ break;
+ }
}
- char valStr[50] = "";
- char const* knownStr = "";
- if (target && target->HasSkill(id))
+ if (locale < TOTAL_LOCALES)
{
- knownStr = handler->GetTrinityString(LANG_KNOWN);
- uint32 curValue = target->GetPureSkillValue(id);
- uint32 maxValue = target->GetPureMaxSkillValue(id);
- uint32 permValue = target->GetSkillPermBonusValue(id);
- uint32 tempValue = target->GetSkillTempBonusValue(id);
-
- char const* valFormat = handler->GetTrinityString(LANG_SKILL_VALUES);
- snprintf(valStr, 50, valFormat, curValue, maxValue, permValue, tempValue);
- }
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
- // send skill in "id - [namedlink locale]" format
- if (handler->GetSession())
- handler->PSendSysMessage(LANG_SKILL_LIST_CHAT, id, id, name.c_str(), "", knownStr, valStr);
- else
- handler->PSendSysMessage(LANG_SKILL_LIST_CONSOLE, id, name.c_str(), "", knownStr, valStr);
+ char valStr[50] = "";
+ char const* knownStr = "";
+ if (target && target->HasSkill(id))
+ {
+ knownStr = handler->GetTrinityString(LANG_KNOWN);
+ uint32 curValue = target->GetPureSkillValue(id);
+ uint32 maxValue = target->GetPureMaxSkillValue(id);
+ uint32 permValue = target->GetSkillPermBonusValue(id);
+ uint32 tempValue = target->GetSkillTempBonusValue(id);
+
+ char const* valFormat = handler->GetTrinityString(LANG_SKILL_VALUES);
+ snprintf(valStr, 50, valFormat, curValue, maxValue, permValue, tempValue);
+ }
- if (!found)
- found = true;
+ // send skill in "id - [namedlink locale]" format
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_SKILL_LIST_CHAT, id, id, name.c_str(), "", knownStr, valStr);
+ else
+ handler->PSendSysMessage(LANG_SKILL_LIST_CONSOLE, id, name.c_str(), "", knownStr, valStr);
+
+ if (!found)
+ found = true;
+ }
}
}
if (!found)
@@ -758,63 +776,81 @@ public:
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id);
if (spellInfo)
{
- std::string name = spellInfo->SpellName;
+ int locale = handler->GetSessionDbcLocale();
+ std::string name = spellInfo->SpellName->Str[locale];
if (name.empty())
continue;
if (!Utf8FitTo(name, wNamePart))
- continue;
-
- if (maxResults && count++ == maxResults)
{
- handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
+ locale = 0;
+ for (; locale < TOTAL_LOCALES; ++locale)
+ {
+ if (locale == handler->GetSessionDbcLocale())
+ continue;
+
+ name = spellInfo->SpellName->Str[locale];
+ if (name.empty())
+ continue;
+
+ if (Utf8FitTo(name, wNamePart))
+ break;
+ }
}
- bool known = target && target->HasSpell(id);
+ if (locale < TOTAL_LOCALES)
+ {
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
- SpellEffectInfo const* effect = spellInfo->GetEffect(EFFECT_0);
- bool learn = effect ? (effect->Effect == SPELL_EFFECT_LEARN_SPELL) : false;
+ bool known = target && target->HasSpell(id);
- SpellInfo const* learnSpellInfo = effect ? sSpellMgr->GetSpellInfo(effect->TriggerSpell) : NULL;
+ SpellEffectInfo const* effect = spellInfo->GetEffect(EFFECT_0);
+ bool learn = effect ? (effect->Effect == SPELL_EFFECT_LEARN_SPELL) : false;
- bool talent = spellInfo->HasAttribute(SPELL_ATTR0_CU_IS_TALENT);
- bool passive = spellInfo->IsPassive();
- bool active = target && target->HasAura(id);
+ SpellInfo const* learnSpellInfo = effect ? sSpellMgr->GetSpellInfo(effect->TriggerSpell) : NULL;
- // unit32 used to prevent interpreting uint8 as char at output
- // find rank of learned spell for learning spell, or talent rank
- uint32 rank = learn && learnSpellInfo ? learnSpellInfo->GetRank() : spellInfo->GetRank();
+ bool talent = spellInfo->HasAttribute(SPELL_ATTR0_CU_IS_TALENT);
+ bool passive = spellInfo->IsPassive();
+ bool active = target && target->HasAura(id);
- // send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
- std::ostringstream ss;
- if (handler->GetSession())
- ss << id << " - |cffffffff|Hspell:" << id << "|h[" << name;
- else
- ss << id << " - " << name;
+ // unit32 used to prevent interpreting uint8 as char at output
+ // find rank of learned spell for learning spell, or talent rank
+ uint32 rank = learn && learnSpellInfo ? learnSpellInfo->GetRank() : spellInfo->GetRank();
- // include rank in link name
- if (rank)
- ss << handler->GetTrinityString(LANG_SPELL_RANK) << rank;
+ // send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
+ std::ostringstream ss;
+ if (handler->GetSession())
+ ss << id << " - |cffffffff|Hspell:" << id << "|h[" << name;
+ else
+ ss << id << " - " << name;
- if (handler->GetSession())
- ss << "]|h|r";
-
- if (talent)
- ss << handler->GetTrinityString(LANG_TALENT);
- if (passive)
- ss << handler->GetTrinityString(LANG_PASSIVE);
- if (learn)
- ss << handler->GetTrinityString(LANG_LEARN);
- if (known)
- ss << handler->GetTrinityString(LANG_KNOWN);
- if (active)
- ss << handler->GetTrinityString(LANG_ACTIVE);
+ // include rank in link name
+ if (rank)
+ ss << handler->GetTrinityString(LANG_SPELL_RANK) << rank;
- handler->SendSysMessage(ss.str().c_str());
+ if (handler->GetSession())
+ ss << "]|h|r";
+
+ if (talent)
+ ss << handler->GetTrinityString(LANG_TALENT);
+ if (passive)
+ ss << handler->GetTrinityString(LANG_PASSIVE);
+ if (learn)
+ ss << handler->GetTrinityString(LANG_LEARN);
+ if (known)
+ ss << handler->GetTrinityString(LANG_KNOWN);
+ if (active)
+ ss << handler->GetTrinityString(LANG_ACTIVE);
- if (!found)
- found = true;
+ handler->SendSysMessage(ss.str().c_str());
+
+ if (!found)
+ found = true;
+ }
}
}
if (!found)
@@ -836,56 +872,56 @@ public:
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id))
{
int locale = handler->GetSessionDbcLocale();
- std::string name = spellInfo->SpellName;
+ std::string name = spellInfo->SpellName->Str[locale];
if (name.empty())
{
handler->SendSysMessage(LANG_COMMAND_NOSPELLFOUND);
return true;
}
- bool known = target && target->HasSpell(id);
+ bool known = target && target->HasSpell(id);
- SpellEffectInfo const* effect = spellInfo->GetEffect(EFFECT_0);
- bool learn = effect? (effect->Effect == SPELL_EFFECT_LEARN_SPELL) : false;
+ SpellEffectInfo const* effect = spellInfo->GetEffect(EFFECT_0);
+ bool learn = effect? (effect->Effect == SPELL_EFFECT_LEARN_SPELL) : false;
- SpellInfo const* learnSpellInfo = effect ? sSpellMgr->GetSpellInfo(effect->TriggerSpell) : NULL;
+ SpellInfo const* learnSpellInfo = effect ? sSpellMgr->GetSpellInfo(effect->TriggerSpell) : NULL;
- bool talent = spellInfo->HasAttribute(SPELL_ATTR0_CU_IS_TALENT);
- bool passive = spellInfo->IsPassive();
- bool active = target && target->HasAura(id);
+ bool talent = spellInfo->HasAttribute(SPELL_ATTR0_CU_IS_TALENT);
+ bool passive = spellInfo->IsPassive();
+ bool active = target && target->HasAura(id);
- // unit32 used to prevent interpreting uint8 as char at output
- // find rank of learned spell for learning spell, or talent rank
- uint32 rank = learn && learnSpellInfo ? learnSpellInfo->GetRank() : spellInfo->GetRank();
+ // unit32 used to prevent interpreting uint8 as char at output
+ // find rank of learned spell for learning spell, or talent rank
+ uint32 rank = learn && learnSpellInfo ? learnSpellInfo->GetRank() : spellInfo->GetRank();
- // send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
- std::ostringstream ss;
- if (handler->GetSession())
- ss << id << " - |cffffffff|Hspell:" << id << "|h[" << name;
- else
- ss << id << " - " << name;
-
- // include rank in link name
- if (rank)
- ss << handler->GetTrinityString(LANG_SPELL_RANK) << rank;
+ // send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
+ std::ostringstream ss;
+ if (handler->GetSession())
+ ss << id << " - |cffffffff|Hspell:" << id << "|h[" << name;
+ else
+ ss << id << " - " << name;
- if (handler->GetSession())
- ss << ' ' << localeNames[locale] << "]|h|r";
- else
- ss << ' ' << localeNames[locale];
-
- if (talent)
- ss << handler->GetTrinityString(LANG_TALENT);
- if (passive)
- ss << handler->GetTrinityString(LANG_PASSIVE);
- if (learn)
- ss << handler->GetTrinityString(LANG_LEARN);
- if (known)
- ss << handler->GetTrinityString(LANG_KNOWN);
- if (active)
- ss << handler->GetTrinityString(LANG_ACTIVE);
+ // include rank in link name
+ if (rank)
+ ss << handler->GetTrinityString(LANG_SPELL_RANK) << rank;
- handler->SendSysMessage(ss.str().c_str());
+ if (handler->GetSession())
+ ss << ' ' << localeNames[locale] << "]|h|r";
+ else
+ ss << ' ' << localeNames[locale];
+
+ if (talent)
+ ss << handler->GetTrinityString(LANG_TALENT);
+ if (passive)
+ ss << handler->GetTrinityString(LANG_PASSIVE);
+ if (learn)
+ ss << handler->GetTrinityString(LANG_LEARN);
+ if (known)
+ ss << handler->GetTrinityString(LANG_KNOWN);
+ if (active)
+ ss << handler->GetTrinityString(LANG_ACTIVE);
+
+ handler->SendSysMessage(ss.str().c_str());
}
else
handler->SendSysMessage(LANG_COMMAND_NOSPELLFOUND);
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 7ad80352995..e6fb42853e3 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -755,7 +755,7 @@ public:
}
target->GetSpellHistory()->ResetCooldown(spellIid, true);
- target->GetSpellHistory()->ResetCharges(spellInfo->ChargeCategoryEntry);
+ target->GetSpellHistory()->ResetCharges(spellInfo->ChargeCategoryId);
handler->PSendSysMessage(LANG_REMOVE_COOLDOWN, spellIid, target == handler->GetSession()->GetPlayer() ? handler->GetTrinityString(LANG_YOU) : nameLink.c_str());
}
return true;
@@ -1168,10 +1168,10 @@ public:
if (itemNameStr && itemNameStr[0])
{
std::string itemName = itemNameStr+1;
- auto itr = std::find_if(sItemSparseStore.begin(), sItemSparseStore.end(), [&itemName](ItemSparseEntry const* itemSparse)
+ auto itr = std::find_if(sItemSparseStore.begin(), sItemSparseStore.end(), [&itemName](std::pair<uint32, ItemSparseEntry const*> kv)
{
for (uint32 i = 0; i < MAX_LOCALES; ++i)
- if (itemName == itemSparse->Name->Str[i])
+ if (itemName == kv.second->Name->Str[i])
return true;
return false;
});
@@ -1183,7 +1183,7 @@ public:
return false;
}
- itemId = itr->ID;
+ itemId = itr->first;
}
else
return false;
@@ -1469,7 +1469,7 @@ public:
// add the skill to the player's book with step 1 (which is the first rank, in most cases something
// like 'Apprentice <skill>'.
target->SetSkill(skill, targetHasSkill ? target->GetSkillStep(skill) : 1, level, max);
- handler->PSendSysMessage(LANG_SET_SKILL, skill, skillLine->DisplayName_lang, handler->GetNameLink(target).c_str(), level, max);
+ handler->PSendSysMessage(LANG_SET_SKILL, skill, skillLine->DisplayName->Str[handler->GetSessionDbcLocale()], handler->GetNameLink(target).c_str(), level, max);
return true;
}
@@ -1573,7 +1573,7 @@ public:
uint8 raceid, classid = 0; //RACE_NONE, CLASS_NONE
std::string raceStr, classStr = handler->GetTrinityString(LANG_UNKNOWN);
uint8 gender = 0;
- int8 locale = handler->GetSessionDbcLocale();
+ LocaleConstant locale = handler->GetSessionDbcLocale();
uint32 totalPlayerTime = 0;
uint8 level = 0;
std::string alive = handler->GetTrinityString(LANG_ERROR);
@@ -1794,7 +1794,7 @@ public:
handler->PSendSysMessage(LANG_PINFO_CHR_LEVEL_HIGH, level);
// Output XI. LANG_PINFO_CHR_RACE
- raceStr = GetRaceName(raceid, locale);
+ raceStr = DB2Manager::GetChrRaceName(raceid, locale);
classStr = GetClassName(classid, locale);
handler->PSendSysMessage(LANG_PINFO_CHR_RACE, (gender == 0 ? handler->GetTrinityString(LANG_CHARACTER_GENDER_MALE) : handler->GetTrinityString(LANG_CHARACTER_GENDER_FEMALE)), raceStr.c_str(), classStr.c_str());
@@ -2608,7 +2608,7 @@ public:
uint32 soundId = atoi((char*)args);
- if (!sSoundEntriesStore.LookupEntry(soundId))
+ if (!sSoundKitStore.LookupEntry(soundId))
{
handler->PSendSysMessage(LANG_SOUND_NOT_EXIST, soundId);
handler->SetSentErrorMessage(true);
@@ -2688,7 +2688,7 @@ public:
{
AuraApplication const* aurApp = itr->second;
Aura const* aura = aurApp->GetBase();
- char const* name = aura->GetSpellInfo()->SpellName;
+ char const* name = aura->GetSpellInfo()->SpellName->Str[handler->GetSessionDbcLocale()];
bool self = target->GetGUID() == aura->GetCasterGUID();
if (self)
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index 4488561589f..a4665973009 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -172,7 +172,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader
int32 energizeAmount = -GetEffectValue(); // -13
// If we are set to fill the lunar side or we've just logged in with 0 power..
if ((!caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER))
- || caster->GetPower(POWER_ECLIPSE) == 0)
+ || caster->GetPower(POWER_LUNAR_POWER) == 0)
{
caster->CastCustomSpell(caster, SPELL_DRUID_ECLIPSE_GENERAL_ENERGIZE, &energizeAmount, 0, 0, true);
// If the energize was due to 0 power, cast the eclipse marker aura
@@ -180,7 +180,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader
caster->CastSpell(caster, SPELL_DRUID_LUNAR_ECLIPSE_MARKER, true);
}
// The energizing effect brought us out of the solar eclipse, remove the aura
- if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) <= 0)
+ if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_LUNAR_POWER) <= 0)
caster->RemoveAurasDueToSpell(SPELL_DRUID_SOLAR_ECLIPSE);
break;
}
@@ -189,7 +189,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader
int32 energizeAmount = GetEffectValue(); // 20
// If we are set to fill the solar side or we've just logged in with 0 power..
if ((!caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER))
- || caster->GetPower(POWER_ECLIPSE) == 0)
+ || caster->GetPower(POWER_LUNAR_POWER) == 0)
{
caster->CastCustomSpell(caster, SPELL_DRUID_ECLIPSE_GENERAL_ENERGIZE, &energizeAmount, 0, 0, true);
// If the energize was due to 0 power, cast the eclipse marker aura
@@ -197,7 +197,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader
caster->CastSpell(caster, SPELL_DRUID_SOLAR_ECLIPSE_MARKER, true);
}
// The energizing effect brought us out of the lunar eclipse, remove the aura
- if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) >= 0)
+ if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_LUNAR_POWER) >= 0)
caster->RemoveAura(SPELL_DRUID_LUNAR_ECLIPSE);
break;
}
@@ -205,7 +205,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader
{
// If we are set to fill the solar side or we've just logged in with 0 power (confirmed with sniffs)
if ((!caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER))
- || caster->GetPower(POWER_ECLIPSE) == 0)
+ || caster->GetPower(POWER_LUNAR_POWER) == 0)
{
int32 energizeAmount = GetEffectValue(); // 15
caster->CastCustomSpell(caster, SPELL_DRUID_STARSURGE_ENERGIZE, &energizeAmount, 0, 0, true);
@@ -220,10 +220,10 @@ class spell_dru_eclipse_energize : public SpellScriptLoader
caster->CastCustomSpell(caster, SPELL_DRUID_STARSURGE_ENERGIZE, &energizeAmount, 0, 0, true);
}
// The energizing effect brought us out of the lunar eclipse, remove the aura
- if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) >= 0)
+ if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_LUNAR_POWER) >= 0)
caster->RemoveAura(SPELL_DRUID_LUNAR_ECLIPSE);
// The energizing effect brought us out of the solar eclipse, remove the aura
- else if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) <= 0)
+ else if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_LUNAR_POWER) <= 0)
caster->RemoveAura(SPELL_DRUID_SOLAR_ECLIPSE);
break;
}
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index b0853c71b2c..7dcd3a4fbb9 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -2706,7 +2706,7 @@ public:
if (Player* target = GetHitUnit()->ToPlayer())
{
target->HandleEmoteCommand(EMOTE_ONESHOT_TRAIN);
- if (EmotesTextSoundEntry const* soundEntry = FindTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->getRace(), target->getGender()))
+ if (EmotesTextSoundEntry const* soundEntry = sDB2Manager.GetTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->getRace(), target->getGender(), target->getClass()))
target->PlayDistanceSound(soundEntry->SoundId);
}
}