diff options
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r-- | src/server/scripts/Commands/cs_lookup.cpp | 26 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 6 |
2 files changed, 27 insertions, 5 deletions
diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 3c46311d182..8b45a06e9cc 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -659,11 +659,22 @@ public: } if (handler->GetSession()) + { + int32 maxLevel = 0; + if (Optional<ContentTuningLevels> questLevels = sDB2Manager.GetContentTuningData(qInfo->GetContentTuningId(), + handler->GetSession()->GetPlayer()->m_playerData->CtrOptions->ContentTuningConditionMask)) + maxLevel = questLevels->MaxLevel; + + int32 scalingFactionGroup = 0; + if (ContentTuningEntry const* contentTuning = sContentTuningStore.LookupEntry(qInfo->GetContentTuningId())) + scalingFactionGroup = contentTuning->GetScalingFactionGroup(); + handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), handler->GetSession()->GetPlayer()->GetQuestLevel(qInfo), handler->GetSession()->GetPlayer()->GetQuestMinLevel(qInfo), - qInfo->GetQuestMaxScalingLevel(), qInfo->GetQuestScalingFactionGroup(), + maxLevel, scalingFactionGroup, title.c_str(), statusStr); + } else handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title.c_str(), statusStr); @@ -711,11 +722,22 @@ public: } if (handler->GetSession()) + { + int32 maxLevel = 0; + if (Optional<ContentTuningLevels> questLevels = sDB2Manager.GetContentTuningData(qInfo->GetContentTuningId(), + handler->GetSession()->GetPlayer()->m_playerData->CtrOptions->ContentTuningConditionMask)) + maxLevel = questLevels->MaxLevel; + + int32 scalingFactionGroup = 0; + if (ContentTuningEntry const* contentTuning = sContentTuningStore.LookupEntry(qInfo->GetContentTuningId())) + scalingFactionGroup = contentTuning->GetScalingFactionGroup(); + handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), handler->GetSession()->GetPlayer()->GetQuestLevel(qInfo), handler->GetSession()->GetPlayer()->GetQuestMinLevel(qInfo), - qInfo->GetQuestMaxScalingLevel(), qInfo->GetQuestScalingFactionGroup(), + maxLevel, scalingFactionGroup, title.c_str(), statusStr); + } else handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title.c_str(), statusStr); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 3db136674be..086b72be892 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1029,7 +1029,7 @@ public: if (Player* caster = handler->GetSession()->GetPlayer()) { ObjectGuid castId = ObjectGuid::Create<HighGuid::Cast>(SPELL_CAST_SOURCE_NORMAL, player->GetMapId(), SPELL_UNSTUCK_ID, player->GetMap()->GenerateLowGuid<HighGuid::Cast>()); - Spell::SendCastResult(caster, spellInfo, SPELL_UNSTUCK_VISUAL, castId, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW); + Spell::SendCastResult(caster, spellInfo, { SPELL_UNSTUCK_VISUAL, 0 }, castId, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW); } return false; @@ -1700,7 +1700,7 @@ public: mapId = target->GetMapId(); areaId = target->GetAreaId(); alive = target->IsAlive() ? handler->GetTrinityString(LANG_YES) : handler->GetTrinityString(LANG_NO); - gender = target->m_playerData->NativeSex; + gender = target->GetNativeSex(); } // get additional information from DB else @@ -2431,7 +2431,7 @@ public: if (!spellInfo) return false; - SpellNonMeleeDamage damageInfo(attacker, target, spellInfo, spellInfo->GetSpellXSpellVisualId(handler->GetSession()->GetPlayer()), spellInfo->SchoolMask); + SpellNonMeleeDamage damageInfo(attacker, target, spellInfo, { spellInfo->GetSpellXSpellVisualId(handler->GetSession()->GetPlayer()),0 }, spellInfo->SchoolMask); damageInfo.damage = damage; attacker->DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb); target->DealSpellDamage(&damageInfo, true); |