Core/DataStores: Updated db2 structures to 9.0.2

Port From (https://github.com/TrinityCore/TrinityCore/commit/b82a3a557a7bf13d48342ea189325550059b622d)
This commit is contained in:
hondacrx
2020-12-12 23:20:41 -05:00
parent 18d2b7bb80
commit f0037ab99f
86 changed files with 12653 additions and 2811 deletions
+28 -3
View File
@@ -23,6 +23,7 @@ using Game.Entities;
using Game.Spells;
using System;
using System.Text;
using System.Collections.Generic;
namespace Game.Chat
{
@@ -542,11 +543,23 @@ namespace Game.Chat
}
if (handler.GetSession() != null)
handler.SendSysMessage(CypherStrings.QuestListChat, qInfo.Id, qInfo.Id,
{
int maxLevel = 0;
var questLevels = Global.DB2Mgr.GetContentTuningData(qInfo.ContentTuningId, handler.GetSession().GetPlayer().m_playerData.CtrOptions.GetValue().ContentTuningConditionMask);
if (questLevels.HasValue)
maxLevel = questLevels.Value.MaxLevel;
int scalingFactionGroup = 0;
ContentTuningRecord contentTuning = CliDB.ContentTuningStorage.LookupByKey(qInfo.ContentTuningId);
if (contentTuning != null)
scalingFactionGroup = contentTuning.GetScalingFactionGroup();
handler.SendSysMessage(CypherStrings.QuestListChat, qInfo.Id, qInfo.Id,
handler.GetSession().GetPlayer().GetQuestLevel(qInfo),
handler.GetSession().GetPlayer().GetQuestMinLevel(qInfo),
qInfo.MaxScalingLevel, qInfo.ScalingFactionGroup,
maxLevel, scalingFactionGroup,
title, statusStr);
}
else
handler.SendSysMessage(CypherStrings.QuestListConsole, qInfo.Id, title, statusStr);
@@ -594,11 +607,23 @@ namespace Game.Chat
}
if (handler.GetSession() != null)
{
int maxLevel = 0;
var questLevels = Global.DB2Mgr.GetContentTuningData(qInfo.ContentTuningId, handler.GetSession().GetPlayer().m_playerData.CtrOptions.GetValue().ContentTuningConditionMask);
if (questLevels.HasValue)
maxLevel = questLevels.Value.MaxLevel;
int scalingFactionGroup = 0;
ContentTuningRecord contentTuning = CliDB.ContentTuningStorage.LookupByKey(qInfo.ContentTuningId);
if (contentTuning != null)
scalingFactionGroup = contentTuning.GetScalingFactionGroup();
handler.SendSysMessage(CypherStrings.QuestListChat, qInfo.Id, qInfo.Id,
handler.GetSession().GetPlayer().GetQuestLevel(qInfo),
handler.GetSession().GetPlayer().GetQuestMinLevel(qInfo),
qInfo.MaxScalingLevel, qInfo.ScalingFactionGroup,
maxLevel, scalingFactionGroup,
_title, statusStr);
}
else
handler.SendSysMessage(CypherStrings.QuestListConsole, qInfo.Id, _title, statusStr);
+3 -3
View File
@@ -591,7 +591,7 @@ namespace Game.Chat
if (spellInfo == null)
return false;
SpellNonMeleeDamage damageInfo = new SpellNonMeleeDamage(attacker, target, spellInfo, spellInfo.GetSpellXSpellVisualId(attacker), spellInfo.SchoolMask);
SpellNonMeleeDamage damageInfo = new SpellNonMeleeDamage(attacker, target, spellInfo, new Networking.Packets.SpellCastVisual(spellInfo.GetSpellXSpellVisualId(attacker), 0), spellInfo.SchoolMask);
damageInfo.damage = damage_;
attacker.DealDamageMods(damageInfo.target, ref damageInfo.damage, ref damageInfo.absorb);
target.DealSpellDamage(damageInfo, true);
@@ -1596,7 +1596,7 @@ namespace Game.Chat
mapId = target.GetMapId();
areaId = target.GetAreaId();
alive = target.IsAlive() ? handler.GetCypherString(CypherStrings.Yes) : handler.GetCypherString(CypherStrings.No);
gender = (Gender)(byte)target.m_playerData.NativeSex;
gender = target.GetNativeSex();
}
// get additional information from DB
else
@@ -2367,7 +2367,7 @@ namespace Game.Chat
if (caster)
{
ObjectGuid castId = ObjectGuid.Create(HighGuid.Cast, SpellCastSource.Normal, player.GetMapId(), SPELL_UNSTUCK_ID, player.GetMap().GenerateLowGuid(HighGuid.Cast));
Spell.SendCastResult(caster, spellInfo, SPELL_UNSTUCK_VISUAL, castId, SpellCastResult.CantDoThatRightNow);
Spell.SendCastResult(caster, spellInfo, new Networking.Packets.SpellCastVisual(SPELL_UNSTUCK_VISUAL, 0), castId, SpellCastResult.CantDoThatRightNow);
}
return false;