Fixed appearance validation
Implemented proper facial hair validation Implemented transmog Set fix interaction of spells like Shadowmeld with Threat reducing effects
This commit is contained in:
@@ -38,13 +38,13 @@ namespace Framework.Collections
|
||||
|
||||
public void delink()
|
||||
{
|
||||
if (isInList())
|
||||
{
|
||||
iNext.iPrev = iPrev;
|
||||
iPrev.iNext = iNext;
|
||||
iNext = null;
|
||||
iPrev = null;
|
||||
}
|
||||
if (!isInList())
|
||||
return;
|
||||
|
||||
iNext.iPrev = iPrev;
|
||||
iPrev.iNext = iNext;
|
||||
iNext = null;
|
||||
iPrev = null;
|
||||
}
|
||||
|
||||
public void insertBefore(LinkedListElement pElem)
|
||||
|
||||
@@ -76,7 +76,8 @@ namespace Framework.Constants
|
||||
Player = 0x1,
|
||||
Account = 0x2,
|
||||
Guild = 0x4,
|
||||
Scenario = 0x8
|
||||
Scenario = 0x8,
|
||||
QuestObjective = 0x10
|
||||
}
|
||||
|
||||
public enum CriteriaCondition
|
||||
@@ -398,6 +399,7 @@ namespace Framework.Constants
|
||||
// 202 - 0 criterias (Legion - 23420)
|
||||
CompleteWorldQuest = 203,
|
||||
// 204 - Special criteria type to award players for some external events? Comes with what looks like an identifier, so guessing it's not unique.
|
||||
TransmogSetUnlocked = 205,
|
||||
TotalTypes = 208
|
||||
}
|
||||
|
||||
|
||||
@@ -899,6 +899,20 @@ namespace Framework.Constants
|
||||
Max
|
||||
}
|
||||
|
||||
public enum CharBaseSectionVariation : byte
|
||||
{
|
||||
Skin = 0,
|
||||
Face = 1,
|
||||
FacialHair = 2,
|
||||
Hair = 3,
|
||||
Underwear = 4,
|
||||
CustomDisplay1 = 5,
|
||||
CustomDisplay2 = 6,
|
||||
CustomDisplay3 = 7,
|
||||
|
||||
Max
|
||||
}
|
||||
|
||||
public enum CharSectionFlags
|
||||
{
|
||||
Player = 0x01,
|
||||
@@ -923,7 +937,9 @@ namespace Framework.Constants
|
||||
CustomDisplay2LowRes = 12,
|
||||
CustomDisplay2 = 13,
|
||||
CustomDisplay3LowRes = 14,
|
||||
CustomDisplay3 = 15
|
||||
CustomDisplay3 = 15,
|
||||
|
||||
Max
|
||||
}
|
||||
|
||||
public enum ChrSpecializationFlag
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Framework.Constants
|
||||
CreatureTemplateVehicle = 16,
|
||||
Spell = 17,
|
||||
SpellClickEvent = 18,
|
||||
QuestAccept = 19,
|
||||
QuestAvailable = 19,
|
||||
// Condition source type 20 unused
|
||||
VehicleSpell = 21,
|
||||
SmartEvent = 22,
|
||||
|
||||
@@ -23,8 +23,8 @@ namespace Framework.Constants
|
||||
public const int MaxBankSlots = 98;
|
||||
public const int BankMoneyLogsTab = 100;
|
||||
|
||||
public const int WithdrawMoneyUnlimited = -1;
|
||||
public const int WithdrawSlotUnlimited = -1;
|
||||
public const uint WithdrawMoneyUnlimited = 0xFFFFFFFF;
|
||||
public const uint WithdrawSlotUnlimited = 0xFFFFFFFF;
|
||||
public const uint EventLogGuidUndefined = 0xFFFFFFFF;
|
||||
|
||||
public const uint ChallengesTypes = 6;
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Framework.Constants
|
||||
|
||||
public const int ReqPrimaryTreeTalents = 31;
|
||||
public const int ExploredZonesSize = 256;
|
||||
public const long MaxMoneyAmount = long.MaxValue;
|
||||
public const ulong MaxMoneyAmount = ulong.MaxValue;
|
||||
public const int MaxActionButtons = 132;
|
||||
public const int MaxActionButtonActionValue = 0x00FFFFFF + 1;
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace Framework.Constants
|
||||
AddPctModifier = 108,
|
||||
AddTargetTrigger = 109,
|
||||
ModPowerRegenPercent = 110,
|
||||
AddCasterHitTrigger = 111,
|
||||
InterceptMeleeRangedAttacks = 111,
|
||||
OverrideClassScripts = 112,
|
||||
ModRangedDamageTaken = 113,
|
||||
ModRangedDamageTakenPct = 114,
|
||||
|
||||
@@ -92,6 +92,8 @@ namespace Framework.Database
|
||||
PrepareStatement(CharStatements.SEL_CHARACTER_SPELL, "SELECT spell, active, disabled FROM character_spell WHERE guid = ?");
|
||||
PrepareStatement(CharStatements.SEL_CHARACTER_QUESTSTATUS, "SELECT quest, status, timer FROM character_queststatus WHERE guid = ? AND status <> 0");
|
||||
PrepareStatement(CharStatements.SEL_CHARACTER_QUESTSTATUS_OBJECTIVES, "SELECT quest, objective, data FROM character_queststatus_objectives WHERE guid = ?");
|
||||
PrepareStatement(CharStatements.SEL_CHARACTER_QUESTSTATUS_OBJECTIVES_CRITERIA, "SELECT questObjectiveId FROM character_queststatus_objectives_criteria WHERE guid = ?");
|
||||
PrepareStatement(CharStatements.SEL_CHARACTER_QUESTSTATUS_OBJECTIVES_CRITERIA_PROGRESS, "SELECT criteriaId, counter, date FROM character_queststatus_objectives_criteria_progress WHERE guid = ?");
|
||||
|
||||
PrepareStatement(CharStatements.SEL_CHARACTER_QUESTSTATUS_DAILY, "SELECT quest, time FROM character_queststatus_daily WHERE guid = ?");
|
||||
PrepareStatement(CharStatements.SEL_CHARACTER_QUESTSTATUS_WEEKLY, "SELECT quest FROM character_queststatus_weekly WHERE guid = ?");
|
||||
@@ -249,8 +251,9 @@ namespace Framework.Database
|
||||
PrepareStatement(CharStatements.UPD_GUILD_RANK_BANK_MONEY, "UPDATE guild_rank SET BankMoneyPerDay = ? WHERE rid = ? AND guildid = ?"); // 0: uint32, 1: uint8, 2: uint32
|
||||
PrepareStatement(CharStatements.UPD_GUILD_BANK_TAB_TEXT, "UPDATE guild_bank_tab SET TabText = ? WHERE guildid = ? AND TabId = ?"); // 0: string, 1: uint32, 2: uint8
|
||||
|
||||
PrepareStatement(CharStatements.INS_GUILD_MEMBER_WITHDRAW, "INSERT INTO guild_member_withdraw (guid, tab0, tab1, tab2, tab3, tab4, tab5, tab6, tab7, money) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) " +
|
||||
"ON DUPLICATE KEY UPDATE tab0 = VALUES (tab0), tab1 = VALUES (tab1), tab2 = VALUES (tab2), tab3 = VALUES (tab3), tab4 = VALUES (tab4), tab5 = VALUES (tab5), tab6 = VALUES (tab6), tab7 = VALUES (tab7), money = VALUES (money)");
|
||||
PrepareStatement(CharStatements.INS_GUILD_MEMBER_WITHDRAW_TABS, "INSERT INTO guild_member_withdraw (guid, tab0, tab1, tab2, tab3, tab4, tab5, tab6, tab7) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) " +
|
||||
"ON DUPLICATE KEY UPDATE tab0 = VALUES (tab0), tab1 = VALUES (tab1), tab2 = VALUES (tab2), tab3 = VALUES (tab3), tab4 = VALUES (tab4), tab5 = VALUES (tab5), tab6 = VALUES (tab6), tab7 = VALUES (tab7)");
|
||||
PrepareStatement(CharStatements.INS_GUILD_MEMBER_WITHDRAW_MONEY, "INSERT INTO guild_member_withdraw (guid, money) VALUES (?, ?) ON DUPLICATE KEY UPDATE money = VALUES (money)");
|
||||
PrepareStatement(CharStatements.DEL_GUILD_MEMBER_WITHDRAW, "TRUNCATE guild_member_withdraw");
|
||||
|
||||
// 0: uint32, 1: uint32, 2: uint32
|
||||
@@ -543,6 +546,9 @@ namespace Framework.Database
|
||||
PrepareStatement(CharStatements.UPD_CHAR_TAXIMASK, "UPDATE characters SET taximask = ? WHERE guid = ?");
|
||||
PrepareStatement(CharStatements.DEL_CHAR_QUESTSTATUS, "DELETE FROM character_queststatus WHERE guid = ?");
|
||||
PrepareStatement(CharStatements.DEL_CHAR_QUESTSTATUS_OBJECTIVES, "DELETE FROM character_queststatus_objectives WHERE guid = ?");
|
||||
PrepareStatement(CharStatements.DEL_CHAR_QUESTSTATUS_OBJECTIVES_CRITERIA, "DELETE FROM character_queststatus_objectives_criteria WHERE guid = ?");
|
||||
PrepareStatement(CharStatements.DEL_CHAR_QUESTSTATUS_OBJECTIVES_CRITERIA_PROGRESS, "DELETE FROM character_queststatus_objectives_criteria_progress WHERE guid = ?");
|
||||
PrepareStatement(CharStatements.DEL_CHAR_QUESTSTATUS_OBJECTIVES_CRITERIA_PROGRESS_BY_CRITERIA, "DELETE FROM character_queststatus_objectives_criteria_progress WHERE guid = ? AND criteriaId = ?");
|
||||
PrepareStatement(CharStatements.DEL_CHAR_SOCIAL_BY_GUID, "DELETE FROM character_social WHERE guid = ?");
|
||||
PrepareStatement(CharStatements.DEL_CHAR_SOCIAL_BY_FRIEND, "DELETE FROM character_social WHERE friend = ?");
|
||||
PrepareStatement(CharStatements.DEL_CHAR_ACHIEVEMENT_BY_ACHIEVEMENT, "DELETE FROM character_achievement WHERE achievement = ? AND guid = ?");
|
||||
@@ -590,11 +596,14 @@ namespace Framework.Database
|
||||
PrepareStatement(CharStatements.DEL_CHAR_QUESTSTATUS_BY_QUEST, "DELETE FROM character_queststatus WHERE guid = ? AND quest = ?");
|
||||
PrepareStatement(CharStatements.REP_CHAR_QUESTSTATUS_OBJECTIVES, "REPLACE INTO character_queststatus_objectives (guid, quest, objective, data) VALUES (?, ?, ?, ?)");
|
||||
PrepareStatement(CharStatements.DEL_CHAR_QUESTSTATUS_OBJECTIVES_BY_QUEST, "DELETE FROM character_queststatus_objectives WHERE guid = ? AND quest = ?");
|
||||
PrepareStatement(CharStatements.INS_CHAR_QUESTSTATUS_OBJECTIVES_CRITERIA, "INSERT INTO character_queststatus_objectives_criteria (guid, questObjectiveId) VALUES (?, ?)");
|
||||
PrepareStatement(CharStatements.INS_CHAR_QUESTSTATUS_OBJECTIVES_CRITERIA_PROGRESS, "INSERT INTO character_queststatus_objectives_criteria_progress (guid, criteriaId, counter, date) VALUES (?, ?, ?, ?)");
|
||||
PrepareStatement(CharStatements.INS_CHAR_QUESTSTATUS_REWARDED, "INSERT IGNORE INTO character_queststatus_rewarded (guid, quest, active) VALUES (?, ?, 1)");
|
||||
PrepareStatement(CharStatements.DEL_CHAR_QUESTSTATUS_REWARDED_BY_QUEST, "DELETE FROM character_queststatus_rewarded WHERE guid = ? AND quest = ?");
|
||||
PrepareStatement(CharStatements.UPD_CHAR_QUESTSTATUS_REWARDED_FACTION_CHANGE, "UPDATE character_queststatus_rewarded SET quest = ? WHERE quest = ? AND guid = ?");
|
||||
PrepareStatement(CharStatements.UPD_CHAR_QUESTSTATUS_REWARDED_ACTIVE, "UPDATE character_queststatus_rewarded SET active = 1 WHERE guid = ?");
|
||||
PrepareStatement(CharStatements.UPD_CHAR_QUESTSTATUS_REWARDED_ACTIVE_BY_QUEST, "UPDATE character_queststatus_rewarded SET active = 0 WHERE quest = ? AND guid = ?");
|
||||
PrepareStatement(CharStatements.DEL_INVALID_QUEST_PROGRESS_CRITERIA, "DELETE FROM character_queststatus_objectives_criteria WHERE questObjectiveId = ?");
|
||||
PrepareStatement(CharStatements.DEL_CHAR_SKILL_BY_SKILL, "DELETE FROM character_skills WHERE guid = ? AND skill = ?");
|
||||
PrepareStatement(CharStatements.INS_CHAR_SKILLS, "INSERT INTO character_skills (guid, skill, value, max) VALUES (?, ?, ?, ?)");
|
||||
PrepareStatement(CharStatements.UPD_CHAR_SKILLS, "UPDATE character_skills SET value = ?, max = ? WHERE guid = ? AND skill = ?");
|
||||
@@ -778,6 +787,8 @@ namespace Framework.Database
|
||||
|
||||
SEL_CHARACTER_QUESTSTATUS,
|
||||
SEL_CHARACTER_QUESTSTATUS_OBJECTIVES,
|
||||
SEL_CHARACTER_QUESTSTATUS_OBJECTIVES_CRITERIA,
|
||||
SEL_CHARACTER_QUESTSTATUS_OBJECTIVES_CRITERIA_PROGRESS,
|
||||
SEL_CHARACTER_QUESTSTATUS_DAILY,
|
||||
SEL_CHARACTER_QUESTSTATUS_WEEKLY,
|
||||
SEL_CHARACTER_QUESTSTATUS_MONTHLY,
|
||||
@@ -913,7 +924,8 @@ namespace Framework.Database
|
||||
UPD_GUILD_BANK_MONEY,
|
||||
UPD_GUILD_RANK_BANK_MONEY,
|
||||
UPD_GUILD_BANK_TAB_TEXT,
|
||||
INS_GUILD_MEMBER_WITHDRAW,
|
||||
INS_GUILD_MEMBER_WITHDRAW_TABS,
|
||||
INS_GUILD_MEMBER_WITHDRAW_MONEY,
|
||||
DEL_GUILD_MEMBER_WITHDRAW,
|
||||
SEL_CHAR_DATA_FOR_GUILD,
|
||||
DEL_GUILD_ACHIEVEMENT,
|
||||
@@ -1157,6 +1169,9 @@ namespace Framework.Database
|
||||
UPD_CHAR_TAXIMASK,
|
||||
DEL_CHAR_QUESTSTATUS,
|
||||
DEL_CHAR_QUESTSTATUS_OBJECTIVES,
|
||||
DEL_CHAR_QUESTSTATUS_OBJECTIVES_CRITERIA,
|
||||
DEL_CHAR_QUESTSTATUS_OBJECTIVES_CRITERIA_PROGRESS,
|
||||
DEL_CHAR_QUESTSTATUS_OBJECTIVES_CRITERIA_PROGRESS_BY_CRITERIA,
|
||||
DEL_CHAR_SOCIAL_BY_GUID,
|
||||
DEL_CHAR_SOCIAL_BY_FRIEND,
|
||||
DEL_CHAR_ACHIEVEMENT_BY_ACHIEVEMENT,
|
||||
@@ -1204,11 +1219,14 @@ namespace Framework.Database
|
||||
DEL_CHAR_QUESTSTATUS_BY_QUEST,
|
||||
REP_CHAR_QUESTSTATUS_OBJECTIVES,
|
||||
DEL_CHAR_QUESTSTATUS_OBJECTIVES_BY_QUEST,
|
||||
INS_CHAR_QUESTSTATUS_OBJECTIVES_CRITERIA,
|
||||
INS_CHAR_QUESTSTATUS_OBJECTIVES_CRITERIA_PROGRESS,
|
||||
INS_CHAR_QUESTSTATUS_REWARDED,
|
||||
DEL_CHAR_QUESTSTATUS_REWARDED_BY_QUEST,
|
||||
UPD_CHAR_QUESTSTATUS_REWARDED_FACTION_CHANGE,
|
||||
UPD_CHAR_QUESTSTATUS_REWARDED_ACTIVE,
|
||||
UPD_CHAR_QUESTSTATUS_REWARDED_ACTIVE_BY_QUEST,
|
||||
DEL_INVALID_QUEST_PROGRESS_CRITERIA,
|
||||
DEL_CHAR_SKILL_BY_SKILL,
|
||||
INS_CHAR_SKILLS,
|
||||
UPD_CHAR_SKILLS,
|
||||
|
||||
@@ -123,9 +123,16 @@ namespace Framework.Database
|
||||
"EmoteDelay3, UnkEmoteID, Language, Type, SoundID1, SoundID2, PlayerConditionID FROM broadcast_text ORDER BY ID DESC");
|
||||
PrepareStatement(HotfixStatements.SEL_BROADCAST_TEXT_LOCALE, "SELECT ID, MaleText_lang, FemaleText_lang FROM broadcast_text_locale WHERE locale = ?");
|
||||
|
||||
// CharacterFacialHairStyles.db2
|
||||
PrepareStatement(HotfixStatements.SEL_CHARACTER_FACIAL_HAIR_STYLES, "SELECT ID, Geoset1, Geoset2, Geoset3, Geoset4, Geoset5, RaceID, SexID, VariationID" +
|
||||
" FROM character_facial_hair_styles ORDER BY ID DESC");
|
||||
|
||||
// CharBaseSection.db2
|
||||
PrepareStatement(HotfixStatements.SEL_CHAR_BASE_SECTION, "SELECT ID, Variation, ResolutionVariation, Resolution FROM char_base_section ORDER BY ID DESC");
|
||||
|
||||
// CharSections.db2
|
||||
PrepareStatement(HotfixStatements.SEL_CHAR_SECTIONS, "SELECT ID, TextureFileDataID1, TextureFileDataID2, TextureFileDataID3, Flags, Race, Gender, GenType, " +
|
||||
"Type, Color FROM char_sections ORDER BY ID DESC");
|
||||
PrepareStatement(HotfixStatements.SEL_CHAR_SECTIONS, "SELECT ID, TextureFileDataID1, TextureFileDataID2, TextureFileDataID3, Flags, RaceID, SexID, " +
|
||||
"BaseSection, VariationIndex, ColorIndex FROM char_sections ORDER BY ID DESC");
|
||||
|
||||
// CharStartOutfit.db2
|
||||
PrepareStatement(HotfixStatements.SEL_CHAR_START_OUTFIT, "SELECT ID, ItemID1, ItemID2, ItemID3, ItemID4, ItemID5, ItemID6, ItemID7, ItemID8, ItemID9, " +
|
||||
@@ -926,6 +933,21 @@ namespace Framework.Database
|
||||
PrepareStatement(HotfixStatements.SEL_TOY, "SELECT ItemID, Description, Flags, CategoryFilter, ID FROM toy ORDER BY ID DESC");
|
||||
PrepareStatement(HotfixStatements.SEL_TOY_LOCALE, "SELECT ID, Description_lang FROM toy_locale WHERE locale = ?");
|
||||
|
||||
// TransmogHoliday.db2
|
||||
PrepareStatement(HotfixStatements.SEL_TRANSMOG_HOLIDAY, "SELECT ID, HolidayID FROM transmog_holiday ORDER BY ID DESC");
|
||||
|
||||
// TransmogSet.db2
|
||||
PrepareStatement(HotfixStatements.SEL_TRANSMOG_SET, "SELECT Name, BaseSetID, UIOrder, ExpansionID, ID, Flags, QuestID, ClassMask, ItemNameDescriptionID, " +
|
||||
"TransmogSetGroupID FROM transmog_set ORDER BY ID DESC");
|
||||
PrepareStatement(HotfixStatements.SEL_TRANSMOG_SET_LOCALE, "SELECT ID, Name_lang FROM transmog_set_locale WHERE locale = ?");
|
||||
|
||||
// TransmogSetGroup.db2
|
||||
PrepareStatement(HotfixStatements.SEL_TRANSMOG_SET_GROUP, "SELECT Label, ID FROM transmog_set_group ORDER BY ID DESC");
|
||||
PrepareStatement(HotfixStatements.SEL_TRANSMOG_SET_GROUP_LOCALE, "SELECT ID, Label_lang FROM transmog_set_group_locale WHERE locale = ?");
|
||||
|
||||
// TransmogSetItem.db2
|
||||
PrepareStatement(HotfixStatements.SEL_TRANSMOG_SET_ITEM, "SELECT ID, TransmogSetID, ItemModifiedAppearanceID, Flags FROM transmog_set_item ORDER BY ID DESC");
|
||||
|
||||
// TransportAnimation.db2
|
||||
PrepareStatement(HotfixStatements.SEL_TRANSPORT_ANIMATION, "SELECT ID, TransportID, TimeIndex, PosX, PosY, PosZ, SequenceID FROM transport_animation" +
|
||||
" ORDER BY ID DESC");
|
||||
@@ -1050,6 +1072,10 @@ namespace Framework.Database
|
||||
SEL_BROADCAST_TEXT,
|
||||
SEL_BROADCAST_TEXT_LOCALE,
|
||||
|
||||
SEL_CHARACTER_FACIAL_HAIR_STYLES,
|
||||
|
||||
SEL_CHAR_BASE_SECTION,
|
||||
|
||||
SEL_CHAR_SECTIONS,
|
||||
|
||||
SEL_CHAR_START_OUTFIT,
|
||||
@@ -1462,6 +1488,16 @@ namespace Framework.Database
|
||||
SEL_TOY,
|
||||
SEL_TOY_LOCALE,
|
||||
|
||||
SEL_TRANSMOG_HOLIDAY,
|
||||
|
||||
SEL_TRANSMOG_SET,
|
||||
SEL_TRANSMOG_SET_LOCALE,
|
||||
|
||||
SEL_TRANSMOG_SET_GROUP,
|
||||
SEL_TRANSMOG_SET_GROUP_LOCALE,
|
||||
|
||||
SEL_TRANSMOG_SET_ITEM,
|
||||
|
||||
SEL_TRANSPORT_ANIMATION,
|
||||
|
||||
SEL_TRANSPORT_ROTATION,
|
||||
|
||||
@@ -94,12 +94,9 @@ namespace Framework.Dynamic
|
||||
|
||||
public void clearReferences()
|
||||
{
|
||||
LinkedListElement curr;
|
||||
while ((curr = base.GetFirstElement()) != null)
|
||||
{
|
||||
((Reference<TO, FROM>)curr).invalidate();
|
||||
curr.delink(); // the delink might be already done by invalidate(), but doing it here again does not hurt and insures an empty list
|
||||
}
|
||||
Reference<TO, FROM> refe;
|
||||
while ((refe = getFirst()) != null)
|
||||
refe.invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user