Core/Misc: First set of required db changes for 9.0
Port From (https://github.com/TrinityCore/TrinityCore/commit/4ca29f3cb050896a8a6c1fea5b2364b2b11c22cd)
This commit is contained in:
@@ -1372,7 +1372,6 @@ namespace Framework.Constants
|
|||||||
TalentsInspecting,
|
TalentsInspecting,
|
||||||
ThreatRadius,
|
ThreatRadius,
|
||||||
TradeLevelReq,
|
TradeLevelReq,
|
||||||
UiQuestLevelsInDialogs, // Should We Add Quest Levels To The Title In The Npc Dialogs?
|
|
||||||
UptimeUpdate,
|
UptimeUpdate,
|
||||||
VmapIndoorCheck,
|
VmapIndoorCheck,
|
||||||
WardenClientBanDuration,
|
WardenClientBanDuration,
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ namespace Framework.Database
|
|||||||
PrepareStatement(WorldStatements.SEL_WAYPOINT_SCRIPT_ID_BY_GUID, "SELECT id FROM waypoint_scripts WHERE guid = ?");
|
PrepareStatement(WorldStatements.SEL_WAYPOINT_SCRIPT_ID_BY_GUID, "SELECT id FROM waypoint_scripts WHERE guid = ?");
|
||||||
PrepareStatement(WorldStatements.DEL_CREATURE, "DELETE FROM creature WHERE guid = ?");
|
PrepareStatement(WorldStatements.DEL_CREATURE, "DELETE FROM creature WHERE guid = ?");
|
||||||
PrepareStatement(WorldStatements.SEL_COMMANDS, "SELECT name, permission, help FROM command");
|
PrepareStatement(WorldStatements.SEL_COMMANDS, "SELECT name, permission, help FROM command");
|
||||||
PrepareStatement(WorldStatements.SEL_CREATURE_TEMPLATE, "SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, name, femaleName, subname, TitleAlt, IconName, gossip_menu_id, minlevel, maxlevel, HealthScalingExpansion, RequiredExpansion, VignetteID, faction, npcflag, speed_walk, speed_run, scale, `rank`, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, unit_flags3, dynamicflags, family, trainer_class, type, type_flags, type_flags2, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, HoverHeight, HealthModifier, HealthModifierExtra, ManaModifier, ManaModifierExtra, ArmorModifier, DamageModifier, ExperienceModifier, RacialLeader, movementId, FadeRegionRadius, WidgetSetID, WidgetSetUnitConditionID, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = ? OR 1 = ?");
|
PrepareStatement(WorldStatements.SEL_CREATURE_TEMPLATE, "SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, name, femaleName, subname, TitleAlt, IconName, gossip_menu_id, minlevel, maxlevel, HealthScalingExpansion, RequiredExpansion, VignetteID, faction, npcflag, speed_walk, speed_run, scale, `rank`, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, unit_flags3, dynamicflags, family, trainer_class, type, type_flags, type_flags2, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, HoverHeight, HealthModifier, HealthModifierExtra, ManaModifier, ManaModifierExtra, ArmorModifier, DamageModifier, ExperienceModifier, RacialLeader, movementId, WidgetSetID, WidgetSetUnitConditionID, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = ? OR 1 = ?");
|
||||||
PrepareStatement(WorldStatements.SEL_WAYPOINT_SCRIPT_BY_ID, "SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?");
|
PrepareStatement(WorldStatements.SEL_WAYPOINT_SCRIPT_BY_ID, "SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?");
|
||||||
PrepareStatement(WorldStatements.SEL_CREATURE_BY_ID, "SELECT guid FROM creature WHERE id = ?");
|
PrepareStatement(WorldStatements.SEL_CREATURE_BY_ID, "SELECT guid FROM creature WHERE id = ?");
|
||||||
PrepareStatement(WorldStatements.SEL_GAMEOBJECT_NEAREST, "SELECT guid, id, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM gameobject WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? ORDER BY order_");
|
PrepareStatement(WorldStatements.SEL_GAMEOBJECT_NEAREST, "SELECT guid, id, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM gameobject WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? ORDER BY order_");
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ namespace Game.Entities
|
|||||||
public float ModExperience;
|
public float ModExperience;
|
||||||
public bool RacialLeader;
|
public bool RacialLeader;
|
||||||
public uint MovementId;
|
public uint MovementId;
|
||||||
public float FadeRegionRadius;
|
|
||||||
public int WidgetSetID;
|
public int WidgetSetID;
|
||||||
public int WidgetSetUnitConditionID;
|
public int WidgetSetUnitConditionID;
|
||||||
public bool RegenHealth;
|
public bool RegenHealth;
|
||||||
@@ -266,7 +265,6 @@ namespace Game.Entities
|
|||||||
stats.HealthScalingExpansion = HealthScalingExpansion;
|
stats.HealthScalingExpansion = HealthScalingExpansion;
|
||||||
stats.VignetteID = VignetteID;
|
stats.VignetteID = VignetteID;
|
||||||
stats.Class = (int)UnitClass;
|
stats.Class = (int)UnitClass;
|
||||||
stats.FadeRegionRadius = FadeRegionRadius;
|
|
||||||
stats.WidgetSetID = WidgetSetID;
|
stats.WidgetSetID = WidgetSetID;
|
||||||
stats.WidgetSetUnitConditionID = WidgetSetUnitConditionID;
|
stats.WidgetSetUnitConditionID = WidgetSetUnitConditionID;
|
||||||
|
|
||||||
|
|||||||
@@ -274,11 +274,11 @@ namespace Game.Misc
|
|||||||
if (quest != null)
|
if (quest != null)
|
||||||
{
|
{
|
||||||
ClientGossipText text = new ClientGossipText();
|
ClientGossipText text = new ClientGossipText();
|
||||||
text.QuestID = (int)questID;
|
text.QuestID = questID;
|
||||||
text.ContentTuningID = quest.ContentTuningId;
|
text.ContentTuningID = quest.ContentTuningId;
|
||||||
text.QuestType = item.QuestIcon;
|
text.QuestType = item.QuestIcon;
|
||||||
text.QuestFlags = (int)quest.Flags;
|
text.QuestFlags = (uint)quest.Flags;
|
||||||
text.QuestFlagsEx = (int)quest.FlagsEx;
|
text.QuestFlagsEx = (uint)quest.FlagsEx;
|
||||||
text.Repeatable = quest.IsRepeatable();
|
text.Repeatable = quest.IsRepeatable();
|
||||||
|
|
||||||
text.QuestTitle = quest.LogTitle;
|
text.QuestTitle = quest.LogTitle;
|
||||||
|
|||||||
@@ -1865,13 +1865,12 @@ namespace Game
|
|||||||
creature.ModExperience = fields.Read<float>(68);
|
creature.ModExperience = fields.Read<float>(68);
|
||||||
creature.RacialLeader = fields.Read<bool>(69);
|
creature.RacialLeader = fields.Read<bool>(69);
|
||||||
creature.MovementId = fields.Read<uint>(70);
|
creature.MovementId = fields.Read<uint>(70);
|
||||||
creature.FadeRegionRadius = fields.Read<float>(71);
|
creature.WidgetSetID = fields.Read<int>(71);
|
||||||
creature.WidgetSetID = fields.Read<int>(72);
|
creature.WidgetSetUnitConditionID = fields.Read<int>(72);
|
||||||
creature.WidgetSetUnitConditionID = fields.Read<int>(73);
|
creature.RegenHealth = fields.Read<bool>(73);
|
||||||
creature.RegenHealth = fields.Read<bool>(74);
|
creature.MechanicImmuneMask = fields.Read<uint>(74);
|
||||||
creature.MechanicImmuneMask = fields.Read<uint>(75);
|
creature.FlagsExtra = (CreatureFlagsExtra)fields.Read<uint>(75);
|
||||||
creature.FlagsExtra = (CreatureFlagsExtra)fields.Read<uint>(76);
|
creature.ScriptID = GetScriptId(fields.Read<string>(76));
|
||||||
creature.ScriptID = GetScriptId(fields.Read<string>(77));
|
|
||||||
|
|
||||||
_creatureTemplateStorage.Add(entry, creature);
|
_creatureTemplateStorage.Add(entry, creature);
|
||||||
}
|
}
|
||||||
@@ -6133,6 +6132,7 @@ namespace Game
|
|||||||
info.stats[STAT_STAMINA] += (lvl > 32 ? 2 : (lvl > 4 ? 1 : 0));
|
info.stats[STAT_STAMINA] += (lvl > 32 ? 2 : (lvl > 4 ? 1 : 0));
|
||||||
info.stats[STAT_AGILITY] += (lvl > 38 ? 2 : (lvl > 8 && (lvl % 2) ? 1 : 0));
|
info.stats[STAT_AGILITY] += (lvl > 38 ? 2 : (lvl > 8 && (lvl % 2) ? 1 : 0));
|
||||||
info.stats[STAT_INTELLECT] += (lvl > 38 ? 3 : (lvl > 4 ? 1 : 0));
|
info.stats[STAT_INTELLECT] += (lvl > 38 ? 3 : (lvl > 4 ? 1 : 0));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6502,35 +6502,35 @@ namespace Game
|
|||||||
_exclusiveQuestGroups.Clear();
|
_exclusiveQuestGroups.Clear();
|
||||||
|
|
||||||
SQLResult result = DB.World.Query("SELECT " +
|
SQLResult result = DB.World.Query("SELECT " +
|
||||||
//0 1 2 3 4 5 6 7 8 9 10 11 12
|
//0 1 2 3 4 5 6 7 8 9
|
||||||
"ID, QuestType, QuestLevel, ScalingFactionGroup, MaxScalingLevel, QuestPackageID, MinLevel, QuestSortID, QuestInfoID, SuggestedGroupNum, RewardNextQuest, RewardXPDifficulty, RewardXPMultiplier, " +
|
"ID, QuestType, QuestPackageID, ContentTuningID, QuestSortID, QuestInfoID, SuggestedGroupNum, RewardNextQuest, RewardXPDifficulty, RewardXPMultiplier, " +
|
||||||
//13 14 15 16 17 18 19 20 21 22 23
|
//10 11 12 13 14 15 16 17
|
||||||
"RewardMoney, RewardMoneyDifficulty, RewardMoneyMultiplier, RewardBonusMoney, RewardDisplaySpell1, RewardDisplaySpell2, RewardDisplaySpell3, RewardSpell, RewardHonor, RewardKillHonor, StartItem, " +
|
"RewardMoney, RewardMoneyDifficulty, RewardMoneyMultiplier, RewardBonusMoney, RewardSpell, RewardHonor, RewardKillHonor, StartItem, " +
|
||||||
//24 25 26 27 28 29
|
//18 19 20 21 22 23
|
||||||
"RewardArtifactXPDifficulty, RewardArtifactXPMultiplier, RewardArtifactCategoryID, Flags, FlagsEx, FlagsEx2, " +
|
"RewardArtifactXPDifficulty, RewardArtifactXPMultiplier, RewardArtifactCategoryID, Flags, FlagsEx, FlagsEx2, " +
|
||||||
//30 31 32 33 34 35 36 37
|
//24 25 26 27 28 29 30 31
|
||||||
"RewardItem1, RewardAmount1, ItemDrop1, ItemDropQuantity1, RewardItem2, RewardAmount2, ItemDrop2, ItemDropQuantity2, " +
|
"RewardItem1, RewardAmount1, ItemDrop1, ItemDropQuantity1, RewardItem2, RewardAmount2, ItemDrop2, ItemDropQuantity2, " +
|
||||||
//38 39 40 41 42 43 44 45
|
//32 33 34 35 36 37 38 39
|
||||||
"RewardItem3, RewardAmount3, ItemDrop3, ItemDropQuantity3, RewardItem4, RewardAmount4, ItemDrop4, ItemDropQuantity4, " +
|
"RewardItem3, RewardAmount3, ItemDrop3, ItemDropQuantity3, RewardItem4, RewardAmount4, ItemDrop4, ItemDropQuantity4, " +
|
||||||
//46 47 48 49 50 51
|
//40 41 42 43 44 45
|
||||||
"RewardChoiceItemID1, RewardChoiceItemQuantity1, RewardChoiceItemDisplayID1, RewardChoiceItemID2, RewardChoiceItemQuantity2, RewardChoiceItemDisplayID2, " +
|
"RewardChoiceItemID1, RewardChoiceItemQuantity1, RewardChoiceItemDisplayID1, RewardChoiceItemID2, RewardChoiceItemQuantity2, RewardChoiceItemDisplayID2, " +
|
||||||
//52 53 54 55 56 57
|
//46 47 48 49 50 51
|
||||||
"RewardChoiceItemID3, RewardChoiceItemQuantity3, RewardChoiceItemDisplayID3, RewardChoiceItemID4, RewardChoiceItemQuantity4, RewardChoiceItemDisplayID4, " +
|
"RewardChoiceItemID3, RewardChoiceItemQuantity3, RewardChoiceItemDisplayID3, RewardChoiceItemID4, RewardChoiceItemQuantity4, RewardChoiceItemDisplayID4, " +
|
||||||
//58 59 60 61 62 63
|
//52 53 54 55 56 57
|
||||||
"RewardChoiceItemID5, RewardChoiceItemQuantity5, RewardChoiceItemDisplayID5, RewardChoiceItemID6, RewardChoiceItemQuantity6, RewardChoiceItemDisplayID6, " +
|
"RewardChoiceItemID5, RewardChoiceItemQuantity5, RewardChoiceItemDisplayID5, RewardChoiceItemID6, RewardChoiceItemQuantity6, RewardChoiceItemDisplayID6, " +
|
||||||
//64 65 66 67 68 69 70 71 72 73 74
|
//58 59 60 61 62 63 64 65 66 67 68
|
||||||
"POIContinent, POIx, POIy, POIPriority, RewardTitle, RewardArenaPoints, RewardSkillLineID, RewardNumSkillUps, PortraitGiver, PortraitGiverMount, PortraitTurnIn, " +
|
"POIContinent, POIx, POIy, POIPriority, RewardTitle, RewardArenaPoints, RewardSkillLineID, RewardNumSkillUps, PortraitGiver, PortraitGiverMount, PortraitTurnIn, " +
|
||||||
//75 76 77 78 79 80 81 82
|
//69 70 71 72 73 74 75 76
|
||||||
"RewardFactionID1, RewardFactionValue1, RewardFactionOverride1, RewardFactionCapIn1, RewardFactionID2, RewardFactionValue2, RewardFactionOverride2, RewardFactionCapIn2, " +
|
"RewardFactionID1, RewardFactionValue1, RewardFactionOverride1, RewardFactionCapIn1, RewardFactionID2, RewardFactionValue2, RewardFactionOverride2, RewardFactionCapIn2, " +
|
||||||
//83 84 85 86 87 88 89 90
|
//77 78 79 80 81 82 83 84
|
||||||
"RewardFactionID3, RewardFactionValue3, RewardFactionOverride3, RewardFactionCapIn3, RewardFactionID4, RewardFactionValue4, RewardFactionOverride4, RewardFactionCapIn4, " +
|
"RewardFactionID3, RewardFactionValue3, RewardFactionOverride3, RewardFactionCapIn3, RewardFactionID4, RewardFactionValue4, RewardFactionOverride4, RewardFactionCapIn4, " +
|
||||||
//91 92 93 94 95
|
//85 86 87 88 89
|
||||||
"RewardFactionID5, RewardFactionValue5, RewardFactionOverride5, RewardFactionCapIn5, RewardFactionFlags, " +
|
"RewardFactionID5, RewardFactionValue5, RewardFactionOverride5, RewardFactionCapIn5, RewardFactionFlags, " +
|
||||||
//96 97 98 99 100 101 102 103
|
//90 91 92 93 94 95 96 97
|
||||||
"RewardCurrencyID1, RewardCurrencyQty1, RewardCurrencyID2, RewardCurrencyQty2, RewardCurrencyID3, RewardCurrencyQty3, RewardCurrencyID4, RewardCurrencyQty4, " +
|
"RewardCurrencyID1, RewardCurrencyQty1, RewardCurrencyID2, RewardCurrencyQty2, RewardCurrencyID3, RewardCurrencyQty3, RewardCurrencyID4, RewardCurrencyQty4, " +
|
||||||
//104 105 106 107 108 109 110 111 112
|
//98 99 100 101 102 103 104 105 106
|
||||||
"AcceptedSoundKitID, CompleteSoundKitID, AreaGroupID, TimeAllowed, AllowableRaces, TreasurePickerID, Expansion, ManagedWorldStateID, QuestSessionBonus, " +
|
"AcceptedSoundKitID, CompleteSoundKitID, AreaGroupID, TimeAllowed, AllowableRaces, TreasurePickerID, Expansion, ManagedWorldStateID, QuestSessionBonus, " +
|
||||||
//113 114 115 116 117 118 119 120 121
|
//107 108 109 110 111 112 113 114 115
|
||||||
"LogTitle, LogDescription, QuestDescription, AreaDescription, PortraitGiverText, PortraitGiverName, PortraitTurnInText, PortraitTurnInName, QuestCompletionLog" +
|
"LogTitle, LogDescription, QuestDescription, AreaDescription, PortraitGiverText, PortraitGiverName, PortraitTurnInText, PortraitTurnInName, QuestCompletionLog" +
|
||||||
" FROM quest_template");
|
" FROM quest_template");
|
||||||
|
|
||||||
@@ -6550,6 +6550,51 @@ namespace Game
|
|||||||
}
|
}
|
||||||
while (result.NextRow());
|
while (result.NextRow());
|
||||||
|
|
||||||
|
|
||||||
|
// Load `quest_reward_choice_items`
|
||||||
|
// 0 1 2 3 4 5 6
|
||||||
|
result = DB.World.Query("SELECT QuestID, Type1, Type2, Type3, Type4, Type5, Type6 FROM quest_reward_choice_items");
|
||||||
|
if (result.IsEmpty())
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.ServerLoading, "Loaded 0 quest reward choice items. DB table `quest_reward_choice_items` is empty.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
uint questId = result.Read<uint>(0);
|
||||||
|
|
||||||
|
var quest = _questTemplates.LookupByKey(questId);
|
||||||
|
if (quest != null)
|
||||||
|
quest.LoadRewardChoiceItems(result.GetFields());
|
||||||
|
else
|
||||||
|
Log.outError(LogFilter.Sql, $"Table `quest_reward_choice_items` has data for quest {questId} but such quest does not exist");
|
||||||
|
} while (result.NextRow());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Load `quest_reward_display_spell`
|
||||||
|
// 0 1 2
|
||||||
|
result = DB.World.Query("SELECT QuestID, SpellID, PlayerConditionID FROM quest_reward_display_spell ORDER BY QuestID ASC, Idx ASC");
|
||||||
|
if (result.IsEmpty())
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.ServerLoading, "Loaded 0 quest reward display spells. DB table `quest_reward_display_spell` is empty.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
uint questId = result.Read<uint>(0);
|
||||||
|
|
||||||
|
var quest = _questTemplates.LookupByKey(questId);
|
||||||
|
if (quest != null)
|
||||||
|
quest.LoadRewardDisplaySpell(result.GetFields());
|
||||||
|
else
|
||||||
|
Log.outError(LogFilter.Sql, $"Table `quest_reward_display_spell` has data for quest {questId} but such quest does not exist");
|
||||||
|
} while (result.NextRow());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Load `quest_details`
|
// Load `quest_details`
|
||||||
// 0 1 2 3 4 5 6 7 8
|
// 0 1 2 3 4 5 6 7 8
|
||||||
result = DB.World.Query("SELECT ID, Emote1, Emote2, Emote3, Emote4, EmoteDelay1, EmoteDelay2, EmoteDelay3, EmoteDelay4 FROM quest_details");
|
result = DB.World.Query("SELECT ID, Emote1, Emote2, Emote3, Emote4, EmoteDelay1, EmoteDelay2, EmoteDelay3, EmoteDelay4 FROM quest_details");
|
||||||
@@ -6639,7 +6684,7 @@ namespace Game
|
|||||||
} while (result.NextRow());
|
} while (result.NextRow());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load `quest_objectives`
|
// Load `quest_mail_sender`
|
||||||
// 0 1
|
// 0 1
|
||||||
result = DB.World.Query("SELECT QuestId, RewardMailSenderEntry FROM quest_mail_sender");
|
result = DB.World.Query("SELECT QuestId, RewardMailSenderEntry FROM quest_mail_sender");
|
||||||
if (result.IsEmpty())
|
if (result.IsEmpty())
|
||||||
@@ -6785,11 +6830,8 @@ namespace Game
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qinfo.MinLevel == -1 || qinfo.MinLevel > SharedConst.DefaultMaxLevel)
|
if (qinfo.ContentTuningId != 0 && !CliDB.ContentTuningStorage.ContainsKey(qinfo.ContentTuningId))
|
||||||
{
|
Log.outError(LogFilter.Sql, $"Quest {qinfo.Id} has `ContentTuningID` = {qinfo.ContentTuningId} but content tuning with this id does not exist.");
|
||||||
Log.outError(LogFilter.Sql, "Quest {0} should be disabled because `MinLevel` = {1}", qinfo.Id, qinfo.MinLevel);
|
|
||||||
// no changes needed, sending -1 in SMSGQUESTQUERYRESPONSE is valid
|
|
||||||
}
|
|
||||||
|
|
||||||
// client quest log visual (area case)
|
// client quest log visual (area case)
|
||||||
if (qinfo.QuestSortID > 0)
|
if (qinfo.QuestSortID > 0)
|
||||||
@@ -7073,24 +7115,34 @@ namespace Game
|
|||||||
var id = qinfo.RewardChoiceItemId[j];
|
var id = qinfo.RewardChoiceItemId[j];
|
||||||
if (id != 0)
|
if (id != 0)
|
||||||
{
|
{
|
||||||
if (Global.ObjectMgr.GetItemTemplate(id) == null)
|
switch (qinfo.RewardChoiceItemType[j])
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, "Quest {0} has `RewardChoiceItemId{1}` = {2} but item with entry {2} does not exist, quest will not reward this item.",
|
case LootItemType.Item:
|
||||||
qinfo.Id, j + 1, id);
|
if (Global.ObjectMgr.GetItemTemplate(id) == null)
|
||||||
qinfo.RewardChoiceItemId[j] = 0; // no changes, quest will not reward this
|
{
|
||||||
|
Log.outError(LogFilter.Sql, $"Quest {qinfo.Id} has `RewardChoiceItemId{j + 1}` = {id} but item with entry {id} does not exist, quest will not reward this item.");
|
||||||
|
qinfo.RewardChoiceItemId[j] = 0; // no changes, quest will not reward this
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LootItemType.Currency:
|
||||||
|
if (!CliDB.CurrencyTypesStorage.HasRecord(id))
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.Sql, $"Quest {qinfo.Id} has `RewardChoiceItemId{j + 1}` = {id} but currency with id {id} does not exist, quest will not reward this currency.");
|
||||||
|
qinfo.RewardChoiceItemId[j] = 0; // no changes, quest will not reward this
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Log.outError(LogFilter.Sql, $"Quest {qinfo.Id} has `RewardChoiceItemType{j + 1}` = {qinfo.RewardChoiceItemType[j]} but it is not a valid item type, reward removed.");
|
||||||
|
qinfo.RewardChoiceItemId[j] = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qinfo.RewardChoiceItemCount[j] == 0)
|
if (qinfo.RewardChoiceItemCount[j] == 0)
|
||||||
{
|
Log.outError(LogFilter.Sql, $"Quest {qinfo.Id} has `RewardChoiceItemId{j + 1}` = {id} but `RewardChoiceItemCount{j + 1}` = 0, quest can't be done.");
|
||||||
Log.outError(LogFilter.Sql, "Quest {0} has `RewardChoiceItemId{1}` = {2} but `RewardChoiceItemCount{1}` = 0, quest can't be done.",
|
|
||||||
qinfo.Id, j + 1, id);
|
|
||||||
// no changes, quest can't be done
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (qinfo.RewardChoiceItemCount[j] > 0)
|
else if (qinfo.RewardChoiceItemCount[j] > 0)
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, "Quest {0} has `RewardChoiceItemId{1}` = 0 but `RewardChoiceItemCount{1}` = {3}.",
|
Log.outError(LogFilter.Sql, $"Quest {qinfo.Id} has `RewardChoiceItemId{j + 1}` = 0 but `RewardChoiceItemCount{j + 1}` = {qinfo.RewardChoiceItemCount[j]}.");
|
||||||
qinfo.Id, j + 1, qinfo.RewardChoiceItemCount[j]);
|
|
||||||
// no changes, quest ignore this data
|
// no changes, quest ignore this data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7146,26 +7198,6 @@ namespace Game
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint i = 0; i < SharedConst.QuestRewardDisplaySpellCount; ++i)
|
|
||||||
{
|
|
||||||
if (qinfo.RewardDisplaySpell[i] != 0)
|
|
||||||
{
|
|
||||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(qinfo.RewardSpell, Difficulty.None);
|
|
||||||
if (spellInfo == null)
|
|
||||||
{
|
|
||||||
Log.outError(LogFilter.Sql, "Quest {0} has `RewardSpell` = {1} but spell {2} does not exist, spell removed as display reward.",
|
|
||||||
qinfo.Id, qinfo.RewardSpell, qinfo.RewardSpell);
|
|
||||||
qinfo.RewardDisplaySpell[i] = 0; // no spell reward will display for this quest
|
|
||||||
}
|
|
||||||
else if (!Global.SpellMgr.IsSpellValid(spellInfo))
|
|
||||||
{
|
|
||||||
Log.outError(LogFilter.Sql, "Quest {0} has `RewardSpell` = {1} but spell {2} is broken, quest will not have a spell reward.",
|
|
||||||
qinfo.Id, qinfo.RewardSpell, qinfo.RewardSpell);
|
|
||||||
qinfo.RewardDisplaySpell[i] = 0; // no spell reward will display for this quest
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (qinfo.RewardSpell > 0)
|
if (qinfo.RewardSpell > 0)
|
||||||
{
|
{
|
||||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(qinfo.RewardSpell, Difficulty.None);
|
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(qinfo.RewardSpell, Difficulty.None);
|
||||||
@@ -7485,33 +7517,33 @@ namespace Game
|
|||||||
|
|
||||||
uint count = 0;
|
uint count = 0;
|
||||||
|
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
||||||
SQLResult result = DB.World.Query("SELECT QuestID, BlobIndex, Idx1, ObjectiveIndex, QuestObjectiveID, QuestObjectID, MapID, UiMapID, Priority, Flags, WorldEffectID, PlayerConditionID, SpawnTrackingID, AlwaysAllowMergingBlobs FROM quest_poi order by QuestID, Idx1");
|
SQLResult result = DB.World.Query("SELECT QuestID, BlobIndex, Idx1, ObjectiveIndex, QuestObjectiveID, QuestObjectID, MapID, UiMapID, Priority, Flags, WorldEffectID, PlayerConditionID, NavigationPlayerConditionID, SpawnTrackingID, AlwaysAllowMergingBlobs FROM quest_poi order by QuestID, Idx1");
|
||||||
if (result.IsEmpty())
|
if (result.IsEmpty())
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.ServerLoading, "Loaded 0 quest POI definitions. DB table `quest_poi` is empty.");
|
Log.outError(LogFilter.ServerLoading, "Loaded 0 quest POI definitions. DB table `quest_poi` is empty.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0 1 2 3
|
Dictionary<uint, MultiMap<int, QuestPOIBlobPoint>> allPoints = new Dictionary<uint, MultiMap<int, QuestPOIBlobPoint>>();
|
||||||
SQLResult points = DB.World.Query("SELECT QuestID, Idx1, X, Y FROM quest_poi_points ORDER BY QuestID DESC, Idx1, Idx2");
|
|
||||||
Dictionary<uint, MultiMap<int, QuestPOIBlobPoint>> POIs = new Dictionary<uint, MultiMap<int, QuestPOIBlobPoint>>();
|
|
||||||
|
|
||||||
if (!points.IsEmpty())
|
// 0 1 2 3 4
|
||||||
|
SQLResult pointsResult = DB.World.Query("SELECT QuestID, Idx1, X, Y, Z FROM quest_poi_points ORDER BY QuestID DESC, Idx1, Idx2");
|
||||||
|
if (!pointsResult.IsEmpty())
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
uint questId = points.Read<uint>(0);
|
uint questId = pointsResult.Read<uint>(0);
|
||||||
int Idx1 = points.Read<int>(1);
|
int Idx1 = pointsResult.Read<int>(1);
|
||||||
int x = points.Read<int>(2);
|
int x = pointsResult.Read<int>(2);
|
||||||
int y = points.Read<int>(3);
|
int y = pointsResult.Read<int>(3);
|
||||||
|
int z = pointsResult.Read<int>(4);
|
||||||
|
|
||||||
if (!POIs.ContainsKey(questId))
|
if (!allPoints.ContainsKey(questId))
|
||||||
POIs[questId] = new MultiMap<int, QuestPOIBlobPoint>();
|
allPoints[questId] = new MultiMap<int, QuestPOIBlobPoint>();
|
||||||
|
|
||||||
QuestPOIBlobPoint point = new QuestPOIBlobPoint(x, y);
|
allPoints[questId].Add(Idx1, new QuestPOIBlobPoint(x, y, z));
|
||||||
POIs[questId].Add(Idx1, point);
|
} while (pointsResult.NextRow());
|
||||||
} while (points.NextRow());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
@@ -7528,25 +7560,32 @@ namespace Game
|
|||||||
int flags = result.Read<int>(9);
|
int flags = result.Read<int>(9);
|
||||||
int worldEffectID = result.Read<int>(10);
|
int worldEffectID = result.Read<int>(10);
|
||||||
int playerConditionID = result.Read<int>(11);
|
int playerConditionID = result.Read<int>(11);
|
||||||
int spawnTrackingID = result.Read<int>(12);
|
int navigationPlayerConditionID = result.Read<int>(12);
|
||||||
bool alwaysAllowMergingBlobs = result.Read<bool>(13);
|
int spawnTrackingID = result.Read<int>(13);
|
||||||
|
bool alwaysAllowMergingBlobs = result.Read<bool>(14);
|
||||||
|
|
||||||
if (Global.ObjectMgr.GetQuestTemplate(questID) == null)
|
if (Global.ObjectMgr.GetQuestTemplate(questID) == null)
|
||||||
Log.outError(LogFilter.Sql, "`quest_poi` quest id ({0}) Idx1 ({1}) does not exist in `quest_template`", questID, idx1);
|
Log.outError(LogFilter.Sql, $"`quest_poi` quest id ({questID}) Idx1 ({idx1}) does not exist in `quest_template`");
|
||||||
|
|
||||||
if (!POIs.ContainsKey(questID) || !POIs[questID].ContainsKey(idx1))
|
var blobs = allPoints.LookupByKey(questID);
|
||||||
|
if (blobs != null)
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, "Table quest_poi references unknown quest points for quest {0} POI id {1}", questID, blobIndex);
|
var points = blobs.LookupByKey(idx1);
|
||||||
continue;
|
if (!points.Empty())
|
||||||
|
{
|
||||||
|
if (!_questPOIStorage.ContainsKey(questID))
|
||||||
|
_questPOIStorage[questID] = new QuestPOIData(questID);
|
||||||
|
|
||||||
|
QuestPOIData poiData = _questPOIStorage[questID];
|
||||||
|
poiData.QuestID = questID;
|
||||||
|
poiData.Blobs.Add(new QuestPOIBlobData(blobIndex, objectiveIndex, questObjectiveID, questObjectID, mapID, uiMapId, priority, flags,
|
||||||
|
worldEffectID, playerConditionID, navigationPlayerConditionID, spawnTrackingID, points, alwaysAllowMergingBlobs));
|
||||||
|
++count;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Log.outError(LogFilter.Sql, $"Table quest_poi references unknown quest points for quest {questID} POI id {blobIndex}");
|
||||||
|
|
||||||
if (!_questPOIStorage.ContainsKey(questID))
|
|
||||||
_questPOIStorage[questID] = new QuestPOIData(questID);
|
|
||||||
|
|
||||||
QuestPOIData poiData = _questPOIStorage[questID];
|
|
||||||
poiData.Blobs.Add(new QuestPOIBlobData(blobIndex, objectiveIndex, questObjectiveID, questObjectID, mapID, uiMapId, priority, flags, worldEffectID, playerConditionID, spawnTrackingID, POIs[questID][idx1], alwaysAllowMergingBlobs));
|
|
||||||
|
|
||||||
++count;
|
|
||||||
} while (result.NextRow());
|
} while (result.NextRow());
|
||||||
|
|
||||||
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} quest POI definitions in {1} ms", count, Time.GetMSTimeDiffToNow(oldMSTime));
|
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} quest POI definitions in {1} ms", count, Time.GetMSTimeDiffToNow(oldMSTime));
|
||||||
@@ -9116,6 +9155,8 @@ namespace Game
|
|||||||
uint itemRewardCount = 0;
|
uint itemRewardCount = 0;
|
||||||
uint currencyRewardCount = 0;
|
uint currencyRewardCount = 0;
|
||||||
uint factionRewardCount = 0;
|
uint factionRewardCount = 0;
|
||||||
|
uint itemChoiceRewardCount = 0;
|
||||||
|
uint mawPowersCount = 0;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@@ -9131,7 +9172,11 @@ namespace Game
|
|||||||
|
|
||||||
} while (choiceResult.NextRow());
|
} while (choiceResult.NextRow());
|
||||||
|
|
||||||
SQLResult responses = DB.World.Query("SELECT ChoiceId, ResponseId, ChoiceArtFileId, Flags, WidgetSetID, UiTextureAtlasElementID, SoundKitID, GroupID, Answer, Header, SubHeader, ButtonTemplate, Description, Confirmation, RewardQuestID FROM playerchoice_response ORDER BY `Index` ASC");
|
// 0 1 2 3 4 5
|
||||||
|
SQLResult responses = DB.World.Query("SELECT ChoiceId, ResponseId, ResponseIdentifier, ChoiceArtFileId, Flags, WidgetSetID, " +
|
||||||
|
//6 7 8 9 10 11 12 13 14 15 16
|
||||||
|
"UiTextureAtlasElementID, SoundKitID, GroupID, UiTextureKitID, Answer, Header, SubHeader, ButtonTemplate, Description, Confirmation, RewardQuestID " +
|
||||||
|
"FROM playerchoice_response ORDER BY `Index` ASC");
|
||||||
if (!responses.IsEmpty())
|
if (!responses.IsEmpty())
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
@@ -9149,20 +9194,23 @@ namespace Game
|
|||||||
PlayerChoiceResponse response = new PlayerChoiceResponse();
|
PlayerChoiceResponse response = new PlayerChoiceResponse();
|
||||||
|
|
||||||
response.ResponseId = responseId;
|
response.ResponseId = responseId;
|
||||||
response.ChoiceArtFileId = responses.Read<int>(2);
|
response.ResponseIdentifier = responses.Read<ushort>(2);
|
||||||
response.Flags = responses.Read<int>(3);
|
response.ChoiceArtFileId = responses.Read<int>(3);
|
||||||
response.WidgetSetID = responses.Read<uint>(4);
|
response.Flags = responses.Read<int>(4);
|
||||||
response.UiTextureAtlasElementID = responses.Read<uint>(5);
|
response.WidgetSetID = responses.Read<uint>(5);
|
||||||
response.SoundKitID = responses.Read<uint>(6);
|
response.UiTextureAtlasElementID = responses.Read<uint>(6);
|
||||||
response.GroupID = responses.Read<byte>(7);
|
response.SoundKitID = responses.Read<uint>(7);
|
||||||
response.Answer = responses.Read<string>(8);
|
response.GroupID = responses.Read<byte>(8);
|
||||||
response.Header = responses.Read<string>(9);
|
response.UiTextureKitID = responses.Read<int>(9);
|
||||||
response.SubHeader = responses.Read<string>(10);
|
response.Answer = responses.Read<string>(10);
|
||||||
response.ButtonTooltip = responses.Read<string>(11);
|
response.Header = responses.Read<string>(11);
|
||||||
response.Description = responses.Read<string>(12);
|
response.SubHeader = responses.Read<string>(12);
|
||||||
response.Confirmation = responses.Read<string>(13);
|
response.ButtonTooltip = responses.Read<string>(13);
|
||||||
if (!responses.IsNull(14))
|
response.Description = responses.Read<string>(14);
|
||||||
response.RewardQuestID.Set(responses.Read<uint>(14));
|
response.Confirmation = responses.Read<string>(15);
|
||||||
|
if (!responses.IsNull(16))
|
||||||
|
response.RewardQuestID.Set(responses.Read<uint>(16));
|
||||||
|
|
||||||
++responseCount;
|
++responseCount;
|
||||||
|
|
||||||
choice.Responses[responseId] = response;
|
choice.Responses[responseId] = response;
|
||||||
@@ -9199,7 +9247,6 @@ namespace Game
|
|||||||
reward.HonorPointCount = rewards.Read<uint>(7);
|
reward.HonorPointCount = rewards.Read<uint>(7);
|
||||||
reward.Money = rewards.Read<ulong>(8);
|
reward.Money = rewards.Read<ulong>(8);
|
||||||
reward.Xp = rewards.Read<uint>(9);
|
reward.Xp = rewards.Read<uint>(9);
|
||||||
++rewardCount;
|
|
||||||
|
|
||||||
if (reward.TitleId != 0 && !CliDB.CharTitlesStorage.ContainsKey(reward.TitleId))
|
if (reward.TitleId != 0 && !CliDB.CharTitlesStorage.ContainsKey(reward.TitleId))
|
||||||
{
|
{
|
||||||
@@ -9221,6 +9268,7 @@ namespace Game
|
|||||||
}
|
}
|
||||||
|
|
||||||
choice.Responses[responseId].Reward.Set(reward);
|
choice.Responses[responseId].Reward.Set(reward);
|
||||||
|
++rewardCount;
|
||||||
|
|
||||||
} while (rewards.NextRow());
|
} while (rewards.NextRow());
|
||||||
}
|
}
|
||||||
@@ -9269,8 +9317,8 @@ namespace Game
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
itemRewardCount++;
|
|
||||||
response.Reward.Value.Items.Add(new PlayerChoiceResponseRewardItem(itemId, bonusListIds, quantity));
|
response.Reward.Value.Items.Add(new PlayerChoiceResponseRewardItem(itemId, bonusListIds, quantity));
|
||||||
|
itemRewardCount++;
|
||||||
|
|
||||||
} while (rewardItem.NextRow());
|
} while (rewardItem.NextRow());
|
||||||
}
|
}
|
||||||
@@ -9311,8 +9359,8 @@ namespace Game
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
currencyRewardCount++;
|
|
||||||
response.Reward.Value.Currency.Add(new PlayerChoiceResponseRewardEntry(currencyId, quantity));
|
response.Reward.Value.Currency.Add(new PlayerChoiceResponseRewardEntry(currencyId, quantity));
|
||||||
|
currencyRewardCount++;
|
||||||
|
|
||||||
} while (rewardCurrency.NextRow());
|
} while (rewardCurrency.NextRow());
|
||||||
}
|
}
|
||||||
@@ -9353,14 +9401,96 @@ namespace Game
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
factionRewardCount++;
|
|
||||||
response.Reward.Value.Faction.Add(new PlayerChoiceResponseRewardEntry(factionId, quantity));
|
response.Reward.Value.Faction.Add(new PlayerChoiceResponseRewardEntry(factionId, quantity));
|
||||||
|
factionRewardCount++;
|
||||||
|
|
||||||
} while (rewardFaction.NextRow());
|
} while (rewardFaction.NextRow());
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.outInfo(LogFilter.ServerLoading, $"Loaded {_playerChoices.Count} player choices, {responseCount} responses, {rewardCount} rewards, {itemRewardCount} item rewards, {currencyRewardCount} " +
|
SQLResult rewardItems = DB.World.Query("SELECT ChoiceId, ResponseId, ItemId, BonusListIDs, Quantity FROM playerchoice_response_reward_item_choice ORDER BY `Index` ASC");
|
||||||
$"currency rewards and {factionRewardCount} faction rewards in {Time.GetMSTimeDiffToNow(oldMSTime)} ms.");
|
if (!rewardItems.IsEmpty())
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
int choiceId = rewardItems.Read<int>(0);
|
||||||
|
int responseId = rewardItems.Read<int>(1);
|
||||||
|
uint itemId = rewardItems.Read<uint>(2);
|
||||||
|
StringArray bonusListIDsTok = new StringArray(rewardItems.Read<string>(3), ' ');
|
||||||
|
List<int> bonusListIds = new List<int>();
|
||||||
|
foreach (string token in bonusListIDsTok)
|
||||||
|
bonusListIds.Add(int.Parse(token));
|
||||||
|
|
||||||
|
int quantity = rewardItems.Read<int>(4);
|
||||||
|
|
||||||
|
PlayerChoice choice = _playerChoices.LookupByKey(choiceId);
|
||||||
|
if (choice == null)
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.Sql, $"Table `playerchoice_response_reward_item_choice` references non-existing ChoiceId: {choiceId} (ResponseId: {responseId}), skipped");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var response = choice.Responses.Find(playerChoiceResponse => { return playerChoiceResponse.ResponseId == responseId; });
|
||||||
|
if (response == null)
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.Sql, $"Table `playerchoice_response_reward_item_choice` references non-existing ResponseId: {responseId} for ChoiceId {choiceId}, skipped");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!response.Reward.HasValue)
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.Sql, $"Table `playerchoice_response_reward_item_choice` references non-existing player choice reward for ChoiceId {choiceId}, ResponseId: {responseId}, skipped");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetItemTemplate(itemId) == null)
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.Sql, $"Table `playerchoice_response_reward_item_choice` references non-existing item {itemId} for ChoiceId {choiceId}, ResponseId: {responseId}, skipped");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
response.Reward.ItemChoices.Add(itemId, bonusListIds, quantity);
|
||||||
|
itemChoiceRewardCount++;
|
||||||
|
|
||||||
|
} while (rewards.NextRow());
|
||||||
|
}
|
||||||
|
|
||||||
|
SQLResult mawPowersResult = DB.World.Query("SELECT ChoiceId, ResponseId, TypeArtFileID, Rarity, RarityColor, SpellID, MaxStacks FROM playerchoice_response_maw_power");
|
||||||
|
if (!mawPowersResult.IsEmpty())
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
int choiceId = mawPowersResult.Read<int>(0);
|
||||||
|
int responseId = mawPowersResult.Read<int>(1);
|
||||||
|
|
||||||
|
PlayerChoice choice = _playerChoices.LookupByKey(choiceId);
|
||||||
|
if (choice == null)
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.Sql, $"Table `playerchoice_response_maw_power` references non-existing ChoiceId: {choiceId} (ResponseId: {responseId}), skipped");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var response = choice.Responses.Find(playerChoiceResponse => { return playerChoiceResponse.ResponseId == responseId; });
|
||||||
|
if (response == null)
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.Sql, "Table `playerchoice_response_maw_power` references non-existing ResponseId: {responseId} for ChoiceId {choiceId}, skipped");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerChoiceResponseMawPower mawPower = new PlayerChoiceResponseMawPower();
|
||||||
|
mawPower.TypeArtFileID = mawPowersResult.Read<int>(2);
|
||||||
|
mawPower.Rarity = mawPowersResult.Read<int>(3);
|
||||||
|
mawPower.RarityColor = mawPowersResult.Read<uint>(4);
|
||||||
|
mawPower.SpellID = mawPowersResult.Read<int>(5);
|
||||||
|
mawPower.MaxStacks = mawPowersResult.Read<int>(6);
|
||||||
|
response.MawPower.Add(mawPower);
|
||||||
|
|
||||||
|
++mawPowersCount;
|
||||||
|
|
||||||
|
} while (mawPowersResult.NextRow());
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.outInfo(LogFilter.ServerLoading, $"Loaded {_playerChoices.Count} player choices, {responseCount} responses, {rewardCount} rewards, {itemRewardCount} item rewards, " +
|
||||||
|
$"{currencyRewardCount} currency rewards, {factionRewardCount} faction rewards, {itemChoiceRewardCount} item choice rewards and {mawPowersCount} maw powers in {Time.GetMSTimeDiffToNow(oldMSTime)} ms.");
|
||||||
}
|
}
|
||||||
public void LoadPlayerChoicesLocale()
|
public void LoadPlayerChoicesLocale()
|
||||||
{
|
{
|
||||||
@@ -10506,7 +10636,7 @@ namespace Game
|
|||||||
public bool AlwaysAllowMergingBlobs;
|
public bool AlwaysAllowMergingBlobs;
|
||||||
|
|
||||||
public QuestPOIBlobData(int blobIndex, int objectiveIndex, int questObjectiveID, int questObjectID, int mapID, int uiMapID, int priority, int flags,
|
public QuestPOIBlobData(int blobIndex, int objectiveIndex, int questObjectiveID, int questObjectID, int mapID, int uiMapID, int priority, int flags,
|
||||||
int worldEffectID, int playerConditionID, int spawnTrackingID, List<QuestPOIBlobPoint> points, bool alwaysAllowMergingBlobs)
|
int worldEffectID, int playerConditionID, int navigationPlayerConditionID, int spawnTrackingID, List<QuestPOIBlobPoint> points, bool alwaysAllowMergingBlobs)
|
||||||
{
|
{
|
||||||
BlobIndex = blobIndex;
|
BlobIndex = blobIndex;
|
||||||
ObjectiveIndex = objectiveIndex;
|
ObjectiveIndex = objectiveIndex;
|
||||||
@@ -10518,6 +10648,7 @@ namespace Game
|
|||||||
Flags = flags;
|
Flags = flags;
|
||||||
WorldEffectID = worldEffectID;
|
WorldEffectID = worldEffectID;
|
||||||
PlayerConditionID = playerConditionID;
|
PlayerConditionID = playerConditionID;
|
||||||
|
NavigationPlayerConditionID = navigationPlayerConditionID;
|
||||||
SpawnTrackingID = spawnTrackingID;
|
SpawnTrackingID = spawnTrackingID;
|
||||||
Points = points;
|
Points = points;
|
||||||
AlwaysAllowMergingBlobs = alwaysAllowMergingBlobs;
|
AlwaysAllowMergingBlobs = alwaysAllowMergingBlobs;
|
||||||
@@ -11000,17 +11131,29 @@ namespace Game
|
|||||||
public List<PlayerChoiceResponseRewardItem> Items = new List<PlayerChoiceResponseRewardItem>();
|
public List<PlayerChoiceResponseRewardItem> Items = new List<PlayerChoiceResponseRewardItem>();
|
||||||
public List<PlayerChoiceResponseRewardEntry> Currency = new List<PlayerChoiceResponseRewardEntry>();
|
public List<PlayerChoiceResponseRewardEntry> Currency = new List<PlayerChoiceResponseRewardEntry>();
|
||||||
public List<PlayerChoiceResponseRewardEntry> Faction = new List<PlayerChoiceResponseRewardEntry>();
|
public List<PlayerChoiceResponseRewardEntry> Faction = new List<PlayerChoiceResponseRewardEntry>();
|
||||||
|
public List<PlayerChoiceResponseRewardItem> ItemChoices = new List<PlayerChoiceResponseRewardItem>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct PlayerChoiceResponseMawPower
|
||||||
|
{
|
||||||
|
public int TypeArtFileID;
|
||||||
|
public int Rarity;
|
||||||
|
public uint RarityColor;
|
||||||
|
public int SpellID;
|
||||||
|
public int MaxStacks;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PlayerChoiceResponse
|
public class PlayerChoiceResponse
|
||||||
{
|
{
|
||||||
public int ResponseId;
|
public int ResponseId;
|
||||||
|
public ushort ResponseIdentifier;
|
||||||
public int ChoiceArtFileId;
|
public int ChoiceArtFileId;
|
||||||
public int Flags;
|
public int Flags;
|
||||||
public uint WidgetSetID;
|
public uint WidgetSetID;
|
||||||
public uint UiTextureAtlasElementID;
|
public uint UiTextureAtlasElementID;
|
||||||
public uint SoundKitID;
|
public uint SoundKitID;
|
||||||
public byte GroupID;
|
public byte GroupID;
|
||||||
|
public int UiTextureKitID;
|
||||||
public string Answer;
|
public string Answer;
|
||||||
public string Header;
|
public string Header;
|
||||||
public string SubHeader;
|
public string SubHeader;
|
||||||
@@ -11019,6 +11162,7 @@ namespace Game
|
|||||||
public string Confirmation;
|
public string Confirmation;
|
||||||
public Optional<PlayerChoiceResponseReward> Reward;
|
public Optional<PlayerChoiceResponseReward> Reward;
|
||||||
public Optional<uint> RewardQuestID;
|
public Optional<uint> RewardQuestID;
|
||||||
|
public Optional<PlayerChoiceResponseMawPower> MawPower;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PlayerChoice
|
public class PlayerChoice
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ namespace Game
|
|||||||
foreach (var it in joinData.lockmap)
|
foreach (var it in joinData.lockmap)
|
||||||
{
|
{
|
||||||
var blackList = new LFGBlackListPkt();
|
var blackList = new LFGBlackListPkt();
|
||||||
blackList.PlayerGuid = it.Key;
|
blackList.PlayerGuid.Set(it.Key);
|
||||||
|
|
||||||
foreach (var lockInfo in it.Value)
|
foreach (var lockInfo in it.Value)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ namespace Game.Networking.Packets
|
|||||||
InstanceGroupSize = new Optional<uint>();
|
InstanceGroupSize = new Optional<uint>();
|
||||||
|
|
||||||
RestrictedAccountMaxLevel = new Optional<uint>();
|
RestrictedAccountMaxLevel = new Optional<uint>();
|
||||||
RestrictedAccountMaxMoney = new Optional<uint>();
|
RestrictedAccountMaxMoney = new Optional<ulong>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Write()
|
public override void Write()
|
||||||
|
|||||||
@@ -1261,7 +1261,7 @@ namespace Game.Networking.Packets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct MonsterSplineAnimTierTransition
|
public struct MonsterSplineAnimTierTransition
|
||||||
{
|
{
|
||||||
public int TierTransitionID;
|
public int TierTransitionID;
|
||||||
public uint StartTime;
|
public uint StartTime;
|
||||||
@@ -1277,7 +1277,7 @@ namespace Game.Networking.Packets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MonsterSplineUnknown901
|
public class MonsterSplineUnknown901
|
||||||
{
|
{
|
||||||
public Array<Inner> Data = new Array<Inner>(16);
|
public Array<Inner> Data = new Array<Inner>(16);
|
||||||
|
|
||||||
@@ -1303,13 +1303,13 @@ namespace Game.Networking.Packets
|
|||||||
|
|
||||||
public class TeleportLocation
|
public class TeleportLocation
|
||||||
{
|
{
|
||||||
public Vector4 Pos;
|
public Position Pos;
|
||||||
public int Unused901_1 = -1;
|
public int Unused901_1 = -1;
|
||||||
public int Unused901_2 = -1;
|
public int Unused901_2 = -1;
|
||||||
|
|
||||||
public void Write(WorldPacket data)
|
public void Write(WorldPacket data)
|
||||||
{
|
{
|
||||||
data.WriteVector4(Pos);
|
data.WriteXYZO(Pos);
|
||||||
data.WriteInt32(Unused901_1);
|
data.WriteInt32(Unused901_1);
|
||||||
data.WriteInt32(Unused901_2);
|
data.WriteInt32(Unused901_2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1006,7 +1006,7 @@ namespace Game.Networking.Packets
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class QuestRewards
|
public class QuestRewards
|
||||||
{
|
{
|
||||||
public uint ChoiceItemCount;
|
public uint ChoiceItemCount;
|
||||||
public uint ItemCount;
|
public uint ItemCount;
|
||||||
public uint Money;
|
public uint Money;
|
||||||
@@ -1016,20 +1016,20 @@ namespace Game.Networking.Packets
|
|||||||
public uint Honor;
|
public uint Honor;
|
||||||
public uint Title;
|
public uint Title;
|
||||||
public uint FactionFlags;
|
public uint FactionFlags;
|
||||||
public Array<int> SpellCompletionDisplayID = new Array<int>(SharedConst.QuestRewardDisplaySpellCount);
|
public int[] SpellCompletionDisplayID = new int[SharedConst.QuestRewardDisplaySpellCount];
|
||||||
public uint SpellCompletionID;
|
public uint SpellCompletionID;
|
||||||
public uint SkillLineID;
|
public uint SkillLineID;
|
||||||
public uint NumSkillUps;
|
public uint NumSkillUps;
|
||||||
public uint TreasurePickerID;
|
public uint TreasurePickerID;
|
||||||
public Array<QuestChoiceItem> ChoiceItems = new Array<QuestChoiceItem>(SharedConst.QuestRewardChoicesCount);
|
public QuestChoiceItem[] ChoiceItems = new QuestChoiceItem[SharedConst.QuestRewardChoicesCount];
|
||||||
public Array<uint> ItemID = new Array<uint>(SharedConst.QuestRewardItemCount);
|
public uint[] ItemID = new uint[SharedConst.QuestRewardItemCount];
|
||||||
public Array<uint> ItemQty = new Array<uint>(SharedConst.QuestRewardItemCount);
|
public uint[] ItemQty = new uint[SharedConst.QuestRewardItemCount];
|
||||||
public Array<uint> FactionID = new Array<uint>(SharedConst.QuestRewardReputationsCount);
|
public uint[] FactionID = new uint[SharedConst.QuestRewardReputationsCount];
|
||||||
public Array<int> FactionValue = new Array<int>(SharedConst.QuestRewardReputationsCount);
|
public int[] FactionValue = new int[SharedConst.QuestRewardReputationsCount];
|
||||||
public Array<int> FactionOverride = new Array<int>(SharedConst.QuestRewardReputationsCount);
|
public int[] FactionOverride = new int[SharedConst.QuestRewardReputationsCount];
|
||||||
public Array<int> FactionCapIn = new Array<int>(SharedConst.QuestRewardReputationsCount);
|
public int[] FactionCapIn = new int[SharedConst.QuestRewardReputationsCount];
|
||||||
public Array<uint> CurrencyID = new Array<uint>(SharedConst.QuestRewardCurrencyCount);
|
public uint[] CurrencyID = new uint[SharedConst.QuestRewardCurrencyCount];
|
||||||
public Array<uint> CurrencyQty = new Array<uint>(SharedConst.QuestRewardCurrencyCount);
|
public uint[] CurrencyQty = new uint[SharedConst.QuestRewardCurrencyCount];
|
||||||
public bool IsBoostSpell;
|
public bool IsBoostSpell;
|
||||||
|
|
||||||
public void Write(WorldPacket data)
|
public void Write(WorldPacket data)
|
||||||
|
|||||||
@@ -394,14 +394,25 @@ namespace Game.Networking.Packets
|
|||||||
public ObjectGuid CastID;
|
public ObjectGuid CastID;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CastFailed : ServerPacket
|
class CastFailedBase : ServerPacket
|
||||||
{
|
{
|
||||||
public ObjectGuid CastID;
|
public ObjectGuid CastID;
|
||||||
public int SpellID;
|
public int SpellID;
|
||||||
public SpellCastVisual Visual;
|
|
||||||
public SpellCastResult Reason;
|
public SpellCastResult Reason;
|
||||||
public int FailedArg1 = -1;
|
public int FailedArg1 = -1;
|
||||||
public int FailedArg2 = -1;
|
public int FailedArg2 = -1;
|
||||||
|
|
||||||
|
public CastFailedBase(ServerOpcodes opcode, ConnectionType connectionType) : base(opcode, connectionType) { }
|
||||||
|
|
||||||
|
public override void Write()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CastFailed : CastFailedBase
|
||||||
|
{
|
||||||
|
public SpellCastVisual Visual;
|
||||||
|
|
||||||
public CastFailed() : base(ServerOpcodes.CastFailed, ConnectionType.Instance) { }
|
public CastFailed() : base(ServerOpcodes.CastFailed, ConnectionType.Instance) { }
|
||||||
|
|
||||||
@@ -418,14 +429,8 @@ namespace Game.Networking.Packets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PetCastFailed : ServerPacket
|
class PetCastFailed : CastFailedBase
|
||||||
{
|
{
|
||||||
public ObjectGuid CastID;
|
|
||||||
public int SpellID;
|
|
||||||
public SpellCastResult Reason;
|
|
||||||
public int FailedArg1 = -1;
|
|
||||||
public int FailedArg2 = -1;
|
|
||||||
|
|
||||||
public PetCastFailed() : base(ServerOpcodes.PetCastFailed, ConnectionType.Instance) { }
|
public PetCastFailed() : base(ServerOpcodes.PetCastFailed, ConnectionType.Instance) { }
|
||||||
|
|
||||||
public override void Write()
|
public override void Write()
|
||||||
|
|||||||
+130
-81
@@ -32,43 +32,35 @@ namespace Game
|
|||||||
{
|
{
|
||||||
Id = fields.Read<uint>(0);
|
Id = fields.Read<uint>(0);
|
||||||
Type = (QuestType)fields.Read<byte>(1);
|
Type = (QuestType)fields.Read<byte>(1);
|
||||||
Level = fields.Read<int>(2);
|
PackageID = fields.Read<uint>(2);
|
||||||
ScalingFactionGroup = fields.Read<int>(3);
|
ContentTuningId = fields.Read<uint>(3);
|
||||||
|
QuestSortID = fields.Read<short>(4);
|
||||||
MaxScalingLevel = fields.Read<int>(4);
|
QuestInfoID = fields.Read<ushort>(5);
|
||||||
PackageID = fields.Read<uint>(5);
|
SuggestedPlayers = fields.Read<uint>(6);
|
||||||
MinLevel = fields.Read<int>(6);
|
NextQuestInChain = fields.Read<uint>(7);
|
||||||
QuestSortID = fields.Read<short>(7);
|
RewardXPDifficulty = fields.Read<uint>(8);
|
||||||
QuestInfoID = fields.Read<ushort>(8);
|
RewardXPMultiplier = fields.Read<float>(9);
|
||||||
SuggestedPlayers = fields.Read<uint>(9);
|
RewardMoney = fields.Read<int>(10);
|
||||||
NextQuestInChain = fields.Read<uint>(10);
|
RewardMoneyDifficulty = fields.Read<uint>(11);
|
||||||
RewardXPDifficulty = fields.Read<uint>(11);
|
RewardMoneyMultiplier = fields.Read<float>(12);
|
||||||
RewardXPMultiplier = fields.Read<float>(12);
|
RewardBonusMoney = fields.Read<uint>(13);
|
||||||
RewardMoney = fields.Read<int>(13);
|
RewardSpell = fields.Read<uint>(14);
|
||||||
RewardMoneyDifficulty = fields.Read<uint>(14);
|
RewardHonor = fields.Read<uint>(15);
|
||||||
RewardMoneyMultiplier = fields.Read<float>(15);
|
RewardKillHonor = fields.Read<uint>(16);
|
||||||
RewardBonusMoney = fields.Read<uint>(16);
|
SourceItemId = fields.Read<uint>(17);
|
||||||
|
RewardArtifactXPDifficulty = fields.Read<uint>(18);
|
||||||
for (int i = 0; i < SharedConst.QuestRewardDisplaySpellCount; ++i)
|
RewardArtifactXPMultiplier = fields.Read<float>(19);
|
||||||
RewardDisplaySpell[i] = fields.Read<uint>(17 + i);
|
RewardArtifactCategoryID = fields.Read<uint>(20);
|
||||||
|
Flags = (QuestFlags)fields.Read<uint>(21);
|
||||||
RewardSpell = fields.Read<uint>(20);
|
FlagsEx = (QuestFlagsEx)fields.Read<uint>(22);
|
||||||
RewardHonor = fields.Read<uint>(21);
|
FlagsEx2 = (QuestFlagsEx2)fields.Read<uint>(23);
|
||||||
RewardKillHonor = fields.Read<uint>(22);
|
|
||||||
SourceItemId = fields.Read<uint>(23);
|
|
||||||
RewardArtifactXPDifficulty = fields.Read<uint>(24);
|
|
||||||
RewardArtifactXPMultiplier = fields.Read<float>(25);
|
|
||||||
RewardArtifactCategoryID = fields.Read<uint>(26);
|
|
||||||
Flags = (QuestFlags)fields.Read<uint>(27);
|
|
||||||
FlagsEx = (QuestFlagsEx)fields.Read<uint>(28);
|
|
||||||
FlagsEx2 = (QuestFlagsEx2)fields.Read<uint>(29);
|
|
||||||
|
|
||||||
for (int i = 0; i < SharedConst.QuestItemDropCount; ++i)
|
for (int i = 0; i < SharedConst.QuestItemDropCount; ++i)
|
||||||
{
|
{
|
||||||
RewardItemId[i] = fields.Read<uint>(30 + i * 4);
|
RewardItemId[i] = fields.Read<uint>(24 + i * 4);
|
||||||
RewardItemCount[i] = fields.Read<uint>(31 + i * 4);
|
RewardItemCount[i] = fields.Read<uint>(25 + i * 4);
|
||||||
ItemDrop[i] = fields.Read<uint>(32 + i * 4);
|
ItemDrop[i] = fields.Read<uint>(26 + i * 4);
|
||||||
ItemDropQuantity[i] = fields.Read<uint>(33 + i * 4);
|
ItemDropQuantity[i] = fields.Read<uint>(27 + i * 4);
|
||||||
|
|
||||||
if (RewardItemId[i] != 0)
|
if (RewardItemId[i] != 0)
|
||||||
++_rewItemsCount;
|
++_rewItemsCount;
|
||||||
@@ -76,66 +68,92 @@ namespace Game
|
|||||||
|
|
||||||
for (int i = 0; i < SharedConst.QuestRewardChoicesCount; ++i)
|
for (int i = 0; i < SharedConst.QuestRewardChoicesCount; ++i)
|
||||||
{
|
{
|
||||||
RewardChoiceItemId[i] = fields.Read<uint>(46 + i * 3);
|
RewardChoiceItemId[i] = fields.Read<uint>(40 + i * 3);
|
||||||
RewardChoiceItemCount[i] = fields.Read<uint>(47 + i * 3);
|
RewardChoiceItemCount[i] = fields.Read<uint>(41 + i * 3);
|
||||||
RewardChoiceItemDisplayId[i] = fields.Read<uint>(48 + i * 3);
|
RewardChoiceItemDisplayId[i] = fields.Read<uint>(42 + i * 3);
|
||||||
|
|
||||||
if (RewardChoiceItemId[i] != 0)
|
if (RewardChoiceItemId[i] != 0)
|
||||||
++_rewChoiceItemsCount;
|
++_rewChoiceItemsCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
POIContinent = fields.Read<uint>(64);
|
POIContinent = fields.Read<uint>(58);
|
||||||
POIx = fields.Read<float>(65);
|
POIx = fields.Read<float>(59);
|
||||||
POIy = fields.Read<float>(66);
|
POIy = fields.Read<float>(60);
|
||||||
POIPriority = fields.Read<uint>(67);
|
POIPriority = fields.Read<uint>(61);
|
||||||
|
|
||||||
RewardTitleId = fields.Read<uint>(68);
|
RewardTitleId = fields.Read<uint>(62);
|
||||||
RewardArenaPoints = fields.Read<int>(69);
|
RewardArenaPoints = fields.Read<int>(63);
|
||||||
RewardSkillId = fields.Read<uint>(70);
|
RewardSkillId = fields.Read<uint>(64);
|
||||||
RewardSkillPoints = fields.Read<uint>(71);
|
RewardSkillPoints = fields.Read<uint>(65);
|
||||||
|
|
||||||
QuestGiverPortrait = fields.Read<uint>(72);
|
QuestGiverPortrait = fields.Read<uint>(66);
|
||||||
QuestGiverPortraitMount = fields.Read<uint>(73);
|
QuestGiverPortraitMount = fields.Read<uint>(67);
|
||||||
QuestTurnInPortrait = fields.Read<uint>(74);
|
QuestTurnInPortrait = fields.Read<uint>(68);
|
||||||
|
|
||||||
for (int i = 0; i < SharedConst.QuestRewardReputationsCount; ++i)
|
for (int i = 0; i < SharedConst.QuestRewardReputationsCount; ++i)
|
||||||
{
|
{
|
||||||
RewardFactionId[i] = fields.Read<uint>(75 + i * 4);
|
RewardFactionId[i] = fields.Read<uint>(69 + i * 4);
|
||||||
RewardFactionValue[i] = fields.Read<int>(76 + i * 4);
|
RewardFactionValue[i] = fields.Read<int>(70 + i * 4);
|
||||||
RewardFactionOverride[i] = fields.Read<int>(77 + i * 4);
|
RewardFactionOverride[i] = fields.Read<int>(71 + i * 4);
|
||||||
RewardFactionCapIn[i] = fields.Read<uint>(78 + i * 4);
|
RewardFactionCapIn[i] = fields.Read<uint>(72 + i * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
RewardReputationMask = fields.Read<uint>(95);
|
RewardReputationMask = fields.Read<uint>(89);
|
||||||
|
|
||||||
for (int i = 0; i < SharedConst.QuestRewardCurrencyCount; ++i)
|
for (int i = 0; i < SharedConst.QuestRewardCurrencyCount; ++i)
|
||||||
{
|
{
|
||||||
RewardCurrencyId[i] = fields.Read<uint>(96 + i * 2);
|
RewardCurrencyId[i] = fields.Read<uint>(90 + i * 2);
|
||||||
RewardCurrencyCount[i] = fields.Read<uint>(97 + i * 2);
|
RewardCurrencyCount[i] = fields.Read<uint>(91 + i * 2);
|
||||||
|
|
||||||
if (RewardCurrencyId[i] != 0)
|
if (RewardCurrencyId[i] != 0)
|
||||||
++_rewCurrencyCount;
|
++_rewCurrencyCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
SoundAccept = fields.Read<uint>(104);
|
SoundAccept = fields.Read<uint>(98);
|
||||||
SoundTurnIn = fields.Read<uint>(105);
|
SoundTurnIn = fields.Read<uint>(99);
|
||||||
AreaGroupID = fields.Read<uint>(106);
|
AreaGroupID = fields.Read<uint>(100);
|
||||||
LimitTime = fields.Read<uint>(107);
|
LimitTime = fields.Read<uint>(101);
|
||||||
AllowableRaces = (long)fields.Read<ulong>(108);
|
AllowableRaces = (long)fields.Read<ulong>(102);
|
||||||
TreasurePickerID = fields.Read<int>(109);
|
TreasurePickerID = fields.Read<int>(103);
|
||||||
Expansion = fields.Read<int>(110);
|
Expansion = fields.Read<int>(104);
|
||||||
ManagedWorldStateID = fields.Read<int>(111);
|
ManagedWorldStateID = fields.Read<int>(105);
|
||||||
QuestSessionBonus = fields.Read<int>(112);
|
QuestSessionBonus = fields.Read<int>(106);
|
||||||
|
|
||||||
LogTitle = fields.Read<string>(113);
|
LogTitle = fields.Read<string>(107);
|
||||||
LogDescription = fields.Read<string>(114);
|
LogDescription = fields.Read<string>(108);
|
||||||
QuestDescription = fields.Read<string>(115);
|
QuestDescription = fields.Read<string>(109);
|
||||||
AreaDescription = fields.Read<string>(116);
|
AreaDescription = fields.Read<string>(110);
|
||||||
PortraitGiverText = fields.Read<string>(117);
|
PortraitGiverText = fields.Read<string>(111);
|
||||||
PortraitGiverName = fields.Read<string>(118);
|
PortraitGiverName = fields.Read<string>(112);
|
||||||
PortraitTurnInText = fields.Read<string>(119);
|
PortraitTurnInText = fields.Read<string>(113);
|
||||||
PortraitTurnInName = fields.Read<string>(120);
|
PortraitTurnInName = fields.Read<string>(114);
|
||||||
QuestCompletionLog = fields.Read<string>(121);
|
QuestCompletionLog = fields.Read<string>(115);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadRewardDisplaySpell(SQLFields fields)
|
||||||
|
{
|
||||||
|
uint spellId = fields.Read<uint>(1);
|
||||||
|
uint playerConditionId = fields.Read<uint>(2);
|
||||||
|
|
||||||
|
if (!Global.SpellMgr.HasSpellInfo(spellId, Difficulty.None))
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.Sql, $"Table `quest_reward_display_spell` has non-existing Spell ({spellId}) set for quest {Id}. Skipped.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (playerConditionId != 0 && !CliDB.PlayerConditionStorage.ContainsKey(playerConditionId))
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.Sql, $"Table `quest_reward_display_spell` has non-existing PlayerCondition ({spellId}) set for quest {Id}. Set to 0.");
|
||||||
|
playerConditionId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
RewardDisplaySpell.Add(new QuestRewardDisplaySpell(spellId, playerConditionId));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadRewardChoiceItems(SQLFields fields)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < SharedConst.QuestRewardChoicesCount; ++i)
|
||||||
|
RewardChoiceItemType[i] = (LootItemType)fields.Read<byte>(1 + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadQuestDetails(SQLFields fields)
|
public void LoadQuestDetails(SQLFields fields)
|
||||||
@@ -310,9 +328,20 @@ namespace Game
|
|||||||
rewards.ArtifactCategoryID = RewardArtifactCategoryID;
|
rewards.ArtifactCategoryID = RewardArtifactCategoryID;
|
||||||
rewards.Title = RewardTitleId;
|
rewards.Title = RewardTitleId;
|
||||||
rewards.FactionFlags = RewardReputationMask;
|
rewards.FactionFlags = RewardReputationMask;
|
||||||
for (int i = 0; i < SharedConst.QuestRewardDisplaySpellCount; ++i)
|
|
||||||
rewards.SpellCompletionDisplayID[i] = (int)RewardDisplaySpell[i];
|
|
||||||
|
|
||||||
|
var displaySpellItr = rewards.SpellCompletionDisplayID.begin();
|
||||||
|
foreach (QuestRewardDisplaySpell displaySpell in RewardDisplaySpell)
|
||||||
|
{
|
||||||
|
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(displaySpell.PlayerConditionId);
|
||||||
|
if (playerCondition != null)
|
||||||
|
if (!ConditionManager.IsPlayerMeetingCondition(player, playerCondition))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
displaySpellItr = displaySpell.SpellId;
|
||||||
|
if (++displaySpellItr == null)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
rewards.SpellCompletionID = RewardSpell;
|
rewards.SpellCompletionID = RewardSpell;
|
||||||
rewards.SkillLineID = RewardSkillId;
|
rewards.SkillLineID = RewardSkillId;
|
||||||
rewards.NumSkillUps = RewardSkillPoints;
|
rewards.NumSkillUps = RewardSkillPoints;
|
||||||
@@ -320,6 +349,7 @@ namespace Game
|
|||||||
|
|
||||||
for (int i = 0; i < SharedConst.QuestRewardChoicesCount; ++i)
|
for (int i = 0; i < SharedConst.QuestRewardChoicesCount; ++i)
|
||||||
{
|
{
|
||||||
|
rewards.ChoiceItems[i].LootItemType = RewardChoiceItemType[i];
|
||||||
rewards.ChoiceItems[i].Item = new ItemInstance();
|
rewards.ChoiceItems[i].Item = new ItemInstance();
|
||||||
rewards.ChoiceItems[i].Item.ItemID = RewardChoiceItemId[i];
|
rewards.ChoiceItems[i].Item.ItemID = RewardChoiceItemId[i];
|
||||||
rewards.ChoiceItems[i].Quantity = RewardChoiceItemCount[i];
|
rewards.ChoiceItems[i].Quantity = RewardChoiceItemCount[i];
|
||||||
@@ -551,14 +581,20 @@ namespace Game
|
|||||||
public void SetEventIdForQuest(ushort eventId) { _eventIdForQuest = eventId; }
|
public void SetEventIdForQuest(ushort eventId) { _eventIdForQuest = eventId; }
|
||||||
public ushort GetEventIdForQuest() { return _eventIdForQuest; }
|
public ushort GetEventIdForQuest() { return _eventIdForQuest; }
|
||||||
|
|
||||||
|
[Obsolete]
|
||||||
|
public int MinLevel;
|
||||||
|
[Obsolete]
|
||||||
|
public int Level;
|
||||||
|
[Obsolete]
|
||||||
|
public int ScalingFactionGroup;
|
||||||
|
[Obsolete]
|
||||||
|
public int MaxScalingLevel;
|
||||||
|
|
||||||
#region Fields
|
#region Fields
|
||||||
public uint Id;
|
public uint Id;
|
||||||
public QuestType Type;
|
public QuestType Type;
|
||||||
public int Level;
|
|
||||||
public int ScalingFactionGroup;
|
|
||||||
public int MaxScalingLevel;
|
|
||||||
public uint PackageID;
|
public uint PackageID;
|
||||||
public int MinLevel;
|
public uint ContentTuningId;
|
||||||
public int QuestSortID;
|
public int QuestSortID;
|
||||||
public uint QuestInfoID;
|
public uint QuestInfoID;
|
||||||
public uint SuggestedPlayers;
|
public uint SuggestedPlayers;
|
||||||
@@ -569,7 +605,7 @@ namespace Game
|
|||||||
public uint RewardMoneyDifficulty;
|
public uint RewardMoneyDifficulty;
|
||||||
public float RewardMoneyMultiplier;
|
public float RewardMoneyMultiplier;
|
||||||
public uint RewardBonusMoney;
|
public uint RewardBonusMoney;
|
||||||
public uint[] RewardDisplaySpell = new uint[SharedConst.QuestRewardDisplaySpellCount];
|
public List<QuestRewardDisplaySpell> RewardDisplaySpell = new List<QuestRewardDisplaySpell>();
|
||||||
public uint RewardSpell { get; set; }
|
public uint RewardSpell { get; set; }
|
||||||
public uint RewardHonor;
|
public uint RewardHonor;
|
||||||
public uint RewardKillHonor;
|
public uint RewardKillHonor;
|
||||||
@@ -584,6 +620,7 @@ namespace Game
|
|||||||
public uint[] RewardItemCount = new uint[SharedConst.QuestRewardItemCount];
|
public uint[] RewardItemCount = new uint[SharedConst.QuestRewardItemCount];
|
||||||
public uint[] ItemDrop = new uint[SharedConst.QuestItemDropCount];
|
public uint[] ItemDrop = new uint[SharedConst.QuestItemDropCount];
|
||||||
public uint[] ItemDropQuantity = new uint[SharedConst.QuestItemDropCount];
|
public uint[] ItemDropQuantity = new uint[SharedConst.QuestItemDropCount];
|
||||||
|
public LootItemType[] RewardChoiceItemType = new LootItemType[SharedConst.QuestRewardChoicesCount];
|
||||||
public uint[] RewardChoiceItemId = new uint[SharedConst.QuestRewardChoicesCount];
|
public uint[] RewardChoiceItemId = new uint[SharedConst.QuestRewardChoicesCount];
|
||||||
public uint[] RewardChoiceItemCount = new uint[SharedConst.QuestRewardChoicesCount];
|
public uint[] RewardChoiceItemCount = new uint[SharedConst.QuestRewardChoicesCount];
|
||||||
public uint[] RewardChoiceItemDisplayId = new uint[SharedConst.QuestRewardChoicesCount];
|
public uint[] RewardChoiceItemDisplayId = new uint[SharedConst.QuestRewardChoicesCount];
|
||||||
@@ -662,7 +699,7 @@ namespace Game
|
|||||||
public uint ScriptId;
|
public uint ScriptId;
|
||||||
|
|
||||||
public List<uint> DependentPreviousQuests = new List<uint>();
|
public List<uint> DependentPreviousQuests = new List<uint>();
|
||||||
public QueryQuestInfoResponse QueryData;
|
public QueryQuestInfoResponse[] QueryData = new QueryQuestInfoResponse[(int)Locale.Total];
|
||||||
|
|
||||||
uint _rewChoiceItemsCount;
|
uint _rewChoiceItemsCount;
|
||||||
uint _rewItemsCount;
|
uint _rewItemsCount;
|
||||||
@@ -729,6 +766,18 @@ namespace Game
|
|||||||
public StringArray RewardText = new StringArray((int)Locale.Total);
|
public StringArray RewardText = new StringArray((int)Locale.Total);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public struct QuestRewardDisplaySpell
|
||||||
|
{
|
||||||
|
public uint SpellId;
|
||||||
|
public uint PlayerConditionId;
|
||||||
|
|
||||||
|
public QuestRewardDisplaySpell(uint spellId, uint playerConditionId)
|
||||||
|
{
|
||||||
|
SpellId = spellId;
|
||||||
|
PlayerConditionId = playerConditionId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class QuestObjective
|
public class QuestObjective
|
||||||
{
|
{
|
||||||
public uint Id;
|
public uint Id;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace Game.Scenarios
|
|||||||
{
|
{
|
||||||
Player player = Global.ObjAccessor.FindPlayer(guid);
|
Player player = Global.ObjAccessor.FindPlayer(guid);
|
||||||
if (player)
|
if (player)
|
||||||
player.RewardQuest(quest, 0, null, false);
|
player.RewardQuest(quest, LootItemType.Item, 0, null, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -151,45 +151,40 @@ namespace Game.Scenarios
|
|||||||
|
|
||||||
uint count = 0;
|
uint count = 0;
|
||||||
|
|
||||||
// 0 1 2 3 4 5 6 7 8
|
// 0 1 2 3 4 5 6 7 8 9
|
||||||
SQLResult result = DB.World.Query("SELECT CriteriaTreeID, BlobIndex, Idx1, MapID, UiMapID, Priority, Flags, WorldEffectID, PlayerConditionID FROM scenario_poi ORDER BY CriteriaTreeID, Idx1");
|
SQLResult result = DB.World.Query("SELECT CriteriaTreeID, BlobIndex, Idx1, MapID, UiMapID, Priority, Flags, WorldEffectID, PlayerConditionID, NavigationPlayerConditionID FROM scenario_poi ORDER BY CriteriaTreeID, Idx1");
|
||||||
if (result.IsEmpty())
|
if (result.IsEmpty())
|
||||||
{
|
{
|
||||||
Log.outInfo(LogFilter.ServerLoading, "Loaded 0 scenario POI definitions. DB table `scenario_poi` is empty.");
|
Log.outInfo(LogFilter.ServerLoading, "Loaded 0 scenario POI definitions. DB table `scenario_poi` is empty.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0 1 2 3
|
|
||||||
SQLResult points = DB.World.Query("SELECT CriteriaTreeID, Idx1, X, Y FROM scenario_poi_points ORDER BY CriteriaTreeID DESC, Idx1, Idx2");
|
|
||||||
|
|
||||||
List<Vector2>[][] POIs = new List<Vector2>[0][];
|
List<Vector2>[][] POIs = new List<Vector2>[0][];
|
||||||
|
Dictionary<uint, MultiMap<int, ScenarioPOIPoint>> allPoints = new Dictionary<uint, MultiMap<int, ScenarioPOIPoint>>();
|
||||||
|
|
||||||
if (!points.IsEmpty())
|
// 0 1 2 3 4
|
||||||
|
SQLResult pointsResult = DB.World.Query("SELECT CriteriaTreeID, Idx1, X, Y, Z FROM scenario_poi_points ORDER BY CriteriaTreeID DESC, Idx1, Idx2");
|
||||||
|
if (!pointsResult.IsEmpty())
|
||||||
{
|
{
|
||||||
// The first result should have the highest criteriaTreeId
|
|
||||||
uint criteriaTreeIdMax = points.Read<uint>(0);
|
|
||||||
POIs = new List<Vector2>[criteriaTreeIdMax + 1][];
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
int CriteriaTreeID = points.Read<int>(0);
|
uint CriteriaTreeID = pointsResult.Read<uint>(0);
|
||||||
int Idx1 = points.Read<int>(1);
|
int Idx1 = pointsResult.Read<int>(1);
|
||||||
int X = points.Read<int>(2);
|
int X = pointsResult.Read<int>(2);
|
||||||
int Y = points.Read<int>(3);
|
int Y = pointsResult.Read<int>(3);
|
||||||
|
int Z = pointsResult.Read<int>(4);
|
||||||
|
|
||||||
if (POIs[CriteriaTreeID] == null)
|
if (!allPoints.ContainsKey(CriteriaTreeID))
|
||||||
POIs[CriteriaTreeID] = new List<Vector2>[Idx1 + 10];
|
allPoints[CriteriaTreeID] = new MultiMap<int, ScenarioPOIPoint>();
|
||||||
|
|
||||||
if (POIs[CriteriaTreeID][Idx1] == null)
|
allPoints[CriteriaTreeID].Add(Idx1, new ScenarioPOIPoint(X, Y, Z));
|
||||||
POIs[CriteriaTreeID][Idx1] = new List<Vector2>();
|
|
||||||
|
|
||||||
POIs[CriteriaTreeID][Idx1].Add(new Vector2(X, Y));
|
} while (pointsResult.NextRow());
|
||||||
} while (points.NextRow());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
int criteriaTreeID = result.Read<int>(0);
|
uint criteriaTreeID = result.Read<uint>(0);
|
||||||
int blobIndex = result.Read<int>(1);
|
int blobIndex = result.Read<int>(1);
|
||||||
int idx1 = result.Read<int>(2);
|
int idx1 = result.Read<int>(2);
|
||||||
int mapID = result.Read<int>(3);
|
int mapID = result.Read<int>(3);
|
||||||
@@ -198,19 +193,28 @@ namespace Game.Scenarios
|
|||||||
int flags = result.Read<int>(6);
|
int flags = result.Read<int>(6);
|
||||||
int worldEffectID = result.Read<int>(7);
|
int worldEffectID = result.Read<int>(7);
|
||||||
int playerConditionID = result.Read<int>(8);
|
int playerConditionID = result.Read<int>(8);
|
||||||
|
int navigationPlayerConditionID = result.Read<int>(9);
|
||||||
|
|
||||||
if (Global.CriteriaMgr.GetCriteriaTree((uint)criteriaTreeID) == null)
|
if (Global.CriteriaMgr.GetCriteriaTree(criteriaTreeID) == null)
|
||||||
Log.outError(LogFilter.Sql, "`scenario_poi` CriteriaTreeID ({0}) Idx1 ({1}) does not correspond to a valid criteria tree", criteriaTreeID, idx1);
|
Log.outError(LogFilter.Sql, $"`scenario_poi` CriteriaTreeID ({criteriaTreeID}) Idx1 ({idx1}) does not correspond to a valid criteria tree");
|
||||||
|
|
||||||
if (criteriaTreeID < POIs.Length && idx1 < POIs[criteriaTreeID].Length)
|
var blobs = allPoints.LookupByKey(criteriaTreeID);
|
||||||
_scenarioPOIStore.Add((uint)criteriaTreeID, new ScenarioPOI(blobIndex, mapID, uiMapID, priority, flags, worldEffectID, playerConditionID, POIs[criteriaTreeID][idx1]));
|
if (blobs != null)
|
||||||
else
|
{
|
||||||
Log.outError(LogFilter.ServerLoading, "Table scenario_poi references unknown scenario poi points for criteria tree id {0} POI id {1}", criteriaTreeID, blobIndex);
|
var points = blobs.LookupByKey(idx1);
|
||||||
|
if (!points.Empty())
|
||||||
|
{
|
||||||
|
_scenarioPOIStore.Add(criteriaTreeID, new ScenarioPOI(blobIndex, mapID, uiMapID, priority, flags, worldEffectID, playerConditionID, navigationPlayerConditionID, points));
|
||||||
|
++count;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.outError(LogFilter.Sql, $"Table scenario_poi references unknown scenario poi points for criteria tree id {criteriaTreeID} POI id {blobIndex}");
|
||||||
|
|
||||||
++count;
|
|
||||||
} while (result.NextRow());
|
} while (result.NextRow());
|
||||||
|
|
||||||
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} scenario POI definitions in {1} ms", count, Time.GetMSTimeDiffToNow(oldMSTime));
|
Log.outInfo(LogFilter.ServerLoading, "Loaded {count} scenario POI definitions in {Time.GetMSTimeDiffToNow(oldMSTime)} ms");
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ScenarioPOI> GetScenarioPOIs(uint CriteriaTreeID)
|
public List<ScenarioPOI> GetScenarioPOIs(uint CriteriaTreeID)
|
||||||
@@ -240,6 +244,20 @@ namespace Game.Scenarios
|
|||||||
public uint Scenario_H;
|
public uint Scenario_H;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public struct ScenarioPOIPoint
|
||||||
|
{
|
||||||
|
public int X;
|
||||||
|
public int Y;
|
||||||
|
public int Z;
|
||||||
|
|
||||||
|
public ScenarioPOIPoint(int x, int y, int z)
|
||||||
|
{
|
||||||
|
X = x;
|
||||||
|
Y = y;
|
||||||
|
Z = z;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class ScenarioPOI
|
public class ScenarioPOI
|
||||||
{
|
{
|
||||||
public int BlobIndex;
|
public int BlobIndex;
|
||||||
@@ -250,9 +268,9 @@ namespace Game.Scenarios
|
|||||||
public int WorldEffectID;
|
public int WorldEffectID;
|
||||||
public int PlayerConditionID;
|
public int PlayerConditionID;
|
||||||
public int NavigationPlayerConditionID;
|
public int NavigationPlayerConditionID;
|
||||||
public List<Vector2> Points = new List<Vector2>();
|
public List<ScenarioPOIPoint> Points = new List<ScenarioPOIPoint>();
|
||||||
|
|
||||||
public ScenarioPOI(int blobIndex, int mapID, int uiMapID, int priority, int flags, int worldEffectID, int playerConditionID, List<Vector2> points)
|
public ScenarioPOI(int blobIndex, int mapID, int uiMapID, int priority, int flags, int worldEffectID, int playerConditionID, int navigationPlayerConditionID, List<ScenarioPOIPoint> points)
|
||||||
{
|
{
|
||||||
BlobIndex = blobIndex;
|
BlobIndex = blobIndex;
|
||||||
MapID = mapID;
|
MapID = mapID;
|
||||||
@@ -261,6 +279,7 @@ namespace Game.Scenarios
|
|||||||
Flags = flags;
|
Flags = flags;
|
||||||
WorldEffectID = worldEffectID;
|
WorldEffectID = worldEffectID;
|
||||||
PlayerConditionID = playerConditionID;
|
PlayerConditionID = playerConditionID;
|
||||||
|
NavigationPlayerConditionID = navigationPlayerConditionID;
|
||||||
Points = points;
|
Points = points;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -896,7 +896,6 @@ namespace Game
|
|||||||
// misc
|
// misc
|
||||||
Values[WorldCfg.PdumpNoPaths] = GetDefaultValue("PlayerDump.DisallowPaths", true);
|
Values[WorldCfg.PdumpNoPaths] = GetDefaultValue("PlayerDump.DisallowPaths", true);
|
||||||
Values[WorldCfg.PdumpNoOverwrite] = GetDefaultValue("PlayerDump.DisallowOverwrite", true);
|
Values[WorldCfg.PdumpNoOverwrite] = GetDefaultValue("PlayerDump.DisallowOverwrite", true);
|
||||||
Values[WorldCfg.UiQuestLevelsInDialogs] = GetDefaultValue("UI.ShowQuestLevelsInDialogs", false);
|
|
||||||
|
|
||||||
// Wintergrasp battlefield
|
// Wintergrasp battlefield
|
||||||
Values[WorldCfg.WintergraspEnable] = GetDefaultValue("Wintergrasp.Enable", false);
|
Values[WorldCfg.WintergraspEnable] = GetDefaultValue("Wintergrasp.Enable", false);
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ namespace Game.Spells
|
|||||||
AuraDataInfo auraData = auraInfo.AuraData.Value;
|
AuraDataInfo auraData = auraInfo.AuraData.Value;
|
||||||
auraData.CastID = aura.GetCastGUID();
|
auraData.CastID = aura.GetCastGUID();
|
||||||
auraData.SpellID = (int)aura.GetId();
|
auraData.SpellID = (int)aura.GetId();
|
||||||
auraData.Visual.SpellXSpellVisualID = (int)aura.GetSpellXSpellVisualId();
|
auraData.Visual.SpellXSpellVisualID = aura.GetSpellXSpellVisualId();
|
||||||
auraData.Flags = GetFlags();
|
auraData.Flags = GetFlags();
|
||||||
if (aura.GetMaxDuration() > 0 && !aura.GetSpellInfo().HasAttribute(SpellAttr5.HideDuration))
|
if (aura.GetMaxDuration() > 0 && !aura.GetSpellInfo().HasAttribute(SpellAttr5.HideDuration))
|
||||||
auraData.Flags |= AuraFlags.Duration;
|
auraData.Flags |= AuraFlags.Duration;
|
||||||
|
|||||||
@@ -3525,7 +3525,7 @@ namespace Game.Spells
|
|||||||
result = SpellCastResult.DontReport;
|
result = SpellCastResult.DontReport;
|
||||||
|
|
||||||
CastFailed castFailed = new CastFailed();
|
CastFailed castFailed = new CastFailed();
|
||||||
castFailed.Visual.SpellXSpellVisualID = (int)m_SpellVisual;
|
castFailed.Visual.SpellXSpellVisualID = m_SpellVisual;
|
||||||
FillSpellCastFailedArgs(castFailed, m_castId, m_spellInfo, result, m_customError, param1, param2, m_caster.ToPlayer());
|
FillSpellCastFailedArgs(castFailed, m_castId, m_spellInfo, result, m_customError, param1, param2, m_caster.ToPlayer());
|
||||||
m_caster.ToPlayer().SendPacket(castFailed);
|
m_caster.ToPlayer().SendPacket(castFailed);
|
||||||
}
|
}
|
||||||
@@ -3553,7 +3553,7 @@ namespace Game.Spells
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
CastFailed packet = new CastFailed();
|
CastFailed packet = new CastFailed();
|
||||||
packet.Visual.SpellXSpellVisualID = (int)spellVisual;
|
packet.Visual.SpellXSpellVisualID = spellVisual;
|
||||||
FillSpellCastFailedArgs(packet, cast_count, spellInfo, result, customError, param1, param2, caster);
|
FillSpellCastFailedArgs(packet, cast_count, spellInfo, result, customError, param1, param2, caster);
|
||||||
caster.SendPacket(packet);
|
caster.SendPacket(packet);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3069,14 +3069,6 @@ PlayerDump.DisallowPaths = 1
|
|||||||
|
|
||||||
PlayerDump.DisallowOverwrite = 1
|
PlayerDump.DisallowOverwrite = 1
|
||||||
|
|
||||||
#
|
|
||||||
# UI.ShowQuestLevelsInDialogs
|
|
||||||
# Description: Show quest levels next to quest titles in UI dialogs
|
|
||||||
# Example: [13] Westfall Stew
|
|
||||||
# Default: 0 - (Do not show)
|
|
||||||
|
|
||||||
UI.ShowQuestLevelsInDialogs = 0
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Calculate.Creature.Zone.Area.Data
|
# Calculate.Creature.Zone.Area.Data
|
||||||
# Description: Calculate at loading creature zoneId / areaId and save in creature table (WARNING: SLOW WORLD SERVER STARTUP)
|
# Description: Calculate at loading creature zoneId / areaId and save in creature table (WARNING: SLOW WORLD SERVER STARTUP)
|
||||||
|
|||||||
Reference in New Issue
Block a user