aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-12-01 21:08:06 +0100
committerShauren <shauren.trinity@gmail.com>2020-12-08 18:16:47 +0100
commitb82a3a557a7bf13d48342ea189325550059b622d (patch)
tree014fd20fae16fab1da1f056850348282b0e5e331 /src/server/scripts/Commands
parent426cb31676338cf6e5411d38f645f98a7e6ccb91 (diff)
Core/DataStores: Updated db2 structures to 9.0.2
* Includes support for new character customization
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_lookup.cpp26
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp6
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);