mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
Mage 400 INTO master/434
Signed-off-by: Salja <salja2012@hotmail.de>
This commit is contained in:
parent
7665a09232
commit
22bfaa12b0
66 changed files with 5773 additions and 3971 deletions
10
sql/434/01_characters.sql
Normal file
10
sql/434/01_characters.sql
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
alter table `characters`.`characters`
|
||||
add column `power8` int(10) UNSIGNED DEFAULT '0' NOT NULL after `power7`,
|
||||
add column `power9` int(10) UNSIGNED DEFAULT '0' NOT NULL after `power8`,
|
||||
add column `power10` int(10) UNSIGNED DEFAULT '0' NOT NULL after `power9`,
|
||||
drop column `ammoId`;
|
||||
|
||||
alter table `characters`.`character_stats`
|
||||
add column `maxpower8` int(10) UNSIGNED DEFAULT '0' NOT NULL after `maxpower7`,
|
||||
add column `maxpower9` int(10) UNSIGNED DEFAULT '0' NOT NULL after `maxpower8`,
|
||||
add column `maxpower10` int(10) UNSIGNED DEFAULT '0' NOT NULL after `maxpower9`;
|
||||
|
|
@ -251,11 +251,13 @@ CREATE TABLE `characters` (
|
|||
`power5` int(10) UNSIGNED NOT NULL default '0',
|
||||
`power6` int(10) UNSIGNED NOT NULL default '0',
|
||||
`power7` int(10) UNSIGNED NOT NULL default '0',
|
||||
`power8` int(10) UNSIGNED NOT NULL default '0',
|
||||
`power9` int(10) UNSIGNED NOT NULL default '0',
|
||||
`power10` int(10) UNSIGNED NOT NULL default '0',
|
||||
`specCount` tinyint(3) UNSIGNED NOT NULL default '1',
|
||||
`activeSpec` tinyint(3) UNSIGNED NOT NULL default '0',
|
||||
`exploredZones` longtext,
|
||||
`equipmentCache` longtext,
|
||||
`ammoId` int(10) UNSIGNED NOT NULL default '0',
|
||||
`knownTitles` longtext,
|
||||
`actionBars` tinyint(3) UNSIGNED NOT NULL default '0',
|
||||
`deleteInfos_Account` int(11) UNSIGNED default NULL,
|
||||
|
|
@ -901,6 +903,9 @@ CREATE TABLE `character_stats` (
|
|||
`maxpower5` int(10) UNSIGNED NOT NULL default '0',
|
||||
`maxpower6` int(10) UNSIGNED NOT NULL default '0',
|
||||
`maxpower7` int(10) UNSIGNED NOT NULL default '0',
|
||||
`maxpower8` int(10) UNSIGNED NOT NULL default '0',
|
||||
`maxpower9` int(10) UNSIGNED NOT NULL default '0',
|
||||
`maxpower10` int(10) UNSIGNED NOT NULL default '0',
|
||||
`strength` int(10) UNSIGNED NOT NULL default '0',
|
||||
`agility` int(10) UNSIGNED NOT NULL default '0',
|
||||
`stamina` int(10) UNSIGNED NOT NULL default '0',
|
||||
|
|
|
|||
|
|
@ -3,4 +3,3 @@ ALTER TABLE character_db_version CHANGE COLUMN required_11391_01_characters_auct
|
|||
ALTER TABLE character_queststatus
|
||||
ADD COLUMN itemcount5 int(11) unsigned NOT NULL default '0' AFTER itemcount4,
|
||||
ADD COLUMN itemcount6 int(11) unsigned NOT NULL default '0' AFTER itemcount5;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,4 +3,3 @@ ALTER TABLE db_version CHANGE COLUMN required_11595_09_mangos_spell_elixir requi
|
|||
DELETE FROM `spell_proc_event` WHERE entry IN (17767);
|
||||
INSERT INTO `spell_proc_event` VALUE
|
||||
(17767, 0x00, 5, 0x02000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00080000, 0x00040000, 0.000000, 0.000000, 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,4 +3,3 @@ ALTER TABLE db_version CHANGE COLUMN required_11597_01_mangos_spell_proc_event r
|
|||
DELETE FROM `spell_proc_event` WHERE entry IN (64914);
|
||||
INSERT INTO `spell_proc_event` VALUE
|
||||
(64914, 0x00, 8, 0x00000000, 0x00000000, 0x00000000, 0x00080000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -172,7 +172,8 @@ bool AchievementCriteriaRequirement::IsValid(AchievementCriteriaEntry const* cri
|
|||
criteria->ID, criteria->requiredType, (requirementType == ACHIEVEMENT_CRITERIA_REQUIRE_S_AURA ? "ACHIEVEMENT_CRITERIA_REQUIRE_S_AURA" : "ACHIEVEMENT_CRITERIA_REQUIRE_T_AURA"), requirementType, aura.effect_idx);
|
||||
return false;
|
||||
}
|
||||
if (!spellEntry->EffectApplyAuraName[aura.effect_idx])
|
||||
SpellEffectEntry const* spellEffect = spellEntry->GetSpellEffect(SpellEffectIndex(aura.effect_idx));
|
||||
if (spellEffect && !spellEffect->EffectApplyAuraName)
|
||||
{
|
||||
sLog.outErrorDb("Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement %s (%u) have non-aura spell effect (ID: %u Effect: %u), ignore.",
|
||||
criteria->ID, criteria->requiredType, (requirementType == ACHIEVEMENT_CRITERIA_REQUIRE_S_AURA ? "ACHIEVEMENT_CRITERIA_REQUIRE_S_AURA" : "ACHIEVEMENT_CRITERIA_REQUIRE_T_AURA"), requirementType, aura.spell_id, aura.effect_idx);
|
||||
|
|
|
|||
|
|
@ -70,10 +70,10 @@ bool LoginQueryHolder::Initialize()
|
|||
// NOTE: all fields in `characters` must be read to prevent lost character data at next save in case wrong DB structure.
|
||||
// !!! NOTE: including unused `zone`,`online`
|
||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADFROM, "SELECT guid, account, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags,"
|
||||
"position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost,"
|
||||
"resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeon_difficulty,"
|
||||
"arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk,"
|
||||
"health, power1, power2, power3, power4, power5, power6, power7, specCount, activeSpec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars FROM characters WHERE guid = '%u'", m_guid.GetCounter());
|
||||
"position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost,"
|
||||
"resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeon_difficulty,"
|
||||
"arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk,"
|
||||
"health, power1, power2, power3, power4, power5, power6, power7, power8, power9, power10, specCount, activeSpec, exploredZones, equipmentCache, knownTitles, actionBars FROM characters WHERE guid = '%u'", m_guid.GetCounter());
|
||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADGROUP, "SELECT groupId FROM group_member WHERE memberGuid ='%u'", m_guid.GetCounter());
|
||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES, "SELECT id, permanent, map, difficulty, resettime FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = '%u'", m_guid.GetCounter());
|
||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADAURAS, "SELECT caster_guid,item_guid,spell,stackcount,remaincharges,basepoints0,basepoints1,basepoints2,periodictime0,periodictime1,periodictime2,maxduration,remaintime,effIndexMask FROM character_aura WHERE guid = '%u'", m_guid.GetCounter());
|
||||
|
|
|
|||
|
|
@ -1965,7 +1965,7 @@ bool ChatHandler::isValidChatMessage(const char* message)
|
|||
}
|
||||
else if (linkedItem)
|
||||
{
|
||||
char* const* suffix = itemSuffix ? itemSuffix->nameSuffix : (itemProperty ? itemProperty->nameSuffix : NULL);
|
||||
DBCString suffix = itemSuffix?itemSuffix->nameSuffix:(itemProperty?itemProperty->nameSuffix:NULL);
|
||||
|
||||
std::string expectedName = std::string(linkedItem->Name1);
|
||||
if (suffix)
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ bool Corpse::LoadFromDB(uint32 lowguid, Field* fields)
|
|||
SetUInt32Value(CORPSE_FIELD_BYTES_1, ((0x00) | (race << 8) | (gender << 16) | (skin << 24)));
|
||||
SetUInt32Value(CORPSE_FIELD_BYTES_2, ((face) | (hairstyle << 8) | (haircolor << 16) | (facialhair << 24)));
|
||||
|
||||
SetUInt32Value(CORPSE_FIELD_GUILD, guildId);
|
||||
//SetUInt32Value(CORPSE_FIELD_GUILD, guildId);
|
||||
|
||||
uint32 flags = CORPSE_FLAG_UNK2;
|
||||
if (playerFlags & PLAYER_FLAGS_HIDE_HELM)
|
||||
|
|
|
|||
|
|
@ -1587,7 +1587,7 @@ bool Creature::IsImmuneToSpell(SpellEntry const* spellInfo)
|
|||
if (!spellInfo)
|
||||
return false;
|
||||
|
||||
if (GetCreatureInfo()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1)))
|
||||
if (GetCreatureInfo()->MechanicImmuneMask & (1 << (spellInfo->GetMechanic() - 1)))
|
||||
return true;
|
||||
|
||||
return Unit::IsImmuneToSpell(spellInfo);
|
||||
|
|
@ -1595,20 +1595,22 @@ bool Creature::IsImmuneToSpell(SpellEntry const* spellInfo)
|
|||
|
||||
bool Creature::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const
|
||||
{
|
||||
if (GetCreatureInfo()->MechanicImmuneMask & (1 << (spellInfo->EffectMechanic[index] - 1)))
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(index);
|
||||
|
||||
if (spellEffect && GetCreatureInfo()->MechanicImmuneMask & (1 << (spellEffect->EffectMechanic - 1)))
|
||||
return true;
|
||||
|
||||
// Taunt immunity special flag check
|
||||
if (GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NOT_TAUNTABLE)
|
||||
{
|
||||
// Taunt aura apply check
|
||||
if (spellInfo->Effect[index] == SPELL_EFFECT_APPLY_AURA)
|
||||
if (spellEffect && spellEffect->Effect == SPELL_EFFECT_APPLY_AURA)
|
||||
{
|
||||
if (spellInfo->EffectApplyAuraName[index] == SPELL_AURA_MOD_TAUNT)
|
||||
if (spellEffect && spellEffect->EffectApplyAuraName == SPELL_AURA_MOD_TAUNT)
|
||||
return true;
|
||||
}
|
||||
// Spell effect taunt check
|
||||
else if (spellInfo->Effect[index] == SPELL_EFFECT_ATTACK_ME)
|
||||
else if (spellEffect && spellEffect->Effect == SPELL_EFFECT_ATTACK_ME)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1634,20 +1636,25 @@ SpellEntry const* Creature::ReachWithSpellAttack(Unit* pVictim)
|
|||
bool bcontinue = true;
|
||||
for (int j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
{
|
||||
if ((spellInfo->Effect[j] == SPELL_EFFECT_SCHOOL_DAMAGE) ||
|
||||
(spellInfo->Effect[j] == SPELL_EFFECT_INSTAKILL) ||
|
||||
(spellInfo->Effect[j] == SPELL_EFFECT_ENVIRONMENTAL_DAMAGE) ||
|
||||
(spellInfo->Effect[j] == SPELL_EFFECT_HEALTH_LEECH)
|
||||
)
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(j));
|
||||
if(!spellEffect)
|
||||
continue;
|
||||
if( (spellEffect->Effect == SPELL_EFFECT_SCHOOL_DAMAGE ) ||
|
||||
(spellEffect->Effect == SPELL_EFFECT_INSTAKILL) ||
|
||||
(spellEffect->Effect == SPELL_EFFECT_ENVIRONMENTAL_DAMAGE) ||
|
||||
(spellEffect->Effect == SPELL_EFFECT_HEALTH_LEECH )
|
||||
)
|
||||
{
|
||||
bcontinue = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (bcontinue) continue;
|
||||
|
||||
if (spellInfo->manaCost > GetPower(POWER_MANA))
|
||||
if (bcontinue)
|
||||
continue;
|
||||
|
||||
if(spellInfo->GetManaCost() > GetPower(POWER_MANA))
|
||||
continue;
|
||||
|
||||
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex);
|
||||
float range = GetSpellMaxRange(srange);
|
||||
float minrange = GetSpellMinRange(srange);
|
||||
|
|
@ -1658,12 +1665,16 @@ SpellEntry const* Creature::ReachWithSpellAttack(Unit* pVictim)
|
|||
// continue;
|
||||
if (dist > range || dist < minrange)
|
||||
continue;
|
||||
if (spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
|
||||
|
||||
if(spellInfo->GetPreventionType() == SPELL_PREVENTION_TYPE_SILENCE && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
continue;
|
||||
if (spellInfo->PreventionType == SPELL_PREVENTION_TYPE_PACIFY && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
|
||||
if(spellInfo->GetPreventionType() == SPELL_PREVENTION_TYPE_PACIFY && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
|
||||
continue;
|
||||
|
||||
return spellInfo;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -1686,7 +1697,8 @@ SpellEntry const* Creature::ReachWithSpellCure(Unit* pVictim)
|
|||
bool bcontinue = true;
|
||||
for (int j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
{
|
||||
if ((spellInfo->Effect[j] == SPELL_EFFECT_HEAL))
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(j));
|
||||
if( spellEffect && (spellEffect->Effect == SPELL_EFFECT_HEAL) )
|
||||
{
|
||||
bcontinue = false;
|
||||
break;
|
||||
|
|
@ -1695,8 +1707,9 @@ SpellEntry const* Creature::ReachWithSpellCure(Unit* pVictim)
|
|||
if (bcontinue)
|
||||
continue;
|
||||
|
||||
if (spellInfo->manaCost > GetPower(POWER_MANA))
|
||||
if(spellInfo->GetManaCost() > GetPower(POWER_MANA))
|
||||
continue;
|
||||
|
||||
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex);
|
||||
float range = GetSpellMaxRange(srange);
|
||||
float minrange = GetSpellMinRange(srange);
|
||||
|
|
@ -1707,12 +1720,15 @@ SpellEntry const* Creature::ReachWithSpellCure(Unit* pVictim)
|
|||
// continue;
|
||||
if (dist > range || dist < minrange)
|
||||
continue;
|
||||
if (spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
|
||||
if(spellInfo->GetPreventionType() == SPELL_PREVENTION_TYPE_SILENCE && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
continue;
|
||||
if (spellInfo->PreventionType == SPELL_PREVENTION_TYPE_PACIFY && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
|
||||
if(spellInfo->GetPreventionType() == SPELL_PREVENTION_TYPE_PACIFY && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
|
||||
continue;
|
||||
|
||||
return spellInfo;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -2147,8 +2163,8 @@ void Creature::AddCreatureSpellCooldown(uint32 spellid)
|
|||
if (cooldown)
|
||||
_AddCreatureSpellCooldown(spellid, time(NULL) + cooldown / IN_MILLISECONDS);
|
||||
|
||||
if (spellInfo->Category)
|
||||
_AddCreatureCategoryCooldown(spellInfo->Category, time(NULL));
|
||||
if(uint32 category = spellInfo->GetCategory())
|
||||
_AddCreatureCategoryCooldown(category, time(NULL));
|
||||
}
|
||||
|
||||
bool Creature::HasCategoryCooldown(uint32 spell_id) const
|
||||
|
|
@ -2157,8 +2173,8 @@ bool Creature::HasCategoryCooldown(uint32 spell_id) const
|
|||
if (!spellInfo)
|
||||
return false;
|
||||
|
||||
CreatureSpellCooldowns::const_iterator itr = m_CreatureCategoryCooldowns.find(spellInfo->Category);
|
||||
return (itr != m_CreatureCategoryCooldowns.end() && time_t(itr->second + (spellInfo->CategoryRecoveryTime / IN_MILLISECONDS)) > time(NULL));
|
||||
CreatureSpellCooldowns::const_iterator itr = m_CreatureCategoryCooldowns.find(spellInfo->GetCategory());
|
||||
return (itr != m_CreatureCategoryCooldowns.end() && time_t(itr->second + (spellInfo->GetCategoryRecoveryTime() / IN_MILLISECONDS)) > time(NULL));
|
||||
}
|
||||
|
||||
bool Creature::HasSpellCooldown(uint32 spell_id) const
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ CanCastResult CreatureAI::CanCastSpell(Unit* pTarget, const SpellEntry* pSpell,
|
|||
if (m_creature->hasUnitState(UNIT_STAT_CAN_NOT_REACT_OR_LOST_CONTROL))
|
||||
return CAST_FAIL_STATE;
|
||||
|
||||
if (pSpell->PreventionType == SPELL_PREVENTION_TYPE_SILENCE && m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
if (pSpell->GetPreventionType() == SPELL_PREVENTION_TYPE_SILENCE && m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
return CAST_FAIL_STATE;
|
||||
|
||||
if (pSpell->PreventionType == SPELL_PREVENTION_TYPE_PACIFY && m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
|
||||
if (pSpell->GetPreventionType() == SPELL_PREVENTION_TYPE_PACIFY && m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
|
||||
return CAST_FAIL_STATE;
|
||||
|
||||
// Check for power (also done by Spell::CheckCast())
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
// Client expected level limitation, like as used in DBC item max levels for "until max player level"
|
||||
// use as default max player level, must be fit max level for used client
|
||||
// also see MAX_LEVEL and STRONG_MAX_LEVEL define
|
||||
#define DEFAULT_MAX_LEVEL 80
|
||||
#define DEFAULT_MAX_LEVEL 85
|
||||
|
||||
// client supported max level for player/pets/etc. Avoid overflow or client stability affected.
|
||||
// also see GT_MAX_LEVEL define
|
||||
|
|
@ -68,7 +68,13 @@ enum AchievementFlags
|
|||
ACHIEVEMENT_FLAG_BAR = 0x00000080, // ACHIEVEMENT_FLAG_HAS_PROGRESS_BAR Show as progress bar (value / max vale) depend from other flag (by def use last criteria value)
|
||||
ACHIEVEMENT_FLAG_REALM_FIRST_REACH = 0x00000100, // ACHIEVEMENT_FLAG_SERVER_FIRST
|
||||
ACHIEVEMENT_FLAG_REALM_FIRST_KILL = 0x00000200, //
|
||||
|
||||
ACHIEVEMENT_FLAG_UNK3 = 0x00000400, // ACHIEVEMENT_FLAG_HIDE_NAME_IN_TIE
|
||||
ACHIEVEMENT_FLAG_REALM_FIRST_GUILD = 0x00000800, // first guild on realm done something
|
||||
ACHIEVEMENT_FLAG_UNK4 = 0x00001000, // as guild group?
|
||||
ACHIEVEMENT_FLAG_UNK5 = 0x00002000, // as guild group?
|
||||
ACHIEVEMENT_FLAG_GUILD = 0x00004000, //
|
||||
ACHIEVEMENT_FLAG_SHOW_GUILD_MEMBERS = 0x00008000, //
|
||||
ACHIEVEMENT_FLAG_SHOW_CRITERIA_MEMBERS = 0x00010000, //
|
||||
};
|
||||
|
||||
enum AchievementCriteriaCondition
|
||||
|
|
@ -106,9 +112,9 @@ enum AchievementCriteriaTypes
|
|||
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE = 11,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE = 13,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST = 14,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND = 15,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP = 16,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_DEATH = 17,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND= 15,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP= 16,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_DEATH= 17,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON = 18,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID = 19,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE = 20,
|
||||
|
|
@ -117,7 +123,7 @@ enum AchievementCriteriaTypes
|
|||
ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM = 26,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST = 27,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET = 28,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL = 29,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL= 29,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE = 30,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA = 31,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA = 32,
|
||||
|
|
@ -132,18 +138,18 @@ enum AchievementCriteriaTypes
|
|||
ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING = 39,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL = 40,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM = 41,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM = 42,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM= 42,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA = 43,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK = 44,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT = 45,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION = 46,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION = 47,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK= 44,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT= 45,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION= 46,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION= 47,
|
||||
// noted: rewarded as soon as the player payed, not at taking place at the seat
|
||||
ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP = 48,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP= 48,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM = 49,
|
||||
// TODO: itemlevel is mentioned in text but not present in dbc
|
||||
ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT = 50,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT = 51,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT= 51,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS = 52,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_HK_RACE = 53,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE = 54,
|
||||
|
|
@ -160,20 +166,20 @@ enum AchievementCriteriaTypes
|
|||
ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_MAIL = 66,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY = 67,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT = 68,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2 = 69,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL = 70,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2= 69,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL= 70,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT = 72,
|
||||
// TODO: title id is not mentioned in dbc
|
||||
ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN = 74,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS = 75,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS= 75,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL = 76,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_LOSE_DUEL = 77,
|
||||
// TODO: creature type (demon, undead etc.) is not stored in dbc
|
||||
ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE = 78,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS = 80,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION = 82,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID = 83,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS = 84,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS= 80,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION= 82,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID= 83,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS= 84,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_SOLD = 85,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_GOLD_VALUE_OWNED = 86,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION = 87,
|
||||
|
|
@ -200,7 +206,7 @@ enum AchievementCriteriaTypes
|
|||
ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE = 109,
|
||||
// TODO: target entry is missing
|
||||
ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2 = 110,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE = 112,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE= 112,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL = 113,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_ACCEPTED_SUMMONINGS = 114,
|
||||
ACHIEVEMENT_CRITERIA_TYPE_EARN_ACHIEVEMENT_POINTS = 115,
|
||||
|
|
@ -209,10 +215,47 @@ enum AchievementCriteriaTypes
|
|||
// 121 unused
|
||||
// 122 unused
|
||||
// 123 unused
|
||||
// 0..123 => 124 criteria types total
|
||||
// 124 Spend X gold on guildmember repairs.
|
||||
// 125 Reach guild level X
|
||||
// 126 Craft X items
|
||||
// 127 Catch X fish from fishing pools.
|
||||
// 128 Purchase the X guild bank tab.
|
||||
// 129 Earn X guild achievement points.
|
||||
// 130 Win X rated battlegrounds.
|
||||
// 131 unused
|
||||
// 132 Earn a battleground rating of X.
|
||||
// 133 Create and purchase a guild crest.
|
||||
// 134 Complete quests
|
||||
// 135 Honorable kills
|
||||
// 0..135 => 136 criteria types total
|
||||
};
|
||||
|
||||
#define ACHIEVEMENT_CRITERIA_TYPE_TOTAL 124
|
||||
#define ACHIEVEMENT_CRITERIA_TYPE_TOTAL 136
|
||||
|
||||
enum AchievementCriteriaMoreReqType
|
||||
{
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_ITEM_LEVEL = 3,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_CREATURE_ID = 4,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_SPELL = 8,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_SPELL_ON_TARGET = 10,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_ITEM_QUALITY_EQUIPPED = 14,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_ITEM_QUALITY_LOOTED = 15,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_AREA_ID = 17,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_AREA_ID2 = 18,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_RAID_DIFFICULTY = 20,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_ARENA_TYPE = 24,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_PLAYER_CLASS = 26,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_PLAYER_RACE = 27,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_PLAYER_CLASS2 = 28,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_CREATURE_TYPE = 30,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_MAP_ID = 32,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_TIMED_QUEST = 35,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_PLAYER_TITLE = 38,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_PLAYER_LEVEL = 39,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_PLAYER_LEVEL2 = 40,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_AREA_ID3 = 41,
|
||||
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_GUILD_REP = 62,
|
||||
};
|
||||
|
||||
enum AreaFlags
|
||||
{
|
||||
|
|
@ -253,7 +296,7 @@ enum Difficulty
|
|||
|
||||
DUNGEON_DIFFICULTY_NORMAL = 0,
|
||||
DUNGEON_DIFFICULTY_HEROIC = 1,
|
||||
// DUNGEON_DIFFICULTY_EPIC = 2, // not used, but exists
|
||||
//DUNGEON_DIFFICULTY_EPIC = 2, // not used, but exists
|
||||
|
||||
RAID_DIFFICULTY_10MAN_NORMAL = 0,
|
||||
RAID_DIFFICULTY_25MAN_NORMAL = 1,
|
||||
|
|
@ -296,7 +339,7 @@ enum FactionMasks
|
|||
FACTION_MASK_ALLIANCE = 2, // player or creature from alliance team
|
||||
FACTION_MASK_HORDE = 4, // player or creature from horde team
|
||||
FACTION_MASK_MONSTER = 8 // aggressive creature from monster team
|
||||
// if none flags set then non-aggressive creature
|
||||
// if none flags set then non-aggressive creature
|
||||
};
|
||||
|
||||
enum MapTypes // Lua_IsInInstance
|
||||
|
|
@ -334,8 +377,8 @@ enum ItemEnchantmentType
|
|||
|
||||
enum ItemLimitCategoryMode
|
||||
{
|
||||
ITEM_LIMIT_CATEGORY_MODE_HAVE = 0, // limit applied to amount items in inventory/bank
|
||||
ITEM_LIMIT_CATEGORY_MODE_EQUIP = 1, // limit applied to amount equipped items (including used gems)
|
||||
ITEM_LIMIT_CATEGORY_MODE_HAVE = 0, // limit applied to amount items in inventory/bank
|
||||
ITEM_LIMIT_CATEGORY_MODE_EQUIP = 1, // limit applied to amount equipped items (including used gems)
|
||||
};
|
||||
|
||||
// some used in code cases
|
||||
|
|
@ -355,55 +398,52 @@ enum TotemCategoryType
|
|||
TOTEM_CATEGORY_TYPE_SPANNER = 24
|
||||
};
|
||||
|
||||
// SummonProperties.dbc, col 0 == Id (m_id)
|
||||
// SummonProperties.dbc, col 1 == Group (m_control)
|
||||
// SummonProperties.dbc, col 1
|
||||
enum SummonPropGroup
|
||||
{
|
||||
SUMMON_PROP_GROUP_WILD = 0,
|
||||
SUMMON_PROP_GROUP_FRIENDLY = 1,
|
||||
SUMMON_PROP_GROUP_PETS = 2,
|
||||
SUMMON_PROP_GROUP_CONTROLLABLE = 3,
|
||||
SUMMON_PROP_GROUP_VEHICLE = 4
|
||||
SUMMON_PROP_GROUP_WILD = 0,
|
||||
SUMMON_PROP_GROUP_FRIENDLY = 1,
|
||||
SUMMON_PROP_GROUP_PETS = 2,
|
||||
SUMMON_PROP_GROUP_CONTROLLABLE = 3,
|
||||
SUMMON_PROP_GROUP_VEHICLE = 4
|
||||
};
|
||||
|
||||
// SummonProperties.dbc, col 2 == FactionId (m_faction)
|
||||
// SummonProperties.dbc, col 3 == Title (m_title)
|
||||
// SummonProperties.dbc, col 3
|
||||
enum UnitNameSummonTitle
|
||||
{
|
||||
UNITNAME_SUMMON_TITLE_NONE = 0, // no default title, different summons, 1330 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_PET = 1, // 's Pet, generic summons, 49 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_GUARDIAN = 2, // 's Guardian, summon guardian, 393 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_MINION = 3, // 's Minion, summon army, 5 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_TOTEM = 4, // 's Totem, summon totem, 169 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_COMPANION = 5, // 's Companion, critter/minipet, 195 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_RUNEBLADE = 6, // 's Runeblade, summon DRW/Ghoul, 2 spells in 3.0.3"
|
||||
UNITNAME_SUMMON_TITLE_CONSTRUCT = 7, // 's Construct, summon bot/bomb, 4 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_OPPONENT = 8, // 's Opponent, something todo with DK prequest line, 2 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_VEHICLE = 9, // 's Vehicle, summon different vehicles, 14 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_MOUNT = 10, // 's Mount, summon drake (vehicle), 3 spells
|
||||
UNITNAME_SUMMON_TITLE_LIGHTWELL = 11, // 's Lightwell, summon lightwell, 6 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_BUTLER = 12 // 's Butler, summon repair bot, 1 spells in 3.2.2a
|
||||
UNITNAME_SUMMON_TITLE_NONE = 0, // no default title, different summons, 1330 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_PET = 1, // 's Pet, generic summons, 49 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_GUARDIAN = 2, // 's Guardian, summon guardian, 393 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_MINION = 3, // 's Minion, summon army, 5 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_TOTEM = 4, // 's Totem, summon totem, 169 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_COMPANION = 5, // 's Companion, critter/minipet, 195 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_RUNEBLADE = 6, // 's Runeblade, summon DRW/Ghoul, 2 spells in 3.0.3"
|
||||
UNITNAME_SUMMON_TITLE_CONSTRUCT = 7, // 's Construct, summon bot/bomb, 4 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_OPPONENT = 8, // 's Opponent, something todo with DK prequest line, 2 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_VEHICLE = 9, // 's Vehicle, summon different vehicles, 14 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_MOUNT = 10, // 's Mount, summon drake (vehicle), 3 spells
|
||||
UNITNAME_SUMMON_TITLE_LIGHTWELL = 11, // 's Lightwell, summon lightwell, 6 spells in 3.0.3
|
||||
UNITNAME_SUMMON_TITLE_BUTLER = 12 // 's Butler, summon repair bot, 1 spells in 3.2.2a
|
||||
};
|
||||
|
||||
// SummonProperties.dbc, col 4 == Slot (m_slot)
|
||||
// SummonProperties.dbc, col 5 == Flags (m_flags)
|
||||
// SummonProperties.dbc, col 5
|
||||
enum SummonPropFlags
|
||||
{
|
||||
SUMMON_PROP_FLAG_NONE = 0x0000, // 1342 spells in 3.0.3
|
||||
SUMMON_PROP_FLAG_UNK1 = 0x0001, // 75 spells in 3.0.3, something unfriendly
|
||||
SUMMON_PROP_FLAG_UNK2 = 0x0002, // 616 spells in 3.0.3, something friendly
|
||||
SUMMON_PROP_FLAG_UNK3 = 0x0004, // 22 spells in 3.0.3, no idea...
|
||||
SUMMON_PROP_FLAG_UNK4 = 0x0008, // 49 spells in 3.0.3, some mounts
|
||||
SUMMON_PROP_FLAG_UNK5 = 0x0010, // 25 spells in 3.0.3, quest related?
|
||||
SUMMON_PROP_FLAG_CANT_BE_DISMISSED = 0x0020, // 0 spells in 3.0.3, unused
|
||||
SUMMON_PROP_FLAG_UNK7 = 0x0040, // 12 spells in 3.0.3, no idea
|
||||
SUMMON_PROP_FLAG_UNK8 = 0x0080, // 4 spells in 3.0.3, no idea
|
||||
SUMMON_PROP_FLAG_UNK9 = 0x0100, // 51 spells in 3.0.3, no idea, many quest related
|
||||
SUMMON_PROP_FLAG_UNK10 = 0x0200, // 51 spells in 3.0.3, something defensive
|
||||
SUMMON_PROP_FLAG_UNK11 = 0x0400, // 3 spells, requires something near?
|
||||
SUMMON_PROP_FLAG_UNK12 = 0x0800, // 30 spells in 3.0.3, no idea
|
||||
SUMMON_PROP_FLAG_UNK13 = 0x1000, // 8 spells in 3.0.3, siege vehicle
|
||||
SUMMON_PROP_FLAG_UNK14 = 0x2000, // 2 spells in 3.0.3, escort?
|
||||
SUMMON_PROP_FLAG_NONE = 0x0000, // 1342 spells in 3.0.3
|
||||
SUMMON_PROP_FLAG_UNK1 = 0x0001, // 75 spells in 3.0.3, something unfriendly
|
||||
SUMMON_PROP_FLAG_UNK2 = 0x0002, // 616 spells in 3.0.3, something friendly
|
||||
SUMMON_PROP_FLAG_UNK3 = 0x0004, // 22 spells in 3.0.3, no idea...
|
||||
SUMMON_PROP_FLAG_UNK4 = 0x0008, // 49 spells in 3.0.3, some mounts
|
||||
SUMMON_PROP_FLAG_UNK5 = 0x0010, // 25 spells in 3.0.3, quest related?
|
||||
SUMMON_PROP_FLAG_CANT_BE_DISMISSED = 0x0020, // 0 spells in 3.0.3, unused
|
||||
SUMMON_PROP_FLAG_UNK7 = 0x0040, // 12 spells in 3.0.3, no idea
|
||||
SUMMON_PROP_FLAG_UNK8 = 0x0080, // 4 spells in 3.0.3, no idea
|
||||
SUMMON_PROP_FLAG_UNK9 = 0x0100, // 51 spells in 3.0.3, no idea, many quest related
|
||||
SUMMON_PROP_FLAG_UNK10 = 0x0200, // 51 spells in 3.0.3, something defensive
|
||||
SUMMON_PROP_FLAG_UNK11 = 0x0400, // 3 spells, requires something near?
|
||||
SUMMON_PROP_FLAG_UNK12 = 0x0800, // 30 spells in 3.0.3, no idea
|
||||
SUMMON_PROP_FLAG_UNK13 = 0x1000, // 8 spells in 3.0.3, siege vehicle
|
||||
SUMMON_PROP_FLAG_UNK14 = 0x2000, // 2 spells in 3.0.3, escort?
|
||||
};
|
||||
|
||||
// SpellEntry::Targets
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -35,6 +35,7 @@ char const* GetPetName(uint32 petfamily, uint32 dbclang);
|
|||
uint32 GetTalentSpellCost(uint32 spellId);
|
||||
uint32 GetTalentSpellCost(TalentSpellPos const* pos);
|
||||
TalentSpellPos const* GetTalentSpellPos(uint32 spellId);
|
||||
SpellEffectEntry const* GetSpellEffectEntry(uint32 spellId, SpellEffectIndex effect);
|
||||
|
||||
int32 GetAreaFlagByAreaID(uint32 area_id); // -1 if not found
|
||||
uint32 GetAreaFlagByMapId(uint32 mapid);
|
||||
|
|
@ -42,7 +43,7 @@ uint32 GetAreaFlagByMapId(uint32 mapid);
|
|||
WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid);
|
||||
|
||||
MANGOS_DLL_SPEC AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id);
|
||||
MANGOS_DLL_SPEC AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_id);
|
||||
MANGOS_DLL_SPEC AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag,uint32 map_id);
|
||||
|
||||
uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId);
|
||||
|
||||
|
|
@ -58,10 +59,10 @@ ChatChannelsEntry const* GetChannelEntryFor(uint32 channel_id);
|
|||
|
||||
bool IsTotemCategoryCompatiableWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId);
|
||||
|
||||
bool Zone2MapCoordinates(float& x, float& y, uint32 zone);
|
||||
bool Map2ZoneCoordinates(float& x, float& y, uint32 zone);
|
||||
bool Zone2MapCoordinates(float& x,float& y,uint32 zone);
|
||||
bool Map2ZoneCoordinates(float& x,float& y,uint32 zone);
|
||||
|
||||
typedef std::map < uint32/*pair32(map,diff)*/, MapDifficulty > MapDifficultyMap;
|
||||
typedef std::map<uint32/*pair32(map,diff)*/,MapDifficulty> MapDifficultyMap;
|
||||
MapDifficulty const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty);
|
||||
|
||||
// natural order for difficulties up-down iteration
|
||||
|
|
@ -100,14 +101,16 @@ extern DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore;
|
|||
extern DBCStorage <AreaTableEntry> sAreaStore;// recommend access using functions
|
||||
extern DBCStorage <AreaGroupEntry> sAreaGroupStore;
|
||||
extern DBCStorage <AreaTriggerEntry> sAreaTriggerStore;
|
||||
extern DBCStorage <ArmorLocationEntry> sArmorLocationStore;
|
||||
extern DBCStorage <AuctionHouseEntry> sAuctionHouseStore;
|
||||
extern DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore;
|
||||
extern DBCStorage <BarberShopStyleEntry> sBarberShopStyleStore;
|
||||
extern DBCStorage <BattlemasterListEntry> sBattlemasterListStore;
|
||||
// extern DBCStorage <ChatChannelsEntry> sChatChannelsStore; -- accessed using function, no usable index
|
||||
//extern DBCStorage <ChatChannelsEntry> sChatChannelsStore; -- accessed using function, no usable index
|
||||
extern DBCStorage <CharStartOutfitEntry> sCharStartOutfitStore;
|
||||
extern DBCStorage <CharTitlesEntry> sCharTitlesStore;
|
||||
extern DBCStorage <ChrClassesEntry> sChrClassesStore;
|
||||
extern DBCStorage <ChrPowerTypesEntry> sChrPowerTypesStore;
|
||||
extern DBCStorage <ChrRacesEntry> sChrRacesStore;
|
||||
extern DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore;
|
||||
extern DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore;
|
||||
|
|
@ -115,7 +118,7 @@ extern DBCStorage <CreatureDisplayInfoExtraEntry>sCreatureDisplayInfoExtraStore;
|
|||
extern DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore;
|
||||
extern DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore;
|
||||
extern DBCStorage <CreatureTypeEntry> sCreatureTypeStore;
|
||||
extern DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore;
|
||||
//extern DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore;
|
||||
extern DBCStorage <DungeonEncounterEntry> sDungeonEncounterStore;
|
||||
extern DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore;
|
||||
extern DBCStorage <DurabilityQualityEntry> sDurabilityQualityStore;
|
||||
|
|
@ -135,16 +138,26 @@ extern DBCStorage <GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore;
|
|||
extern DBCStorage <GtChanceToSpellCritBaseEntry> sGtChanceToSpellCritBaseStore;
|
||||
extern DBCStorage <GtChanceToSpellCritEntry> sGtChanceToSpellCritStore;
|
||||
extern DBCStorage <GtOCTClassCombatRatingScalarEntry> sGtOCTClassCombatRatingScalarStore;
|
||||
extern DBCStorage <GtOCTRegenHPEntry> sGtOCTRegenHPStore;
|
||||
// extern DBCStorage <GtOCTRegenMPEntry> sGtOCTRegenMPStore; -- not used currently
|
||||
extern DBCStorage <GtRegenHPPerSptEntry> sGtRegenHPPerSptStore;
|
||||
//extern DBCStorage <GtOCTRegenHPEntry> sGtOCTRegenHPStore;
|
||||
//extern DBCStorage <GtOCTRegenMPEntry> sGtOCTRegenMPStore; -- not used currently
|
||||
//extern DBCStorage <GtRegenHPPerSptEntry> sGtRegenHPPerSptStore;
|
||||
extern DBCStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore;
|
||||
extern DBCStorage <HolidaysEntry> sHolidaysStore;
|
||||
extern DBCStorage <ItemEntry> sItemStore;
|
||||
extern DBCStorage <ItemArmorQualityEntry> sItemArmorQualityStore;
|
||||
extern DBCStorage <ItemArmorShieldEntry> sItemArmorShieldStore;
|
||||
extern DBCStorage <ItemArmorTotalEntry> sItemArmorTotalStore;
|
||||
extern DBCStorage <ItemBagFamilyEntry> sItemBagFamilyStore;
|
||||
extern DBCStorage <ItemClassEntry> sItemClassStore;
|
||||
// extern DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore; -- not used currently
|
||||
extern DBCStorage <ItemExtendedCostEntry> sItemExtendedCostStore;
|
||||
extern DBCStorage <ItemDamageEntry> sItemDamageAmmoStore;
|
||||
extern DBCStorage <ItemDamageEntry> sItemDamageOneHandStore;
|
||||
extern DBCStorage <ItemDamageEntry> sItemDamageOneHandCasterStore;
|
||||
extern DBCStorage <ItemDamageEntry> sItemDamageRangedStore;
|
||||
extern DBCStorage <ItemDamageEntry> sItemDamageThrownStore;
|
||||
extern DBCStorage <ItemDamageEntry> sItemDamageTwoHandStore;
|
||||
extern DBCStorage <ItemDamageEntry> sItemDamageTwoHandCasterStore;
|
||||
extern DBCStorage <ItemDamageEntry> sItemDamageWandStore;
|
||||
//extern DBCStorage <ItemExtendedCostEntry> sItemExtendedCostStore;
|
||||
//extern DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore; -- not used currently
|
||||
extern DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore;
|
||||
extern DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore;
|
||||
extern DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore;
|
||||
|
|
@ -152,14 +165,15 @@ extern DBCStorage <ItemSetEntry> sItemSetStore;
|
|||
extern DBCStorage <LockEntry> sLockStore;
|
||||
extern DBCStorage <MailTemplateEntry> sMailTemplateStore;
|
||||
extern DBCStorage <MapEntry> sMapStore;
|
||||
// extern DBCStorage <MapDifficultyEntry> sMapDifficultyStore; -- use GetMapDifficultyData insteed
|
||||
//extern DBCStorage <MapDifficultyEntry> sMapDifficultyStore; -- use GetMapDifficultyData insteed
|
||||
extern MapDifficultyMap sMapDifficultyMap;
|
||||
extern DBCStorage <MovieEntry> sMovieStore;
|
||||
extern DBCStorage <OverrideSpellDataEntry> sOverrideSpellDataStore;
|
||||
extern DBCStorage <QuestFactionRewardEntry> sQuestFactionRewardStore;
|
||||
extern DBCStorage <QuestSortEntry> sQuestSortStore;
|
||||
extern DBCStorage <QuestXPLevel> sQuestXPLevelStore;
|
||||
// extern DBCStorage <PvPDifficultyEntry> sPvPDifficultyStore; -- use GetBattlegroundSlotByLevel for access
|
||||
extern DBCStorage <PhaseEntry> sPhaseStore;
|
||||
//extern DBCStorage <PvPDifficultyEntry> sPvPDifficultyStore; -- use GetBattlegroundSlotByLevel for access
|
||||
extern DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore;
|
||||
extern DBCStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore;
|
||||
extern DBCStorage <ScalingStatValuesEntry> sScalingStatValuesStore;
|
||||
|
|
@ -180,7 +194,23 @@ extern DBCStorage <SpellRangeEntry> sSpellRangeStore;
|
|||
extern DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore;
|
||||
extern DBCStorage <SpellShapeshiftFormEntry> sSpellShapeshiftFormStore;
|
||||
extern DBCStorage <SpellEntry> sSpellStore;
|
||||
extern DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore;
|
||||
extern DBCStorage <SpellAuraOptionsEntry> sSpellAuraOptionsStore;
|
||||
extern DBCStorage <SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore;
|
||||
extern DBCStorage <SpellCastingRequirementsEntry> sSpellCastingRequirementsStore;
|
||||
extern DBCStorage <SpellCategoriesEntry> sSpellCategoriesStore;
|
||||
extern DBCStorage <SpellClassOptionsEntry> sSpellClassOptionsStore;
|
||||
extern DBCStorage <SpellCooldownsEntry> sSpellCooldownsStore;
|
||||
extern DBCStorage <SpellEffectEntry> sSpellEffectStore;
|
||||
extern DBCStorage <SpellEquippedItemsEntry> sSpellEquippedItemsStore;
|
||||
extern DBCStorage <SpellInterruptsEntry> sSpellInterruptsStore;
|
||||
extern DBCStorage <SpellLevelsEntry> sSpellLevelsStore;
|
||||
extern DBCStorage <SpellPowerEntry> sSpellPowerStore;
|
||||
extern DBCStorage <SpellReagentsEntry> sSpellReagentsStore;
|
||||
extern DBCStorage <SpellScalingEntry> sSpellScalingStore;
|
||||
extern DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore;
|
||||
extern DBCStorage <SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore;
|
||||
extern DBCStorage <SpellTotemsEntry> sSpellTotemsStore;
|
||||
//extern DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore;
|
||||
extern DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore;
|
||||
extern DBCStorage <TalentEntry> sTalentStore;
|
||||
extern DBCStorage <TalentTabEntry> sTalentTabStore;
|
||||
|
|
@ -190,12 +220,11 @@ extern TaxiMask sTaxiNodesMask;
|
|||
extern TaxiMask sOldContinentsNodesMask;
|
||||
extern TaxiPathSetBySource sTaxiPathSetBySource;
|
||||
extern TaxiPathNodesByPath sTaxiPathNodesByPath;
|
||||
extern DBCStorage <TeamContributionPoints> sTeamContributionPoints;
|
||||
extern DBCStorage <TotemCategoryEntry> sTotemCategoryStore;
|
||||
extern DBCStorage <VehicleEntry> sVehicleStore;
|
||||
extern DBCStorage <VehicleSeatEntry> sVehicleSeatStore;
|
||||
extern DBCStorage <WMOAreaTableEntry> sWMOAreaTableStore;
|
||||
// extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates
|
||||
//extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates
|
||||
extern DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore;
|
||||
extern DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore;
|
||||
|
||||
|
|
@ -206,9 +235,7 @@ MANGOS_DLL_SPEC DBCStorage <SoundEntriesEntry> const* GetSoundEntriesSt
|
|||
MANGOS_DLL_SPEC DBCStorage <SpellEntry> const* GetSpellStore();
|
||||
MANGOS_DLL_SPEC DBCStorage <SpellRangeEntry> const* GetSpellRangeStore();
|
||||
MANGOS_DLL_SPEC DBCStorage <FactionEntry> const* GetFactionStore();
|
||||
MANGOS_DLL_SPEC DBCStorage <ItemEntry> const* GetItemDisplayStore();
|
||||
MANGOS_DLL_SPEC DBCStorage <CreatureDisplayInfoEntry> const* GetCreatureDisplayStore();
|
||||
MANGOS_DLL_SPEC DBCStorage <EmotesEntry> const* GetEmotesStore();
|
||||
MANGOS_DLL_SPEC DBCStorage <EmotesTextEntry> const* GetEmotesTextStore();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
353
src/game/DBCStructure.cpp
Normal file
353
src/game/DBCStructure.cpp
Normal file
|
|
@ -0,0 +1,353 @@
|
|||
/*
|
||||
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "DBCStructure.h"
|
||||
#include "DBCStores.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
int32 SpellEntry::CalculateSimpleValue(SpellEffectIndex eff) const
|
||||
{
|
||||
if(SpellEffectEntry const* effectEntry = GetSpellEffectEntry(Id, eff))
|
||||
return effectEntry->CalculateSimpleValue();
|
||||
return 0;
|
||||
}
|
||||
|
||||
ClassFamilyMask const& SpellEntry::GetEffectSpellClassMask(SpellEffectIndex eff) const
|
||||
{
|
||||
if (SpellEffectEntry const* effectEntry = GetSpellEffectEntry(Id, eff))
|
||||
return effectEntry->EffectSpellClassMask;
|
||||
|
||||
static ClassFamilyMask const emptyCFM;
|
||||
|
||||
return emptyCFM;
|
||||
}
|
||||
|
||||
SpellAuraOptionsEntry const* SpellEntry::GetSpellAuraOptions() const
|
||||
{
|
||||
return SpellAuraOptionsId ? sSpellAuraOptionsStore.LookupEntry(SpellAuraOptionsId) : NULL;
|
||||
}
|
||||
|
||||
SpellAuraRestrictionsEntry const* SpellEntry::GetSpellAuraRestrictions() const
|
||||
{
|
||||
return SpellAuraRestrictionsId ? sSpellAuraRestrictionsStore.LookupEntry(SpellAuraRestrictionsId) : NULL;
|
||||
}
|
||||
|
||||
SpellCastingRequirementsEntry const* SpellEntry::GetSpellCastingRequirements() const
|
||||
{
|
||||
return SpellCastingRequirementsId ? sSpellCastingRequirementsStore.LookupEntry(SpellCastingRequirementsId) : NULL;
|
||||
}
|
||||
|
||||
SpellCategoriesEntry const* SpellEntry::GetSpellCategories() const
|
||||
{
|
||||
return SpellCategoriesId ? sSpellCategoriesStore.LookupEntry(SpellCategoriesId) : NULL;
|
||||
}
|
||||
|
||||
SpellClassOptionsEntry const* SpellEntry::GetSpellClassOptions() const
|
||||
{
|
||||
return SpellClassOptionsId ? sSpellClassOptionsStore.LookupEntry(SpellClassOptionsId) : NULL;
|
||||
}
|
||||
|
||||
SpellCooldownsEntry const* SpellEntry::GetSpellCooldowns() const
|
||||
{
|
||||
return SpellCooldownsId ? sSpellCooldownsStore.LookupEntry(SpellCooldownsId) : NULL;
|
||||
}
|
||||
|
||||
SpellEffectEntry const* SpellEntry::GetSpellEffect(SpellEffectIndex eff) const
|
||||
{
|
||||
return GetSpellEffectEntry(Id, eff);
|
||||
}
|
||||
|
||||
SpellEquippedItemsEntry const* SpellEntry::GetSpellEquippedItems() const
|
||||
{
|
||||
return SpellEquippedItemsId ? sSpellEquippedItemsStore.LookupEntry(SpellEquippedItemsId) : NULL;
|
||||
}
|
||||
|
||||
SpellInterruptsEntry const* SpellEntry::GetSpellInterrupts() const
|
||||
{
|
||||
return SpellInterruptsId ? sSpellInterruptsStore.LookupEntry(SpellInterruptsId) : NULL;
|
||||
}
|
||||
|
||||
SpellLevelsEntry const* SpellEntry::GetSpellLevels() const
|
||||
{
|
||||
return SpellLevelsId ? sSpellLevelsStore.LookupEntry(SpellLevelsId) : NULL;
|
||||
}
|
||||
|
||||
SpellPowerEntry const* SpellEntry::GetSpellPower() const
|
||||
{
|
||||
return SpellPowerId ? sSpellPowerStore.LookupEntry(SpellPowerId) : NULL;
|
||||
}
|
||||
|
||||
SpellReagentsEntry const* SpellEntry::GetSpellReagents() const
|
||||
{
|
||||
return SpellReagentsId ? sSpellReagentsStore.LookupEntry(SpellReagentsId) : NULL;
|
||||
}
|
||||
|
||||
SpellScalingEntry const* SpellEntry::GetSpellScaling() const
|
||||
{
|
||||
return SpellScalingId ? sSpellScalingStore.LookupEntry(SpellScalingId) : NULL;
|
||||
}
|
||||
|
||||
SpellShapeshiftEntry const* SpellEntry::GetSpellShapeshift() const
|
||||
{
|
||||
return SpellShapeshiftId ? sSpellShapeshiftStore.LookupEntry(SpellShapeshiftId) : NULL;
|
||||
}
|
||||
|
||||
SpellTargetRestrictionsEntry const* SpellEntry::GetSpellTargetRestrictions() const
|
||||
{
|
||||
return SpellTargetRestrictionsId ? sSpellTargetRestrictionsStore.LookupEntry(SpellTargetRestrictionsId) : NULL;
|
||||
}
|
||||
|
||||
SpellTotemsEntry const* SpellEntry::GetSpellTotems() const
|
||||
{
|
||||
return SpellTotemsId ? sSpellTotemsStore.LookupEntry(SpellTotemsId) : NULL;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetManaCost() const
|
||||
{
|
||||
SpellPowerEntry const* power = GetSpellPower();
|
||||
return power ? power->manaCost : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetPreventionType() const
|
||||
{
|
||||
SpellCategoriesEntry const* cat = GetSpellCategories();
|
||||
return cat ? cat->PreventionType : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetCategory() const
|
||||
{
|
||||
SpellCategoriesEntry const* cat = GetSpellCategories();
|
||||
return cat ? cat->Category : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetStartRecoveryTime() const
|
||||
{
|
||||
SpellCooldownsEntry const* cd = GetSpellCooldowns();
|
||||
return cd ? cd->StartRecoveryTime : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetMechanic() const
|
||||
{
|
||||
SpellCategoriesEntry const* cat = GetSpellCategories();
|
||||
return cat ? cat->Mechanic : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetRecoveryTime() const
|
||||
{
|
||||
SpellCooldownsEntry const* cd = GetSpellCooldowns();
|
||||
return cd ? cd->RecoveryTime : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetCategoryRecoveryTime() const
|
||||
{
|
||||
SpellCooldownsEntry const* cd = GetSpellCooldowns();
|
||||
return cd ? cd->CategoryRecoveryTime : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetStartRecoveryCategory() const
|
||||
{
|
||||
SpellCategoriesEntry const* cat = GetSpellCategories();
|
||||
return cat ? cat->StartRecoveryCategory : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetSpellLevel() const
|
||||
{
|
||||
SpellLevelsEntry const* levels = GetSpellLevels();
|
||||
return levels ? levels->spellLevel : 0;
|
||||
}
|
||||
|
||||
int32 SpellEntry::GetEquippedItemClass() const
|
||||
{
|
||||
SpellEquippedItemsEntry const* items = GetSpellEquippedItems();
|
||||
return items ? items->EquippedItemClass : -1;
|
||||
}
|
||||
|
||||
SpellFamily SpellEntry::GetSpellFamilyName() const
|
||||
{
|
||||
SpellClassOptionsEntry const* classOpt = GetSpellClassOptions();
|
||||
return classOpt ? SpellFamily(classOpt->SpellFamilyName) : SPELLFAMILY_GENERIC;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetDmgClass() const
|
||||
{
|
||||
SpellCategoriesEntry const* cat = GetSpellCategories();
|
||||
return cat ? cat->DmgClass : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetDispel() const
|
||||
{
|
||||
SpellCategoriesEntry const* cat = GetSpellCategories();
|
||||
return cat ? cat->Dispel : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetMaxAffectedTargets() const
|
||||
{
|
||||
SpellTargetRestrictionsEntry const* target = GetSpellTargetRestrictions();
|
||||
return target ? target->MaxAffectedTargets : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetStackAmount() const
|
||||
{
|
||||
SpellAuraOptionsEntry const* aura = GetSpellAuraOptions();
|
||||
return aura ? aura->StackAmount : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetManaCostPercentage() const
|
||||
{
|
||||
SpellPowerEntry const* power = GetSpellPower();
|
||||
return power ? power->ManaCostPercentage : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetProcCharges() const
|
||||
{
|
||||
SpellAuraOptionsEntry const* aura = GetSpellAuraOptions();
|
||||
return aura ? aura->procCharges : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetProcChance() const
|
||||
{
|
||||
SpellAuraOptionsEntry const* aura = GetSpellAuraOptions();
|
||||
return aura ? aura->procChance : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetMaxLevel() const
|
||||
{
|
||||
SpellLevelsEntry const* levels = GetSpellLevels();
|
||||
return levels ? levels->maxLevel : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetTargetAuraState() const
|
||||
{
|
||||
SpellAuraRestrictionsEntry const* aura = GetSpellAuraRestrictions();
|
||||
return aura ? aura->TargetAuraState : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetManaPerSecond() const
|
||||
{
|
||||
SpellPowerEntry const* power = GetSpellPower();
|
||||
return power ? power->manaPerSecond : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetRequiresSpellFocus() const
|
||||
{
|
||||
SpellCastingRequirementsEntry const* castReq = GetSpellCastingRequirements();
|
||||
return castReq ? castReq->RequiresSpellFocus : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetSpellEffectIdByIndex(SpellEffectIndex index) const
|
||||
{
|
||||
SpellEffectEntry const* effect = GetSpellEffect(index);
|
||||
return effect ? effect->Effect : SPELL_EFFECT_NONE;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetAuraInterruptFlags() const
|
||||
{
|
||||
SpellInterruptsEntry const* interrupt = GetSpellInterrupts();
|
||||
return interrupt ? interrupt->AuraInterruptFlags : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetEffectImplicitTargetAByIndex(SpellEffectIndex index) const
|
||||
{
|
||||
SpellEffectEntry const* effect = GetSpellEffect(index);
|
||||
return effect ? effect->EffectImplicitTargetA : TARGET_NONE;
|
||||
}
|
||||
|
||||
int32 SpellEntry::GetAreaGroupId() const
|
||||
{
|
||||
SpellCastingRequirementsEntry const* castReq = GetSpellCastingRequirements();
|
||||
return castReq ? castReq->AreaGroupId : -1;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetFacingCasterFlags() const
|
||||
{
|
||||
SpellCastingRequirementsEntry const* castReq = GetSpellCastingRequirements();
|
||||
return castReq ? castReq->FacingCasterFlags : -1;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetBaseLevel() const
|
||||
{
|
||||
SpellLevelsEntry const* levels = GetSpellLevels();
|
||||
return levels ? levels->baseLevel : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetInterruptFlags() const
|
||||
{
|
||||
SpellInterruptsEntry const* interrupt = GetSpellInterrupts();
|
||||
return interrupt ? interrupt->InterruptFlags : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetTargetCreatureType() const
|
||||
{
|
||||
SpellTargetRestrictionsEntry const* target = GetSpellTargetRestrictions();
|
||||
return target ? target->TargetCreatureType : 0;
|
||||
}
|
||||
|
||||
int32 SpellEntry::GetEffectMiscValue(SpellEffectIndex index) const
|
||||
{
|
||||
SpellEffectEntry const* effect = GetSpellEffect(index);
|
||||
return effect ? effect->EffectMiscValue : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetStances() const
|
||||
{
|
||||
SpellShapeshiftEntry const* ss = GetSpellShapeshift();
|
||||
return ss ? ss->Stances : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetStancesNot() const
|
||||
{
|
||||
SpellShapeshiftEntry const* ss = GetSpellShapeshift();
|
||||
return ss ? ss->StancesNot : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetProcFlags() const
|
||||
{
|
||||
SpellAuraOptionsEntry const* aura = GetSpellAuraOptions();
|
||||
return aura ? aura->procFlags : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetChannelInterruptFlags() const
|
||||
{
|
||||
SpellInterruptsEntry const* interrupt = GetSpellInterrupts();
|
||||
return interrupt ? interrupt->ChannelInterruptFlags : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetManaCostPerLevel() const
|
||||
{
|
||||
SpellPowerEntry const* power = GetSpellPower();
|
||||
return power ? power->manaCostPerlevel : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetCasterAuraState() const
|
||||
{
|
||||
SpellAuraRestrictionsEntry const* aura = GetSpellAuraRestrictions();
|
||||
return aura ? aura->CasterAuraState : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetTargets() const
|
||||
{
|
||||
SpellTargetRestrictionsEntry const* target = GetSpellTargetRestrictions();
|
||||
return target ? target->Targets : 0;
|
||||
}
|
||||
|
||||
uint32 SpellEntry::GetEffectApplyAuraNameByIndex(SpellEffectIndex index) const
|
||||
{
|
||||
SpellEffectEntry const* effect = GetSpellEffect(index);
|
||||
return effect ? effect->EffectApplyAuraName : 0;
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -19,103 +19,123 @@
|
|||
#ifndef MANGOS_DBCSFRM_H
|
||||
#define MANGOS_DBCSFRM_H
|
||||
|
||||
const char Achievementfmt[] = "niixssssssssssssssssxxxxxxxxxxxxxxxxxxiixixxxxxxxxxxxxxxxxxxii";
|
||||
const char AchievementCriteriafmt[] = "niiiiiiiissssssssssssssssxixiii";
|
||||
const char AreaTableEntryfmt[] = "iiinixxxxxissssssssssssssssxixxxxxxx";
|
||||
const char AreaGroupEntryfmt[] = "niiiiiii";
|
||||
const char AreaTriggerEntryfmt[] = "niffffffff";
|
||||
const char AuctionHouseEntryfmt[] = "niiixxxxxxxxxxxxxxxxx";
|
||||
const char BankBagSlotPricesEntryfmt[] = "ni";
|
||||
const char BarberShopStyleEntryfmt[] = "nixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiii";
|
||||
const char BattlemasterListEntryfmt[] = "niiiiiiiiixssssssssssssssssxiiii";
|
||||
const char CharStartOutfitEntryfmt[] = "diiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
const char CharTitlesEntryfmt[] = "nxssssssssssssssssxxxxxxxxxxxxxxxxxxi";
|
||||
const char ChatChannelsEntryfmt[] = "iixssssssssssssssssxxxxxxxxxxxxxxxxxx";
|
||||
// ChatChannelsEntryfmt, index not used (more compact store)
|
||||
const char ChrClassesEntryfmt[] = "nxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixii";
|
||||
const char ChrRacesEntryfmt[] = "nxixiixixxxxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi";
|
||||
const char CinematicSequencesEntryfmt[] = "nxxxxxxxxx";
|
||||
const char CreatureDisplayInfofmt[] = "nxxifxxxxxxxxxxx";
|
||||
const char CreatureDisplayInfoExtrafmt[] = "nixxxxxxxxxxxxxxxxxxx";
|
||||
const char CreatureFamilyfmt[] = "nfifiiiiixssssssssssssssssxx";
|
||||
const char CreatureSpellDatafmt[] = "niiiixxxx";
|
||||
const char CreatureTypefmt[] = "nxxxxxxxxxxxxxxxxxx";
|
||||
const char CurrencyTypesfmt[] = "xnxi";
|
||||
const char DungeonEncounterfmt[] = "niiiissssssssssssssssxx";
|
||||
const char DurabilityCostsfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii";
|
||||
const char DurabilityQualityfmt[] = "nf";
|
||||
const char EmotesEntryfmt[] = "nxxiiix";
|
||||
const char EmotesTextEntryfmt[] = "nxixxxxxxxxxxxxxxxx";
|
||||
const char FactionEntryfmt[] = "niiiiiiiiiiiiiiiiiiffixssssssssssssssssxxxxxxxxxxxxxxxxxx";
|
||||
const char FactionTemplateEntryfmt[] = "niiiiiiiiiiiii";
|
||||
const char GameObjectDisplayInfofmt[] = "nxxxxxxxxxxxfxxxxxx";
|
||||
const char GemPropertiesEntryfmt[] = "nixxi";
|
||||
const char GlyphPropertiesfmt[] = "niii";
|
||||
const char GlyphSlotfmt[] = "nii";
|
||||
const char GtBarberShopCostBasefmt[] = "f";
|
||||
const char GtCombatRatingsfmt[] = "f";
|
||||
const char GtChanceToMeleeCritBasefmt[] = "f";
|
||||
const char GtChanceToMeleeCritfmt[] = "f";
|
||||
const char GtChanceToSpellCritBasefmt[] = "f";
|
||||
const char GtChanceToSpellCritfmt[] = "f";
|
||||
const char GtOCTClassCombatRatingScalarfmt[] = "df";
|
||||
const char GtOCTRegenHPfmt[] = "f";
|
||||
// const char GtOCTRegenMPfmt[]="f";
|
||||
const char GtRegenHPPerSptfmt[] = "f";
|
||||
const char GtRegenMPPerSptfmt[] = "f";
|
||||
const char Holidaysfmt[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
const char Itemfmt[] = "niiiiiii";
|
||||
const char ItemBagFamilyfmt[] = "nxxxxxxxxxxxxxxxxx";
|
||||
const char ItemClassfmt[] = "nxxssssssssssssssssx";
|
||||
// const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx";
|
||||
// const char ItemCondExtCostsEntryfmt[]="xiii";
|
||||
const char ItemExtendedCostEntryfmt[] = "niiiiiiiiiiiiiix";
|
||||
const char ItemLimitCategoryEntryfmt[] = "nxxxxxxxxxxxxxxxxxii";
|
||||
const char ItemRandomPropertiesfmt[] = "nxiiiiissssssssssssssssx";
|
||||
const char ItemRandomSuffixfmt[] = "nssssssssssssssssxxiiiiiiiiii";
|
||||
const char ItemSetEntryfmt[] = "dssssssssssssssssxxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii";
|
||||
const char LockEntryfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx";
|
||||
const char MailTemplateEntryfmt[] = "nxxxxxxxxxxxxxxxxxssssssssssssssssx";
|
||||
const char MapEntryfmt[] = "nxixxssssssssssssssssxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixiffxixx";
|
||||
const char MapDifficultyEntryfmt[] = "diixxxxxxxxxxxxxxxxxiix";
|
||||
const char MovieEntryfmt[] = "nxx";
|
||||
const char OverrideSpellDatafmt[] = "niiiiiiiiiix";
|
||||
const char QuestFactionRewardfmt[] = "niiiiiiiiii";
|
||||
const char QuestSortEntryfmt[] = "nxxxxxxxxxxxxxxxxx";
|
||||
const char QuestXPLevelfmt[] = "niiiiiiiiii";
|
||||
const char PvPDifficultyfmt[] = "diiiii";
|
||||
const char RandomPropertiesPointsfmt[] = "niiiiiiiiiiiiiii";
|
||||
const char ScalingStatDistributionfmt[] = "niiiiiiiiiiiiiiiiiiiii";
|
||||
const char ScalingStatValuesfmt[] = "iniiiiiiiiiiiiiiiiixiiii";
|
||||
const char SkillLinefmt[] = "nixssssssssssssssssxxxxxxxxxxxxxxxxxxixxxxxxxxxxxxxxxxxi";
|
||||
const char SkillLineAbilityfmt[] = "niiiixxiiiiixx";
|
||||
const char SkillRaceClassInfofmt[] = "diiiiixx";
|
||||
const char SoundEntriesfmt[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
const char SpellCastTimefmt[] = "nixx";
|
||||
const char SpellDurationfmt[] = "niii";
|
||||
const char SpellDifficultyfmt[] = "niiii";
|
||||
const char SpellEntryfmt[] = "niiiiiiiiiiiixixiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiifxiiiiiiiiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiiiiiixssssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiixfffxxxiiiiixxxxxxi";
|
||||
const char SpellFocusObjectfmt[] = "nxxxxxxxxxxxxxxxxx";
|
||||
const char SpellItemEnchantmentfmt[] = "nxiiiiiixxxiiissssssssssssssssxiiiixxx";
|
||||
const char SpellItemEnchantmentConditionfmt[] = "nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX";
|
||||
const char SpellRadiusfmt[] = "nfxx";
|
||||
const char SpellRangefmt[] = "nffffxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
const char SpellRuneCostfmt[] = "niiii";
|
||||
const char SpellShapeshiftFormfmt[] = "nxxxxxxxxxxxxxxxxxxiixiiixxiiiiiiii";
|
||||
const char StableSlotPricesfmt[] = "ni";
|
||||
const char Achievementfmt[]="niixsxiixixxii";
|
||||
const char AchievementCriteriafmt[]="niiiiiiiixsiiiiixxxxxxx";
|
||||
const char AreaTableEntryfmt[]="iiinixxxxxisixxxxxxxxxxxxx";
|
||||
const char AreaGroupEntryfmt[]="niiiiiii";
|
||||
const char AreaTriggerEntryfmt[]="nifffxxxfffff";
|
||||
const char ArmorLocationfmt[]="nfffff";
|
||||
const char AuctionHouseEntryfmt[]="niiix";
|
||||
const char BankBagSlotPricesEntryfmt[]="ni";
|
||||
const char BarberShopStyleEntryfmt[]="nixxxiii";
|
||||
const char BattlemasterListEntryfmt[]="niiiiiiiiixsiiiiiiii";
|
||||
const char CharStartOutfitEntryfmt[]="diiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
const char CharTitlesEntryfmt[]="nxsxix";
|
||||
const char ChatChannelsEntryfmt[]="iixsx";
|
||||
// ChatChannelsEntryfmt, index not used (more compact store)
|
||||
const char ChrClassesEntryfmt[]="nixsxxxixiixxx";
|
||||
const char ChrRacesEntryfmt[]="nxixiixixxxxixsxxxxxixxx";
|
||||
const char ChrClassesXPowerTypesfmt[]="nii";
|
||||
const char CinematicSequencesEntryfmt[]="nxxxxxxxxx";
|
||||
const char CreatureDisplayInfofmt[]="nxxifxxxxxxxxxxxx";
|
||||
const char CreatureDisplayInfoExtrafmt[]="nixxxxxxxxxxxxxxxxxxx";
|
||||
const char CreatureFamilyfmt[]="nfifiiiiixsx";
|
||||
const char CreatureSpellDatafmt[]="niiiixxxx";
|
||||
const char CreatureTypefmt[]="nxx";
|
||||
const char DungeonEncounterfmt[]="niiiisxx";
|
||||
const char DurabilityCostsfmt[]="niiiiiiiiiiiiiiiiiiiiiiiiiiiii";
|
||||
const char DurabilityQualityfmt[]="nf";
|
||||
const char EmotesEntryfmt[]="nxxiiixx";
|
||||
const char EmotesTextEntryfmt[]="nxixxxxxxxxxxxxxxxx";
|
||||
const char FactionEntryfmt[]="niiiiiiiiiiiiiiiiiiffixsxx";
|
||||
const char FactionTemplateEntryfmt[]="niiiiiiiiiiiii";
|
||||
const char GameObjectDisplayInfofmt[]="nxxxxxxxxxxxffffffxxx";
|
||||
const char GemPropertiesEntryfmt[]="nixxix";
|
||||
const char GlyphPropertiesfmt[]="niii";
|
||||
const char GlyphSlotfmt[]="nii";
|
||||
const char GtBarberShopCostBasefmt[]="xf";
|
||||
const char GtCombatRatingsfmt[]="xf";
|
||||
const char GtChanceToMeleeCritBasefmt[]="xf";
|
||||
const char GtChanceToMeleeCritfmt[]="xf";
|
||||
const char GtChanceToSpellCritBasefmt[]="xf";
|
||||
const char GtOCTClassCombatRatingScalarfmt[]="df";
|
||||
const char GtChanceToSpellCritfmt[]="xf";
|
||||
const char GtOCTRegenHPfmt[]="xf";
|
||||
//const char GtOCTRegenMPfmt[]="f";
|
||||
const char GtRegenHPPerSptfmt[]="xf";
|
||||
const char GtRegenMPPerSptfmt[]="xf";
|
||||
const char Holidaysfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
const char ItemClassfmt[]="nixxxs";
|
||||
const char ItemArmorQualityfmt[]="nfffffffi";
|
||||
const char ItemArmorShieldfmt[]="nifffffff";
|
||||
const char ItemArmorTotalfmt[]="niffff";
|
||||
const char ItemBagFamilyfmt[]="nx";
|
||||
//const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx";
|
||||
//const char ItemCondExtCostsEntryfmt[]="xiii";
|
||||
//const char ItemExtendedCostEntryfmt[]="niiiiiiiiiiiiiix";
|
||||
const char ItemDamagefmt[]="nfffffffi";
|
||||
const char ItemLimitCategoryEntryfmt[]="nxii";
|
||||
const char ItemRandomPropertiesfmt[]="nxiiiiis";
|
||||
const char ItemRandomSuffixfmt[]="nsxiiiiiiiiii";
|
||||
const char ItemSetEntryfmt[]="dsxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii";
|
||||
const char LockEntryfmt[]="niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx";
|
||||
const char MailTemplateEntryfmt[]="nxs";
|
||||
const char MapEntryfmt[]="nxixxxsixxixiffxixxi";
|
||||
const char MapDifficultyEntryfmt[]="diixiix";
|
||||
const char MovieEntryfmt[]="nxxx";
|
||||
const char OverrideSpellDatafmt[]="niiiiiiiiiixx";
|
||||
const char QuestFactionRewardfmt[]="niiiiiiiiii";
|
||||
const char QuestSortEntryfmt[]="nx";
|
||||
const char QuestXPLevelfmt[]="niiiiiiiiii";
|
||||
const char Phasefmt[]="nii";
|
||||
const char PvPDifficultyfmt[]="diiiii";
|
||||
const char RandomPropertiesPointsfmt[]="niiiiiiiiiiiiiii";
|
||||
const char ScalingStatDistributionfmt[]="niiiiiiiiiiiiiiiiiiiixi";
|
||||
const char ScalingStatValuesfmt[]="iniiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
const char SkillLinefmt[]="nisxixi";
|
||||
const char SkillLineAbilityfmt[]="niiiixxiiiiixx";
|
||||
const char SkillRaceClassInfofmt[]="diiiiixxx";
|
||||
const char SoundEntriesfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
const char SpellCastTimefmt[]="nixx";
|
||||
const char SpellDurationfmt[]="niii";
|
||||
const char SpellDifficultyfmt[]="niiii";
|
||||
const char SpellEntryfmt[]="niiiiiiiiixxiiiifiiiissxxiixxixiiiiiiixiiiiiiiix";
|
||||
const char SpellAuraOptionsEntryfmt[]="diiii";
|
||||
const char SpellAuraRestrictionsEntryfmt[]="diiiiiiii";
|
||||
const char SpellCastingRequirementsEntryfmt[]="dixxixi";
|
||||
const char SpellCategoriesEntryfmt[]="diiiiii";
|
||||
const char SpellClassOptionsEntryfmt[]="dxiiiix";
|
||||
const char SpellCooldownsEntryfmt[]="diii";
|
||||
const char SpellEffectEntryfmt[]="difiiixfiiiiiifixfiiiiiiiix";
|
||||
const char SpellEquippedItemsEntryfmt[]="diii";
|
||||
const char SpellInterruptsEntryfmt[]="dixixi";
|
||||
const char SpellLevelsEntryfmt[]="diii";
|
||||
const char SpellPowerEntryfmt[]="diiiixxx";
|
||||
const char SpellReagentsEntryfmt[]="diiiiiiiiiiiiiiii";
|
||||
const char SpellScalingEntryfmt[]="diiiiffffffffffi";
|
||||
const char SpellShapeshiftEntryfmt[]="dixixx";
|
||||
const char SpellTargetRestrictionsEntryfmt[]="dfiiii";
|
||||
const char SpellTotemsEntryfmt[]="diiii";
|
||||
const char SpellFocusObjectfmt[]="nx";
|
||||
const char SpellItemEnchantmentfmt[]="nxiiiiiixxxiiisiiiixxxx";
|
||||
const char SpellItemEnchantmentConditionfmt[]="nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX";
|
||||
const char SpellRadiusfmt[]="nfxx";
|
||||
const char SpellRangefmt[]="nffffxxx";
|
||||
const char SpellRuneCostfmt[]="niiii";
|
||||
const char SpellShapeshiftFormfmt[]="nxxiixiiixxiiiiiiiixx";
|
||||
//const char StableSlotPricesfmt[] = "ni"; // removed
|
||||
const char SummonPropertiesfmt[] = "niiiii";
|
||||
const char TalentEntryfmt[] = "niiiiiiiixxxxixxixxxxxx";
|
||||
const char TalentTabEntryfmt[] = "nxxxxxxxxxxxxxxxxxxxiiix";
|
||||
const char TaxiNodesEntryfmt[] = "nifffssssssssssssssssxii";
|
||||
const char TaxiPathEntryfmt[] = "niii";
|
||||
const char TaxiPathNodeEntryfmt[] = "diiifffiiii";
|
||||
const char TeamContributionPointsfmt[] = "df";
|
||||
const char TotemCategoryEntryfmt[] = "nxxxxxxxxxxxxxxxxxii";
|
||||
const char VehicleEntryfmt[] = "niffffiiiiiiiifffffffffffffffssssfifixxx";
|
||||
const char VehicleSeatEntryfmt[] = "niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiixxxxxxxxxxxx";
|
||||
const char WMOAreaTableEntryfmt[] = "niiixxxxxiixxxxxxxxxxxxxxxxx";
|
||||
const char WorldMapAreaEntryfmt[] = "xinxffffixx";
|
||||
const char WorldMapOverlayEntryfmt[] = "nxiiiixxxxxxxxxxx";
|
||||
const char WorldSafeLocsEntryfmt[] = "nifffxxxxxxxxxxxxxxxxx";
|
||||
const char TalentEntryfmt[]="niiiiiiixxiiibbbbxx";
|
||||
const char TalentTabEntryfmt[]="nxxiiixxxxx";
|
||||
const char TaxiNodesEntryfmt[]="nifffsiixxx";
|
||||
const char TaxiPathEntryfmt[]="niii";
|
||||
const char TaxiPathNodeEntryfmt[]="diiifffiiii";
|
||||
const char TotemCategoryEntryfmt[]="nxii";
|
||||
const char VehicleEntryfmt[]="niffffiiiiiiiifffffffffffffffssssfifiixx";
|
||||
const char VehicleSeatEntryfmt[]="niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiixxxxxxxxxxxxxxxxxxxx";
|
||||
const char WMOAreaTableEntryfmt[]="niiixxxxxiixxxx";
|
||||
const char WorldMapAreaEntryfmt[]="xinxffffixxxxx";
|
||||
const char WorldMapOverlayEntryfmt[]="nxiiiixxxxxxxxx";
|
||||
const char WorldSafeLocsEntryfmt[]="nifffx";
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -171,7 +171,10 @@ void DynamicObject::Delay(int32 delaytime)
|
|||
bool foundAura = false;
|
||||
for (int32 i = m_effIndex + 1; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
if ((holder->GetSpellProto()->Effect[i] == SPELL_EFFECT_PERSISTENT_AREA_AURA || holder->GetSpellProto()->Effect[i] == SPELL_EFFECT_ADD_FARSIGHT) && holder->m_auras[i])
|
||||
SpellEffectEntry const* effect = holder->GetSpellProto()->GetSpellEffect(SpellEffectIndex(i));
|
||||
if(!effect)
|
||||
continue;
|
||||
if ((effect->Effect == SPELL_EFFECT_PERSISTENT_AREA_AURA || effect->Effect == SPELL_EFFECT_ADD_FARSIGHT) && holder->m_auras[i])
|
||||
{
|
||||
foundAura = true;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ enum DynamicObjectType
|
|||
DYNAMIC_OBJECT_PORTAL = 0x0, // unused
|
||||
DYNAMIC_OBJECT_AREA_SPELL = 0x1,
|
||||
DYNAMIC_OBJECT_FARSIGHT_FOCUS = 0x2,
|
||||
DYNAMIC_OBJECT_RAID_MARKER = 0x3,
|
||||
};
|
||||
|
||||
struct SpellEntry;
|
||||
|
|
|
|||
|
|
@ -1858,8 +1858,8 @@ float GameObject::GetObjectBoundingRadius() const
|
|||
// FIXME:
|
||||
// 1. This is clearly hack way because GameObjectDisplayInfoEntry have 6 floats related to GO sizes, but better that use DEFAULT_WORLD_OBJECT_SIZE
|
||||
// 2. In some cases this must be only interactive size, not GO size, current way can affect creature target point auto-selection in strange ways for big underground/virtual GOs
|
||||
if (m_displayInfo)
|
||||
return fabs(m_displayInfo->unknown12) * GetObjectScale();
|
||||
/*if (m_displayInfo)
|
||||
return fabs(m_displayInfo->unknown12) * GetObjectScale();*/
|
||||
|
||||
return DEFAULT_WORLD_OBJECT_SIZE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -689,8 +689,19 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* pQuest)
|
|||
for (iI = 0; iI < QUEST_OBJECTIVES_COUNT; ++iI)
|
||||
data << ObjectiveText[iI];
|
||||
|
||||
GetMenuSession()->SendPacket(&data);
|
||||
for(iI = 0; iI < 4; ++iI) // 4.0.0 currency reward id and count
|
||||
{
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
}
|
||||
|
||||
for(iI = 0; iI < 4; ++iI) // 4.0.0 currency required id and count
|
||||
{
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
}
|
||||
|
||||
GetMenuSession()->SendPacket( &data );
|
||||
DEBUG_LOG("WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -230,6 +230,132 @@ bool ItemCanGoIntoBag(ItemPrototype const* pProto, ItemPrototype const* pBagProt
|
|||
return false;
|
||||
}
|
||||
|
||||
uint32 ItemPrototype::GetArmor() const
|
||||
{
|
||||
if (Quality >= ITEM_QUALITY_HEIRLOOM) // heirlooms have it's own dbc...
|
||||
return 0;
|
||||
|
||||
if (Class == ITEM_CLASS_ARMOR && SubClass == ITEM_SUBCLASS_ARMOR_SHIELD)
|
||||
{
|
||||
if (ItemArmorShieldEntry const* ias = sItemArmorShieldStore.LookupEntry(ItemLevel))
|
||||
{
|
||||
return uint32(floor(ias->Value[Quality] + 0.5f));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
ItemArmorQualityEntry const* iaq = sItemArmorQualityStore.LookupEntry(ItemLevel);
|
||||
ItemArmorTotalEntry const* iat = sItemArmorTotalStore.LookupEntry(ItemLevel);
|
||||
|
||||
if (!iaq || !iat)
|
||||
return 0;
|
||||
|
||||
if (InventoryType != INVTYPE_HEAD && InventoryType != INVTYPE_CHEST && InventoryType != INVTYPE_SHOULDERS &&
|
||||
InventoryType != INVTYPE_LEGS && InventoryType != INVTYPE_FEET && InventoryType != INVTYPE_WRISTS &&
|
||||
InventoryType != INVTYPE_HANDS && InventoryType != INVTYPE_WAIST && InventoryType != INVTYPE_CLOAK &&
|
||||
InventoryType != INVTYPE_ROBE)
|
||||
return 0;
|
||||
|
||||
ArmorLocationEntry const* al = NULL;
|
||||
|
||||
if (InventoryType == INVTYPE_ROBE)
|
||||
al = sArmorLocationStore.LookupEntry(INVTYPE_CHEST);
|
||||
else
|
||||
al = sArmorLocationStore.LookupEntry(InventoryType);
|
||||
|
||||
if (!al)
|
||||
return 0;
|
||||
|
||||
float iatMult, alMult;
|
||||
|
||||
switch (SubClass)
|
||||
{
|
||||
case ITEM_SUBCLASS_ARMOR_CLOTH:
|
||||
iatMult = iat->Value[0];
|
||||
alMult = al->Value[0];
|
||||
break;
|
||||
case ITEM_SUBCLASS_ARMOR_LEATHER:
|
||||
iatMult = iat->Value[1];
|
||||
alMult = al->Value[1];
|
||||
break;
|
||||
case ITEM_SUBCLASS_ARMOR_MAIL:
|
||||
iatMult = iat->Value[2];
|
||||
alMult = al->Value[2];
|
||||
break;
|
||||
case ITEM_SUBCLASS_ARMOR_PLATE:
|
||||
iatMult = iat->Value[3];
|
||||
alMult = al->Value[3];
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return uint32(floor(iaq->Value[Quality] * iatMult * alMult + 0.5f));
|
||||
}
|
||||
|
||||
float ItemPrototype::getDPS() const
|
||||
{
|
||||
float damage = 0.0f;
|
||||
|
||||
if (Class == ITEM_CLASS_WEAPON)
|
||||
{
|
||||
if (Quality >= ITEM_QUALITY_HEIRLOOM) // heirlooms have it's own dbc...
|
||||
return damage;
|
||||
|
||||
ItemDamageEntry const* id = NULL;
|
||||
|
||||
switch (InventoryType)
|
||||
{
|
||||
case INVTYPE_WEAPON:
|
||||
case INVTYPE_WEAPONMAINHAND:
|
||||
case INVTYPE_WEAPONOFFHAND:
|
||||
if (Flags2 & ITEM_FLAG2_CASTER_WEAPON) // caster weapon flag
|
||||
id = sItemDamageOneHandCasterStore.LookupEntry(ItemLevel);
|
||||
else
|
||||
id = sItemDamageOneHandStore.LookupEntry(ItemLevel);
|
||||
break;
|
||||
case INVTYPE_2HWEAPON:
|
||||
if (Flags2 & ITEM_FLAG2_CASTER_WEAPON) // caster weapon flag
|
||||
id = sItemDamageTwoHandCasterStore.LookupEntry(ItemLevel);
|
||||
else
|
||||
id = sItemDamageTwoHandStore.LookupEntry(ItemLevel);
|
||||
break;
|
||||
case INVTYPE_AMMO:
|
||||
id = sItemDamageAmmoStore.LookupEntry(ItemLevel);
|
||||
break;
|
||||
case INVTYPE_RANGED:
|
||||
case INVTYPE_THROWN:
|
||||
case INVTYPE_RANGEDRIGHT:
|
||||
switch (SubClass)
|
||||
{
|
||||
case ITEM_SUBCLASS_WEAPON_BOW:
|
||||
case ITEM_SUBCLASS_WEAPON_GUN:
|
||||
case ITEM_SUBCLASS_WEAPON_CROSSBOW:
|
||||
id = sItemDamageRangedStore.LookupEntry(ItemLevel);
|
||||
break;
|
||||
case ITEM_SUBCLASS_WEAPON_THROWN:
|
||||
id = sItemDamageThrownStore.LookupEntry(ItemLevel);
|
||||
break;
|
||||
case ITEM_SUBCLASS_WEAPON_WAND:
|
||||
id = sItemDamageWandStore.LookupEntry(ItemLevel);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!id)
|
||||
return damage;
|
||||
|
||||
return id->Value[Quality];
|
||||
}
|
||||
|
||||
return damage;
|
||||
}
|
||||
|
||||
Item::Item()
|
||||
{
|
||||
m_objectType |= TYPEMASK_ITEM;
|
||||
|
|
@ -883,25 +1009,35 @@ bool Item::IsFitToSpellRequirements(SpellEntry const* spellInfo) const
|
|||
{
|
||||
ItemPrototype const* proto = GetProto();
|
||||
|
||||
SpellEquippedItemsEntry const* equippedItems = spellInfo->GetSpellEquippedItems();
|
||||
if (!equippedItems)
|
||||
return true;
|
||||
|
||||
// Enchant spells only use Effect[0] (patch 3.3.2)
|
||||
if (proto->IsVellum() && spellInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_ENCHANT_ITEM)
|
||||
if (proto->IsVellum())
|
||||
{
|
||||
// EffectItemType[0] is the associated scroll itemID, if a scroll can be made
|
||||
if (spellInfo->EffectItemType[EFFECT_INDEX_0] == 0)
|
||||
return false;
|
||||
// Other checks do not apply to vellum enchants, so return final result
|
||||
return ((proto->SubClass == ITEM_SUBCLASS_WEAPON_ENCHANTMENT && spellInfo->EquippedItemClass == ITEM_CLASS_WEAPON) ||
|
||||
(proto->SubClass == ITEM_SUBCLASS_ARMOR_ENCHANTMENT && spellInfo->EquippedItemClass == ITEM_CLASS_ARMOR));
|
||||
SpellEffectEntry const* spellEffect_0 = spellInfo->GetSpellEffect(EFFECT_INDEX_0);
|
||||
|
||||
if (spellEffect_0 && spellEffect_0->Effect == SPELL_EFFECT_ENCHANT_ITEM)
|
||||
{
|
||||
// EffectItemType[0] is the associated scroll itemID, if a scroll can be made
|
||||
if (spellEffect_0->EffectItemType == 0)
|
||||
return false;
|
||||
// Other checks do not apply to vellum enchants, so return final result
|
||||
int32 eqItemClass = spellInfo->GetEquippedItemClass();
|
||||
return ((proto->SubClass == ITEM_SUBCLASS_WEAPON_ENCHANTMENT && eqItemClass == ITEM_CLASS_WEAPON) ||
|
||||
(proto->SubClass == ITEM_SUBCLASS_ARMOR_ENCHANTMENT && eqItemClass == ITEM_CLASS_ARMOR));
|
||||
}
|
||||
}
|
||||
|
||||
if (spellInfo->EquippedItemClass != -1) // -1 == any item class
|
||||
if (equippedItems->EquippedItemClass != -1) // -1 == any item class
|
||||
{
|
||||
if (spellInfo->EquippedItemClass != int32(proto->Class))
|
||||
if (equippedItems->EquippedItemClass != int32(proto->Class))
|
||||
return false; // wrong item class
|
||||
|
||||
if (spellInfo->EquippedItemSubClassMask != 0) // 0 == any subclass
|
||||
if (equippedItems->EquippedItemSubClassMask != 0) // 0 == any subclass
|
||||
{
|
||||
if ((spellInfo->EquippedItemSubClassMask & (1 << proto->SubClass)) == 0)
|
||||
if ((equippedItems->EquippedItemSubClassMask & (1 << proto->SubClass)) == 0)
|
||||
return false; // subclass not present in mask
|
||||
}
|
||||
}
|
||||
|
|
@ -909,9 +1045,9 @@ bool Item::IsFitToSpellRequirements(SpellEntry const* spellInfo) const
|
|||
// Only check for item enchantments (TARGET_FLAG_ITEM), all other spells are either NPC spells
|
||||
// or spells where slot requirements are already handled with AttributesEx3 fields
|
||||
// and special code (Titan's Grip, Windfury Attack). Check clearly not applicable for Lava Lash.
|
||||
if (spellInfo->EquippedItemInventoryTypeMask != 0 && (spellInfo->Targets & TARGET_FLAG_ITEM)) // 0 == any inventory type
|
||||
if (equippedItems->EquippedItemInventoryTypeMask != 0 && (spellInfo->GetTargets() & TARGET_FLAG_ITEM)) // 0 == any inventory type
|
||||
{
|
||||
if ((spellInfo->EquippedItemInventoryTypeMask & (1 << proto->InventoryType)) == 0)
|
||||
if ((equippedItems->EquippedItemInventoryTypeMask & (1 << proto->InventoryType)) == 0)
|
||||
return false; // inventory type not present in mask
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -331,27 +331,30 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recv_data)
|
|||
{
|
||||
data << pProto->ItemStat[i].ItemStatType;
|
||||
data << pProto->ItemStat[i].ItemStatValue;
|
||||
data << uint32(0); // 4.0.0
|
||||
data << uint32(0); // 4.0.0
|
||||
}
|
||||
data << pProto->ScalingStatDistribution; // scaling stats distribution
|
||||
data << pProto->ScalingStatValue; // some kind of flags used to determine stat values column
|
||||
for (int i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
|
||||
{
|
||||
data << pProto->Damage[i].DamageMin;
|
||||
data << pProto->Damage[i].DamageMax;
|
||||
data << pProto->Damage[i].DamageType;
|
||||
}
|
||||
//for(int i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
|
||||
//{
|
||||
// data << pProto->Damage[i].DamageMin;
|
||||
// data << pProto->Damage[i].DamageMax;
|
||||
// data << pProto->Damage[i].DamageType;
|
||||
//}
|
||||
|
||||
// resistances (7)
|
||||
data << pProto->Armor;
|
||||
data << pProto->HolyRes;
|
||||
data << pProto->FireRes;
|
||||
data << pProto->NatureRes;
|
||||
data << pProto->FrostRes;
|
||||
data << pProto->ShadowRes;
|
||||
data << pProto->ArcaneRes;
|
||||
//data << pProto->Armor;
|
||||
//data << pProto->HolyRes;
|
||||
//data << pProto->FireRes;
|
||||
//data << pProto->NatureRes;
|
||||
//data << pProto->FrostRes;
|
||||
//data << pProto->ShadowRes;
|
||||
//data << pProto->ArcaneRes;
|
||||
|
||||
data << uint32(0); // DamageType
|
||||
//data << pProto->AmmoType;
|
||||
data << pProto->Delay;
|
||||
data << pProto->AmmoType;
|
||||
data << pProto->RangedModRange;
|
||||
|
||||
for (int s = 0; s < MAX_ITEM_PROTO_SPELLS; ++s)
|
||||
|
|
@ -375,9 +378,9 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recv_data)
|
|||
}
|
||||
else
|
||||
{
|
||||
data << uint32(spell->RecoveryTime);
|
||||
data << uint32(spell->Category);
|
||||
data << uint32(spell->CategoryRecoveryTime);
|
||||
data << uint32(spell->GetRecoveryTime());
|
||||
data << uint32(spell->GetCategory());
|
||||
data << uint32(spell->GetCategoryRecoveryTime());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -420,7 +423,10 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recv_data)
|
|||
data << uint32(pProto->Duration); // added in 2.4.2.8209, duration (seconds)
|
||||
data << uint32(pProto->ItemLimitCategory); // WotLK, ItemLimitCategory
|
||||
data << uint32(pProto->HolidayId); // Holiday.dbc?
|
||||
SendPacket(&data);
|
||||
data << float(0); // damage/armor scaling factor
|
||||
data << uint32(0); // 4.0.0
|
||||
data << uint32(0); // 4.0.0
|
||||
SendPacket( &data );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1086,7 +1092,7 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket& recv_data)
|
|||
else
|
||||
{
|
||||
// listed in dbc or not expected to exist unknown item
|
||||
if (sItemStore.LookupEntry(itemid))
|
||||
if(true/*sItemStore.LookupEntry(itemid)*/)
|
||||
sLog.outErrorDb("WORLD: CMSG_ITEM_NAME_QUERY for item %u failed (item listed in Item.dbc but not exist in DB)", itemid);
|
||||
else
|
||||
sLog.outError("WORLD: CMSG_ITEM_NAME_QUERY for item %u failed (unknown item, not listed in Item.dbc)", itemid);
|
||||
|
|
|
|||
|
|
@ -66,10 +66,18 @@ enum ItemModType
|
|||
ITEM_MOD_SPELL_POWER = 45,
|
||||
ITEM_MOD_HEALTH_REGEN = 46,
|
||||
ITEM_MOD_SPELL_PENETRATION = 47,
|
||||
ITEM_MOD_BLOCK_VALUE = 48
|
||||
ITEM_MOD_BLOCK_VALUE = 48,
|
||||
ITEM_MOD_MASTERY_RATING = 49,
|
||||
ITEM_MOD_EXTRA_ARMOR = 50,
|
||||
ITEM_MOD_FIRE_RESISTANCE = 51,
|
||||
ITEM_MOD_FROST_RESISTANCE = 52,
|
||||
ITEM_MOD_HOLY_RESISTANCE = 53,
|
||||
ITEM_MOD_SHADOW_RESISTANCE = 54,
|
||||
ITEM_MOD_NATURE_RESISTANCE = 55,
|
||||
ITEM_MOD_ARCANE_RESISTANCE = 56
|
||||
};
|
||||
|
||||
#define MAX_ITEM_MOD 49
|
||||
#define MAX_ITEM_MOD 57
|
||||
|
||||
enum ItemSpelltriggerType
|
||||
{
|
||||
|
|
@ -567,16 +575,16 @@ struct ItemPrototype
|
|||
_ItemStat ItemStat[MAX_ITEM_PROTO_STATS];
|
||||
uint32 ScalingStatDistribution; // id from ScalingStatDistribution.dbc
|
||||
uint32 ScalingStatValue; // mask for selecting column in ScalingStatValues.dbc
|
||||
_Damage Damage[MAX_ITEM_PROTO_DAMAGES];
|
||||
uint32 Armor;
|
||||
uint32 HolyRes;
|
||||
uint32 FireRes;
|
||||
uint32 NatureRes;
|
||||
uint32 FrostRes;
|
||||
uint32 ShadowRes;
|
||||
uint32 ArcaneRes;
|
||||
_Damage Damage[MAX_ITEM_PROTO_DAMAGES]; // TODO: remove it
|
||||
uint32 Armor; // TODO: remove it
|
||||
uint32 HolyRes; // TODO: remove it
|
||||
uint32 FireRes; // TODO: remove it
|
||||
uint32 NatureRes; // TODO: remove it
|
||||
uint32 FrostRes; // TODO: remove it
|
||||
uint32 ShadowRes; // TODO: remove it
|
||||
uint32 ArcaneRes; // TODO: remove it
|
||||
uint32 Delay;
|
||||
uint32 AmmoType;
|
||||
uint32 AmmoType; // TODO: remove it
|
||||
float RangedModRange;
|
||||
_Spell Spells[MAX_ITEM_PROTO_SPELLS];
|
||||
uint32 Bonding;
|
||||
|
|
@ -634,16 +642,7 @@ struct ItemPrototype
|
|||
}
|
||||
|
||||
uint32 GetMaxStackSize() const { return Stackable > 0 ? uint32(Stackable) : uint32(0x7FFFFFFF - 1); }
|
||||
|
||||
float getDPS() const
|
||||
{
|
||||
if (Delay == 0)
|
||||
return 0;
|
||||
float temp = 0;
|
||||
for (int i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
|
||||
temp += Damage[i].DamageMin + Damage[i].DamageMax;
|
||||
return temp * 500 / Delay;
|
||||
}
|
||||
float getDPS() const;
|
||||
|
||||
int32 getFeralBonus(int32 extraDPS = 0) const
|
||||
{
|
||||
|
|
@ -658,7 +657,11 @@ struct ItemPrototype
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool IsPotion() const { return Class == ITEM_CLASS_CONSUMABLE && SubClass == ITEM_SUBCLASS_POTION; }
|
||||
uint32 GetArmor() const;
|
||||
float GetMinDamage() const { return floor(getDPS() * float(Delay) / 1000.0f * 0.7f + 0.5f); }
|
||||
float GetMaxDamage() const { return floor(getDPS() * float(Delay) / 1000.0f * 1.3f + 0.5f); }
|
||||
|
||||
bool IsPotion() const { return Class==ITEM_CLASS_CONSUMABLE && SubClass==ITEM_SUBCLASS_POTION; }
|
||||
bool IsConjuredConsumable() const { return Class == ITEM_CLASS_CONSUMABLE && (Flags & ITEM_FLAG_CONJURED); }
|
||||
bool IsVellum() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2345,7 +2345,7 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(char* /*args*/)
|
|||
continue;
|
||||
|
||||
// skip server-side/triggered spells
|
||||
if (spellInfo->spellLevel == 0)
|
||||
if(spellInfo->GetSpellLevel()==0)
|
||||
continue;
|
||||
|
||||
// skip wrong class/race skills
|
||||
|
|
@ -2353,7 +2353,7 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(char* /*args*/)
|
|||
continue;
|
||||
|
||||
// skip other spell families
|
||||
if (spellInfo->SpellFamilyName != family)
|
||||
if( spellInfo->GetSpellFamilyName() != family)
|
||||
continue;
|
||||
|
||||
// skip spells with first rank learned as talent (and all talents then also)
|
||||
|
|
@ -3293,7 +3293,8 @@ void ChatHandler::ShowSpellListHelper(Player* target, SpellEntry const* spellInf
|
|||
uint32 id = spellInfo->Id;
|
||||
|
||||
bool known = target && target->HasSpell(id);
|
||||
bool learn = (spellInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_LEARN_SPELL);
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(EFFECT_INDEX_0);
|
||||
bool learn = (spellEffect && spellEffect->Effect == SPELL_EFFECT_LEARN_SPELL);
|
||||
|
||||
uint32 talentCost = GetTalentSpellCost(id);
|
||||
|
||||
|
|
@ -3303,7 +3304,7 @@ void ChatHandler::ShowSpellListHelper(Player* target, SpellEntry const* spellInf
|
|||
|
||||
// unit32 used to prevent interpreting uint8 as char at output
|
||||
// find rank of learned spell for learning spell, or talent rank
|
||||
uint32 rank = talentCost ? talentCost : sSpellMgr.GetSpellRank(learn ? spellInfo->EffectTriggerSpell[EFFECT_INDEX_0] : id);
|
||||
uint32 rank = talentCost ? talentCost : sSpellMgr.GetSpellRank(learn ? (spellEffect ? spellEffect->EffectTriggerSpell : 0) : id);
|
||||
|
||||
// send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
|
||||
std::ostringstream ss;
|
||||
|
|
@ -4001,9 +4002,14 @@ bool ChatHandler::HandleAuraCommand(char* args)
|
|||
|
||||
for (uint32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
uint8 eff = spellInfo->Effect[i];
|
||||
if (eff >= TOTAL_SPELL_EFFECTS)
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(i));
|
||||
if(!spellEffect)
|
||||
continue;
|
||||
|
||||
uint8 eff = spellEffect->Effect;
|
||||
if (eff>=TOTAL_SPELL_EFFECTS)
|
||||
continue;
|
||||
|
||||
if (IsAreaAuraEffect(eff) ||
|
||||
eff == SPELL_EFFECT_APPLY_AURA ||
|
||||
eff == SPELL_EFFECT_PERSISTENT_AREA_AURA)
|
||||
|
|
@ -4949,8 +4955,8 @@ bool ChatHandler::HandleResetHonorCommand(char* args)
|
|||
target->SetHonorPoints(0);
|
||||
target->SetUInt32Value(PLAYER_FIELD_KILLS, 0);
|
||||
target->SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS, 0);
|
||||
target->SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, 0);
|
||||
target->SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, 0);
|
||||
//target->SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, 0);
|
||||
//target->SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, 0);
|
||||
target->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -416,4 +416,3 @@ BattleGroundMap* MapManager::CreateBattleGroundMap(uint32 id, uint32 InstanceId,
|
|||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1167,10 +1167,10 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
|
|||
|
||||
WorldPacket data(MSG_INSPECT_HONOR_STATS, 8 + 1 + 4 * 4);
|
||||
data << player->GetObjectGuid();
|
||||
data << uint8(player->GetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY));
|
||||
data << uint8(player->GetHonorPoints());
|
||||
data << uint32(player->GetUInt32Value(PLAYER_FIELD_KILLS));
|
||||
data << uint32(player->GetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION));
|
||||
data << uint32(player->GetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION));
|
||||
//data << uint32(player->GetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION));
|
||||
//data << uint32(player->GetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION));
|
||||
data << uint32(player->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS));
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -755,21 +755,6 @@ void WorldSession::HandleBuyStableSlot(WorldPacket& recv_data)
|
|||
// remove fake death
|
||||
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
if (GetPlayer()->m_stableSlots < MAX_PET_STABLES)
|
||||
{
|
||||
StableSlotPricesEntry const* SlotPrice = sStableSlotPricesStore.LookupEntry(GetPlayer()->m_stableSlots + 1);
|
||||
if (_player->GetMoney() >= SlotPrice->Price)
|
||||
{
|
||||
++GetPlayer()->m_stableSlots;
|
||||
_player->ModifyMoney(-int32(SlotPrice->Price));
|
||||
SendStableResult(STABLE_SUCCESS_BUY_SLOT);
|
||||
}
|
||||
else
|
||||
SendStableResult(STABLE_ERR_MONEY);
|
||||
}
|
||||
else
|
||||
SendStableResult(STABLE_ERR_STABLE);
|
||||
}
|
||||
|
||||
void WorldSession::HandleStableRevivePet(WorldPacket& /* recv_data */)
|
||||
|
|
|
|||
|
|
@ -91,7 +91,9 @@ LanguageDesc lang_description[LANGUAGES_COUNT] =
|
|||
{ LANG_DRAENEI, 29932, SKILL_LANG_DRAENEI },
|
||||
{ LANG_ZOMBIE, 0, 0 },
|
||||
{ LANG_GNOMISH_BINARY, 0, 0 },
|
||||
{ LANG_GOBLIN_BINARY, 0, 0 }
|
||||
{ LANG_GOBLIN_BINARY, 0, 0 },
|
||||
{ LANG_WORGEN, 69270, SKILL_LANG_WORGEN },
|
||||
{ LANG_GOBLIN, 69269, SKILL_LANG_GOBLIN }
|
||||
};
|
||||
|
||||
LanguageDesc const* GetLanguageDescByID(uint32 lang)
|
||||
|
|
@ -842,30 +844,31 @@ void ObjectMgr::LoadEquipmentTemplates()
|
|||
for (uint8 j = 0; j < 3; ++j)
|
||||
{
|
||||
if (!eqInfo->equipentry[j])
|
||||
continue;
|
||||
continue;
|
||||
|
||||
ItemEntry const* dbcitem = sItemStore.LookupEntry(eqInfo->equipentry[j]);
|
||||
if (!dbcitem)
|
||||
{
|
||||
sLog.outErrorDb("Unknown item (entry=%u) in creature_equip_template.equipentry%u for entry = %u, forced to 0.", eqInfo->equipentry[j], j + 1, i);
|
||||
const_cast<EquipmentInfo*>(eqInfo)->equipentry[j] = 0;
|
||||
continue;
|
||||
}
|
||||
//ItemEntry const *dbcitem = sItemStore.LookupEntry(eqInfo->equipentry[j]);
|
||||
|
||||
if (dbcitem->InventoryType != INVTYPE_WEAPON &&
|
||||
dbcitem->InventoryType != INVTYPE_SHIELD &&
|
||||
dbcitem->InventoryType != INVTYPE_RANGED &&
|
||||
dbcitem->InventoryType != INVTYPE_2HWEAPON &&
|
||||
dbcitem->InventoryType != INVTYPE_WEAPONMAINHAND &&
|
||||
dbcitem->InventoryType != INVTYPE_WEAPONOFFHAND &&
|
||||
dbcitem->InventoryType != INVTYPE_HOLDABLE &&
|
||||
dbcitem->InventoryType != INVTYPE_THROWN &&
|
||||
dbcitem->InventoryType != INVTYPE_RANGEDRIGHT &&
|
||||
dbcitem->InventoryType != INVTYPE_RELIC)
|
||||
{
|
||||
sLog.outErrorDb("Item (entry=%u) in creature_equip_template.equipentry%u for entry = %u is not equipable in a hand, forced to 0.", eqInfo->equipentry[j], j + 1, i);
|
||||
const_cast<EquipmentInfo*>(eqInfo)->equipentry[j] = 0;
|
||||
}
|
||||
//if (!dbcitem)
|
||||
//{
|
||||
// sLog.outErrorDb("Unknown item (entry=%u) in creature_equip_template.equipentry%u for entry = %u, forced to 0.", eqInfo->equipentry[j], j+1, i);
|
||||
// const_cast<EquipmentInfo*>(eqInfo)->equipentry[j] = 0;
|
||||
// continue;
|
||||
//}
|
||||
|
||||
//if (dbcitem->InventoryType != INVTYPE_WEAPON &&
|
||||
// dbcitem->InventoryType != INVTYPE_SHIELD &&
|
||||
// dbcitem->InventoryType != INVTYPE_RANGED &&
|
||||
// dbcitem->InventoryType != INVTYPE_2HWEAPON &&
|
||||
// dbcitem->InventoryType != INVTYPE_WEAPONMAINHAND &&
|
||||
// dbcitem->InventoryType != INVTYPE_WEAPONOFFHAND &&
|
||||
// dbcitem->InventoryType != INVTYPE_HOLDABLE &&
|
||||
// dbcitem->InventoryType != INVTYPE_THROWN &&
|
||||
// dbcitem->InventoryType != INVTYPE_RANGEDRIGHT &&
|
||||
// dbcitem->InventoryType != INVTYPE_RELIC)
|
||||
//{
|
||||
// sLog.outErrorDb("Item (entry=%u) in creature_equip_template.equipentry%u for entry = %u is not equipable in a hand, forced to 0.", eqInfo->equipentry[j], j+1, i);
|
||||
// const_cast<EquipmentInfo*>(eqInfo)->equipentry[j] = 0;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1790,8 +1793,8 @@ void ObjectMgr::LoadItemPrototypes()
|
|||
for (uint32 i = 1; i < sItemStorage.MaxEntry; ++i)
|
||||
{
|
||||
ItemPrototype const* proto = sItemStorage.LookupEntry<ItemPrototype >(i);
|
||||
ItemEntry const* dbcitem = sItemStore.LookupEntry(i);
|
||||
if (!proto)
|
||||
//ItemEntry const *dbcitem = sItemStore.LookupEntry(i);
|
||||
if(!proto)
|
||||
{
|
||||
/* to many errors, and possible not all items really used in game
|
||||
if (dbcitem)
|
||||
|
|
@ -1800,13 +1803,13 @@ void ObjectMgr::LoadItemPrototypes()
|
|||
continue;
|
||||
}
|
||||
|
||||
if (dbcitem)
|
||||
if(true/*dbcitem*/)
|
||||
{
|
||||
if (proto->Class != dbcitem->Class)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) not correct class %u, must be %u (still using DB value).", i, proto->Class, dbcitem->Class);
|
||||
// It safe let use Class from DB
|
||||
}
|
||||
//if(proto->Class != dbcitem->Class)
|
||||
//{
|
||||
// sLog.outErrorDb("Item (Entry: %u) not correct class %u, must be %u (still using DB value).",i,proto->Class,dbcitem->Class);
|
||||
// // It safe let use Class from DB
|
||||
//}
|
||||
/* disabled: have some strange wrong cases for Subclass values.
|
||||
for enable also uncomment Subclass field in ItemEntry structure and in Itemfmt[]
|
||||
if(proto->SubClass != dbcitem->SubClass)
|
||||
|
|
@ -1816,34 +1819,34 @@ void ObjectMgr::LoadItemPrototypes()
|
|||
}
|
||||
*/
|
||||
|
||||
if (proto->Unk0 != dbcitem->Unk0)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) not correct %i Unk0, must be %i (still using DB value).", i, proto->Unk0, dbcitem->Unk0);
|
||||
// It safe let use Unk0 from DB
|
||||
}
|
||||
//if(proto->Unk0 != dbcitem->Unk0)
|
||||
//{
|
||||
// sLog.outErrorDb("Item (Entry: %u) not correct %i Unk0, must be %i (still using DB value).",i,proto->Unk0,dbcitem->Unk0);
|
||||
// // It safe let use Unk0 from DB
|
||||
//}
|
||||
|
||||
if (proto->Material != dbcitem->Material)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) not correct %i material, must be %i (still using DB value).", i, proto->Material, dbcitem->Material);
|
||||
// It safe let use Material from DB
|
||||
}
|
||||
//if(proto->Material != dbcitem->Material)
|
||||
//{
|
||||
// sLog.outErrorDb("Item (Entry: %u) not correct %i material, must be %i (still using DB value).",i,proto->Material,dbcitem->Material);
|
||||
// // It safe let use Material from DB
|
||||
//}
|
||||
|
||||
if (proto->InventoryType != dbcitem->InventoryType)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) not correct %u inventory type, must be %u (still using DB value).", i, proto->InventoryType, dbcitem->InventoryType);
|
||||
// It safe let use InventoryType from DB
|
||||
}
|
||||
//if(proto->InventoryType != dbcitem->InventoryType)
|
||||
//{
|
||||
// sLog.outErrorDb("Item (Entry: %u) not correct %u inventory type, must be %u (still using DB value).",i,proto->InventoryType,dbcitem->InventoryType);
|
||||
// // It safe let use InventoryType from DB
|
||||
//}
|
||||
|
||||
if (proto->DisplayInfoID != dbcitem->DisplayId)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) not correct %u display id, must be %u (using it).", i, proto->DisplayInfoID, dbcitem->DisplayId);
|
||||
const_cast<ItemPrototype*>(proto)->DisplayInfoID = dbcitem->DisplayId;
|
||||
}
|
||||
if (proto->Sheath != dbcitem->Sheath)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) not correct %u sheath, must be %u (using it).", i, proto->Sheath, dbcitem->Sheath);
|
||||
const_cast<ItemPrototype*>(proto)->Sheath = dbcitem->Sheath;
|
||||
}
|
||||
//if(proto->DisplayInfoID != dbcitem->DisplayId)
|
||||
//{
|
||||
// sLog.outErrorDb("Item (Entry: %u) not correct %u display id, must be %u (using it).",i,proto->DisplayInfoID,dbcitem->DisplayId);
|
||||
// const_cast<ItemPrototype*>(proto)->DisplayInfoID = dbcitem->DisplayId;
|
||||
//}
|
||||
//if(proto->Sheath != dbcitem->Sheath)
|
||||
//{
|
||||
// sLog.outErrorDb("Item (Entry: %u) not correct %u sheath, must be %u (using it).",i,proto->Sheath,dbcitem->Sheath);
|
||||
// const_cast<ItemPrototype*>(proto)->Sheath = dbcitem->Sheath;
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2214,15 +2217,15 @@ void ObjectMgr::LoadItemPrototypes()
|
|||
continue;
|
||||
}
|
||||
|
||||
if (BAG_FAMILY_MASK_CURRENCY_TOKENS & mask)
|
||||
{
|
||||
CurrencyTypesEntry const* ctEntry = sCurrencyTypesStore.LookupEntry(proto->ItemId);
|
||||
if (!ctEntry)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has currency bag family bit set in BagFamily but not listed in CurrencyTypes.dbc, remove bit", i);
|
||||
const_cast<ItemPrototype*>(proto)->BagFamily &= ~mask;
|
||||
}
|
||||
}
|
||||
//if(BAG_FAMILY_MASK_CURRENCY_TOKENS & mask)
|
||||
//{
|
||||
// CurrencyTypesEntry const* ctEntry = sCurrencyTypesStore.LookupEntry(proto->ItemId);
|
||||
// if(!ctEntry)
|
||||
// {
|
||||
// sLog.outErrorDb("Item (Entry: %u) has currency bag family bit set in BagFamily but not listed in CurrencyTypes.dbc, remove bit",i);
|
||||
// const_cast<ItemPrototype*>(proto)->BagFamily &= ~mask;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2545,10 +2548,14 @@ void ObjectMgr::LoadItemRequiredTarget()
|
|||
|
||||
for (int j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
{
|
||||
if (pSpellInfo->EffectImplicitTargetA[j] == TARGET_CHAIN_DAMAGE ||
|
||||
pSpellInfo->EffectImplicitTargetB[j] == TARGET_CHAIN_DAMAGE ||
|
||||
pSpellInfo->EffectImplicitTargetA[j] == TARGET_DUELVSPLAYER ||
|
||||
pSpellInfo->EffectImplicitTargetB[j] == TARGET_DUELVSPLAYER)
|
||||
SpellEffectEntry const* spellEffect = pSpellInfo->GetSpellEffect(SpellEffectIndex(j));
|
||||
if(!pSpellInfo)
|
||||
continue;
|
||||
|
||||
if (spellEffect->EffectImplicitTargetA == TARGET_CHAIN_DAMAGE ||
|
||||
spellEffect->EffectImplicitTargetB == TARGET_CHAIN_DAMAGE ||
|
||||
spellEffect->EffectImplicitTargetA == TARGET_DUELVSPLAYER ||
|
||||
spellEffect->EffectImplicitTargetB == TARGET_DUELVSPLAYER)
|
||||
{
|
||||
bIsItemSpellValid = true;
|
||||
break;
|
||||
|
|
@ -4010,8 +4017,12 @@ void ObjectMgr::LoadQuests()
|
|||
bool found = false;
|
||||
for (int k = 0; k < MAX_EFFECT_INDEX; ++k)
|
||||
{
|
||||
if ((spellInfo->Effect[k] == SPELL_EFFECT_QUEST_COMPLETE && uint32(spellInfo->EffectMiscValue[k]) == qinfo->QuestId) ||
|
||||
spellInfo->Effect[k] == SPELL_EFFECT_SEND_EVENT)
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(k));
|
||||
if(!spellEffect)
|
||||
continue;
|
||||
|
||||
if ((spellEffect->Effect == SPELL_EFFECT_QUEST_COMPLETE && uint32(spellEffect->EffectMiscValue) == qinfo->QuestId) ||
|
||||
spellEffect->Effect == SPELL_EFFECT_SEND_EVENT)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
|
|
@ -4286,10 +4297,13 @@ void ObjectMgr::LoadQuests()
|
|||
|
||||
for (int j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
{
|
||||
if (spellInfo->Effect[j] != SPELL_EFFECT_QUEST_COMPLETE)
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(j));
|
||||
if(!spellEffect)
|
||||
continue;
|
||||
if (spellEffect->Effect != SPELL_EFFECT_QUEST_COMPLETE)
|
||||
continue;
|
||||
|
||||
uint32 quest_id = spellInfo->EffectMiscValue[j];
|
||||
uint32 quest_id = spellEffect->EffectMiscValue;
|
||||
|
||||
Quest const* quest = GetQuestTemplate(quest_id);
|
||||
|
||||
|
|
@ -6819,59 +6833,6 @@ void ObjectMgr::LoadNPCSpellClickSpells()
|
|||
sLog.outString(">> Loaded %u spellclick definitions", count);
|
||||
}
|
||||
|
||||
static char* SERVER_SIDE_SPELL = "MaNGOS server-side spell";
|
||||
|
||||
struct SQLSpellLoader : public SQLStorageLoaderBase<SQLSpellLoader>
|
||||
{
|
||||
template<class S, class D>
|
||||
void default_fill(uint32 field_pos, S src, D& dst)
|
||||
{
|
||||
if (field_pos == LOADED_SPELLDBC_FIELD_POS_EQUIPPED_ITEM_CLASS)
|
||||
dst = D(-1);
|
||||
else
|
||||
dst = D(src);
|
||||
}
|
||||
|
||||
void default_fill_to_str(uint32 field_pos, char const* /*src*/, char*& dst)
|
||||
{
|
||||
if (field_pos == LOADED_SPELLDBC_FIELD_POS_SPELLNAME_0)
|
||||
{
|
||||
dst = SERVER_SIDE_SPELL;
|
||||
}
|
||||
else
|
||||
{
|
||||
dst = new char[1];
|
||||
*dst = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void ObjectMgr::LoadSpellTemplate()
|
||||
{
|
||||
SQLSpellLoader loader;
|
||||
loader.Load(sSpellTemplate);
|
||||
|
||||
sLog.outString(">> Loaded %u spell definitions", sSpellTemplate.RecordCount);
|
||||
sLog.outString();
|
||||
|
||||
for (uint32 i = 1; i < sSpellTemplate.MaxEntry; ++i)
|
||||
{
|
||||
// check data correctness
|
||||
SpellEntry const* spellEntry = sSpellTemplate.LookupEntry<SpellEntry>(i);
|
||||
if (!spellEntry)
|
||||
continue;
|
||||
|
||||
// insert serverside spell data
|
||||
if (sSpellStore.GetNumRows() <= i)
|
||||
{
|
||||
sLog.outErrorDb("Loading Spell Template for spell %u, index out of bounds (max = %u)", i, sSpellStore.GetNumRows());
|
||||
continue;
|
||||
}
|
||||
else
|
||||
sSpellStore.InsertEntry(const_cast<SpellEntry*>(spellEntry), i);
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadWeatherZoneChances()
|
||||
{
|
||||
uint32 count = 0;
|
||||
|
|
@ -8490,15 +8451,23 @@ void ObjectMgr::LoadTrainers(char const* tableName, bool isTemplates)
|
|||
trainerSpell.learnedSpell = spell;
|
||||
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
if (spellinfo->Effect[i] == SPELL_EFFECT_LEARN_SPELL &&
|
||||
SpellMgr::IsProfessionOrRidingSpell(spellinfo->EffectTriggerSpell[i]))
|
||||
SpellEffectEntry const* spellEffect = spellinfo->GetSpellEffect(SpellEffectIndex(i));
|
||||
if (!spellEffect)
|
||||
continue;
|
||||
|
||||
if (spellEffect->Effect == SPELL_EFFECT_LEARN_SPELL &&
|
||||
SpellMgr::IsProfessionOrRidingSpell(spellEffect->EffectTriggerSpell))
|
||||
{
|
||||
// prof spells sometime only additions to main spell learn that have level data
|
||||
for (int j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
{
|
||||
if (spellinfo->Effect[j] == SPELL_EFFECT_LEARN_SPELL)
|
||||
SpellEffectEntry const* spellEff = spellinfo->GetSpellEffect(SpellEffectIndex(j));
|
||||
if (!spellEff)
|
||||
continue;
|
||||
|
||||
if (spellEff->Effect == SPELL_EFFECT_LEARN_SPELL)
|
||||
{
|
||||
trainerSpell.learnedSpell = spellinfo->EffectTriggerSpell[j];
|
||||
trainerSpell.learnedSpell = spellEff->EffectTriggerSpell;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -8528,11 +8497,11 @@ void ObjectMgr::LoadTrainers(char const* tableName, bool isTemplates)
|
|||
{
|
||||
if (trainerSpell.reqLevel)
|
||||
{
|
||||
if (trainerSpell.reqLevel == learnSpellinfo->spellLevel)
|
||||
if (trainerSpell.reqLevel == learnSpellinfo->GetSpellLevel())
|
||||
ERROR_DB_STRICT_LOG("Table `%s` (Entry: %u) has redundant reqlevel %u (=spell level) for spell %u", tableName, entry, trainerSpell.reqLevel, spell);
|
||||
}
|
||||
else
|
||||
trainerSpell.reqLevel = learnSpellinfo->spellLevel;
|
||||
trainerSpell.reqLevel = learnSpellinfo->GetSpellLevel();
|
||||
}
|
||||
|
||||
++count;
|
||||
|
|
@ -9106,7 +9075,7 @@ bool ObjectMgr::IsVendorItemValid(bool isTemplate, char const* tableName, uint32
|
|||
return false;
|
||||
}
|
||||
|
||||
if (ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost))
|
||||
/*if (ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost))
|
||||
{
|
||||
if (pl)
|
||||
ChatHandler(pl).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost);
|
||||
|
|
@ -9114,7 +9083,7 @@ bool ObjectMgr::IsVendorItemValid(bool isTemplate, char const* tableName, uint32
|
|||
sLog.outErrorDb("Table `%s` contain item (Entry: %u) with wrong ExtendedCost (%u) for %s %u, ignoring",
|
||||
tableName, item_id, ExtendedCost, idStr, vendor_entry);
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (maxcount > 0 && incrtime == 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1341,11 +1341,35 @@ enum Opcodes
|
|||
MSG_MOVE_SET_COLLISION_HGT = 0x518,
|
||||
CMSG_CLEAR_RANDOM_BG_WIN_TIME = 0x519,
|
||||
CMSG_CLEAR_HOLIDAY_BG_WIN_TIME = 0x51A,
|
||||
CMSG_COMMENTATOR_SKIRMISH_QUEUE_COMMAND = 0x51B,// lua: CommentatorSetSkirmishMatchmakingMode/CommentatorRequestSkirmishQueueData/CommentatorRequestSkirmishMode/CommentatorStartSkirmishMatch
|
||||
SMSG_COMMENTATOR_SKIRMISH_QUEUE_RESULT1 = 0x51C,// event EVENT_COMMENTATOR_SKIRMISH_QUEUE_REQUEST, CGCommentator::QueueNode
|
||||
SMSG_COMMENTATOR_SKIRMISH_QUEUE_RESULT2 = 0x51D,// event EVENT_COMMENTATOR_SKIRMISH_QUEUE_REQUEST
|
||||
SMSG_COMPRESSED_UNKNOWN_1310 = 0x51E,// some compressed packet
|
||||
NUM_MSG_TYPES = 0x51F
|
||||
CMSG_COMMENTATOR_SKIRMISH_QUEUE_COMMAND = 0x51B, // Lua_CommentatorSetSkirmishMatchmakingMode and Lua_CommentatorRequestSkirmishQueueData
|
||||
SMSG_COMMENTATOR_SKIRMISH_QUEUE_RESULT1 = 0x51C, // event EVENT_COMMENTATOR_SKIRMISH_QUEUE_REQUEST, CGCommentator::QueueNode
|
||||
SMSG_COMMENTATOR_SKIRMISH_QUEUE_RESULT2 = 0x51D, // event EVENT_COMMENTATOR_SKIRMISH_QUEUE_REQUEST
|
||||
SMSG_COMPRESSED_UNKNOWN_1310 = 0x51E, // some compressed packet
|
||||
SMSG_UNKNOWN_1311 = 0x51F, // related to transform
|
||||
SMSG_UNKNOWN_1312 = 0x520, // related to transform
|
||||
UMSG_UNKNOWN_1313 = 0x521, // not found
|
||||
SMSG_UNKNOWN_1314 = 0x522, // sets unit+4336 to value from packet
|
||||
SMSG_UNKNOWN_1315 = 0x523, // related to opcode 0x522
|
||||
SMSG_UNKNOWN_1316 = 0x524, // sets unit+4338 to value from packet
|
||||
SMSG_UNKNOWN_1317 = 0x525, // sets unit+4340 to value from packet
|
||||
UMSG_UNKNOWN_1318 = 0x526, // not found
|
||||
UMSG_UNKNOWN_1319 = 0x527, // not found
|
||||
CMSG_UNKNOWN_1320 = 0x528, // setcurrency console command?
|
||||
UMSG_UNKNOWN_1321 = 0x529, // not found
|
||||
UMSG_UNKNOWN_1322 = 0x52A, // not found
|
||||
UMSG_UNKNOWN_1323 = 0x52B, // not found
|
||||
UMSG_UNKNOWN_1324 = 0x52C, // not found
|
||||
UMSG_UNKNOWN_1325 = 0x52D, // not found
|
||||
UMSG_UNKNOWN_1326 = 0x52E, // not found
|
||||
UMSG_UNKNOWN_1327 = 0x52F, // not found
|
||||
UMSG_UNKNOWN_1328 = 0x530, // not found
|
||||
SMSG_UNKNOWN_1329 = 0x531, // faction related
|
||||
UMSG_UNKNOWN_1330 = 0x532, // not found
|
||||
UMSG_UNKNOWN_1331 = 0x533, // not found
|
||||
UMSG_UNKNOWN_1332 = 0x534, // not found
|
||||
UMSG_UNKNOWN_1333 = 0x535, // not found
|
||||
UMSG_UNKNOWN_1334 = 0x536, // not found
|
||||
NUM_MSG_TYPES = 0x537
|
||||
};
|
||||
|
||||
/// Player state
|
||||
|
|
|
|||
|
|
@ -724,21 +724,22 @@ void Pet::Unsummon(PetSaveMode mode, Unit* owner /*= NULL*/)
|
|||
{
|
||||
// returning of reagents only for players, so best done here
|
||||
uint32 spellId = GetUInt32Value(UNIT_CREATED_BY_SPELL);
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
|
||||
SpellReagentsEntry const* spellReagents = spellInfo ? spellInfo->GetSpellReagents() : NULL;
|
||||
|
||||
if (spellInfo)
|
||||
if (spellReagents)
|
||||
{
|
||||
for (uint32 i = 0; i < MAX_SPELL_REAGENTS; ++i)
|
||||
{
|
||||
if (spellInfo->Reagent[i] > 0)
|
||||
if (spellReagents->Reagent[i] > 0)
|
||||
{
|
||||
ItemPosCountVec dest; // for succubus, voidwalker, felhunter and felguard credit soulshard when despawn reason other than death (out of range, logout)
|
||||
uint8 msg = p_owner->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, spellInfo->Reagent[i], spellInfo->ReagentCount[i]);
|
||||
ItemPosCountVec dest; //for succubus, voidwalker, felhunter and felguard credit soulshard when despawn reason other than death (out of range, logout)
|
||||
uint8 msg = p_owner->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, spellReagents->Reagent[i], spellReagents->ReagentCount[i]);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
Item* item = p_owner->StoreNewItem(dest, spellInfo->Reagent[i], true);
|
||||
Item* item = p_owner->StoreNewItem(dest, spellReagents->Reagent[i], true);
|
||||
if (p_owner->IsInWorld())
|
||||
p_owner->SendNewItem(item, spellInfo->ReagentCount[i], true, false);
|
||||
p_owner->SendNewItem(item, spellReagents->ReagentCount[i], true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1317,13 +1318,20 @@ void Pet::_LoadAuras(uint32 timediff)
|
|||
}
|
||||
|
||||
// prevent wrong values of remaincharges
|
||||
if (spellproto->procCharges == 0)
|
||||
uint32 procCharges = spellproto->GetProcCharges();
|
||||
if (procCharges)
|
||||
{
|
||||
if (remaincharges <= 0 || remaincharges > procCharges)
|
||||
remaincharges = procCharges;
|
||||
}
|
||||
else
|
||||
remaincharges = 0;
|
||||
|
||||
if (!spellproto->StackAmount)
|
||||
uint32 defstackamount = spellproto->GetStackAmount();
|
||||
if (!defstackamount)
|
||||
stackcount = 1;
|
||||
else if (spellproto->StackAmount < stackcount)
|
||||
stackcount = spellproto->StackAmount;
|
||||
else if (defstackamount < stackcount)
|
||||
stackcount = defstackamount;
|
||||
else if (!stackcount)
|
||||
stackcount = 1;
|
||||
|
||||
|
|
@ -1379,9 +1387,13 @@ void Pet::_SaveAuras()
|
|||
for (int32 j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
{
|
||||
SpellEntry const* spellInfo = holder->GetSpellProto();
|
||||
if (spellInfo->EffectApplyAuraName[j] == SPELL_AURA_MOD_STEALTH ||
|
||||
spellInfo->Effect[j] == SPELL_EFFECT_APPLY_AREA_AURA_OWNER ||
|
||||
spellInfo->Effect[j] == SPELL_EFFECT_APPLY_AREA_AURA_PET)
|
||||
SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(SpellEffectIndex(j));
|
||||
if(!effectEntry)
|
||||
continue;
|
||||
|
||||
if (effectEntry->EffectApplyAuraName == SPELL_AURA_MOD_STEALTH ||
|
||||
effectEntry->Effect == SPELL_EFFECT_APPLY_AREA_AURA_OWNER ||
|
||||
effectEntry->Effect == SPELL_EFFECT_APPLY_AREA_AURA_PET )
|
||||
{
|
||||
save = false;
|
||||
break;
|
||||
|
|
@ -1610,8 +1622,8 @@ void Pet::InitLevelupSpellsForLevel()
|
|||
continue;
|
||||
|
||||
// will called first if level down
|
||||
if (spellEntry->spellLevel > level)
|
||||
unlearnSpell(spellEntry->Id, true);
|
||||
if(spellEntry->GetSpellLevel() > level)
|
||||
unlearnSpell(spellEntry->Id,true);
|
||||
// will called if level up
|
||||
else
|
||||
learnSpell(spellEntry->Id);
|
||||
|
|
|
|||
|
|
@ -220,7 +220,8 @@ void PetAI::UpdateAI(const uint32 diff)
|
|||
{
|
||||
// allow only spell without spell cost or with spell cost but not duration limit
|
||||
int32 duration = GetSpellDuration(spellInfo);
|
||||
if ((spellInfo->manaCost || spellInfo->ManaCostPercentage || spellInfo->manaPerSecond) && duration > 0)
|
||||
SpellPowerEntry const* spellPower = spellInfo->GetSpellPower();
|
||||
if (spellPower && (spellPower->manaCost || spellPower->ManaCostPercentage || spellPower->manaPerSecond) && duration > 0)
|
||||
continue;
|
||||
|
||||
// allow only spell without cooldown > duration
|
||||
|
|
|
|||
|
|
@ -186,7 +186,10 @@ void WorldSession::HandlePetAction(WorldPacket& recv_data)
|
|||
|
||||
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
if (spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA || spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED)
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(i));
|
||||
if (!spellEffect)
|
||||
continue;
|
||||
if (spellEffect->EffectImplicitTargetA == TARGET_ALL_ENEMY_IN_AREA || spellEffect->EffectImplicitTargetA == TARGET_ALL_ENEMY_IN_AREA_INSTANT || spellEffect->EffectImplicitTargetA == TARGET_ALL_ENEMY_IN_AREA_CHANNELED)
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -274,6 +274,26 @@ std::ostringstream& operator<< (std::ostringstream& ss, PlayerTaxi const& taxi)
|
|||
ss << taxi.m_taximask[i] << " ";
|
||||
return ss;
|
||||
}
|
||||
|
||||
SpellModifier::SpellModifier( SpellModOp _op, SpellModType _type, int32 _value, SpellEntry const* spellEntry, SpellEffectIndex eff, int16 _charges /*= 0*/ ) : op(_op), type(_type), charges(_charges), value(_value), spellId(spellEntry->Id), lastAffected(NULL)
|
||||
{
|
||||
mask = spellEntry->GetEffectSpellClassMask(eff);
|
||||
}
|
||||
|
||||
SpellModifier::SpellModifier( SpellModOp _op, SpellModType _type, int32 _value, Aura const* aura, int16 _charges /*= 0*/ ) : op(_op), type(_type), charges(_charges), value(_value), spellId(aura->GetId()), lastAffected(NULL)
|
||||
{
|
||||
mask = aura->GetAuraSpellClassMask();
|
||||
}
|
||||
|
||||
bool SpellModifier::isAffectedOnSpell( SpellEntry const *spell ) const
|
||||
{
|
||||
SpellEntry const *affect_spell = sSpellStore.LookupEntry(spellId);
|
||||
// False if affect_spell == NULL or spellFamily not equal
|
||||
if (!affect_spell || affect_spell->GetSpellFamilyName() != spell->GetSpellFamilyName())
|
||||
return false;
|
||||
return spell->IsFitToFamilyMask(mask);
|
||||
}
|
||||
|
||||
//== TradeData =================================================
|
||||
|
||||
TradeData* TradeData::GetTraderData() const
|
||||
|
|
@ -425,6 +445,7 @@ Player::Player(WorldSession* session): Unit(), m_mover(this), m_camera(this), m_
|
|||
memset(m_items, 0, sizeof(Item*)*PLAYER_SLOTS_COUNT);
|
||||
|
||||
m_social = NULL;
|
||||
m_guildId = 0;
|
||||
|
||||
// group is initialized in the reference constructor
|
||||
SetGroupInvite(NULL);
|
||||
|
|
@ -541,6 +562,8 @@ Player::Player(WorldSession* session): Unit(), m_mover(this), m_camera(this), m_
|
|||
|
||||
// Honor System
|
||||
m_lastHonorUpdateTime = time(NULL);
|
||||
m_honorPoints = 0;
|
||||
m_arenaPoints = 0;
|
||||
|
||||
// Player summoning
|
||||
m_summon_expire = 0;
|
||||
|
|
@ -677,18 +700,16 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
|
|||
SetUInt16Value(PLAYER_BYTES_3, 0, gender); // only GENDER_MALE/GENDER_FEMALE (1 bit) allowed, drunk state = 0
|
||||
SetByteValue(PLAYER_BYTES_3, 3, 0); // BattlefieldArenaFaction (0 or 1)
|
||||
|
||||
SetUInt32Value(PLAYER_GUILDID, 0);
|
||||
SetUInt32Value(PLAYER_GUILDRANK, 0);
|
||||
SetUInt32Value(PLAYER_GUILD_TIMESTAMP, 0);
|
||||
SetInGuild( 0 );
|
||||
SetUInt32Value( PLAYER_GUILDRANK, 0 );
|
||||
SetUInt32Value( PLAYER_GUILD_TIMESTAMP, 0 );
|
||||
|
||||
for (int i = 0; i < KNOWN_TITLES_SIZE; ++i)
|
||||
SetUInt64Value(PLAYER__FIELD_KNOWN_TITLES + i, 0); // 0=disabled
|
||||
SetUInt32Value(PLAYER_CHOSEN_TITLE, 0);
|
||||
|
||||
SetUInt32Value(PLAYER_FIELD_KILLS, 0);
|
||||
SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS, 0);
|
||||
SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, 0);
|
||||
SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, 0);
|
||||
SetUInt32Value( PLAYER_FIELD_KILLS, 0 );
|
||||
SetUInt32Value( PLAYER_FIELD_LIFETIME_HONORBALE_KILLS, 0 );
|
||||
|
||||
// set starting level
|
||||
uint32 start_level = getClass() != CLASS_DEATH_KNIGHT
|
||||
|
|
@ -1995,6 +2016,9 @@ void Player::RegenerateAll(uint32 diff)
|
|||
if (getClass() == CLASS_DEATH_KNIGHT)
|
||||
Regenerate(POWER_RUNE, diff);
|
||||
|
||||
if (getClass() == CLASS_HUNTER)
|
||||
Regenerate(POWER_FOCUS, diff);
|
||||
|
||||
m_regenTimer = REGEN_TIME_FULL;
|
||||
}
|
||||
|
||||
|
|
@ -2029,6 +2053,9 @@ void Player::Regenerate(Powers power, uint32 diff)
|
|||
float RageDecreaseRate = sWorld.getConfig(CONFIG_FLOAT_RATE_POWER_RAGE_LOSS);
|
||||
addvalue = 20 * RageDecreaseRate; // 2 rage by tick (= 2 seconds => 1 rage/sec)
|
||||
} break;
|
||||
case POWER_FOCUS:
|
||||
addvalue = 12;
|
||||
break;
|
||||
case POWER_ENERGY: // Regenerate energy (rogue)
|
||||
{
|
||||
float EnergyRate = sWorld.getConfig(CONFIG_FLOAT_RATE_POWER_ENERGY);
|
||||
|
|
@ -2059,7 +2086,6 @@ void Player::Regenerate(Powers power, uint32 diff)
|
|||
}
|
||||
}
|
||||
} break;
|
||||
case POWER_FOCUS:
|
||||
case POWER_HAPPINESS:
|
||||
case POWER_HEALTH:
|
||||
break;
|
||||
|
|
@ -2638,12 +2664,14 @@ void Player::InitStatsForLevel(bool reapplyMods)
|
|||
SetFloatValue(UNIT_FIELD_MINRANGEDDAMAGE, 0.0f);
|
||||
SetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE, 0.0f);
|
||||
|
||||
SetInt32Value(UNIT_FIELD_ATTACK_POWER, 0);
|
||||
SetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS, 0);
|
||||
SetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER, 0.0f);
|
||||
SetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER, 0);
|
||||
SetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MODS, 0);
|
||||
SetFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER, 0.0f);
|
||||
SetInt32Value(UNIT_FIELD_ATTACK_POWER, 0 );
|
||||
SetInt32Value(UNIT_FIELD_ATTACK_POWER_MOD_POS, 0 );
|
||||
SetInt32Value(UNIT_FIELD_ATTACK_POWER_MOD_NEG, 0 );
|
||||
SetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER,0.0f);
|
||||
SetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER, 0 );
|
||||
SetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MOD_POS,0 );
|
||||
SetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MOD_NEG,0 );
|
||||
SetFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER,0.0f);
|
||||
|
||||
// Base crit values (will be recalculated in UpdateAllStats() at loading and in _ApplyAllStatBonuses() at reset
|
||||
SetFloatValue(PLAYER_CRIT_PERCENTAGE, 0.0f);
|
||||
|
|
@ -2688,7 +2716,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
|
|||
|
||||
// save new stats
|
||||
for (int i = POWER_MANA; i < MAX_POWERS; ++i)
|
||||
SetMaxPower(Powers(i), GetCreatePowers(Powers(i)));
|
||||
SetMaxPower(Powers(i), GetCreatePowers(Powers(i)));
|
||||
|
||||
SetMaxHealth(classInfo.basehealth); // stamina bonus will applied later
|
||||
|
||||
|
|
@ -2774,7 +2802,7 @@ void Player::SendInitialSpells()
|
|||
data << uint32(itr->first);
|
||||
|
||||
data << uint16(itr->second.itemid); // cast item id
|
||||
data << uint16(sEntry->Category); // spell category
|
||||
data << uint16(sEntry->GetCategory()); // spell category
|
||||
|
||||
// send infinity cooldown in special format
|
||||
if (itr->second.end >= infTime)
|
||||
|
|
@ -2786,7 +2814,7 @@ void Player::SendInitialSpells()
|
|||
|
||||
time_t cooldown = itr->second.end > curTime ? (itr->second.end - curTime) * IN_MILLISECONDS : 0;
|
||||
|
||||
if (sEntry->Category) // may be wrong, but anyway better than nothing...
|
||||
if(sEntry->GetCategory()) // may be wrong, but anyway better than nothing...
|
||||
{
|
||||
data << uint32(0); // cooldown
|
||||
data << uint32(cooldown); // category cooldown
|
||||
|
|
@ -3260,10 +3288,12 @@ bool Player::IsNeedCastPassiveLikeSpellAtLearn(SpellEntry const* spellInfo) cons
|
|||
|
||||
// note: form passives activated with shapeshift spells be implemented by HandleShapeshiftBoosts instead of spell_learn_spell
|
||||
// talent dependent passives activated at form apply have proper stance data
|
||||
bool need_cast = !spellInfo->Stances || (!form && spellInfo->HasAttribute(SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT));
|
||||
SpellShapeshiftEntry const* shapeShift = spellInfo->GetSpellShapeshift();
|
||||
bool need_cast = (!shapeShift || !shapeShift->Stances || (!form && spellInfo->HasAttribute(SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT)));
|
||||
|
||||
// Check CasterAuraStates
|
||||
return need_cast && (!spellInfo->CasterAuraState || HasAuraState(AuraState(spellInfo->CasterAuraState)));
|
||||
SpellAuraRestrictionsEntry const* auraRestrictions = spellInfo->GetSpellAuraRestrictions();
|
||||
return need_cast && (auraRestrictions && (!auraRestrictions->CasterAuraState || HasAuraState(AuraState(auraRestrictions->CasterAuraState))));
|
||||
}
|
||||
|
||||
void Player::learnSpell(uint32 spell_id, bool dependent)
|
||||
|
|
@ -3553,9 +3583,9 @@ void Player::RemoveArenaSpellCooldowns()
|
|||
++next;
|
||||
SpellEntry const* entry = sSpellStore.LookupEntry(itr->first);
|
||||
// check if spellentry is present and if the cooldown is less than 15 mins
|
||||
if (entry &&
|
||||
entry->RecoveryTime <= 15 * MINUTE * IN_MILLISECONDS &&
|
||||
entry->CategoryRecoveryTime <= 15 * MINUTE * IN_MILLISECONDS)
|
||||
if( entry &&
|
||||
entry->GetRecoveryTime() <= 15 * MINUTE * IN_MILLISECONDS &&
|
||||
entry->GetCategoryRecoveryTime() <= 15 * MINUTE * IN_MILLISECONDS )
|
||||
{
|
||||
// remove & notify
|
||||
RemoveSpellCooldown(itr->first, true);
|
||||
|
|
@ -3855,6 +3885,9 @@ void Player::InitVisibleBits()
|
|||
updateVisualBits.SetBit(UNIT_FIELD_POWER5);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_POWER6);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_POWER7);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_POWER8);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_POWER9);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_POWER10);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_MAXHEALTH);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_MAXPOWER1);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_MAXPOWER2);
|
||||
|
|
@ -3863,6 +3896,9 @@ void Player::InitVisibleBits()
|
|||
updateVisualBits.SetBit(UNIT_FIELD_MAXPOWER5);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_MAXPOWER6);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_MAXPOWER7);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_MAXPOWER8);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_MAXPOWER9);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_MAXPOWER10);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_LEVEL);
|
||||
updateVisualBits.SetBit(UNIT_FIELD_FACTIONTEMPLATE);
|
||||
updateVisualBits.SetBit(UNIT_VIRTUAL_ITEM_SLOT_ID + 0);
|
||||
|
|
@ -3891,7 +3927,7 @@ void Player::InitVisibleBits()
|
|||
updateVisualBits.SetBit(PLAYER_DUEL_ARBITER + 0);
|
||||
updateVisualBits.SetBit(PLAYER_DUEL_ARBITER + 1);
|
||||
updateVisualBits.SetBit(PLAYER_FLAGS);
|
||||
updateVisualBits.SetBit(PLAYER_GUILDID);
|
||||
//updateVisualBits.SetBit(PLAYER_GUILDID);
|
||||
updateVisualBits.SetBit(PLAYER_GUILDRANK);
|
||||
updateVisualBits.SetBit(PLAYER_BYTES);
|
||||
updateVisualBits.SetBit(PLAYER_BYTES_2);
|
||||
|
|
@ -4035,9 +4071,10 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
|
|||
SpellEntry const* spell = sSpellStore.LookupEntry(trainer_spell->learnedSpell);
|
||||
|
||||
// secondary prof. or not prof. spell
|
||||
uint32 skill = spell->EffectMiscValue[1];
|
||||
SpellEffectEntry const* spellEffect = spell->GetSpellEffect(EFFECT_INDEX_1);
|
||||
uint32 skill = spellEffect ? spellEffect->EffectMiscValue : 0;
|
||||
|
||||
if (spell->Effect[1] != SPELL_EFFECT_SKILL || !IsPrimaryProfessionSkill(skill))
|
||||
if(spellEffect && (spellEffect->Effect != SPELL_EFFECT_SKILL || !IsPrimaryProfessionSkill(skill)))
|
||||
return TRAINER_SPELL_GREEN;
|
||||
|
||||
// check primary prof. limit
|
||||
|
|
@ -4531,8 +4568,6 @@ Corpse* Player::CreateCorpse()
|
|||
|
||||
corpse->SetUInt32Value(CORPSE_FIELD_DISPLAY_ID, GetNativeDisplayId());
|
||||
|
||||
corpse->SetUInt32Value(CORPSE_FIELD_GUILD, GetGuildId());
|
||||
|
||||
uint32 iDisplayID;
|
||||
uint32 iIventoryType;
|
||||
uint32 _cfi;
|
||||
|
|
@ -5115,23 +5150,23 @@ float Player::GetExpertiseDodgeOrParryReduction(WeaponAttackType attType) const
|
|||
|
||||
float Player::OCTRegenHPPerSpirit()
|
||||
{
|
||||
uint32 level = getLevel();
|
||||
uint32 pclass = getClass();
|
||||
//uint32 level = getLevel();
|
||||
//uint32 pclass = getClass();
|
||||
|
||||
if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL;
|
||||
//if (level>GT_MAX_LEVEL) level = GT_MAX_LEVEL;
|
||||
|
||||
GtOCTRegenHPEntry const* baseRatio = sGtOCTRegenHPStore.LookupEntry((pclass - 1) * GT_MAX_LEVEL + level - 1);
|
||||
GtRegenHPPerSptEntry const* moreRatio = sGtRegenHPPerSptStore.LookupEntry((pclass - 1) * GT_MAX_LEVEL + level - 1);
|
||||
if (baseRatio == NULL || moreRatio == NULL)
|
||||
//GtOCTRegenHPEntry const *baseRatio = sGtOCTRegenHPStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1);
|
||||
//GtRegenHPPerSptEntry const *moreRatio = sGtRegenHPPerSptStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1);
|
||||
//if (baseRatio==NULL || moreRatio==NULL)
|
||||
return 0.0f;
|
||||
|
||||
// Formula from PaperDollFrame script
|
||||
float spirit = GetStat(STAT_SPIRIT);
|
||||
float baseSpirit = spirit;
|
||||
if (baseSpirit > 50) baseSpirit = 50;
|
||||
float moreSpirit = spirit - baseSpirit;
|
||||
float regen = baseSpirit * baseRatio->ratio + moreSpirit * moreRatio->ratio;
|
||||
return regen;
|
||||
//float spirit = GetStat(STAT_SPIRIT);
|
||||
//float baseSpirit = spirit;
|
||||
//if (baseSpirit>50) baseSpirit = 50;
|
||||
//float moreSpirit = spirit - baseSpirit;
|
||||
//float regen = baseSpirit * baseRatio->ratio + moreSpirit * moreRatio->ratio;
|
||||
//return regen;
|
||||
}
|
||||
|
||||
float Player::OCTRegenMPPerSpirit()
|
||||
|
|
@ -5352,7 +5387,7 @@ bool Player::UpdateCraftSkill(uint32 spellid)
|
|||
|
||||
// Alchemy Discoveries here
|
||||
SpellEntry const* spellEntry = sSpellStore.LookupEntry(spellid);
|
||||
if (spellEntry && spellEntry->Mechanic == MECHANIC_DISCOVERY)
|
||||
if (spellEntry && spellEntry->GetMechanic() == MECHANIC_DISCOVERY)
|
||||
{
|
||||
if (uint32 discoveredSpell = GetSkillDiscoverySpell(_spell_idx->second->skillId, spellid, this))
|
||||
learnSpell(discoveredSpell, false);
|
||||
|
|
@ -6394,16 +6429,14 @@ void Player::UpdateHonorFields()
|
|||
// update yesterday's contribution
|
||||
if (m_lastHonorUpdateTime >= yesterday)
|
||||
{
|
||||
SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, GetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION));
|
||||
//SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, GetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION));
|
||||
|
||||
// this is the first update today, reset today's contribution
|
||||
SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, 0);
|
||||
SetUInt32Value(PLAYER_FIELD_KILLS, MAKE_PAIR32(0, kills_today));
|
||||
SetUInt32Value(PLAYER_FIELD_KILLS, MAKE_PAIR32(0,kills_today));
|
||||
}
|
||||
else
|
||||
{
|
||||
// no honor/kills yesterday or today, reset
|
||||
SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, 0);
|
||||
SetUInt32Value(PLAYER_FIELD_KILLS, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -6537,7 +6570,7 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, float honor)
|
|||
// add honor points
|
||||
ModifyHonorPoints(int32(honor));
|
||||
|
||||
ApplyModUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, uint32(honor), true);
|
||||
// FIXME 4x ApplyModUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, uint32(honor), true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -6546,7 +6579,9 @@ void Player::SetHonorPoints(uint32 value)
|
|||
if (value > sWorld.getConfig(CONFIG_UINT32_MAX_HONOR_POINTS))
|
||||
value = sWorld.getConfig(CONFIG_UINT32_MAX_HONOR_POINTS);
|
||||
|
||||
SetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY, value);
|
||||
// FIXME 4x SetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY, value);
|
||||
// must be recalculated to new honor points items and removed
|
||||
m_honorPoints = value;
|
||||
}
|
||||
|
||||
void Player::SetArenaPoints(uint32 value)
|
||||
|
|
@ -6554,7 +6589,9 @@ void Player::SetArenaPoints(uint32 value)
|
|||
if (value > sWorld.getConfig(CONFIG_UINT32_MAX_ARENA_POINTS))
|
||||
value = sWorld.getConfig(CONFIG_UINT32_MAX_ARENA_POINTS);
|
||||
|
||||
SetUInt32Value(PLAYER_FIELD_ARENA_CURRENCY, value);
|
||||
// FIXME 4x SetUInt32Value(PLAYER_FIELD_ARENA_CURRENCY, value);
|
||||
// must be recalculated to new honor points items and removed
|
||||
m_arenaPoints = value;
|
||||
}
|
||||
|
||||
void Player::ModifyHonorPoints(int32 value)
|
||||
|
|
@ -7149,7 +7186,7 @@ void Player::_ApplyItemBonuses(ItemPrototype const* proto, uint8 slot, bool appl
|
|||
}
|
||||
|
||||
// If set ScalingStatValue armor get it or use item armor
|
||||
uint32 armor = proto->Armor;
|
||||
uint32 armor = proto->GetArmor();
|
||||
if (ssv)
|
||||
{
|
||||
if (uint32 ssvarmor = ssv->getArmorMod(proto->ScalingStatValue))
|
||||
|
|
@ -7210,8 +7247,8 @@ void Player::_ApplyItemBonuses(ItemPrototype const* proto, uint8 slot, bool appl
|
|||
attType = OFF_ATTACK;
|
||||
}
|
||||
|
||||
float minDamage = proto->Damage[0].DamageMin;
|
||||
float maxDamage = proto->Damage[0].DamageMax;
|
||||
float minDamage = proto->GetMinDamage();
|
||||
float maxDamage = proto->GetMaxDamage();
|
||||
int32 extraDPS = 0;
|
||||
// If set dpsMod in ScalingStatValue use it for min (70% from average), max (130% from average) damage
|
||||
if (ssv)
|
||||
|
|
@ -7285,7 +7322,7 @@ void Player::_ApplyWeaponDependentAuraMods(Item* item, WeaponAttackType attackTy
|
|||
void Player::_ApplyWeaponDependentAuraCritMod(Item* item, WeaponAttackType attackType, Aura* aura, bool apply)
|
||||
{
|
||||
// generic not weapon specific case processes in aura code
|
||||
if (aura->GetSpellProto()->EquippedItemClass == -1)
|
||||
if(aura->GetSpellProto()->GetEquippedItemClass() == -1)
|
||||
return;
|
||||
|
||||
BaseModGroup mod = BASEMOD_END;
|
||||
|
|
@ -7311,7 +7348,7 @@ void Player::_ApplyWeaponDependentAuraDamageMod(Item* item, WeaponAttackType att
|
|||
return;
|
||||
|
||||
// generic not weapon specific case processes in aura code
|
||||
if (aura->GetSpellProto()->EquippedItemClass == -1)
|
||||
if(aura->GetSpellProto()->GetEquippedItemClass() == -1)
|
||||
return;
|
||||
|
||||
UnitMods unitMod = UNIT_MOD_END;
|
||||
|
|
@ -7542,7 +7579,7 @@ void Player::_HandleDeadlyPoison(Unit* Target, WeaponAttackType attType, SpellEn
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (dPoison && dPoison->GetStackAmount() == spellInfo->StackAmount)
|
||||
if (dPoison && dPoison->GetStackAmount() == spellInfo->GetStackAmount())
|
||||
{
|
||||
Item* otherWeapon = GetWeaponForAttack(attType == BASE_ATTACK ? OFF_ATTACK : BASE_ATTACK);
|
||||
if (!otherWeapon)
|
||||
|
|
@ -7562,9 +7599,9 @@ void Player::_HandleDeadlyPoison(Unit* Target, WeaponAttackType attType, SpellEn
|
|||
if (pSecondEnchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
|
||||
continue;
|
||||
|
||||
SpellEntry const* combatEntry = sSpellStore.LookupEntry(pSecondEnchant->spellid[s]);
|
||||
if (combatEntry && combatEntry->Dispel == DISPEL_POISON)
|
||||
CastSpell(Target, combatEntry, true, otherWeapon);
|
||||
if (SpellEntry const* combatEntry = sSpellStore.LookupEntry(pSecondEnchant->spellid[s]))
|
||||
if (combatEntry->GetDispel() == DISPEL_POISON)
|
||||
CastSpell(Target, combatEntry, true, otherWeapon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7605,7 +7642,7 @@ void Player::CastItemCombatSpell(Unit* Target, WeaponAttackType attType)
|
|||
if (m_extraAttacks && IsSpellHaveEffect(spellInfo, SPELL_EFFECT_ADD_EXTRA_ATTACKS))
|
||||
return;
|
||||
|
||||
float chance = (float)spellInfo->procChance;
|
||||
float chance = (float)spellInfo->GetProcChance();
|
||||
|
||||
if (spellData.SpellPPMRate)
|
||||
{
|
||||
|
|
@ -7658,7 +7695,7 @@ void Player::CastItemCombatSpell(Unit* Target, WeaponAttackType attType)
|
|||
else
|
||||
{
|
||||
// Deadly Poison, unique effect needs to be handled before casting triggered spell
|
||||
if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && spellInfo->SpellFamilyFlags & UI64LIT(0x10000))
|
||||
if (spellInfo->IsFitToFamily(SPELLFAMILY_ROGUE, UI64LIT(0x0000000000010000)))
|
||||
_HandleDeadlyPoison(Target, attType, spellInfo);
|
||||
|
||||
CastSpell(Target, spellInfo->Id, true, item);
|
||||
|
|
@ -7873,26 +7910,26 @@ void Player::_ApplyAllLevelScaleItemMods(bool apply)
|
|||
|
||||
void Player::_ApplyAmmoBonuses()
|
||||
{
|
||||
// check ammo
|
||||
uint32 ammo_id = GetUInt32Value(PLAYER_AMMO_ID);
|
||||
if (!ammo_id)
|
||||
return;
|
||||
//// check ammo
|
||||
//uint32 ammo_id = GetUInt32Value(PLAYER_AMMO_ID);
|
||||
//if(!ammo_id)
|
||||
// return;
|
||||
|
||||
float currentAmmoDPS;
|
||||
//float currentAmmoDPS;
|
||||
|
||||
ItemPrototype const* ammo_proto = ObjectMgr::GetItemPrototype(ammo_id);
|
||||
if (!ammo_proto || ammo_proto->Class != ITEM_CLASS_PROJECTILE || !CheckAmmoCompatibility(ammo_proto))
|
||||
currentAmmoDPS = 0.0f;
|
||||
else
|
||||
currentAmmoDPS = ammo_proto->Damage[0].DamageMin;
|
||||
//ItemPrototype const *ammo_proto = ObjectMgr::GetItemPrototype( ammo_id );
|
||||
//if( !ammo_proto || ammo_proto->Class!=ITEM_CLASS_PROJECTILE || !CheckAmmoCompatibility(ammo_proto))
|
||||
// currentAmmoDPS = 0.0f;
|
||||
//else
|
||||
// currentAmmoDPS = ammo_proto->Damage[0].DamageMin;
|
||||
|
||||
if (currentAmmoDPS == GetAmmoDPS())
|
||||
return;
|
||||
//if(currentAmmoDPS == GetAmmoDPS())
|
||||
// return;
|
||||
|
||||
m_ammoDPS = currentAmmoDPS;
|
||||
//m_ammoDPS = currentAmmoDPS;
|
||||
|
||||
if (CanModifyStats())
|
||||
UpdateDamagePhysical(RANGED_ATTACK);
|
||||
//if(CanModifyStats())
|
||||
// UpdateDamagePhysical(RANGED_ATTACK);
|
||||
}
|
||||
|
||||
bool Player::CheckAmmoCompatibility(const ItemPrototype* ammo_proto) const
|
||||
|
|
@ -11049,37 +11086,37 @@ InventoryResult Player::CanUseAmmo(uint32 item) const
|
|||
|
||||
void Player::SetAmmo(uint32 item)
|
||||
{
|
||||
if (!item)
|
||||
return;
|
||||
//if(!item)
|
||||
// return;
|
||||
|
||||
// already set
|
||||
if (GetUInt32Value(PLAYER_AMMO_ID) == item)
|
||||
return;
|
||||
//// already set
|
||||
//if( GetUInt32Value(PLAYER_AMMO_ID) == item )
|
||||
// return;
|
||||
|
||||
// check ammo
|
||||
if (item)
|
||||
{
|
||||
InventoryResult msg = CanUseAmmo(item);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
SendEquipError(msg, NULL, NULL, item);
|
||||
return;
|
||||
}
|
||||
}
|
||||
//// check ammo
|
||||
//if (item)
|
||||
//{
|
||||
// InventoryResult msg = CanUseAmmo( item );
|
||||
// if (msg != EQUIP_ERR_OK)
|
||||
// {
|
||||
// SendEquipError(msg, NULL, NULL, item);
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
|
||||
SetUInt32Value(PLAYER_AMMO_ID, item);
|
||||
//SetUInt32Value(PLAYER_AMMO_ID, item);
|
||||
|
||||
_ApplyAmmoBonuses();
|
||||
//_ApplyAmmoBonuses();
|
||||
}
|
||||
|
||||
void Player::RemoveAmmo()
|
||||
{
|
||||
SetUInt32Value(PLAYER_AMMO_ID, 0);
|
||||
//SetUInt32Value(PLAYER_AMMO_ID, 0);
|
||||
|
||||
m_ammoDPS = 0.0f;
|
||||
//m_ammoDPS = 0.0f;
|
||||
|
||||
if (CanModifyStats())
|
||||
UpdateDamagePhysical(RANGED_ATTACK);
|
||||
//if (CanModifyStats())
|
||||
// UpdateDamagePhysical(RANGED_ATTACK);
|
||||
}
|
||||
|
||||
// Return stored item (if stored to stack, it can diff. from pItem). And pItem ca be deleted in this case.
|
||||
|
|
@ -11284,7 +11321,7 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update)
|
|||
sLog.outError("Weapon switch cooldown spell %u couldn't be found in Spell.dbc", cooldownSpell);
|
||||
else
|
||||
{
|
||||
m_weaponChangeTimer = spellProto->StartRecoveryTime;
|
||||
m_weaponChangeTimer = spellProto->GetStartRecoveryTime();
|
||||
|
||||
WorldPacket data(SMSG_SPELL_COOLDOWN, 8 + 1 + 4);
|
||||
data << GetObjectGuid();
|
||||
|
|
@ -15487,9 +15524,9 @@ bool Player::LoadFromDB(ObjectGuid guid, SqlQueryHolder* holder)
|
|||
//"resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeon_difficulty,"
|
||||
// 39 40 41 42 43 44 45 46 47 48 49
|
||||
//"arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk,"
|
||||
// 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
||||
//"health, power1, power2, power3, power4, power5, power6, power7, specCount, activeSpec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars FROM characters WHERE guid = '%u'", GUID_LOPART(m_guid));
|
||||
QueryResult* result = holder->GetResult(PLAYER_LOGIN_QUERY_LOADFROM);
|
||||
// 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
||||
//"health, power1, power2, power3, power4, power5, power6, power7, power8, power9, power10, specCount, activeSpec, exploredZones, equipmentCache, knownTitles, actionBars FROM characters WHERE guid = '%u'", GUID_LOPART(m_guid));
|
||||
QueryResult *result = holder->GetResult(PLAYER_LOGIN_QUERY_LOADFROM);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
|
|
@ -15538,8 +15575,8 @@ bool Player::LoadFromDB(ObjectGuid guid, SqlQueryHolder* holder)
|
|||
SetUInt32Value(UNIT_FIELD_LEVEL, fields[6].GetUInt8());
|
||||
SetUInt32Value(PLAYER_XP, fields[7].GetUInt32());
|
||||
|
||||
_LoadIntoDataField(fields[60].GetString(), PLAYER_EXPLORED_ZONES_1, PLAYER_EXPLORED_ZONES_SIZE);
|
||||
_LoadIntoDataField(fields[63].GetString(), PLAYER__FIELD_KNOWN_TITLES, KNOWN_TITLES_SIZE * 2);
|
||||
_LoadIntoDataField(fields[63].GetString(), PLAYER_EXPLORED_ZONES_1, PLAYER_EXPLORED_ZONES_SIZE);
|
||||
_LoadIntoDataField(fields[65].GetString(), PLAYER__FIELD_KNOWN_TITLES, KNOWN_TITLES_SIZE*2);
|
||||
|
||||
InitDisplayIds(); // model, scale and model data
|
||||
|
||||
|
|
@ -15564,12 +15601,10 @@ bool Player::LoadFromDB(ObjectGuid guid, SqlQueryHolder* holder)
|
|||
SetUInt32Value(PLAYER_FLAGS, fields[11].GetUInt32());
|
||||
SetInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fields[48].GetInt32());
|
||||
|
||||
SetUInt64Value(PLAYER_FIELD_KNOWN_CURRENCIES, fields[47].GetUInt64());
|
||||
|
||||
SetUInt32Value(PLAYER_AMMO_ID, fields[62].GetUInt32());
|
||||
//SetUInt64Value(PLAYER_FIELD_KNOWN_CURRENCIES, fields[47].GetUInt64());
|
||||
|
||||
// Action bars state
|
||||
SetByteValue(PLAYER_FIELD_BYTES, 2, fields[64].GetUInt8());
|
||||
SetByteValue(PLAYER_FIELD_BYTES, 2, fields[66].GetUInt8());
|
||||
|
||||
// cleanup inventory related item value fields (its will be filled correctly in _LoadInventory)
|
||||
for (uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
|
||||
|
|
@ -15632,8 +15667,8 @@ bool Player::LoadFromDB(ObjectGuid guid, SqlQueryHolder* holder)
|
|||
|
||||
SetHonorPoints(fields[40].GetUInt32());
|
||||
|
||||
SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, fields[41].GetUInt32());
|
||||
SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, fields[42].GetUInt32());
|
||||
//SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, fields[41].GetUInt32());
|
||||
//SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, fields[42].GetUInt32());
|
||||
SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS, fields[43].GetUInt32());
|
||||
SetUInt16Value(PLAYER_FIELD_KILLS, 0, fields[44].GetUInt16());
|
||||
SetUInt16Value(PLAYER_FIELD_KILLS, 1, fields[45].GetUInt16());
|
||||
|
|
@ -15904,8 +15939,8 @@ bool Player::LoadFromDB(ObjectGuid guid, SqlQueryHolder* holder)
|
|||
_LoadMailedItems(holder->GetResult(PLAYER_LOGIN_QUERY_LOADMAILEDITEMS));
|
||||
UpdateNextMailTimeAndUnreads();
|
||||
|
||||
m_specsCount = fields[58].GetUInt8();
|
||||
m_activeSpec = fields[59].GetUInt8();
|
||||
m_specsCount = fields[61].GetUInt8();
|
||||
m_activeSpec = fields[62].GetUInt8();
|
||||
|
||||
_LoadGlyphs(holder->GetResult(PLAYER_LOGIN_QUERY_LOADGLYPHS));
|
||||
|
||||
|
|
@ -16015,7 +16050,8 @@ bool Player::LoadFromDB(ObjectGuid guid, SqlQueryHolder* holder)
|
|||
// restore remembered power/health values (but not more max values)
|
||||
uint32 savedhealth = fields[50].GetUInt32();
|
||||
SetHealth(savedhealth > GetMaxHealth() ? GetMaxHealth() : savedhealth);
|
||||
for (uint32 i = 0; i < MAX_POWERS; ++i)
|
||||
|
||||
for(uint32 i = 0; i < MAX_POWERS; ++i)
|
||||
{
|
||||
uint32 savedpower = fields[51 + i].GetUInt32();
|
||||
SetPower(Powers(i), savedpower > GetMaxPower(Powers(i)) ? GetMaxPower(Powers(i)) : savedpower);
|
||||
|
|
@ -16200,13 +16236,19 @@ void Player::_LoadAuras(QueryResult* result, uint32 timediff)
|
|||
}
|
||||
|
||||
// prevent wrong values of remaincharges
|
||||
if (spellproto->procCharges == 0)
|
||||
if (uint32 procCharges = spellproto->GetProcCharges())
|
||||
{
|
||||
if (remaincharges <= 0 || remaincharges > procCharges)
|
||||
remaincharges = procCharges;
|
||||
}
|
||||
else
|
||||
remaincharges = 0;
|
||||
|
||||
if (!spellproto->StackAmount)
|
||||
uint32 defstackamount = spellproto->GetStackAmount();
|
||||
if (!defstackamount)
|
||||
stackcount = 1;
|
||||
else if (spellproto->StackAmount < stackcount)
|
||||
stackcount = spellproto->StackAmount;
|
||||
else if (defstackamount < stackcount)
|
||||
stackcount = defstackamount;
|
||||
else if (!stackcount)
|
||||
stackcount = 1;
|
||||
|
||||
|
|
@ -17329,21 +17371,21 @@ void Player::SaveToDB()
|
|||
stmt.PExecute(GetGUIDLow());
|
||||
|
||||
SqlStatement uberInsert = CharacterDatabase.CreateStatement(insChar, "INSERT INTO characters (guid,account,name,race,class,gender,level,xp,money,playerBytes,playerBytes2,playerFlags,"
|
||||
"map, dungeon_difficulty, position_x, position_y, position_z, orientation, "
|
||||
"taximask, online, cinematic, "
|
||||
"totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, "
|
||||
"trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, "
|
||||
"death_expire_time, taxi_path, arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, "
|
||||
"todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, health, power1, power2, power3, "
|
||||
"power4, power5, power6, power7, specCount, activeSpec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars) "
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
|
||||
"?, ?, ?, ?, ?, ?, "
|
||||
"?, ?, ?, "
|
||||
"?, ?, ?, ?, ?, ?, ?, "
|
||||
"?, ?, ?, ?, ?, ?, ?, ?, ?, "
|
||||
"?, ?, ?, ?, ?, ?, ?, "
|
||||
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
|
||||
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ");
|
||||
"map, dungeon_difficulty, position_x, position_y, position_z, orientation, "
|
||||
"taximask, online, cinematic, "
|
||||
"totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, "
|
||||
"trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, "
|
||||
"death_expire_time, taxi_path, arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, "
|
||||
"todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, health, power1, power2, power3, "
|
||||
"power4, power5, power6, power7, power8, power9, power10, specCount, activeSpec, exploredZones, equipmentCache, knownTitles, actionBars) VALUES ("
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
|
||||
"?, ?, ?, ?, ?, ?, "
|
||||
"?, ?, ?, "
|
||||
"?, ?, ?, ?, ?, ?, ?, "
|
||||
"?, ?, ?, ?, ?, ?, ?, ?, ?, "
|
||||
"?, ?, ?, ?, ?, ?, ?, "
|
||||
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
|
||||
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ");
|
||||
|
||||
uberInsert.addUInt32(GetGUIDLow());
|
||||
uberInsert.addUInt32(GetSession()->GetAccountId());
|
||||
|
|
@ -17422,9 +17464,9 @@ void Player::SaveToDB()
|
|||
|
||||
uberInsert.addUInt32(GetHonorPoints());
|
||||
|
||||
uberInsert.addUInt32(GetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION));
|
||||
uberInsert.addUInt32(0); // FIXME 4x GetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION)
|
||||
|
||||
uberInsert.addUInt32(GetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION));
|
||||
uberInsert.addUInt32(0); // FIXME 4x GetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION)
|
||||
|
||||
uberInsert.addUInt32(GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS));
|
||||
|
||||
|
|
@ -17434,7 +17476,7 @@ void Player::SaveToDB()
|
|||
|
||||
uberInsert.addUInt32(GetUInt32Value(PLAYER_CHOSEN_TITLE));
|
||||
|
||||
uberInsert.addUInt64(GetUInt64Value(PLAYER_FIELD_KNOWN_CURRENCIES));
|
||||
uberInsert.addUInt64(0); // FIXME 4x GetUInt64Value(PLAYER_FIELD_KNOWN_CURRENCIES)
|
||||
|
||||
// FIXME: at this moment send to DB as unsigned, including unit32(-1)
|
||||
uberInsert.addUInt32(GetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX));
|
||||
|
|
@ -17461,9 +17503,7 @@ void Player::SaveToDB()
|
|||
}
|
||||
uberInsert.addString(ss);
|
||||
|
||||
uberInsert.addUInt32(GetUInt32Value(PLAYER_AMMO_ID));
|
||||
|
||||
for (uint32 i = 0; i < KNOWN_TITLES_SIZE * 2; ++i) // string
|
||||
for(uint32 i = 0; i < KNOWN_TITLES_SIZE*2; ++i ) //string
|
||||
{
|
||||
ss << GetUInt32Value(PLAYER__FIELD_KNOWN_TITLES + i) << " ";
|
||||
}
|
||||
|
|
@ -18111,10 +18151,10 @@ void Player::_SaveStats()
|
|||
SqlStatement stmt = CharacterDatabase.CreateStatement(delStats, "DELETE FROM character_stats WHERE guid = ?");
|
||||
stmt.PExecute(GetGUIDLow());
|
||||
|
||||
stmt = CharacterDatabase.CreateStatement(insertStats, "INSERT INTO character_stats (guid, maxhealth, maxpower1, maxpower2, maxpower3, maxpower4, maxpower5, maxpower6, maxpower7, "
|
||||
"strength, agility, stamina, intellect, spirit, armor, resHoly, resFire, resNature, resFrost, resShadow, resArcane, "
|
||||
"blockPct, dodgePct, parryPct, critPct, rangedCritPct, spellCritPct, attackPower, rangedAttackPower, spellPower) "
|
||||
"VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
stmt = CharacterDatabase.CreateStatement(insertStats, "INSERT INTO character_stats (guid, maxhealth, maxpower1, maxpower2, maxpower3, maxpower4, maxpower5, maxpower6, maxpower7, maxpower8, maxpower9, maxpower10"
|
||||
"strength, agility, stamina, intellect, spirit, armor, resHoly, resFire, resNature, resFrost, resShadow, resArcane, "
|
||||
"blockPct, dodgePct, parryPct, critPct, rangedCritPct, spellCritPct, attackPower, rangedAttackPower, spellPower) "
|
||||
"VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
|
||||
stmt.addUInt32(GetGUIDLow());
|
||||
stmt.addUInt32(GetMaxHealth());
|
||||
|
|
@ -19245,7 +19285,7 @@ void Player::InitDisplayIds()
|
|||
}
|
||||
}
|
||||
|
||||
void Player::TakeExtendedCost(uint32 extendedCostId, uint32 count)
|
||||
/*void Player::TakeExtendedCost(uint32 extendedCostId, uint32 count)
|
||||
{
|
||||
ItemExtendedCostEntry const* extendedCost = sItemExtendedCostStore.LookupEntry(extendedCostId);
|
||||
|
||||
|
|
@ -19259,7 +19299,7 @@ void Player::TakeExtendedCost(uint32 extendedCostId, uint32 count)
|
|||
if (extendedCost->reqitem[i])
|
||||
DestroyItemCount(extendedCost->reqitem[i], extendedCost->reqitemcount[i] * count, true);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// Return true is the bought item has a max count to force refresh of window by caller
|
||||
bool Player::BuyItemFromVendorSlot(ObjectGuid vendorGuid, uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot)
|
||||
|
|
@ -19344,7 +19384,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorGuid, uint32 vendorslot, uin
|
|||
return false;
|
||||
}
|
||||
|
||||
if (uint32 extendedCostId = crItem->ExtendedCost)
|
||||
/*if (uint32 extendedCostId = crItem->ExtendedCost)
|
||||
{
|
||||
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(extendedCostId);
|
||||
if (!iece)
|
||||
|
|
@ -19384,7 +19424,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorGuid, uint32 vendorslot, uin
|
|||
SendEquipError(EQUIP_ERR_CANT_EQUIP_RANK, NULL, NULL);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
uint32 price = (crItem->ExtendedCost == 0 || pProto->Flags2 & ITEM_FLAG2_EXT_COST_REQUIRES_GOLD) ? pProto->BuyPrice * count : 0;
|
||||
|
||||
|
|
@ -19412,8 +19452,8 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorGuid, uint32 vendorslot, uin
|
|||
|
||||
ModifyMoney(-int32(price));
|
||||
|
||||
if (crItem->ExtendedCost)
|
||||
TakeExtendedCost(crItem->ExtendedCost, count);
|
||||
/*if (crItem->ExtendedCost)
|
||||
TakeExtendedCost(crItem->ExtendedCost, count);*/
|
||||
|
||||
pItem = StoreNewItem(dest, item, true);
|
||||
}
|
||||
|
|
@ -19435,8 +19475,8 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorGuid, uint32 vendorslot, uin
|
|||
|
||||
ModifyMoney(-int32(price));
|
||||
|
||||
if (crItem->ExtendedCost)
|
||||
TakeExtendedCost(crItem->ExtendedCost, count);
|
||||
/*if (crItem->ExtendedCost)
|
||||
TakeExtendedCost(crItem->ExtendedCost, count);*/
|
||||
|
||||
pItem = EquipNewItem(dest, item, true);
|
||||
|
||||
|
|
@ -19572,9 +19612,9 @@ void Player::AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 it
|
|||
// if no cooldown found above then base at DBC data
|
||||
if (rec < 0 && catrec < 0)
|
||||
{
|
||||
cat = spellInfo->Category;
|
||||
rec = spellInfo->RecoveryTime;
|
||||
catrec = spellInfo->CategoryRecoveryTime;
|
||||
cat = spellInfo->GetCategory();
|
||||
rec = spellInfo->GetRecoveryTime();
|
||||
catrec = spellInfo->GetCategoryRecoveryTime();
|
||||
}
|
||||
|
||||
time_t curTime = time(NULL);
|
||||
|
|
@ -20449,10 +20489,13 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
|
|||
bool found = false;
|
||||
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
if (spellInfo->Effect[i] == SPELL_EFFECT_LEARN_SPELL && !HasSpell(spellInfo->EffectTriggerSpell[i]))
|
||||
if(SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(i)))
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
if(spellEffect->Effect == SPELL_EFFECT_LEARN_SPELL && !HasSpell(spellEffect->EffectTriggerSpell))
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -20461,8 +20504,10 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
|
|||
return;
|
||||
|
||||
// prevent learn non first rank unknown profession and second specialization for same profession)
|
||||
uint32 learned_0 = spellInfo->EffectTriggerSpell[EFFECT_INDEX_0];
|
||||
if (sSpellMgr.GetSpellRank(learned_0) > 1 && !HasSpell(learned_0))
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(EFFECT_INDEX_0);
|
||||
uint32 learned_0 = spellEffect ? spellEffect->EffectTriggerSpell : 0;
|
||||
|
||||
if( sSpellMgr.GetSpellRank(learned_0) > 1 && !HasSpell(learned_0) )
|
||||
{
|
||||
// not have first rank learned (unlearned prof?)
|
||||
uint32 first_spell = sSpellMgr.GetFirstSpellInChain(learned_0);
|
||||
|
|
@ -20474,7 +20519,9 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
|
|||
return;
|
||||
|
||||
// specialization
|
||||
if (learnedInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_TRADE_SKILL && learnedInfo->Effect[EFFECT_INDEX_1] == 0)
|
||||
SpellEffectEntry const* learnedSpellEffect0 = learnedInfo->GetSpellEffect(EFFECT_INDEX_0);
|
||||
SpellEffectEntry const* learnedSpellEffect1 = learnedInfo->GetSpellEffect(EFFECT_INDEX_1);
|
||||
if (learnedSpellEffect0 && learnedSpellEffect0->Effect == SPELL_EFFECT_TRADE_SKILL && learnedSpellEffect1 && learnedSpellEffect1->Effect == 0)
|
||||
{
|
||||
// search other specialization for same prof
|
||||
for (PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
|
||||
|
|
@ -20487,7 +20534,9 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
|
|||
return;
|
||||
|
||||
// compare only specializations
|
||||
if (itrInfo->Effect[EFFECT_INDEX_0] != SPELL_EFFECT_TRADE_SKILL || itrInfo->Effect[EFFECT_INDEX_1] != 0)
|
||||
SpellEffectEntry const* itrSpellEffect0 = learnedInfo->GetSpellEffect(EFFECT_INDEX_0);
|
||||
SpellEffectEntry const* itrSpellEffect1 = learnedInfo->GetSpellEffect(EFFECT_INDEX_1);
|
||||
if ((itrSpellEffect0 && itrSpellEffect0->Effect != SPELL_EFFECT_TRADE_SKILL) || (itrSpellEffect1 && itrSpellEffect1->Effect != 0))
|
||||
continue;
|
||||
|
||||
// compare same chain spells
|
||||
|
|
@ -20889,12 +20938,13 @@ void Player::AutoUnequipOffhandIfNeed()
|
|||
|
||||
bool Player::HasItemFitToSpellReqirements(SpellEntry const* spellInfo, Item const* ignoreItem)
|
||||
{
|
||||
if (spellInfo->EquippedItemClass < 0)
|
||||
int32 itemClass = spellInfo->GetEquippedItemClass();
|
||||
if(itemClass < 0)
|
||||
return true;
|
||||
|
||||
// scan other equipped items for same requirements (mostly 2 daggers/etc)
|
||||
// for optimize check 2 used cases only
|
||||
switch (spellInfo->EquippedItemClass)
|
||||
switch(itemClass)
|
||||
{
|
||||
case ITEM_CLASS_WEAPON:
|
||||
{
|
||||
|
|
@ -20925,7 +20975,7 @@ bool Player::HasItemFitToSpellReqirements(SpellEntry const* spellInfo, Item cons
|
|||
break;
|
||||
}
|
||||
default:
|
||||
sLog.outError("HasItemFitToSpellReqirements: Not handled spell requirement for item class %u", spellInfo->EquippedItemClass);
|
||||
sLog.outError("HasItemFitToSpellReqirements: Not handled spell requirement for item class %u", itemClass);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -22147,7 +22197,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
|
|||
return;
|
||||
|
||||
// Check if it requires another talent
|
||||
if (talentInfo->DependsOn > 0)
|
||||
/*if (talentInfo->DependsOn > 0)
|
||||
{
|
||||
if (TalentEntry const* depTalentInfo = sTalentStore.LookupEntry(talentInfo->DependsOn))
|
||||
{
|
||||
|
|
@ -22163,7 +22213,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
|
|||
if (!hasEnoughRank)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// Find out how many points we have in this field
|
||||
uint32 spentPoints = 0;
|
||||
|
|
@ -22261,7 +22311,7 @@ void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRa
|
|||
return;
|
||||
|
||||
// Check if it requires another talent
|
||||
if (talentInfo->DependsOn > 0)
|
||||
/*if (talentInfo->DependsOn > 0)
|
||||
{
|
||||
if (TalentEntry const* depTalentInfo = sTalentStore.LookupEntry(talentInfo->DependsOn))
|
||||
{
|
||||
|
|
@ -22275,7 +22325,7 @@ void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRa
|
|||
if (!hasEnoughRank)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// Find out how many points we have in this field
|
||||
uint32 spentPoints = 0;
|
||||
|
|
@ -22330,13 +22380,13 @@ void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRa
|
|||
|
||||
void Player::UpdateKnownCurrencies(uint32 itemId, bool apply)
|
||||
{
|
||||
if (CurrencyTypesEntry const* ctEntry = sCurrencyTypesStore.LookupEntry(itemId))
|
||||
{
|
||||
if (apply)
|
||||
SetFlag64(PLAYER_FIELD_KNOWN_CURRENCIES, (UI64LIT(1) << (ctEntry->BitIndex - 1)));
|
||||
else
|
||||
RemoveFlag64(PLAYER_FIELD_KNOWN_CURRENCIES, (UI64LIT(1) << (ctEntry->BitIndex - 1)));
|
||||
}
|
||||
//if(CurrencyTypesEntry const* ctEntry = sCurrencyTypesStore.LookupEntry(itemId))
|
||||
//{
|
||||
// if(apply)
|
||||
// SetFlag64(PLAYER_FIELD_KNOWN_CURRENCIES, (UI64LIT(1) << (ctEntry->BitIndex - 1)));
|
||||
// else
|
||||
// RemoveFlag64(PLAYER_FIELD_KNOWN_CURRENCIES, (UI64LIT(1) << (ctEntry->BitIndex - 1)));
|
||||
//}
|
||||
}
|
||||
|
||||
void Player::UpdateFallInformationIfNeed(MovementInfo const& minfo, uint16 opcode)
|
||||
|
|
@ -22981,20 +23031,25 @@ void Player::SendDuelCountdown(uint32 counter)
|
|||
|
||||
bool Player::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const
|
||||
{
|
||||
switch (spellInfo->Effect[index])
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(index);
|
||||
if(spellEffect)
|
||||
{
|
||||
case SPELL_EFFECT_ATTACK_ME:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (spellInfo->EffectApplyAuraName[index])
|
||||
{
|
||||
case SPELL_AURA_MOD_TAUNT:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
switch(spellEffect->Effect)
|
||||
{
|
||||
case SPELL_EFFECT_ATTACK_ME:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch(spellEffect->EffectApplyAuraName)
|
||||
{
|
||||
case SPELL_AURA_MOD_TAUNT:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return Unit::IsImmuneToSpellEffect(spellInfo, index);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,6 +113,36 @@ struct PlayerTalent
|
|||
typedef UNORDERED_MAP<uint32, PlayerSpell> PlayerSpellMap;
|
||||
typedef UNORDERED_MAP<uint32, PlayerTalent> PlayerTalentMap;
|
||||
|
||||
// Spell modifier (used for modify other spells)
|
||||
struct SpellModifier
|
||||
{
|
||||
SpellModifier() : charges(0), lastAffected(NULL) {}
|
||||
|
||||
SpellModifier(SpellModOp _op, SpellModType _type, int32 _value, uint32 _spellId, uint64 _mask, uint32 _mask2 = 0, int16 _charges = 0)
|
||||
: op(_op), type(_type), charges(_charges), value(_value), mask(_mask, _mask2), spellId(_spellId), lastAffected(NULL)
|
||||
{}
|
||||
|
||||
SpellModifier(SpellModOp _op, SpellModType _type, int32 _value, uint32 _spellId, ClassFamilyMask _mask, int16 _charges = 0)
|
||||
: op(_op), type(_type), charges(_charges), value(_value), mask(_mask), spellId(_spellId), lastAffected(NULL)
|
||||
{}
|
||||
|
||||
SpellModifier(SpellModOp _op, SpellModType _type, int32 _value, SpellEntry const* spellEntry, SpellEffectIndex eff, int16 _charges = 0);
|
||||
|
||||
SpellModifier(SpellModOp _op, SpellModType _type, int32 _value, Aura const* aura, int16 _charges = 0);
|
||||
|
||||
bool isAffectedOnSpell(SpellEntry const *spell) const;
|
||||
|
||||
SpellModOp op : 8;
|
||||
SpellModType type : 8;
|
||||
int16 charges : 16;
|
||||
int32 value;
|
||||
ClassFamilyMask mask;
|
||||
uint32 spellId;
|
||||
Spell const* lastAffected;
|
||||
};
|
||||
|
||||
typedef std::list<SpellModifier*> SpellModList;
|
||||
|
||||
struct SpellCooldown
|
||||
{
|
||||
time_t end;
|
||||
|
|
@ -718,6 +748,9 @@ enum TransferAbortReason
|
|||
TRANSFER_ABORT_NOT_FOUND4 = 0x0E, // 3.2
|
||||
TRANSFER_ABORT_REALM_ONLY = 0x0F, // All players on party must be from the same realm.
|
||||
TRANSFER_ABORT_MAP_NOT_ALLOWED = 0x10, // Map can't be entered at this time.
|
||||
// 0x11 not found
|
||||
TRANSFER_ABORT_LOCKED_TO_DIFFERENT_INSTANCE = 0x12, // 4.0.1
|
||||
TRANSFER_ABORT_ALREADY_COMPLETED_ENCOUNTER = 0x13, // 4.0.1
|
||||
};
|
||||
|
||||
enum InstanceResetWarningType
|
||||
|
|
@ -1249,7 +1282,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
Item* GetItemFromBuyBackSlot(uint32 slot);
|
||||
void RemoveItemFromBuyBackSlot(uint32 slot, bool del);
|
||||
|
||||
void TakeExtendedCost(uint32 extendedCostId, uint32 count);
|
||||
//void TakeExtendedCost(uint32 extendedCostId, uint32 count);
|
||||
|
||||
uint32 GetMaxKeyringSize() const { return KEYRING_SLOT_END - KEYRING_SLOT_START; }
|
||||
void SendEquipError(InventoryResult msg, Item* pItem, Item* pItem2 = NULL, uint32 itemid = 0) const;
|
||||
|
|
@ -1579,8 +1612,8 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
void learnQuestRewardedSpells(Quest const* quest);
|
||||
void learnSpellHighRank(uint32 spellid);
|
||||
|
||||
uint32 GetFreeTalentPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS1); }
|
||||
void SetFreeTalentPoints(uint32 points) { SetUInt32Value(PLAYER_CHARACTER_POINTS1, points); }
|
||||
uint32 GetFreeTalentPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS); }
|
||||
void SetFreeTalentPoints(uint32 points) { SetUInt32Value(PLAYER_CHARACTER_POINTS, points); }
|
||||
void UpdateFreeTalentPoints(bool resetIfNeed = true);
|
||||
bool resetTalents(bool no_cost = false, bool all_specs = false);
|
||||
uint32 resetTalentsCost() const;
|
||||
|
|
@ -1609,8 +1642,8 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
void ApplyGlyph(uint8 slot, bool apply);
|
||||
void ApplyGlyphs(bool apply);
|
||||
|
||||
uint32 GetFreePrimaryProfessionPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS2); }
|
||||
void SetFreePrimaryProfessions(uint16 profs) { SetUInt32Value(PLAYER_CHARACTER_POINTS2, profs); }
|
||||
uint32 GetFreePrimaryProfessionPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS); }
|
||||
void SetFreePrimaryProfessions(uint16 profs) { SetUInt32Value(PLAYER_CHARACTER_POINTS, profs); }
|
||||
void InitPrimaryProfessions();
|
||||
|
||||
PlayerSpellMap const& GetSpellMap() const { return m_spells; }
|
||||
|
|
@ -1719,10 +1752,10 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
void SetAllowLowLevelRaid(bool allow) { ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_ENABLE_LOW_LEVEL_RAID, allow); }
|
||||
bool GetAllowLowLevelRaid() const { return HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_ENABLE_LOW_LEVEL_RAID); }
|
||||
|
||||
void SetInGuild(uint32 GuildId) { SetUInt32Value(PLAYER_GUILDID, GuildId); }
|
||||
void SetRank(uint32 rankId) { SetUInt32Value(PLAYER_GUILDRANK, rankId); }
|
||||
void SetInGuild(uint32 GuildId) { m_guildId = GuildId; }
|
||||
void SetRank(uint32 rankId){ SetUInt32Value(PLAYER_GUILDRANK, rankId); }
|
||||
void SetGuildIdInvited(uint32 GuildId) { m_GuildIdInvited = GuildId; }
|
||||
uint32 GetGuildId() { return GetUInt32Value(PLAYER_GUILDID); }
|
||||
uint32 GetGuildId() { return m_guildId; }
|
||||
static uint32 GetGuildIdFromDB(ObjectGuid guid);
|
||||
uint32 GetRank() { return GetUInt32Value(PLAYER_GUILDRANK); }
|
||||
static uint32 GetRankFromDB(ObjectGuid guid);
|
||||
|
|
@ -1938,13 +1971,13 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
/*********************************************************/
|
||||
void UpdateArenaFields();
|
||||
void UpdateHonorFields();
|
||||
bool RewardHonor(Unit* pVictim, uint32 groupsize, float honor = -1);
|
||||
uint32 GetHonorPoints() const { return GetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY); }
|
||||
uint32 GetArenaPoints() const { return GetUInt32Value(PLAYER_FIELD_ARENA_CURRENCY); }
|
||||
void SetHonorPoints(uint32 value);
|
||||
void SetArenaPoints(uint32 value);
|
||||
void ModifyHonorPoints(int32 value);
|
||||
void ModifyArenaPoints(int32 value);
|
||||
bool RewardHonor(Unit *pVictim, uint32 groupsize, float honor = -1);
|
||||
uint32 GetHonorPoints() { return m_honorPoints; }
|
||||
uint32 GetArenaPoints() { return m_arenaPoints; }
|
||||
void SetHonorPoints(uint32 honor);
|
||||
void SetArenaPoints(uint32 arena);
|
||||
void ModifyHonorPoints( int32 value );
|
||||
void ModifyArenaPoints( int32 value );
|
||||
|
||||
uint32 GetMaxPersonalArenaRatingRequirement(uint32 minarenaslot);
|
||||
|
||||
|
|
@ -2430,6 +2463,8 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
/*** HONOR SYSTEM ***/
|
||||
/*********************************************************/
|
||||
time_t m_lastHonorUpdateTime;
|
||||
uint32 m_honorPoints;
|
||||
uint32 m_arenaPoints;
|
||||
|
||||
void outDebugStatsValues() const;
|
||||
ObjectGuid m_lootGuid;
|
||||
|
|
@ -2529,7 +2564,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
uint8 m_swingErrorMsg;
|
||||
float m_ammoDPS;
|
||||
|
||||
//////////////////// Rest System/////////////////////
|
||||
//////////////////// Rest SystemPlayerSpell
|
||||
time_t time_inn_enter;
|
||||
uint32 inn_trigger_id;
|
||||
float m_rest_bonus;
|
||||
|
|
@ -2545,7 +2580,8 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
uint32 m_questRewardTalentCount;
|
||||
|
||||
// Social
|
||||
PlayerSocial* m_social;
|
||||
PlayerSocial *m_social;
|
||||
uint32 m_guildId;
|
||||
|
||||
// Groups
|
||||
GroupReference m_group;
|
||||
|
|
|
|||
|
|
@ -283,10 +283,12 @@ uint32 Quest::CalculateRewardHonor(uint32 level) const
|
|||
if (GetRewHonorAddition() > 0 || GetRewHonorMultiplier() > 0.0f)
|
||||
{
|
||||
// values stored from 0.. for 1...
|
||||
TeamContributionPoints const* tc = sTeamContributionPoints.LookupEntry(level - 1);
|
||||
if (!tc)
|
||||
/* not exist in 4.x
|
||||
TeamContributionPoints const* tc = sTeamContributionPoints.LookupEntry(level-1);
|
||||
if(!tc)
|
||||
return 0;
|
||||
uint32 i_honor = uint32(tc->Value * GetRewHonorMultiplier() * 0.1f);
|
||||
*/
|
||||
uint32 i_honor = uint32(/*tc->Value*/1.0f * GetRewHonorMultiplier() * 0.1f);
|
||||
honor = i_honor + GetRewHonorAddition();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,9 +37,7 @@ const char WorldTemplatedstfmt[] = "ii";
|
|||
const char ConditionsSrcFmt[] = "iiii";
|
||||
const char ConditionsDstFmt[] = "iiii";
|
||||
const char SpellTemplatesrcfmt[] = "iiiiiiiiiix";
|
||||
// 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 185
|
||||
const char SpellTemplatedstfmt[] = "ixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiixxxxixxxxxxFxxxxxxxxxxxxxxxxxxxxxxixxxxxFFFxxxxxxixxxxxixxixxxxxFFFxxxxxxixxxxxixxFFFxxxxxxxxxxxxxppppppppppppppppppppppppppppppppxxxxxxxxxxxFFFxxxxxx";
|
||||
// Id proc DurationIndex Effect0 tarA0 effectAura0 triggerSpell0 SpellName[16] Rank[16]
|
||||
|
||||
SQLStorage sCreatureStorage(CreatureInfosrcfmt, CreatureInfodstfmt, "entry", "creature_template");
|
||||
SQLStorage sCreatureDataAddonStorage(CreatureDataAddonInfofmt, "guid", "creature_addon");
|
||||
SQLStorage sCreatureModelStorage(CreatureModelfmt, "modelid", "creature_model_info");
|
||||
|
|
@ -52,4 +50,3 @@ SQLStorage sPageTextStore(PageTextfmt, "entry", "page_text");
|
|||
SQLStorage sInstanceTemplate(InstanceTemplatesrcfmt, InstanceTemplatedstfmt, "map", "instance_template");
|
||||
SQLStorage sWorldTemplate(WorldTemplatesrcfmt, WorldTemplatedstfmt, "map", "world_template");
|
||||
SQLStorage sConditionStorage(ConditionsSrcFmt, ConditionsDstFmt, "condition_entry", "conditions");
|
||||
SQLStorage sSpellTemplate(SpellTemplatesrcfmt, SpellTemplatedstfmt, "id", "spell_template");
|
||||
|
|
|
|||
|
|
@ -34,6 +34,5 @@ extern SQLStorage sItemStorage;
|
|||
extern SQLStorage sInstanceTemplate;
|
||||
extern SQLStorage sWorldTemplate;
|
||||
extern SQLStorage sConditionStorage;
|
||||
extern SQLStorage sSpellTemplate;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -88,14 +88,18 @@ ScriptMgr::~ScriptMgr()
|
|||
// returns priority (0 == cannot start script)
|
||||
uint8 GetSpellStartDBScriptPriority(SpellEntry const* spellinfo, SpellEffectIndex effIdx)
|
||||
{
|
||||
if (spellinfo->Effect[effIdx] == SPELL_EFFECT_SCRIPT_EFFECT)
|
||||
SpellEffectEntry const* spellEffect = spellinfo->GetSpellEffect(effIdx);
|
||||
if (!spellEffect)
|
||||
return 0;
|
||||
|
||||
if (spellEffect->Effect == SPELL_EFFECT_SCRIPT_EFFECT)
|
||||
return 10;
|
||||
|
||||
if (spellinfo->Effect[effIdx] == SPELL_EFFECT_DUMMY)
|
||||
if (spellEffect->Effect == SPELL_EFFECT_DUMMY)
|
||||
return 9;
|
||||
|
||||
// NonExisting triggered spells can also start DB-Spell-Scripts
|
||||
if (spellinfo->Effect[effIdx] == SPELL_EFFECT_TRIGGER_SPELL && !sSpellStore.LookupEntry(spellinfo->EffectTriggerSpell[effIdx]))
|
||||
if (spellEffect->Effect == SPELL_EFFECT_TRIGGER_SPELL && !sSpellStore.LookupEntry(spellEffect->EffectTriggerSpell))
|
||||
return 5;
|
||||
|
||||
// Can not start script
|
||||
|
|
@ -598,7 +602,11 @@ void ScriptMgr::LoadScripts(ScriptMapMapName& scripts, const char* tablename)
|
|||
if (SpellEntry const* spell = sSpellStore.LookupEntry(i))
|
||||
for (int j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
{
|
||||
if (spell->Effect[j] == SPELL_EFFECT_SEND_TAXI && spell->EffectMiscValue[j] == int32(tmp.sendTaxiPath.taxiPathId))
|
||||
SpellEffectEntry const* spellEffect = spell->GetSpellEffect(SpellEffectIndex(j));
|
||||
if (!spellEffect)
|
||||
continue;
|
||||
|
||||
if (spellEffect->Effect == SPELL_EFFECT_SEND_TAXI && spellEffect->EffectMiscValue == tmp.sendTaxiPath.taxiPathId)
|
||||
{
|
||||
taxiSpell = i;
|
||||
break;
|
||||
|
|
@ -752,10 +760,14 @@ void ScriptMgr::LoadEventScripts()
|
|||
{
|
||||
for (int j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
{
|
||||
if (spell->Effect[j] == SPELL_EFFECT_SEND_EVENT)
|
||||
SpellEffectEntry const* spellEffect = spell->GetSpellEffect(SpellEffectIndex(j));
|
||||
if (!spellEffect)
|
||||
continue;
|
||||
|
||||
if (spellEffect->Effect == SPELL_EFFECT_SEND_EVENT)
|
||||
{
|
||||
if (spell->EffectMiscValue[j])
|
||||
evt_scripts.insert(spell->EffectMiscValue[j]);
|
||||
if (spellEffect->EffectMiscValue)
|
||||
evt_scripts.insert(spellEffect->EffectMiscValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1755,10 +1767,14 @@ void ScriptMgr::LoadEventIdScripts()
|
|||
{
|
||||
for (int j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
{
|
||||
if (spell->Effect[j] == SPELL_EFFECT_SEND_EVENT)
|
||||
SpellEffectEntry const* spellEffect = spell->GetSpellEffect(SpellEffectIndex(j));
|
||||
if (!spellEffect)
|
||||
continue;
|
||||
|
||||
if (spellEffect->Effect == SPELL_EFFECT_SEND_EVENT)
|
||||
{
|
||||
if (spell->EffectMiscValue[j])
|
||||
evt_scripts.insert(spell->EffectMiscValue[j]);
|
||||
if (spellEffect->EffectMiscValue)
|
||||
evt_scripts.insert(spellEffect->EffectMiscValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,26 +54,27 @@ enum Races
|
|||
RACE_FOREST_TROLL = 18,
|
||||
RACE_TAUNKA = 19,
|
||||
RACE_NORTHREND_SKELETON = 20,
|
||||
RACE_ICE_TROLL = 21
|
||||
RACE_ICE_TROLL = 21,
|
||||
RACE_WORGEN = 22
|
||||
};
|
||||
|
||||
// max+1 for player race
|
||||
#define MAX_RACES 12
|
||||
#define MAX_RACES 23
|
||||
|
||||
#define RACEMASK_ALL_PLAYABLE \
|
||||
((1<<(RACE_HUMAN-1)) |(1<<(RACE_ORC-1)) |(1<<(RACE_DWARF-1)) | \
|
||||
(1<<(RACE_NIGHTELF-1)) |(1<<(RACE_UNDEAD-1)) |(1<<(RACE_TAUREN-1)) | \
|
||||
(1<<(RACE_GNOME-1)) |(1<<(RACE_TROLL-1)) |(1<<(RACE_BLOODELF-1))| \
|
||||
(1<<(RACE_DRAENEI-1)))
|
||||
(1<<(RACE_DRAENEI-1)) |(1<<(RACE_GOBLIN-1)) |(1<<(RACE_WORGEN-1)))
|
||||
|
||||
// for most cases batter use ChrRace data for team check as more safe, but when need full mask of team can be use this defines.
|
||||
#define RACEMASK_ALLIANCE \
|
||||
((1<<(RACE_HUMAN-1)) |(1<<(RACE_DWARF-1)) |(1<<(RACE_NIGHTELF-1))| \
|
||||
(1<<(RACE_GNOME-1)) |(1<<(RACE_DRAENEI-1)))
|
||||
(1<<(RACE_GNOME-1)) |(1<<(RACE_DRAENEI-1)) |(1<<(RACE_WORGEN-1)))
|
||||
|
||||
#define RACEMASK_HORDE \
|
||||
((1<<(RACE_ORC-1)) |(1<<(RACE_UNDEAD-1)) |(1<<(RACE_TAUREN-1)) | \
|
||||
(1<<(RACE_TROLL-1)) |(1<<(RACE_BLOODELF-1)))
|
||||
(1<<(RACE_TROLL-1)) |(1<<(RACE_BLOODELF-1)) |(1<<(RACE_GOBLIN-1)))
|
||||
|
||||
// Class value is index in ChrClasses.dbc
|
||||
enum Classes
|
||||
|
|
@ -150,10 +151,13 @@ enum Powers
|
|||
POWER_HAPPINESS = 4,
|
||||
POWER_RUNE = 5,
|
||||
POWER_RUNIC_POWER = 6,
|
||||
POWER_SOUL_SHARDS = 7,
|
||||
POWER_ECLIPSE = 8,
|
||||
POWER_HOLY_POWER = 9,
|
||||
POWER_HEALTH = 0xFFFFFFFE // (-2 as signed value)
|
||||
};
|
||||
|
||||
#define MAX_POWERS 7
|
||||
#define MAX_POWERS 10
|
||||
|
||||
enum SpellSchools
|
||||
{
|
||||
|
|
@ -580,10 +584,12 @@ enum Language
|
|||
LANG_ZOMBIE = 36,
|
||||
LANG_GNOMISH_BINARY = 37,
|
||||
LANG_GOBLIN_BINARY = 38,
|
||||
LANG_WORGEN = 39,
|
||||
LANG_GOBLIN = 40,
|
||||
LANG_ADDON = 0xFFFFFFFF // used by addons, in 2.4.0 not exit, replaced by messagetype?
|
||||
};
|
||||
|
||||
#define LANGUAGES_COUNT 19
|
||||
#define LANGUAGES_COUNT 21
|
||||
|
||||
// In fact !=0 values is alliance/horde root faction ids
|
||||
enum Team
|
||||
|
|
@ -775,186 +781,198 @@ enum SpellCastResult
|
|||
SPELL_FAILED_ALREADY_BEING_TAMED = 5,
|
||||
SPELL_FAILED_ALREADY_HAVE_CHARM = 6,
|
||||
SPELL_FAILED_ALREADY_HAVE_SUMMON = 7,
|
||||
SPELL_FAILED_ALREADY_OPEN = 8,
|
||||
SPELL_FAILED_AURA_BOUNCED = 9,
|
||||
SPELL_FAILED_AUTOTRACK_INTERRUPTED = 10,
|
||||
SPELL_FAILED_BAD_IMPLICIT_TARGETS = 11,
|
||||
SPELL_FAILED_BAD_TARGETS = 12,
|
||||
SPELL_FAILED_CANT_BE_CHARMED = 13,
|
||||
SPELL_FAILED_CANT_BE_DISENCHANTED = 14,
|
||||
SPELL_FAILED_CANT_BE_DISENCHANTED_SKILL = 15,
|
||||
SPELL_FAILED_CANT_BE_MILLED = 16,
|
||||
SPELL_FAILED_CANT_BE_PROSPECTED = 17,
|
||||
SPELL_FAILED_CANT_CAST_ON_TAPPED = 18,
|
||||
SPELL_FAILED_CANT_DUEL_WHILE_INVISIBLE = 19,
|
||||
SPELL_FAILED_CANT_DUEL_WHILE_STEALTHED = 20,
|
||||
SPELL_FAILED_CANT_STEALTH = 21,
|
||||
SPELL_FAILED_CASTER_AURASTATE = 22,
|
||||
SPELL_FAILED_CASTER_DEAD = 23,
|
||||
SPELL_FAILED_CHARMED = 24,
|
||||
SPELL_FAILED_CHEST_IN_USE = 25,
|
||||
SPELL_FAILED_CONFUSED = 26,
|
||||
SPELL_FAILED_DONT_REPORT = 27,
|
||||
SPELL_FAILED_EQUIPPED_ITEM = 28,
|
||||
SPELL_FAILED_EQUIPPED_ITEM_CLASS = 29,
|
||||
SPELL_FAILED_EQUIPPED_ITEM_CLASS_MAINHAND = 30,
|
||||
SPELL_FAILED_EQUIPPED_ITEM_CLASS_OFFHAND = 31,
|
||||
SPELL_FAILED_ERROR = 32,
|
||||
SPELL_FAILED_FIZZLE = 33,
|
||||
SPELL_FAILED_FLEEING = 34,
|
||||
SPELL_FAILED_FOOD_LOWLEVEL = 35,
|
||||
SPELL_FAILED_HIGHLEVEL = 36,
|
||||
SPELL_FAILED_HUNGER_SATIATED = 37,
|
||||
SPELL_FAILED_IMMUNE = 38,
|
||||
SPELL_FAILED_INCORRECT_AREA = 39,
|
||||
SPELL_FAILED_INTERRUPTED = 40,
|
||||
SPELL_FAILED_INTERRUPTED_COMBAT = 41,
|
||||
SPELL_FAILED_ITEM_ALREADY_ENCHANTED = 42,
|
||||
SPELL_FAILED_ITEM_GONE = 43,
|
||||
SPELL_FAILED_ITEM_NOT_FOUND = 44,
|
||||
SPELL_FAILED_ITEM_NOT_READY = 45,
|
||||
SPELL_FAILED_LEVEL_REQUIREMENT = 46,
|
||||
SPELL_FAILED_LINE_OF_SIGHT = 47,
|
||||
SPELL_FAILED_LOWLEVEL = 48,
|
||||
SPELL_FAILED_LOW_CASTLEVEL = 49,
|
||||
SPELL_FAILED_MAINHAND_EMPTY = 50,
|
||||
SPELL_FAILED_MOVING = 51,
|
||||
SPELL_FAILED_NEED_AMMO = 52,
|
||||
SPELL_FAILED_NEED_AMMO_POUCH = 53,
|
||||
SPELL_FAILED_NEED_EXOTIC_AMMO = 54,
|
||||
SPELL_FAILED_NEED_MORE_ITEMS = 55,
|
||||
SPELL_FAILED_NOPATH = 56,
|
||||
SPELL_FAILED_NOT_BEHIND = 57,
|
||||
SPELL_FAILED_NOT_FISHABLE = 58,
|
||||
SPELL_FAILED_NOT_FLYING = 59,
|
||||
SPELL_FAILED_NOT_HERE = 60,
|
||||
SPELL_FAILED_NOT_INFRONT = 61,
|
||||
SPELL_FAILED_NOT_IN_CONTROL = 62,
|
||||
SPELL_FAILED_NOT_KNOWN = 63,
|
||||
SPELL_FAILED_NOT_MOUNTED = 64,
|
||||
SPELL_FAILED_NOT_ON_TAXI = 65,
|
||||
SPELL_FAILED_NOT_ON_TRANSPORT = 66,
|
||||
SPELL_FAILED_NOT_READY = 67,
|
||||
SPELL_FAILED_NOT_SHAPESHIFT = 68,
|
||||
SPELL_FAILED_NOT_STANDING = 69,
|
||||
SPELL_FAILED_NOT_TRADEABLE = 70,
|
||||
SPELL_FAILED_NOT_TRADING = 71,
|
||||
SPELL_FAILED_NOT_UNSHEATHED = 72,
|
||||
SPELL_FAILED_NOT_WHILE_GHOST = 73,
|
||||
SPELL_FAILED_NOT_WHILE_LOOTING = 74,
|
||||
SPELL_FAILED_NO_AMMO = 75,
|
||||
SPELL_FAILED_NO_CHARGES_REMAIN = 76,
|
||||
SPELL_FAILED_NO_CHAMPION = 77,
|
||||
SPELL_FAILED_NO_COMBO_POINTS = 78,
|
||||
SPELL_FAILED_NO_DUELING = 79,
|
||||
SPELL_FAILED_NO_ENDURANCE = 80,
|
||||
SPELL_FAILED_NO_FISH = 81,
|
||||
SPELL_FAILED_NO_ITEMS_WHILE_SHAPESHIFTED = 82,
|
||||
SPELL_FAILED_NO_MOUNTS_ALLOWED = 83,
|
||||
SPELL_FAILED_NO_PET = 84,
|
||||
SPELL_FAILED_NO_POWER = 85,
|
||||
SPELL_FAILED_NOTHING_TO_DISPEL = 86,
|
||||
SPELL_FAILED_NOTHING_TO_STEAL = 87,
|
||||
SPELL_FAILED_ONLY_ABOVEWATER = 88,
|
||||
SPELL_FAILED_ONLY_DAYTIME = 89,
|
||||
SPELL_FAILED_ONLY_INDOORS = 90,
|
||||
SPELL_FAILED_ONLY_MOUNTED = 91,
|
||||
SPELL_FAILED_ONLY_NIGHTTIME = 92,
|
||||
SPELL_FAILED_ONLY_OUTDOORS = 93,
|
||||
SPELL_FAILED_ONLY_SHAPESHIFT = 94,
|
||||
SPELL_FAILED_ONLY_STEALTHED = 95,
|
||||
SPELL_FAILED_ONLY_UNDERWATER = 96,
|
||||
SPELL_FAILED_OUT_OF_RANGE = 97,
|
||||
SPELL_FAILED_PACIFIED = 98,
|
||||
SPELL_FAILED_POSSESSED = 99,
|
||||
SPELL_FAILED_REAGENTS = 100,
|
||||
SPELL_FAILED_REQUIRES_AREA = 101,
|
||||
SPELL_FAILED_REQUIRES_SPELL_FOCUS = 102,
|
||||
SPELL_FAILED_ROOTED = 103,
|
||||
SPELL_FAILED_SILENCED = 104,
|
||||
SPELL_FAILED_SPELL_IN_PROGRESS = 105,
|
||||
SPELL_FAILED_SPELL_LEARNED = 106,
|
||||
SPELL_FAILED_SPELL_UNAVAILABLE = 107,
|
||||
SPELL_FAILED_STUNNED = 108,
|
||||
SPELL_FAILED_TARGETS_DEAD = 109,
|
||||
SPELL_FAILED_TARGET_AFFECTING_COMBAT = 110,
|
||||
SPELL_FAILED_TARGET_AURASTATE = 111,
|
||||
SPELL_FAILED_TARGET_DUELING = 112,
|
||||
SPELL_FAILED_TARGET_ENEMY = 113,
|
||||
SPELL_FAILED_TARGET_ENRAGED = 114,
|
||||
SPELL_FAILED_TARGET_FRIENDLY = 115,
|
||||
SPELL_FAILED_TARGET_IN_COMBAT = 116,
|
||||
SPELL_FAILED_TARGET_IS_PLAYER = 117,
|
||||
SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED = 118,
|
||||
SPELL_FAILED_TARGET_NOT_DEAD = 119,
|
||||
SPELL_FAILED_TARGET_NOT_IN_PARTY = 120,
|
||||
SPELL_FAILED_TARGET_NOT_LOOTED = 121,
|
||||
SPELL_FAILED_TARGET_NOT_PLAYER = 122,
|
||||
SPELL_FAILED_TARGET_NO_POCKETS = 123,
|
||||
SPELL_FAILED_TARGET_NO_WEAPONS = 124,
|
||||
SPELL_FAILED_TARGET_NO_RANGED_WEAPONS = 125,
|
||||
SPELL_FAILED_TARGET_UNSKINNABLE = 126,
|
||||
SPELL_FAILED_THIRST_SATIATED = 127,
|
||||
SPELL_FAILED_TOO_CLOSE = 128,
|
||||
SPELL_FAILED_TOO_MANY_OF_ITEM = 129,
|
||||
SPELL_FAILED_TOTEM_CATEGORY = 130,
|
||||
SPELL_FAILED_TOTEMS = 131,
|
||||
SPELL_FAILED_TRY_AGAIN = 132,
|
||||
SPELL_FAILED_UNIT_NOT_BEHIND = 133,
|
||||
SPELL_FAILED_UNIT_NOT_INFRONT = 134,
|
||||
SPELL_FAILED_WRONG_PET_FOOD = 135,
|
||||
SPELL_FAILED_NOT_WHILE_FATIGUED = 136,
|
||||
SPELL_FAILED_TARGET_NOT_IN_INSTANCE = 137,
|
||||
SPELL_FAILED_NOT_WHILE_TRADING = 138,
|
||||
SPELL_FAILED_TARGET_NOT_IN_RAID = 139,
|
||||
SPELL_FAILED_TARGET_FREEFORALL = 140,
|
||||
SPELL_FAILED_NO_EDIBLE_CORPSES = 141,
|
||||
SPELL_FAILED_ONLY_BATTLEGROUNDS = 142,
|
||||
SPELL_FAILED_TARGET_NOT_GHOST = 143,
|
||||
SPELL_FAILED_TRANSFORM_UNUSABLE = 144,
|
||||
SPELL_FAILED_WRONG_WEATHER = 145,
|
||||
SPELL_FAILED_DAMAGE_IMMUNE = 146,
|
||||
SPELL_FAILED_PREVENTED_BY_MECHANIC = 147,
|
||||
SPELL_FAILED_PLAY_TIME = 148,
|
||||
SPELL_FAILED_REPUTATION = 149,
|
||||
SPELL_FAILED_MIN_SKILL = 150,
|
||||
SPELL_FAILED_NOT_IN_ARENA = 151,
|
||||
SPELL_FAILED_NOT_ON_SHAPESHIFT = 152,
|
||||
SPELL_FAILED_NOT_ON_STEALTHED = 153,
|
||||
SPELL_FAILED_NOT_ON_DAMAGE_IMMUNE = 154,
|
||||
SPELL_FAILED_NOT_ON_MOUNTED = 155,
|
||||
SPELL_FAILED_TOO_SHALLOW = 156,
|
||||
SPELL_FAILED_TARGET_NOT_IN_SANCTUARY = 157,
|
||||
SPELL_FAILED_TARGET_IS_TRIVIAL = 158,
|
||||
SPELL_FAILED_BM_OR_INVISGOD = 159,
|
||||
SPELL_FAILED_EXPERT_RIDING_REQUIREMENT = 160,
|
||||
SPELL_FAILED_ARTISAN_RIDING_REQUIREMENT = 161,
|
||||
SPELL_FAILED_NOT_IDLE = 162,
|
||||
SPELL_FAILED_NOT_INACTIVE = 163,
|
||||
SPELL_FAILED_PARTIAL_PLAYTIME = 164,
|
||||
SPELL_FAILED_NO_PLAYTIME = 165,
|
||||
SPELL_FAILED_NOT_IN_BATTLEGROUND = 166,
|
||||
SPELL_FAILED_NOT_IN_RAID_INSTANCE = 167,
|
||||
SPELL_FAILED_ONLY_IN_ARENA = 168,
|
||||
SPELL_FAILED_TARGET_LOCKED_TO_RAID_INSTANCE = 169,
|
||||
SPELL_FAILED_ON_USE_ENCHANT = 170,
|
||||
SPELL_FAILED_NOT_ON_GROUND = 171,
|
||||
SPELL_FAILED_CUSTOM_ERROR = 172,
|
||||
SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW = 173,
|
||||
SPELL_FAILED_TOO_MANY_SOCKETS = 174,
|
||||
SPELL_FAILED_INVALID_GLYPH = 175,
|
||||
SPELL_FAILED_UNIQUE_GLYPH = 176,
|
||||
SPELL_FAILED_GLYPH_SOCKET_LOCKED = 177,
|
||||
SPELL_FAILED_NO_VALID_TARGETS = 178,
|
||||
SPELL_FAILED_ITEM_AT_MAX_CHARGES = 179,
|
||||
SPELL_FAILED_NOT_IN_BARBERSHOP = 180,
|
||||
SPELL_FAILED_FISHING_TOO_LOW = 181,
|
||||
SPELL_FAILED_ITEM_ENCHANT_TRADE_WINDOW = 182,
|
||||
SPELL_FAILED_SUMMON_PENDING = 183,
|
||||
SPELL_FAILED_MAX_SOCKETS = 184,
|
||||
SPELL_FAILED_PET_CAN_RENAME = 185,
|
||||
SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED = 186,
|
||||
SPELL_FAILED_UNKNOWN = 187, // actually doesn't exist in client
|
||||
SPELL_FAILED_ALREADY_HAVE_PET = 8,
|
||||
SPELL_FAILED_ALREADY_OPEN = 9,
|
||||
SPELL_FAILED_AURA_BOUNCED = 10,
|
||||
SPELL_FAILED_AUTOTRACK_INTERRUPTED = 11,
|
||||
SPELL_FAILED_BAD_IMPLICIT_TARGETS = 12,
|
||||
SPELL_FAILED_BAD_TARGETS = 13,
|
||||
SPELL_FAILED_CANT_BE_CHARMED = 14,
|
||||
SPELL_FAILED_CANT_BE_DISENCHANTED = 15,
|
||||
SPELL_FAILED_CANT_BE_DISENCHANTED_SKILL = 16,
|
||||
SPELL_FAILED_CANT_BE_MILLED = 17,
|
||||
SPELL_FAILED_CANT_BE_PROSPECTED = 18,
|
||||
SPELL_FAILED_CANT_CAST_ON_TAPPED = 19,
|
||||
SPELL_FAILED_CANT_DUEL_WHILE_INVISIBLE = 20,
|
||||
SPELL_FAILED_CANT_DUEL_WHILE_STEALTHED = 21,
|
||||
SPELL_FAILED_CANT_STEALTH = 22,
|
||||
SPELL_FAILED_CASTER_AURASTATE = 23,
|
||||
SPELL_FAILED_CASTER_DEAD = 24,
|
||||
SPELL_FAILED_CHARMED = 25,
|
||||
SPELL_FAILED_CHEST_IN_USE = 26,
|
||||
SPELL_FAILED_CONFUSED = 27,
|
||||
SPELL_FAILED_DONT_REPORT = 28,
|
||||
SPELL_FAILED_EQUIPPED_ITEM = 29,
|
||||
SPELL_FAILED_EQUIPPED_ITEM_CLASS = 30,
|
||||
SPELL_FAILED_EQUIPPED_ITEM_CLASS_MAINHAND = 31,
|
||||
SPELL_FAILED_EQUIPPED_ITEM_CLASS_OFFHAND = 32,
|
||||
SPELL_FAILED_ERROR = 33,
|
||||
SPELL_FAILED_FALLING = 34,
|
||||
SPELL_FAILED_FIZZLE = 35,
|
||||
SPELL_FAILED_FLEEING = 36,
|
||||
SPELL_FAILED_FOOD_LOWLEVEL = 37,
|
||||
SPELL_FAILED_HIGHLEVEL = 38,
|
||||
SPELL_FAILED_HUNGER_SATIATED = 39,
|
||||
SPELL_FAILED_IMMUNE = 40,
|
||||
SPELL_FAILED_INCORRECT_AREA = 41,
|
||||
SPELL_FAILED_INTERRUPTED = 42,
|
||||
SPELL_FAILED_INTERRUPTED_COMBAT = 43,
|
||||
SPELL_FAILED_ITEM_ALREADY_ENCHANTED = 44,
|
||||
SPELL_FAILED_ITEM_GONE = 45,
|
||||
SPELL_FAILED_ITEM_NOT_FOUND = 46,
|
||||
SPELL_FAILED_ITEM_NOT_READY = 47,
|
||||
SPELL_FAILED_LEVEL_REQUIREMENT = 48,
|
||||
SPELL_FAILED_LINE_OF_SIGHT = 49,
|
||||
SPELL_FAILED_LOWLEVEL = 50,
|
||||
SPELL_FAILED_LOW_CASTLEVEL = 51,
|
||||
SPELL_FAILED_MAINHAND_EMPTY = 52,
|
||||
SPELL_FAILED_MOVING = 53,
|
||||
SPELL_FAILED_NEED_AMMO = 54,
|
||||
SPELL_FAILED_NEED_AMMO_POUCH = 55,
|
||||
SPELL_FAILED_NEED_EXOTIC_AMMO = 56,
|
||||
SPELL_FAILED_NEED_MORE_ITEMS = 57,
|
||||
SPELL_FAILED_NOPATH = 58,
|
||||
SPELL_FAILED_NOT_BEHIND = 59,
|
||||
SPELL_FAILED_NOT_FISHABLE = 60,
|
||||
SPELL_FAILED_NOT_FLYING = 61,
|
||||
SPELL_FAILED_NOT_HERE = 62,
|
||||
SPELL_FAILED_NOT_INFRONT = 63,
|
||||
SPELL_FAILED_NOT_IN_CONTROL = 64,
|
||||
SPELL_FAILED_NOT_KNOWN = 65,
|
||||
SPELL_FAILED_NOT_MOUNTED = 66,
|
||||
SPELL_FAILED_NOT_ON_TAXI = 67,
|
||||
SPELL_FAILED_NOT_ON_TRANSPORT = 68,
|
||||
SPELL_FAILED_NOT_READY = 69,
|
||||
SPELL_FAILED_NOT_SHAPESHIFT = 70,
|
||||
SPELL_FAILED_NOT_STANDING = 71,
|
||||
SPELL_FAILED_NOT_TRADEABLE = 72,
|
||||
SPELL_FAILED_NOT_TRADING = 73,
|
||||
SPELL_FAILED_NOT_UNSHEATHED = 74,
|
||||
SPELL_FAILED_NOT_WHILE_GHOST = 75,
|
||||
SPELL_FAILED_NOT_WHILE_LOOTING = 76,
|
||||
SPELL_FAILED_NO_AMMO = 77,
|
||||
SPELL_FAILED_NO_CHARGES_REMAIN = 78,
|
||||
SPELL_FAILED_NO_CHAMPION = 79,
|
||||
SPELL_FAILED_NO_COMBO_POINTS = 80,
|
||||
SPELL_FAILED_NO_DUELING = 81,
|
||||
SPELL_FAILED_NO_ENDURANCE = 82,
|
||||
SPELL_FAILED_NO_FISH = 83,
|
||||
SPELL_FAILED_NO_ITEMS_WHILE_SHAPESHIFTED = 84,
|
||||
SPELL_FAILED_NO_MOUNTS_ALLOWED = 85,
|
||||
SPELL_FAILED_NO_PET = 86,
|
||||
SPELL_FAILED_NO_POWER = 87,
|
||||
SPELL_FAILED_NOTHING_TO_DISPEL = 88,
|
||||
SPELL_FAILED_NOTHING_TO_STEAL = 89,
|
||||
SPELL_FAILED_ONLY_ABOVEWATER = 90,
|
||||
SPELL_FAILED_ONLY_DAYTIME = 91,
|
||||
SPELL_FAILED_ONLY_INDOORS = 92,
|
||||
SPELL_FAILED_ONLY_MOUNTED = 93,
|
||||
SPELL_FAILED_ONLY_NIGHTTIME = 94,
|
||||
SPELL_FAILED_ONLY_OUTDOORS = 95,
|
||||
SPELL_FAILED_ONLY_SHAPESHIFT = 96,
|
||||
SPELL_FAILED_ONLY_STEALTHED = 97,
|
||||
SPELL_FAILED_ONLY_UNDERWATER = 98,
|
||||
SPELL_FAILED_OUT_OF_RANGE = 99,
|
||||
SPELL_FAILED_PACIFIED = 100,
|
||||
SPELL_FAILED_POSSESSED = 101,
|
||||
SPELL_FAILED_REAGENTS = 102,
|
||||
SPELL_FAILED_REQUIRES_AREA = 103,
|
||||
SPELL_FAILED_REQUIRES_SPELL_FOCUS = 104,
|
||||
SPELL_FAILED_ROOTED = 105,
|
||||
SPELL_FAILED_SILENCED = 106,
|
||||
SPELL_FAILED_SPELL_IN_PROGRESS = 107,
|
||||
SPELL_FAILED_SPELL_LEARNED = 108,
|
||||
SPELL_FAILED_SPELL_UNAVAILABLE = 109,
|
||||
SPELL_FAILED_STUNNED = 110,
|
||||
SPELL_FAILED_TARGETS_DEAD = 111,
|
||||
SPELL_FAILED_TARGET_AFFECTING_COMBAT = 112,
|
||||
SPELL_FAILED_TARGET_AURASTATE = 113,
|
||||
SPELL_FAILED_TARGET_DUELING = 114,
|
||||
SPELL_FAILED_TARGET_ENEMY = 115,
|
||||
SPELL_FAILED_TARGET_ENRAGED = 116,
|
||||
SPELL_FAILED_TARGET_FRIENDLY = 117,
|
||||
SPELL_FAILED_TARGET_IN_COMBAT = 118,
|
||||
SPELL_FAILED_TARGET_IS_PLAYER = 119,
|
||||
SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED = 120,
|
||||
SPELL_FAILED_TARGET_NOT_DEAD = 121,
|
||||
SPELL_FAILED_TARGET_NOT_IN_PARTY = 122,
|
||||
SPELL_FAILED_TARGET_NOT_LOOTED = 123,
|
||||
SPELL_FAILED_TARGET_NOT_PLAYER = 124,
|
||||
SPELL_FAILED_TARGET_NO_POCKETS = 125,
|
||||
SPELL_FAILED_TARGET_NO_WEAPONS = 126,
|
||||
SPELL_FAILED_TARGET_NO_RANGED_WEAPONS = 127,
|
||||
SPELL_FAILED_TARGET_UNSKINNABLE = 128,
|
||||
SPELL_FAILED_THIRST_SATIATED = 129,
|
||||
SPELL_FAILED_TOO_CLOSE = 130,
|
||||
SPELL_FAILED_TOO_MANY_OF_ITEM = 131,
|
||||
SPELL_FAILED_TOTEM_CATEGORY = 132,
|
||||
SPELL_FAILED_TOTEMS = 133,
|
||||
SPELL_FAILED_TRY_AGAIN = 134,
|
||||
SPELL_FAILED_UNIT_NOT_BEHIND = 135,
|
||||
SPELL_FAILED_UNIT_NOT_INFRONT = 136,
|
||||
SPELL_FAILED_VISION_OBSCURED = 137,
|
||||
SPELL_FAILED_WRONG_PET_FOOD = 138,
|
||||
SPELL_FAILED_NOT_WHILE_FATIGUED = 139,
|
||||
SPELL_FAILED_TARGET_NOT_IN_INSTANCE = 140,
|
||||
SPELL_FAILED_NOT_WHILE_TRADING = 141,
|
||||
SPELL_FAILED_TARGET_NOT_IN_RAID = 142,
|
||||
SPELL_FAILED_TARGET_FREEFORALL = 143,
|
||||
SPELL_FAILED_NO_EDIBLE_CORPSES = 144,
|
||||
SPELL_FAILED_ONLY_BATTLEGROUNDS = 145,
|
||||
SPELL_FAILED_TARGET_NOT_GHOST = 146,
|
||||
SPELL_FAILED_TRANSFORM_UNUSABLE = 147,
|
||||
SPELL_FAILED_WRONG_WEATHER = 148,
|
||||
SPELL_FAILED_DAMAGE_IMMUNE = 149,
|
||||
SPELL_FAILED_PREVENTED_BY_MECHANIC = 150,
|
||||
SPELL_FAILED_PLAY_TIME = 151,
|
||||
SPELL_FAILED_REPUTATION = 152,
|
||||
SPELL_FAILED_MIN_SKILL = 153,
|
||||
SPELL_FAILED_NOT_IN_ARENA = 154,
|
||||
SPELL_FAILED_NOT_ON_SHAPESHIFT = 155,
|
||||
SPELL_FAILED_NOT_ON_STEALTHED = 156,
|
||||
SPELL_FAILED_NOT_ON_DAMAGE_IMMUNE = 157,
|
||||
SPELL_FAILED_NOT_ON_MOUNTED = 158,
|
||||
SPELL_FAILED_TOO_SHALLOW = 159,
|
||||
SPELL_FAILED_TARGET_NOT_IN_SANCTUARY = 160,
|
||||
SPELL_FAILED_TARGET_IS_TRIVIAL = 161,
|
||||
SPELL_FAILED_BM_OR_INVISGOD = 162,
|
||||
SPELL_FAILED_EXPERT_RIDING_REQUIREMENT = 163,
|
||||
SPELL_FAILED_ARTISAN_RIDING_REQUIREMENT = 164,
|
||||
SPELL_FAILED_NOT_IDLE = 165,
|
||||
SPELL_FAILED_NOT_INACTIVE = 166,
|
||||
SPELL_FAILED_PARTIAL_PLAYTIME = 167,
|
||||
SPELL_FAILED_NO_PLAYTIME = 168,
|
||||
SPELL_FAILED_NOT_IN_BATTLEGROUND = 169,
|
||||
SPELL_FAILED_NOT_IN_RAID_INSTANCE = 170,
|
||||
SPELL_FAILED_ONLY_IN_ARENA = 171,
|
||||
SPELL_FAILED_TARGET_LOCKED_TO_RAID_INSTANCE = 172,
|
||||
SPELL_FAILED_ON_USE_ENCHANT = 173,
|
||||
SPELL_FAILED_NOT_ON_GROUND = 174,
|
||||
SPELL_FAILED_CUSTOM_ERROR = 175,
|
||||
SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW = 176,
|
||||
SPELL_FAILED_TOO_MANY_SOCKETS = 177,
|
||||
SPELL_FAILED_INVALID_GLYPH = 178,
|
||||
SPELL_FAILED_UNIQUE_GLYPH = 179,
|
||||
SPELL_FAILED_GLYPH_SOCKET_LOCKED = 180,
|
||||
SPELL_FAILED_NO_VALID_TARGETS = 181,
|
||||
SPELL_FAILED_ITEM_AT_MAX_CHARGES = 182,
|
||||
SPELL_FAILED_NOT_IN_BARBERSHOP = 183,
|
||||
SPELL_FAILED_FISHING_TOO_LOW = 184,
|
||||
SPELL_FAILED_ITEM_ENCHANT_TRADE_WINDOW = 185,
|
||||
SPELL_FAILED_SUMMON_PENDING = 186,
|
||||
SPELL_FAILED_MAX_SOCKETS = 187,
|
||||
SPELL_FAILED_PET_CAN_RENAME = 188,
|
||||
SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED = 189,
|
||||
SPELL_FAILED_NO_ACTIONS = 190,
|
||||
SPELL_FAILED_CURRENCY_WEIGHT_MISMATCH = 191,
|
||||
SPELL_FAILED_CURRENCY_WEIGHT_NOT_ENOUGH = 192,
|
||||
SPELL_FAILED_CURRENCY_WEIGHT_TOO_MUCH = 193,
|
||||
SPELL_FAILED_NO_VACANT_SEAT = 194,
|
||||
SPELL_FAILED_NO_LIQUID = 195,
|
||||
SPELL_FAILED_ONLY_NOT_SWIMMING = 196,
|
||||
SPELL_FAILED_BY_NOT_MOVING = 197,
|
||||
SPELL_FAILED_IN_COMBAT_RES_LIMIT_REACHED = 198,
|
||||
SPELL_FAILED_UNKNOWN = 199, // Value not used
|
||||
|
||||
SPELL_CAST_OK = 255 // custom value, don't must be send to client
|
||||
};
|
||||
|
|
@ -2395,10 +2413,25 @@ enum SkillType
|
|||
SKILL_PET_WASP = 785,
|
||||
SKILL_PET_EXOTIC_RHINO = 786,
|
||||
SKILL_PET_EXOTIC_CORE_HOUND = 787,
|
||||
SKILL_PET_EXOTIC_SPIRIT_BEAST = 788
|
||||
SKILL_PET_EXOTIC_SPIRIT_BEAST = 788,
|
||||
SKILL_RACIAL_WORGEN = 789,
|
||||
SKILL_RACIAL_GOBLIN = 790,
|
||||
SKILL_LANG_WORGEN = 791,
|
||||
SKILL_LANG_GOBLIN = 792,
|
||||
SKILL_ARCHAEOLOGY = 794,
|
||||
SKILL_GENERAL_HUNTER = 795,
|
||||
SKILL_GENERAL_DEATHKNIGHT = 796,
|
||||
SKILL_GENERAL_ROGUE = 797,
|
||||
SKILL_GENERAL_DRUID = 798,
|
||||
SKILL_GENERAL_MAGE = 799,
|
||||
SKILL_GENERAL_PALADIN = 800,
|
||||
SKILL_GENERAL_SHAMAN = 801,
|
||||
SKILL_GENERAL_WARLOCK = 802,
|
||||
SKILL_GENERAL_WARRIOR = 803,
|
||||
SKILL_GENERAL_PRIEST = 804
|
||||
};
|
||||
|
||||
#define MAX_SKILL_TYPE 789
|
||||
#define MAX_SKILL_TYPE 805
|
||||
|
||||
inline SkillType SkillByLockType(LockType locktype)
|
||||
{
|
||||
|
|
@ -2556,10 +2589,14 @@ enum ChatMsg
|
|||
CHAT_MSG_ACHIEVEMENT = 0x30,
|
||||
CHAT_MSG_GUILD_ACHIEVEMENT = 0x31,
|
||||
CHAT_MSG_ARENA_POINTS = 0x32,
|
||||
CHAT_MSG_PARTY_LEADER = 0x33
|
||||
CHAT_MSG_PARTY_LEADER = 0x33,
|
||||
CHAT_MSG_UNK52 = 0x34, // 4.0.1
|
||||
CHAT_MSG_BN_WISPER = 0x35, // 4.0.1
|
||||
CHAT_MSG_BN_WISPER_INFORM = 0x36, // 4.0.1
|
||||
CHAT_MSG_BN_CONVERSATION = 0x37 // 4.0.1
|
||||
};
|
||||
|
||||
#define MAX_CHAT_MSG_TYPE 0x34
|
||||
#define MAX_CHAT_MSG_TYPE 0x38
|
||||
|
||||
enum ChatLinkColors
|
||||
{
|
||||
|
|
@ -2834,9 +2871,12 @@ enum BattleGroundTypeId
|
|||
BATTLEGROUND_DS = 10,
|
||||
BATTLEGROUND_RV = 11,
|
||||
BATTLEGROUND_IC = 30,
|
||||
BATTLEGROUND_RB = 32 // random battleground
|
||||
BATTLEGROUND_RB = 32, // random battleground
|
||||
BATTLEGROUND_TP = 108, // 4.0.0
|
||||
BATTLEGROUND_BG = 118 // 4.0.0
|
||||
};
|
||||
#define MAX_BATTLEGROUND_TYPE_ID 33
|
||||
|
||||
#define MAX_BATTLEGROUND_TYPE_ID 119
|
||||
|
||||
enum ArenaType
|
||||
{
|
||||
|
|
@ -2975,6 +3015,6 @@ enum ActivateTaxiReply
|
|||
// account with expansion > client supported will rejected at connection by client
|
||||
// because if client receive unsupported expansion level it think
|
||||
// that it not have expansion installed and reject
|
||||
#define MAX_EXPANSION 2
|
||||
#define MAX_EXPANSION 3
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -99,9 +99,9 @@ void LoadSkillDiscoveryTable()
|
|||
}
|
||||
|
||||
// mechanic discovery
|
||||
if (reqSpellEntry->Mechanic != MECHANIC_DISCOVERY &&
|
||||
// explicit discovery ability
|
||||
!IsExplicitDiscoverySpell(reqSpellEntry))
|
||||
if (reqSpellEntry->GetMechanic() != MECHANIC_DISCOVERY &&
|
||||
// explicit discovery ability
|
||||
!IsExplicitDiscoverySpell(reqSpellEntry))
|
||||
{
|
||||
if (reportedReqSpells.find(reqSkillOrSpell) == reportedReqSpells.end())
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
261
src/game/Spell.h
261
src/game/Spell.h
|
|
@ -233,125 +233,125 @@ class Spell
|
|||
friend void Unit::SetCurrentCastedSpell(Spell* pSpell);
|
||||
|
||||
public:
|
||||
void EffectEmpty(SpellEffectIndex eff_idx);
|
||||
void EffectNULL(SpellEffectIndex eff_idx);
|
||||
void EffectUnused(SpellEffectIndex eff_idx);
|
||||
void EffectDistract(SpellEffectIndex eff_idx);
|
||||
void EffectPull(SpellEffectIndex eff_idx);
|
||||
void EffectSchoolDMG(SpellEffectIndex eff_idx);
|
||||
void EffectEnvironmentalDMG(SpellEffectIndex eff_idx);
|
||||
void EffectInstaKill(SpellEffectIndex eff_idx);
|
||||
void EffectDummy(SpellEffectIndex eff_idx);
|
||||
void EffectTeleportUnits(SpellEffectIndex eff_idx);
|
||||
void EffectApplyAura(SpellEffectIndex eff_idx);
|
||||
void EffectSendEvent(SpellEffectIndex eff_idx);
|
||||
void EffectPowerBurn(SpellEffectIndex eff_idx);
|
||||
void EffectPowerDrain(SpellEffectIndex eff_idx);
|
||||
void EffectHeal(SpellEffectIndex eff_idx);
|
||||
void EffectBind(SpellEffectIndex eff_idx);
|
||||
void EffectHealthLeech(SpellEffectIndex eff_idx);
|
||||
void EffectQuestComplete(SpellEffectIndex eff_idx);
|
||||
void EffectCreateItem(SpellEffectIndex eff_idx);
|
||||
void EffectCreateItem2(SpellEffectIndex eff_idx);
|
||||
void EffectCreateRandomItem(SpellEffectIndex eff_idx);
|
||||
void EffectPersistentAA(SpellEffectIndex eff_idx);
|
||||
void EffectEnergize(SpellEffectIndex eff_idx);
|
||||
void EffectOpenLock(SpellEffectIndex eff_idx);
|
||||
void EffectSummonChangeItem(SpellEffectIndex eff_idx);
|
||||
void EffectProficiency(SpellEffectIndex eff_idx);
|
||||
void EffectApplyAreaAura(SpellEffectIndex eff_idx);
|
||||
void EffectSummonType(SpellEffectIndex eff_idx);
|
||||
void EffectLearnSpell(SpellEffectIndex eff_idx);
|
||||
void EffectDispel(SpellEffectIndex eff_idx);
|
||||
void EffectDualWield(SpellEffectIndex eff_idx);
|
||||
void EffectPickPocket(SpellEffectIndex eff_idx);
|
||||
void EffectAddFarsight(SpellEffectIndex eff_idx);
|
||||
void EffectHealMechanical(SpellEffectIndex eff_idx);
|
||||
void EffectJump(SpellEffectIndex eff_idx);
|
||||
void EffectTeleUnitsFaceCaster(SpellEffectIndex eff_idx);
|
||||
void EffectLearnSkill(SpellEffectIndex eff_idx);
|
||||
void EffectAddHonor(SpellEffectIndex eff_idx);
|
||||
void EffectTradeSkill(SpellEffectIndex eff_idx);
|
||||
void EffectEnchantItemPerm(SpellEffectIndex eff_idx);
|
||||
void EffectEnchantItemTmp(SpellEffectIndex eff_idx);
|
||||
void EffectTameCreature(SpellEffectIndex eff_idx);
|
||||
void EffectSummonPet(SpellEffectIndex eff_idx);
|
||||
void EffectLearnPetSpell(SpellEffectIndex eff_idx);
|
||||
void EffectWeaponDmg(SpellEffectIndex eff_idx);
|
||||
void EffectClearQuest(SpellEffectIndex eff_idx);
|
||||
void EffectForceCast(SpellEffectIndex eff_idx);
|
||||
void EffectTriggerSpell(SpellEffectIndex eff_idx);
|
||||
void EffectTriggerMissileSpell(SpellEffectIndex eff_idx);
|
||||
void EffectThreat(SpellEffectIndex eff_idx);
|
||||
void EffectRestoreItemCharges(SpellEffectIndex eff_idx);
|
||||
void EffectHealMaxHealth(SpellEffectIndex eff_idx);
|
||||
void EffectInterruptCast(SpellEffectIndex eff_idx);
|
||||
void EffectSummonObjectWild(SpellEffectIndex eff_idx);
|
||||
void EffectScriptEffect(SpellEffectIndex eff_idx);
|
||||
void EffectSanctuary(SpellEffectIndex eff_idx);
|
||||
void EffectAddComboPoints(SpellEffectIndex eff_idx);
|
||||
void EffectDuel(SpellEffectIndex eff_idx);
|
||||
void EffectStuck(SpellEffectIndex eff_idx);
|
||||
void EffectSummonPlayer(SpellEffectIndex eff_idx);
|
||||
void EffectActivateObject(SpellEffectIndex eff_idx);
|
||||
void EffectApplyGlyph(SpellEffectIndex eff_idx);
|
||||
void EffectEnchantHeldItem(SpellEffectIndex eff_idx);
|
||||
void EffectSummonObject(SpellEffectIndex eff_idx);
|
||||
void EffectResurrect(SpellEffectIndex eff_idx);
|
||||
void EffectParry(SpellEffectIndex eff_idx);
|
||||
void EffectBlock(SpellEffectIndex eff_idx);
|
||||
void EffectLeapForward(SpellEffectIndex eff_idx);
|
||||
void EffectLeapBack(SpellEffectIndex eff_idx);
|
||||
void EffectTransmitted(SpellEffectIndex eff_idx);
|
||||
void EffectDisEnchant(SpellEffectIndex eff_idx);
|
||||
void EffectInebriate(SpellEffectIndex eff_idx);
|
||||
void EffectFeedPet(SpellEffectIndex eff_idx);
|
||||
void EffectDismissPet(SpellEffectIndex eff_idx);
|
||||
void EffectReputation(SpellEffectIndex eff_idx);
|
||||
void EffectSelfResurrect(SpellEffectIndex eff_idx);
|
||||
void EffectSkinning(SpellEffectIndex eff_idx);
|
||||
void EffectCharge(SpellEffectIndex eff_idx);
|
||||
void EffectCharge2(SpellEffectIndex eff_idx);
|
||||
void EffectProspecting(SpellEffectIndex eff_idx);
|
||||
void EffectRedirectThreat(SpellEffectIndex eff_idx);
|
||||
void EffectMilling(SpellEffectIndex eff_idx);
|
||||
void EffectRenamePet(SpellEffectIndex eff_idx);
|
||||
void EffectSendTaxi(SpellEffectIndex eff_idx);
|
||||
void EffectKnockBack(SpellEffectIndex eff_idx);
|
||||
void EffectPlayerPull(SpellEffectIndex eff_idx);
|
||||
void EffectDispelMechanic(SpellEffectIndex eff_idx);
|
||||
void EffectSummonDeadPet(SpellEffectIndex eff_idx);
|
||||
void EffectSummonAllTotems(SpellEffectIndex eff_idx);
|
||||
void EffectBreakPlayerTargeting(SpellEffectIndex eff_idx);
|
||||
void EffectDestroyAllTotems(SpellEffectIndex eff_idx);
|
||||
void EffectDurabilityDamage(SpellEffectIndex eff_idx);
|
||||
void EffectSkill(SpellEffectIndex eff_idx);
|
||||
void EffectTaunt(SpellEffectIndex eff_idx);
|
||||
void EffectDurabilityDamagePCT(SpellEffectIndex eff_idx);
|
||||
void EffectModifyThreatPercent(SpellEffectIndex eff_idx);
|
||||
void EffectResurrectNew(SpellEffectIndex eff_idx);
|
||||
void EffectAddExtraAttacks(SpellEffectIndex eff_idx);
|
||||
void EffectSpiritHeal(SpellEffectIndex eff_idx);
|
||||
void EffectSkinPlayerCorpse(SpellEffectIndex eff_idx);
|
||||
void EffectStealBeneficialBuff(SpellEffectIndex eff_idx);
|
||||
void EffectUnlearnSpecialization(SpellEffectIndex eff_idx);
|
||||
void EffectHealPct(SpellEffectIndex eff_idx);
|
||||
void EffectEnergisePct(SpellEffectIndex eff_idx);
|
||||
void EffectTriggerSpellWithValue(SpellEffectIndex eff_idx);
|
||||
void EffectTriggerRitualOfSummoning(SpellEffectIndex eff_idx);
|
||||
void EffectKillCreditPersonal(SpellEffectIndex eff_idx);
|
||||
void EffectKillCreditGroup(SpellEffectIndex eff_idx);
|
||||
void EffectQuestFail(SpellEffectIndex eff_idx);
|
||||
void EffectQuestOffer(SpellEffectIndex eff_idx);
|
||||
void EffectActivateRune(SpellEffectIndex eff_idx);
|
||||
void EffectTeachTaxiNode(SpellEffectIndex eff_idx);
|
||||
void EffectTitanGrip(SpellEffectIndex eff_idx);
|
||||
void EffectEnchantItemPrismatic(SpellEffectIndex eff_idx);
|
||||
void EffectPlaySound(SpellEffectIndex eff_idx);
|
||||
void EffectPlayMusic(SpellEffectIndex eff_idx);
|
||||
void EffectSpecCount(SpellEffectIndex eff_idx);
|
||||
void EffectActivateSpec(SpellEffectIndex eff_idx);
|
||||
void EffectCancelAura(SpellEffectIndex eff_idx);
|
||||
void EffectEmpty(SpellEffectEntry const* effect);
|
||||
void EffectNULL(SpellEffectEntry const* effect);
|
||||
void EffectUnused(SpellEffectEntry const* effect);
|
||||
void EffectDistract(SpellEffectEntry const* effect);
|
||||
void EffectPull(SpellEffectEntry const* effect);
|
||||
void EffectSchoolDMG(SpellEffectEntry const* effect);
|
||||
void EffectEnvironmentalDMG(SpellEffectEntry const* effect);
|
||||
void EffectInstaKill(SpellEffectEntry const* effect);
|
||||
void EffectDummy(SpellEffectEntry const* effect);
|
||||
void EffectTeleportUnits(SpellEffectEntry const* effect);
|
||||
void EffectApplyAura(SpellEffectEntry const* effect);
|
||||
void EffectSendEvent(SpellEffectEntry const* effect);
|
||||
void EffectPowerBurn(SpellEffectEntry const* effect);
|
||||
void EffectPowerDrain(SpellEffectEntry const* effect);
|
||||
void EffectHeal(SpellEffectEntry const* effect);
|
||||
void EffectBind(SpellEffectEntry const* effect);
|
||||
void EffectHealthLeech(SpellEffectEntry const* effect);
|
||||
void EffectQuestComplete(SpellEffectEntry const* effect);
|
||||
void EffectCreateItem(SpellEffectEntry const* effect);
|
||||
void EffectCreateItem2(SpellEffectEntry const* effect);
|
||||
void EffectCreateRandomItem(SpellEffectEntry const* effect);
|
||||
void EffectPersistentAA(SpellEffectEntry const* effect);
|
||||
void EffectEnergize(SpellEffectEntry const* effect);
|
||||
void EffectOpenLock(SpellEffectEntry const* effect);
|
||||
void EffectSummonChangeItem(SpellEffectEntry const* effect);
|
||||
void EffectProficiency(SpellEffectEntry const* effect);
|
||||
void EffectApplyAreaAura(SpellEffectEntry const* effect);
|
||||
void EffectSummonType(SpellEffectEntry const* effect);
|
||||
void EffectLearnSpell(SpellEffectEntry const* effect);
|
||||
void EffectDispel(SpellEffectEntry const* effect);
|
||||
void EffectDualWield(SpellEffectEntry const* effect);
|
||||
void EffectPickPocket(SpellEffectEntry const* effect);
|
||||
void EffectAddFarsight(SpellEffectEntry const* effect);
|
||||
void EffectHealMechanical(SpellEffectEntry const* effect);
|
||||
void EffectJump(SpellEffectEntry const* effect);
|
||||
void EffectTeleUnitsFaceCaster(SpellEffectEntry const* effect);
|
||||
void EffectLearnSkill(SpellEffectEntry const* effect);
|
||||
void EffectAddHonor(SpellEffectEntry const* effect);
|
||||
void EffectTradeSkill(SpellEffectEntry const* effect);
|
||||
void EffectEnchantItemPerm(SpellEffectEntry const* effect);
|
||||
void EffectEnchantItemTmp(SpellEffectEntry const* effect);
|
||||
void EffectTameCreature(SpellEffectEntry const* effect);
|
||||
void EffectSummonPet(SpellEffectEntry const* effect);
|
||||
void EffectLearnPetSpell(SpellEffectEntry const* effect);
|
||||
void EffectWeaponDmg(SpellEffectEntry const* effect);
|
||||
void EffectClearQuest(SpellEffectEntry const* effect);
|
||||
void EffectForceCast(SpellEffectEntry const* effect);
|
||||
void EffectTriggerSpell(SpellEffectEntry const* effect);
|
||||
void EffectTriggerMissileSpell(SpellEffectEntry const* effect);
|
||||
void EffectThreat(SpellEffectEntry const* effect);
|
||||
void EffectRestoreItemCharges(SpellEffectEntry const* effect);
|
||||
void EffectHealMaxHealth(SpellEffectEntry const* effect);
|
||||
void EffectInterruptCast(SpellEffectEntry const* effect);
|
||||
void EffectSummonObjectWild(SpellEffectEntry const* effect);
|
||||
void EffectScriptEffect(SpellEffectEntry const* effect);
|
||||
void EffectSanctuary(SpellEffectEntry const* effect);
|
||||
void EffectAddComboPoints(SpellEffectEntry const* effect);
|
||||
void EffectDuel(SpellEffectEntry const* effect);
|
||||
void EffectStuck(SpellEffectEntry const* effect);
|
||||
void EffectSummonPlayer(SpellEffectEntry const* effect);
|
||||
void EffectActivateObject(SpellEffectEntry const* effect);
|
||||
void EffectApplyGlyph(SpellEffectEntry const* effect);
|
||||
void EffectEnchantHeldItem(SpellEffectEntry const* effect);
|
||||
void EffectSummonObject(SpellEffectEntry const* effect);
|
||||
void EffectResurrect(SpellEffectEntry const* effect);
|
||||
void EffectParry(SpellEffectEntry const* effect);
|
||||
void EffectBlock(SpellEffectEntry const* effect);
|
||||
void EffectLeapForward(SpellEffectEntry const* effect);
|
||||
void EffectLeapBack(SpellEffectEntry const* effect);
|
||||
void EffectTransmitted(SpellEffectEntry const* effect);
|
||||
void EffectDisEnchant(SpellEffectEntry const* effect);
|
||||
void EffectInebriate(SpellEffectEntry const* effect);
|
||||
void EffectFeedPet(SpellEffectEntry const* effect);
|
||||
void EffectDismissPet(SpellEffectEntry const* effect);
|
||||
void EffectReputation(SpellEffectEntry const* effect);
|
||||
void EffectSelfResurrect(SpellEffectEntry const* effect);
|
||||
void EffectSkinning(SpellEffectEntry const* effect);
|
||||
void EffectCharge(SpellEffectEntry const* effect);
|
||||
void EffectCharge2(SpellEffectEntry const* effect);
|
||||
void EffectProspecting(SpellEffectEntry const* effect);
|
||||
void EffectRedirectThreat(SpellEffectEntry const* effect);
|
||||
void EffectMilling(SpellEffectEntry const* effect);
|
||||
void EffectRenamePet(SpellEffectEntry const* effect);
|
||||
void EffectSendTaxi(SpellEffectEntry const* effect);
|
||||
void EffectKnockBack(SpellEffectEntry const* effect);
|
||||
void EffectPlayerPull(SpellEffectEntry const* effect);
|
||||
void EffectDispelMechanic(SpellEffectEntry const* effect);
|
||||
void EffectSummonDeadPet(SpellEffectEntry const* effect);
|
||||
void EffectSummonAllTotems(SpellEffectEntry const* effect);
|
||||
void EffectBreakPlayerTargeting (SpellEffectEntry const* effect);
|
||||
void EffectDestroyAllTotems(SpellEffectEntry const* effect);
|
||||
void EffectDurabilityDamage(SpellEffectEntry const* effect);
|
||||
void EffectSkill(SpellEffectEntry const* effect);
|
||||
void EffectTaunt(SpellEffectEntry const* effect);
|
||||
void EffectDurabilityDamagePCT(SpellEffectEntry const* effect);
|
||||
void EffectModifyThreatPercent(SpellEffectEntry const* effect);
|
||||
void EffectResurrectNew(SpellEffectEntry const* effect);
|
||||
void EffectAddExtraAttacks(SpellEffectEntry const* effect);
|
||||
void EffectSpiritHeal(SpellEffectEntry const* effect);
|
||||
void EffectSkinPlayerCorpse(SpellEffectEntry const* effect);
|
||||
void EffectStealBeneficialBuff(SpellEffectEntry const* effect);
|
||||
void EffectUnlearnSpecialization(SpellEffectEntry const* effect);
|
||||
void EffectHealPct(SpellEffectEntry const* effect);
|
||||
void EffectEnergisePct(SpellEffectEntry const* effect);
|
||||
void EffectTriggerSpellWithValue(SpellEffectEntry const* effect);
|
||||
void EffectTriggerRitualOfSummoning(SpellEffectEntry const* effect);
|
||||
void EffectKillCreditPersonal(SpellEffectEntry const* effect);
|
||||
void EffectKillCreditGroup(SpellEffectEntry const* effect);
|
||||
void EffectQuestFail(SpellEffectEntry const* effect);
|
||||
void EffectQuestOffer(SpellEffectEntry const* effect);
|
||||
void EffectActivateRune(SpellEffectEntry const* effect);
|
||||
void EffectTeachTaxiNode(SpellEffectEntry const* effect);
|
||||
void EffectTitanGrip(SpellEffectEntry const* effect);
|
||||
void EffectEnchantItemPrismatic(SpellEffectEntry const* effect);
|
||||
void EffectPlaySound(SpellEffectEntry const* effect);
|
||||
void EffectPlayMusic(SpellEffectEntry const* effect);
|
||||
void EffectSpecCount(SpellEffectEntry const* effect);
|
||||
void EffectActivateSpec(SpellEffectEntry const* effect);
|
||||
void EffectCancelAura(SpellEffectEntry const* effect);
|
||||
|
||||
Spell(Unit* caster, SpellEntry const* info, bool triggered, ObjectGuid originalCasterGUID = ObjectGuid(), SpellEntry const* triggeredBy = NULL);
|
||||
~Spell();
|
||||
|
|
@ -392,7 +392,7 @@ class Spell
|
|||
uint32 getState() const { return m_spellState; }
|
||||
void setState(uint32 state) { m_spellState = state; }
|
||||
|
||||
void DoCreateItem(SpellEffectIndex eff_idx, uint32 itemtype);
|
||||
void DoCreateItem(SpellEffectEntry const* effect, uint32 itemtype);
|
||||
|
||||
void WriteSpellGoTargets(WorldPacket* data);
|
||||
void WriteAmmoToPacket(WorldPacket* data);
|
||||
|
|
@ -429,6 +429,7 @@ class Spell
|
|||
|
||||
SpellEntry const* m_spellInfo;
|
||||
SpellEntry const* m_triggeredBySpellInfo;
|
||||
SpellInterruptsEntry const* m_spellInterrupts;
|
||||
int32 m_currentBasePoints[MAX_EFFECT_INDEX]; // cache SpellEntry::CalculateSimpleValue and use for set custom base points
|
||||
Item* m_CastItem;
|
||||
uint8 m_cast_count;
|
||||
|
|
@ -449,8 +450,8 @@ class Spell
|
|||
return m_spellInfo->HasAttribute(SPELL_ATTR_RANGED);
|
||||
}
|
||||
bool IsChannelActive() const { return m_caster->GetUInt32Value(UNIT_CHANNEL_SPELL) != 0; }
|
||||
bool IsMeleeAttackResetSpell() const { return !m_IsTriggeredSpell && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK); }
|
||||
bool IsRangedAttackResetSpell() const { return !m_IsTriggeredSpell && IsRangedSpell() && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK); }
|
||||
bool IsMeleeAttackResetSpell() const { return !m_IsTriggeredSpell && m_spellInterrupts && (m_spellInterrupts->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK); }
|
||||
bool IsRangedAttackResetSpell() const { return !m_IsTriggeredSpell && IsRangedSpell() && m_spellInterrupts && (m_spellInterrupts->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK); }
|
||||
|
||||
bool IsDeletable() const { return !m_referencedFromCurrentSpell && !m_executedCurrently; }
|
||||
void SetReferencedFromCurrent(bool yes) { m_referencedFromCurrentSpell = yes; }
|
||||
|
|
@ -460,7 +461,7 @@ class Spell
|
|||
uint64 GetDelayMoment() const { return m_delayMoment; }
|
||||
|
||||
bool IsNeedSendToClient() const; // use for hide spell cast for client in case when cast not have client side affect (animation or log entries)
|
||||
bool IsTriggeredSpellWithRedundentData() const; // use for ignore some spell data for triggered spells like cast time, some triggered spells have redundent copy data from main spell for client use purpose
|
||||
bool IsTriggeredSpellWithRedundentData() const; // use for ignore some spell data for triggered spells like cast time, some triggered spells have redundant copy data from main spell for client use purpose
|
||||
|
||||
CurrentSpellTypes GetCurrentContainer();
|
||||
|
||||
|
|
@ -659,12 +660,12 @@ class Spell
|
|||
typedef std::vector<CreaturePosition> CreatureSummonPositions;
|
||||
|
||||
// return true IFF further processing required
|
||||
bool DoSummonPet(SpellEffectIndex eff_idx);
|
||||
bool DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc = 0);
|
||||
bool DoSummonWild(CreatureSummonPositions& list, SummonPropertiesEntry const* prop, SpellEffectIndex effIdx, uint32 level);
|
||||
bool DoSummonCritter(CreatureSummonPositions& list, SummonPropertiesEntry const* prop, SpellEffectIndex effIdx, uint32 level);
|
||||
bool DoSummonGuardian(CreatureSummonPositions& list, SummonPropertiesEntry const* prop, SpellEffectIndex effIdx, uint32 level);
|
||||
bool DoSummonPossessed(CreatureSummonPositions& list, SummonPropertiesEntry const* prop, SpellEffectIndex effIdx, uint32 level);
|
||||
bool DoSummonPet(SpellEffectEntry const* effect);
|
||||
bool DoSummonTotem(SpellEffectEntry const* effect, uint8 slot_dbc = 0);
|
||||
bool DoSummonWild(CreatureSummonPositions& list, SummonPropertiesEntry const* prop, SpellEffectEntry const* effect, uint32 level);
|
||||
bool DoSummonCritter(CreatureSummonPositions& list, SummonPropertiesEntry const* prop, SpellEffectEntry const* effect, uint32 level);
|
||||
bool DoSummonGuardian(CreatureSummonPositions& list, SummonPropertiesEntry const* prop, SpellEffectEntry const* effect, uint32 level);
|
||||
bool DoSummonPossessed(CreatureSummonPositions& list, SummonPropertiesEntry const* prop, SpellEffectEntry const* effect, uint32 level);
|
||||
};
|
||||
|
||||
enum ReplenishType
|
||||
|
|
@ -889,7 +890,7 @@ namespace MaNGOS
|
|||
#endif
|
||||
}
|
||||
|
||||
typedef void(Spell::*pEffect)(SpellEffectIndex eff_idx);
|
||||
typedef void(Spell::*pEffect)(SpellEffectEntry const* spellEffect);
|
||||
|
||||
class SpellEvent : public BasicEvent
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -380,11 +380,12 @@ class MANGOS_DLL_SPEC Aura
|
|||
void SetModifier(AuraType t, int32 a, uint32 pt, int32 miscValue);
|
||||
Modifier* GetModifier() { return &m_modifier; }
|
||||
Modifier const* GetModifier() const { return &m_modifier; }
|
||||
int32 GetMiscValue() const { return m_spellAuraHolder->GetSpellProto()->EffectMiscValue[m_effIndex]; }
|
||||
int32 GetMiscBValue() const { return m_spellAuraHolder->GetSpellProto()->EffectMiscValueB[m_effIndex]; }
|
||||
int32 GetMiscValue() const { return m_spellEffect ? m_spellEffect->EffectMiscValue : 0; }
|
||||
int32 GetMiscBValue() const { return m_spellEffect ? m_spellEffect->EffectMiscValueB : 0; }
|
||||
|
||||
SpellEntry const* GetSpellProto() const { return GetHolder()->GetSpellProto(); }
|
||||
uint32 GetId() const { return GetHolder()->GetSpellProto()->Id; }
|
||||
SpellEffectEntry const* GetSpellEffect() const { return m_spellEffect; }
|
||||
uint32 GetId() const{ return GetHolder()->GetSpellProto()->Id; }
|
||||
ObjectGuid const& GetCastItemGuid() const { return GetHolder()->GetCastItemGuid(); }
|
||||
ObjectGuid const& GetCasterGuid() const { return GetHolder()->GetCasterGuid(); }
|
||||
Unit* GetCaster() const { return GetHolder()->GetCaster(); }
|
||||
|
|
@ -467,7 +468,9 @@ class MANGOS_DLL_SPEC Aura
|
|||
void ReapplyAffectedPassiveAuras();
|
||||
|
||||
Modifier m_modifier;
|
||||
SpellModifier *m_spellmod;
|
||||
|
||||
SpellEffectEntry const* m_spellEffect;
|
||||
time_t m_applyTime;
|
||||
|
||||
int32 m_currentBasePoints; // cache SpellEntry::CalculateSimpleValue and use for set custom base points
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -165,10 +165,11 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
|
|||
// send spell error
|
||||
if (SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellid))
|
||||
{
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(EFFECT_INDEX_0);
|
||||
// for implicit area/coord target spells
|
||||
if (IsPointEffectTarget(Targets(spellInfo->EffectImplicitTargetA[EFFECT_INDEX_0])) ||
|
||||
IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[EFFECT_INDEX_0])))
|
||||
Spell::SendCastResult(_player, spellInfo, cast_count, SPELL_FAILED_NO_VALID_TARGETS);
|
||||
if (spellEffect && (IsPointEffectTarget(Targets(spellEffect->EffectImplicitTargetA)) ||
|
||||
IsAreaEffectTarget(Targets(spellEffect->EffectImplicitTargetA))))
|
||||
Spell::SendCastResult(_player,spellInfo,cast_count,SPELL_FAILED_NO_VALID_TARGETS);
|
||||
// for explicit target spells
|
||||
else
|
||||
Spell::SendCastResult(_player, spellInfo, cast_count, SPELL_FAILED_BAD_TARGETS);
|
||||
|
|
@ -464,8 +465,9 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket)
|
|||
bool allow = false;
|
||||
for (int k = 0; k < MAX_EFFECT_INDEX; ++k)
|
||||
{
|
||||
if (spellInfo->EffectApplyAuraName[k] == SPELL_AURA_MOD_POSSESS ||
|
||||
spellInfo->EffectApplyAuraName[k] == SPELL_AURA_MOD_POSSESS_PET)
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(k));
|
||||
if (spellEffect && (spellEffect->EffectApplyAuraName == SPELL_AURA_MOD_POSSESS ||
|
||||
spellEffect->EffectApplyAuraName == SPELL_AURA_MOD_POSSESS_PET))
|
||||
{
|
||||
allow = true;
|
||||
break;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -92,35 +92,48 @@ inline float GetSpellMaxRange(SpellRangeEntry const* range, bool friendly = fals
|
|||
return 0;
|
||||
return (friendly ? range->maxRangeFriendly : range->maxRange);
|
||||
}
|
||||
inline uint32 GetSpellRecoveryTime(SpellEntry const* spellInfo) { return spellInfo->RecoveryTime > spellInfo->CategoryRecoveryTime ? spellInfo->RecoveryTime : spellInfo->CategoryRecoveryTime; }
|
||||
int32 GetSpellDuration(SpellEntry const* spellInfo);
|
||||
int32 GetSpellMaxDuration(SpellEntry const* spellInfo);
|
||||
int32 CalculateSpellDuration(SpellEntry const* spellInfo, Unit const* caster = NULL);
|
||||
inline uint32 GetSpellRecoveryTime(SpellEntry const *spellInfo)
|
||||
{
|
||||
if(SpellCooldownsEntry const* cooldowns = spellInfo->GetSpellCooldowns())
|
||||
return cooldowns->RecoveryTime > cooldowns->CategoryRecoveryTime ? cooldowns->RecoveryTime : cooldowns->CategoryRecoveryTime;
|
||||
return 0;
|
||||
}
|
||||
int32 GetSpellDuration(SpellEntry const *spellInfo);
|
||||
int32 GetSpellMaxDuration(SpellEntry const *spellInfo);
|
||||
int32 CalculateSpellDuration(SpellEntry const *spellInfo, Unit const* caster = NULL);
|
||||
uint16 GetSpellAuraMaxTicks(SpellEntry const* spellInfo);
|
||||
uint16 GetSpellAuraMaxTicks(uint32 spellId);
|
||||
WeaponAttackType GetWeaponAttackType(SpellEntry const* spellInfo);
|
||||
|
||||
inline bool IsSpellHaveEffect(SpellEntry const* spellInfo, SpellEffects effect)
|
||||
{
|
||||
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
if (SpellEffects(spellInfo->Effect[i]) == effect)
|
||||
return true;
|
||||
for(int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
if(SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(SpellEffectIndex(i)))
|
||||
if(SpellEffects(effectEntry->Effect) == effect)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool IsAuraApplyEffect(SpellEntry const* spellInfo, SpellEffectIndex effecIdx)
|
||||
{
|
||||
switch (spellInfo->Effect[effecIdx])
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(effecIdx));
|
||||
if (!spellEffect)
|
||||
return false;
|
||||
|
||||
switch (spellEffect->Effect)
|
||||
{
|
||||
case SPELL_EFFECT_APPLY_AURA:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_PARTY:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_RAID:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_PET:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_FRIEND:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_ENEMY:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_OWNER:
|
||||
return true;
|
||||
case SPELL_EFFECT_APPLY_AURA:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_PARTY:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_RAID:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_PET:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_FRIEND:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_ENEMY:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_OWNER:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +149,10 @@ inline bool IsSpellAppliesAura(SpellEntry const* spellInfo, uint32 effectMask =
|
|||
|
||||
inline bool IsEffectHandledOnDelayedSpellLaunch(SpellEntry const* spellInfo, SpellEffectIndex effecIdx)
|
||||
{
|
||||
switch (spellInfo->Effect[effecIdx])
|
||||
SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(effecIdx);
|
||||
if(!effectEntry)
|
||||
return false;
|
||||
switch (effectEntry->Effect)
|
||||
{
|
||||
case SPELL_EFFECT_SCHOOL_DAMAGE:
|
||||
case SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL:
|
||||
|
|
@ -151,7 +167,11 @@ inline bool IsEffectHandledOnDelayedSpellLaunch(SpellEntry const* spellInfo, Spe
|
|||
|
||||
inline bool IsPeriodicRegenerateEffect(SpellEntry const* spellInfo, SpellEffectIndex effecIdx)
|
||||
{
|
||||
switch (AuraType(spellInfo->EffectApplyAuraName[effecIdx]))
|
||||
SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(effecIdx);
|
||||
if(!effectEntry)
|
||||
return false;
|
||||
|
||||
switch (AuraType(effectEntry->EffectApplyAuraName))
|
||||
{
|
||||
case SPELL_AURA_PERIODIC_ENERGIZE:
|
||||
case SPELL_AURA_PERIODIC_HEAL:
|
||||
|
|
@ -166,17 +186,25 @@ bool IsCastEndProcModifierAura(SpellEntry const* spellInfo, SpellEffectIndex eff
|
|||
|
||||
inline bool IsSpellHaveAura(SpellEntry const* spellInfo, AuraType aura)
|
||||
{
|
||||
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
if (AuraType(spellInfo->EffectApplyAuraName[i]) == aura)
|
||||
return true;
|
||||
for(int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
if(SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(SpellEffectIndex(i)))
|
||||
if(AuraType(effectEntry->EffectApplyAuraName)==aura)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool IsSpellLastAuraEffect(SpellEntry const* spellInfo, SpellEffectIndex effecIdx)
|
||||
{
|
||||
for (int i = effecIdx + 1; i < MAX_EFFECT_INDEX; ++i)
|
||||
if (spellInfo->EffectApplyAuraName[i])
|
||||
return false;
|
||||
for(int i = effecIdx+1; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
if(SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(SpellEffectIndex(i)))
|
||||
if(effectEntry->EffectApplyAuraName)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -184,32 +212,38 @@ bool IsNoStackAuraDueToAura(uint32 spellId_1, uint32 spellId_2);
|
|||
|
||||
inline bool IsSealSpell(SpellEntry const* spellInfo)
|
||||
{
|
||||
// Collection of all the seal family flags. No other paladin spell has any of those.
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(EFFECT_INDEX_0);
|
||||
//Collection of all the seal family flags. No other paladin spell has any of those.
|
||||
return spellInfo->IsFitToFamily(SPELLFAMILY_PALADIN, UI64LIT(0x26000C000A000000)) &&
|
||||
// avoid counting target triggered effect as seal for avoid remove it or seal by it.
|
||||
spellInfo->EffectImplicitTargetA[EFFECT_INDEX_0] == TARGET_SELF;
|
||||
// avoid counting target triggered effect as seal for avoid remove it or seal by it.
|
||||
spellEffect && spellEffect->EffectImplicitTargetA == TARGET_SELF;
|
||||
}
|
||||
|
||||
inline bool IsElementalShield(SpellEntry const* spellInfo)
|
||||
{
|
||||
SpellClassOptionsEntry const* classOptions = spellInfo->GetSpellClassOptions();
|
||||
// family flags 10 (Lightning), 42 (Earth), 37 (Water), proc shield from T2 8 pieces bonus
|
||||
return (spellInfo->SpellFamilyFlags & UI64LIT(0x42000000400)) || spellInfo->Id == 23552;
|
||||
return (classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x42000000400)) || spellInfo->Id == 23552;
|
||||
}
|
||||
|
||||
inline bool IsExplicitDiscoverySpell(SpellEntry const* spellInfo)
|
||||
{
|
||||
return (((spellInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_CREATE_RANDOM_ITEM
|
||||
|| spellInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_CREATE_ITEM_2)
|
||||
&& spellInfo->Effect[EFFECT_INDEX_1] == SPELL_EFFECT_SCRIPT_EFFECT)
|
||||
|| spellInfo->Id == 64323); // Book of Glyph Mastery (Effect0==SPELL_EFFECT_SCRIPT_EFFECT without any other data)
|
||||
SpellEffectEntry const* spellEffect0 = spellInfo->GetSpellEffect(EFFECT_INDEX_0);
|
||||
SpellEffectEntry const* spellEffect1 = spellInfo->GetSpellEffect(EFFECT_INDEX_1);
|
||||
return ((spellEffect0 && (spellEffect0->Effect == SPELL_EFFECT_CREATE_RANDOM_ITEM ||
|
||||
spellEffect0->Effect == SPELL_EFFECT_CREATE_ITEM_2) &&
|
||||
(spellEffect1 && spellEffect1->Effect == SPELL_EFFECT_SCRIPT_EFFECT)) ||
|
||||
spellInfo->Id == 64323); // Book of Glyph Mastery (Effect0==SPELL_EFFECT_SCRIPT_EFFECT without any other data)
|
||||
}
|
||||
|
||||
inline bool IsLootCraftingSpell(SpellEntry const* spellInfo)
|
||||
{
|
||||
return (spellInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_CREATE_RANDOM_ITEM ||
|
||||
// different random cards from Inscription (121==Virtuoso Inking Set category) r without explicit item
|
||||
(spellInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_CREATE_ITEM_2 &&
|
||||
(spellInfo->TotemCategory[0] != 0 || spellInfo->EffectItemType[0] == 0)));
|
||||
SpellEffectEntry const* spellEffect0 = spellInfo->GetSpellEffect(EFFECT_INDEX_0);
|
||||
SpellTotemsEntry const* totems = spellInfo->GetSpellTotems();
|
||||
return (spellEffect0 && (spellEffect0->Effect == SPELL_EFFECT_CREATE_RANDOM_ITEM ||
|
||||
// different random cards from Inscription (121==Virtuoso Inking Set category) r without explicit item
|
||||
(spellEffect0->Effect == SPELL_EFFECT_CREATE_ITEM_2 &&
|
||||
((totems && totems->TotemCategory[0] != 0) || spellEffect0->EffectItemType==0))));
|
||||
}
|
||||
|
||||
int32 CompareAuraRanks(uint32 spellId_1, uint32 spellId_2);
|
||||
|
|
@ -232,11 +266,13 @@ inline bool IsPassiveSpellStackableWithRanks(SpellEntry const* spellProto)
|
|||
|
||||
inline bool IsSpellRemoveAllMovementAndControlLossEffects(SpellEntry const* spellProto)
|
||||
{
|
||||
return spellProto->EffectApplyAuraName[EFFECT_INDEX_0] == SPELL_AURA_MECHANIC_IMMUNITY &&
|
||||
spellProto->EffectMiscValue[EFFECT_INDEX_0] == 1 &&
|
||||
spellProto->EffectApplyAuraName[EFFECT_INDEX_1] == 0 &&
|
||||
spellProto->EffectApplyAuraName[EFFECT_INDEX_2] == 0 &&
|
||||
spellProto->HasAttribute(SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)/* && -- all above selected spells have SPELL_ATTR_EX5_* mask
|
||||
SpellEffectEntry const* spellEffect0 = spellProto->GetSpellEffect(EFFECT_INDEX_0);
|
||||
|
||||
return spellEffect0 && spellEffect0->EffectApplyAuraName == SPELL_AURA_MECHANIC_IMMUNITY &&
|
||||
spellEffect0->EffectMiscValue == 1 &&
|
||||
spellEffect0->EffectApplyAuraName == 0 &&
|
||||
spellEffect0->EffectApplyAuraName == 0 &&
|
||||
(spellProto->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)/* && -- all above selected spells have SPELL_ATTR_EX5_* mask
|
||||
((spellProto->AttributesEx5 &
|
||||
(SPELL_ATTR_EX5_USABLE_WHILE_CONFUSED|SPELL_ATTR_EX5_USABLE_WHILE_FEARED|SPELL_ATTR_EX5_USABLE_WHILE_STUNNED)) ==
|
||||
(SPELL_ATTR_EX5_USABLE_WHILE_CONFUSED|SPELL_ATTR_EX5_USABLE_WHILE_FEARED|SPELL_ATTR_EX5_USABLE_WHILE_STUNNED))*/;
|
||||
|
|
@ -302,12 +338,16 @@ inline bool IsSpellWithCasterSourceTargetsOnly(SpellEntry const* spellInfo)
|
|||
{
|
||||
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
uint32 targetA = spellInfo->EffectImplicitTargetA[i];
|
||||
if (targetA && !IsCasterSourceTarget(targetA))
|
||||
SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(SpellEffectIndex(i));
|
||||
if(!effectEntry)
|
||||
continue;
|
||||
|
||||
uint32 targetA = effectEntry->EffectImplicitTargetA;
|
||||
if(targetA && !IsCasterSourceTarget(targetA))
|
||||
return false;
|
||||
|
||||
uint32 targetB = spellInfo->EffectImplicitTargetB[i];
|
||||
if (targetB && !IsCasterSourceTarget(targetB))
|
||||
uint32 targetB = effectEntry->EffectImplicitTargetB;
|
||||
if(targetB && !IsCasterSourceTarget(targetB))
|
||||
return false;
|
||||
|
||||
if (!targetA && !targetB)
|
||||
|
|
@ -390,12 +430,16 @@ inline bool IsAreaEffectTarget(Targets target)
|
|||
|
||||
inline bool IsAreaOfEffectSpell(SpellEntry const* spellInfo)
|
||||
{
|
||||
if (IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[EFFECT_INDEX_0])) || IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetB[EFFECT_INDEX_0])))
|
||||
SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(EFFECT_INDEX_0);
|
||||
if(effectEntry && (IsAreaEffectTarget(Targets(effectEntry->EffectImplicitTargetA)) || IsAreaEffectTarget(Targets(effectEntry->EffectImplicitTargetB))))
|
||||
return true;
|
||||
if (IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[EFFECT_INDEX_1])) || IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetB[EFFECT_INDEX_1])))
|
||||
effectEntry = spellInfo->GetSpellEffect(EFFECT_INDEX_1);
|
||||
if(effectEntry && (IsAreaEffectTarget(Targets(effectEntry->EffectImplicitTargetA)) || IsAreaEffectTarget(Targets(effectEntry->EffectImplicitTargetB))))
|
||||
return true;
|
||||
if (IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[EFFECT_INDEX_2])) || IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetB[EFFECT_INDEX_2])))
|
||||
effectEntry = spellInfo->GetSpellEffect(EFFECT_INDEX_2);
|
||||
if(effectEntry && (IsAreaEffectTarget(Targets(effectEntry->EffectImplicitTargetA)) || IsAreaEffectTarget(Targets(effectEntry->EffectImplicitTargetB))))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -414,8 +458,13 @@ inline bool IsAreaAuraEffect(uint32 effect)
|
|||
inline bool HasAreaAuraEffect(SpellEntry const* spellInfo)
|
||||
{
|
||||
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
if (IsAreaAuraEffect(spellInfo->Effect[i]))
|
||||
{
|
||||
SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(SpellEffectIndex(i));
|
||||
if(!effectEntry)
|
||||
continue;
|
||||
if (IsAreaAuraEffect(effectEntry->Effect))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -423,7 +472,11 @@ inline bool HasAuraWithTriggerEffect(SpellEntry const* spellInfo)
|
|||
{
|
||||
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
switch (spellInfo->Effect[i])
|
||||
SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(SpellEffectIndex(i));
|
||||
if(!effectEntry)
|
||||
continue;
|
||||
|
||||
switch(effectEntry->Effect)
|
||||
{
|
||||
case SPELL_AURA_PERIODIC_TRIGGER_SPELL:
|
||||
case SPELL_AURA_PROC_TRIGGER_SPELL:
|
||||
|
|
@ -452,7 +505,7 @@ inline bool IsAutoRepeatRangedSpell(SpellEntry const* spellInfo)
|
|||
|
||||
inline bool IsSpellRequiresRangedAP(SpellEntry const* spellInfo)
|
||||
{
|
||||
return (spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MELEE);
|
||||
return (spellInfo->GetSpellFamilyName() == SPELLFAMILY_HUNTER && spellInfo->GetDmgClass() != SPELL_DAMAGE_CLASS_MELEE);
|
||||
}
|
||||
|
||||
SpellCastResult GetErrorAtShapeshiftedCast(SpellEntry const* spellInfo, uint32 form);
|
||||
|
|
@ -467,8 +520,12 @@ inline bool IsNeedCastSpellAtFormApply(SpellEntry const* spellInfo, ShapeshiftFo
|
|||
if ((!spellInfo->HasAttribute(SPELL_ATTR_PASSIVE) && !spellInfo->HasAttribute(SPELL_ATTR_UNK7)) || !form)
|
||||
return false;
|
||||
|
||||
SpellShapeshiftEntry const* shapeShift = spellInfo->GetSpellShapeshift();
|
||||
if (shapeShift)
|
||||
return false;
|
||||
|
||||
// passive spells with SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT are already active without shapeshift, do no recast!
|
||||
return (spellInfo->Stances & (1 << (form - 1)) && !spellInfo->HasAttribute(SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT));
|
||||
return (shapeShift->Stances & (1<<(form-1)) && !(spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -485,16 +542,21 @@ inline SpellSchoolMask GetSpellSchoolMask(SpellEntry const* spellInfo)
|
|||
inline uint32 GetSpellMechanicMask(SpellEntry const* spellInfo, uint32 effectMask)
|
||||
{
|
||||
uint32 mask = 0;
|
||||
if (spellInfo->Mechanic)
|
||||
mask |= 1 << (spellInfo->Mechanic - 1);
|
||||
|
||||
if (uint32 mech = spellInfo->GetMechanic())
|
||||
mask |= 1 << (mech - 1);
|
||||
|
||||
for (uint32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
if (!(effectMask & (1 << i)))
|
||||
continue;
|
||||
|
||||
if (spellInfo->EffectMechanic[i])
|
||||
mask |= 1 << (spellInfo->EffectMechanic[i] - 1);
|
||||
SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(SpellEffectIndex(i));
|
||||
if (!effectEntry)
|
||||
continue;
|
||||
|
||||
if (effectEntry->EffectMechanic)
|
||||
mask |= 1 << (effectEntry->EffectMechanic - 1);
|
||||
}
|
||||
|
||||
return mask;
|
||||
|
|
@ -502,21 +564,29 @@ inline uint32 GetSpellMechanicMask(SpellEntry const* spellInfo, uint32 effectMas
|
|||
|
||||
inline uint32 GetAllSpellMechanicMask(SpellEntry const* spellInfo)
|
||||
{
|
||||
SpellCategoriesEntry const* spellCategory = spellInfo->GetSpellCategories();
|
||||
uint32 mask = 0;
|
||||
if (spellInfo->Mechanic)
|
||||
mask |= 1 << (spellInfo->Mechanic - 1);
|
||||
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
if (spellInfo->EffectMechanic[i])
|
||||
mask |= 1 << (spellInfo->EffectMechanic[i] - 1);
|
||||
if (spellCategory && spellCategory->Mechanic)
|
||||
mask |= 1 << (spellCategory->Mechanic - 1);
|
||||
|
||||
for (int i=0; i< MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(SpellEffectIndex(i));
|
||||
if (effectEntry && effectEntry->EffectMechanic)
|
||||
mask |= 1 << (effectEntry->EffectMechanic-1);
|
||||
}
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
inline Mechanics GetEffectMechanic(SpellEntry const* spellInfo, SpellEffectIndex effect)
|
||||
{
|
||||
if (spellInfo->EffectMechanic[effect])
|
||||
return Mechanics(spellInfo->EffectMechanic[effect]);
|
||||
if (spellInfo->Mechanic)
|
||||
return Mechanics(spellInfo->Mechanic);
|
||||
SpellEffectEntry const* effectEntry = spellInfo->GetSpellEffect(SpellEffectIndex(effect));
|
||||
if (effectEntry && effectEntry->EffectMechanic)
|
||||
return Mechanics(effectEntry->EffectMechanic);
|
||||
SpellCategoriesEntry const* spellCategory = spellInfo->GetSpellCategories();
|
||||
if (spellCategory && spellCategory->Mechanic)
|
||||
return Mechanics(spellCategory->Mechanic);
|
||||
return MECHANIC_NONE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -252,13 +252,13 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
|
|||
UnitMods unitMod = ranged ? UNIT_MOD_ATTACK_POWER_RANGED : UNIT_MOD_ATTACK_POWER;
|
||||
|
||||
uint16 index = UNIT_FIELD_ATTACK_POWER;
|
||||
uint16 index_mod = UNIT_FIELD_ATTACK_POWER_MODS;
|
||||
uint16 index_mod = UNIT_FIELD_ATTACK_POWER_MOD_POS;
|
||||
uint16 index_mult = UNIT_FIELD_ATTACK_POWER_MULTIPLIER;
|
||||
|
||||
if (ranged)
|
||||
{
|
||||
index = UNIT_FIELD_RANGED_ATTACK_POWER;
|
||||
index_mod = UNIT_FIELD_RANGED_ATTACK_POWER_MODS;
|
||||
index_mod = UNIT_FIELD_RANGED_ATTACK_POWER_MOD_POS;
|
||||
index_mult = UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER;
|
||||
|
||||
switch (getClass())
|
||||
|
|
@ -703,7 +703,7 @@ void Player::UpdateExpertise(WeaponAttackType attack)
|
|||
for (AuraList::const_iterator itr = expAuras.begin(); itr != expAuras.end(); ++itr)
|
||||
{
|
||||
// item neutral spell
|
||||
if ((*itr)->GetSpellProto()->EquippedItemClass == -1)
|
||||
if((*itr)->GetSpellProto()->GetEquippedItemClass() == -1)
|
||||
expertise += (*itr)->GetModifier()->m_amount;
|
||||
// item dependent spell
|
||||
else if (weapon && weapon->IsFitToSpellRequirements((*itr)->GetSpellProto()))
|
||||
|
|
@ -729,7 +729,7 @@ void Player::UpdateArmorPenetration()
|
|||
for (AuraList::const_iterator itr = armorAuras.begin(); itr != armorAuras.end(); ++itr)
|
||||
{
|
||||
// affects all weapons
|
||||
if ((*itr)->GetSpellProto()->EquippedItemClass == -1)
|
||||
if((*itr)->GetSpellProto()->GetEquippedItemClass() == -1)
|
||||
{
|
||||
m_armorPenetrationPct += (*itr)->GetModifier()->m_amount;
|
||||
continue;
|
||||
|
|
@ -867,13 +867,13 @@ void Creature::UpdateAttackPowerAndDamage(bool ranged)
|
|||
UnitMods unitMod = ranged ? UNIT_MOD_ATTACK_POWER_RANGED : UNIT_MOD_ATTACK_POWER;
|
||||
|
||||
uint16 index = UNIT_FIELD_ATTACK_POWER;
|
||||
uint16 index_mod = UNIT_FIELD_ATTACK_POWER_MODS;
|
||||
uint16 index_mod = UNIT_FIELD_ATTACK_POWER_MOD_POS;
|
||||
uint16 index_mult = UNIT_FIELD_ATTACK_POWER_MULTIPLIER;
|
||||
|
||||
if (ranged)
|
||||
{
|
||||
index = UNIT_FIELD_RANGED_ATTACK_POWER;
|
||||
index_mod = UNIT_FIELD_RANGED_ATTACK_POWER_MODS;
|
||||
index_mod = UNIT_FIELD_RANGED_ATTACK_POWER_MOD_POS;
|
||||
index_mult = UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER;
|
||||
}
|
||||
|
||||
|
|
@ -1091,9 +1091,9 @@ void Pet::UpdateAttackPowerAndDamage(bool ranged)
|
|||
|
||||
// UNIT_FIELD_(RANGED)_ATTACK_POWER field
|
||||
SetInt32Value(UNIT_FIELD_ATTACK_POWER, (int32)base_attPower);
|
||||
// UNIT_FIELD_(RANGED)_ATTACK_POWER_MODS field
|
||||
SetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS, (int32)attPowerMod);
|
||||
// UNIT_FIELD_(RANGED)_ATTACK_POWER_MULTIPLIER field
|
||||
//UNIT_FIELD_(RANGED)_ATTACK_POWER_MODS field
|
||||
SetInt32Value(UNIT_FIELD_ATTACK_POWER_MOD_POS, (int32)attPowerMod);
|
||||
//UNIT_FIELD_(RANGED)_ATTACK_POWER_MULTIPLIER field
|
||||
SetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER, attPowerMultiplier);
|
||||
|
||||
// automatically update weapon damage after attack power modification
|
||||
|
|
|
|||
|
|
@ -183,32 +183,28 @@ void Totem::SetTypeBySummonSpell(SpellEntry const* spellProto)
|
|||
|
||||
bool Totem::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const
|
||||
{
|
||||
switch (spellInfo->Effect[index])
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(index);
|
||||
if(spellEffect)
|
||||
{
|
||||
case SPELL_EFFECT_ATTACK_ME:
|
||||
// immune to any type of regeneration effects hp/mana etc.
|
||||
case SPELL_EFFECT_HEAL:
|
||||
case SPELL_EFFECT_HEAL_MAX_HEALTH:
|
||||
case SPELL_EFFECT_HEAL_MECHANICAL:
|
||||
case SPELL_EFFECT_HEAL_PCT:
|
||||
case SPELL_EFFECT_ENERGIZE:
|
||||
case SPELL_EFFECT_ENERGIZE_PCT:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!IsPositiveSpell(spellInfo))
|
||||
{
|
||||
// immune to all negative auras
|
||||
if (IsAuraApplyEffect(spellInfo, index))
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// immune to any type of regeneration auras hp/mana etc.
|
||||
if (IsPeriodicRegenerateEffect(spellInfo, index))
|
||||
return true;
|
||||
// TODO: possibly all negative auras immune?
|
||||
switch(spellEffect->Effect)
|
||||
{
|
||||
case SPELL_EFFECT_ATTACK_ME:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch(spellEffect->EffectApplyAuraName)
|
||||
{
|
||||
case SPELL_AURA_PERIODIC_DAMAGE:
|
||||
case SPELL_AURA_PERIODIC_LEECH:
|
||||
case SPELL_AURA_MOD_FEAR:
|
||||
case SPELL_AURA_TRANSFORM:
|
||||
case SPELL_AURA_MOD_TAUNT:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return Creature::IsImmuneToSpellEffect(spellInfo, index);
|
||||
|
|
|
|||
|
|
@ -165,18 +165,18 @@ void MovementInfo::Write(ByteBuffer& data) const
|
|||
|
||||
bool GlobalCooldownMgr::HasGlobalCooldown(SpellEntry const* spellInfo) const
|
||||
{
|
||||
GlobalCooldownList::const_iterator itr = m_GlobalCooldowns.find(spellInfo->StartRecoveryCategory);
|
||||
GlobalCooldownList::const_iterator itr = m_GlobalCooldowns.find(spellInfo->GetStartRecoveryCategory());
|
||||
return itr != m_GlobalCooldowns.end() && itr->second.duration && WorldTimer::getMSTimeDiff(itr->second.cast_time, WorldTimer::getMSTime()) < itr->second.duration;
|
||||
}
|
||||
|
||||
void GlobalCooldownMgr::AddGlobalCooldown(SpellEntry const* spellInfo, uint32 gcd)
|
||||
{
|
||||
m_GlobalCooldowns[spellInfo->StartRecoveryCategory] = GlobalCooldown(gcd, WorldTimer::getMSTime());
|
||||
m_GlobalCooldowns[spellInfo->GetStartRecoveryCategory()] = GlobalCooldown(gcd, WorldTimer::getMSTime());
|
||||
}
|
||||
|
||||
void GlobalCooldownMgr::CancelGlobalCooldown(SpellEntry const* spellInfo)
|
||||
{
|
||||
m_GlobalCooldowns[spellInfo->StartRecoveryCategory].duration = 0;
|
||||
m_GlobalCooldowns[spellInfo->GetStartRecoveryCategory()].duration = 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
@ -430,10 +430,10 @@ bool Unit::haveOffhandWeapon() const
|
|||
else
|
||||
{
|
||||
uint32 ItemId = GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1);
|
||||
ItemEntry const* itemInfo = sItemStore.LookupEntry(ItemId);
|
||||
/*ItemEntry const* itemInfo = sItemStore.LookupEntry(ItemId);
|
||||
|
||||
if (itemInfo && itemInfo->Class == ITEM_CLASS_WEAPON)
|
||||
return true;
|
||||
return true;*/
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -856,7 +856,7 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
|
||||
if (damagetype == DIRECT_DAMAGE || damagetype == SPELL_DIRECT_DAMAGE)
|
||||
{
|
||||
if (!spellProto || !(spellProto->AuraInterruptFlags & AURA_INTERRUPT_FLAG_DIRECT_DAMAGE))
|
||||
if (!spellProto || !(spellProto->GetAuraInterruptFlags() & AURA_INTERRUPT_FLAG_DIRECT_DAMAGE))
|
||||
pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DIRECT_DAMAGE);
|
||||
}
|
||||
if (pVictim->GetTypeId() != TYPEID_PLAYER)
|
||||
|
|
@ -899,7 +899,7 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
next = i; ++next;
|
||||
if (spellProto && spellProto->Id == se->Id) // Not drop auras added by self
|
||||
continue;
|
||||
if (!se->procFlags && (se->AuraInterruptFlags & AURA_INTERRUPT_FLAG_DAMAGE))
|
||||
if (!se->GetProcFlags() && (se->GetAuraInterruptFlags() & AURA_INTERRUPT_FLAG_DAMAGE))
|
||||
{
|
||||
pVictim->RemoveAurasDueToSpell(i->second->GetId());
|
||||
next = vAuras.begin();
|
||||
|
|
@ -920,7 +920,7 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
{
|
||||
if (spell->getState() == SPELL_STATE_PREPARING)
|
||||
{
|
||||
if (spell->m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_ABORT_ON_DMG)
|
||||
if(spell->m_spellInfo->GetInterruptFlags() & SPELL_INTERRUPT_FLAG_ABORT_ON_DMG)
|
||||
pVictim->InterruptSpell(CurrentSpellTypes(i));
|
||||
else
|
||||
spell->Delayed();
|
||||
|
|
@ -933,8 +933,8 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
{
|
||||
if (spell->getState() == SPELL_STATE_CASTING)
|
||||
{
|
||||
uint32 channelInterruptFlags = spell->m_spellInfo->ChannelInterruptFlags;
|
||||
if (channelInterruptFlags & CHANNEL_FLAG_DELAY)
|
||||
uint32 channelInterruptFlags = spell->m_spellInfo->GetChannelInterruptFlags();
|
||||
if( channelInterruptFlags & CHANNEL_FLAG_DELAY )
|
||||
{
|
||||
if (pVictim != this) // don't shorten the duration of channeling if you damage yourself
|
||||
spell->DelayedChannel();
|
||||
|
|
@ -1137,9 +1137,9 @@ void Unit::CastSpell(Unit* Victim, SpellEntry const* spellInfo, bool triggered,
|
|||
SpellCastTargets targets;
|
||||
targets.setUnitTarget(Victim);
|
||||
|
||||
if (spellInfo->Targets & TARGET_FLAG_DEST_LOCATION)
|
||||
if (spellInfo->GetTargets() & TARGET_FLAG_DEST_LOCATION)
|
||||
targets.setDestination(Victim->GetPositionX(), Victim->GetPositionY(), Victim->GetPositionZ());
|
||||
if (spellInfo->Targets & TARGET_FLAG_SOURCE_LOCATION)
|
||||
if (spellInfo->GetTargets() & TARGET_FLAG_SOURCE_LOCATION)
|
||||
if (WorldObject* caster = spell->GetCastingObject())
|
||||
targets.setSource(caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ());
|
||||
|
||||
|
|
@ -1200,9 +1200,9 @@ void Unit::CastCustomSpell(Unit* Victim, SpellEntry const* spellInfo, int32 cons
|
|||
targets.setUnitTarget(Victim);
|
||||
spell->m_CastItem = castItem;
|
||||
|
||||
if (spellInfo->Targets & TARGET_FLAG_DEST_LOCATION)
|
||||
if (spellInfo->GetTargets() & TARGET_FLAG_DEST_LOCATION)
|
||||
targets.setDestination(Victim->GetPositionX(), Victim->GetPositionY(), Victim->GetPositionZ());
|
||||
if (spellInfo->Targets & TARGET_FLAG_SOURCE_LOCATION)
|
||||
if (spellInfo->GetTargets() & TARGET_FLAG_SOURCE_LOCATION)
|
||||
if (WorldObject* caster = spell->GetCastingObject())
|
||||
targets.setSource(caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ());
|
||||
|
||||
|
|
@ -1253,9 +1253,9 @@ void Unit::CastSpell(float x, float y, float z, SpellEntry const* spellInfo, boo
|
|||
|
||||
SpellCastTargets targets;
|
||||
|
||||
if (spellInfo->Targets & TARGET_FLAG_DEST_LOCATION)
|
||||
if (spellInfo->GetTargets() & TARGET_FLAG_DEST_LOCATION)
|
||||
targets.setDestination(x, y, z);
|
||||
if (spellInfo->Targets & TARGET_FLAG_SOURCE_LOCATION)
|
||||
if (spellInfo->GetTargets() & TARGET_FLAG_SOURCE_LOCATION)
|
||||
targets.setSource(x, y, z);
|
||||
|
||||
// Spell cast with x,y,z but without dbc target-mask, set destination
|
||||
|
|
@ -1296,7 +1296,7 @@ void Unit::CalculateSpellDamage(SpellNonMeleeDamage* damageInfo, int32 damage, S
|
|||
bool crit = IsSpellCrit(pVictim, spellInfo, damageSchoolMask, attackType);
|
||||
|
||||
// damage bonus (per damage class)
|
||||
switch (spellInfo->DmgClass)
|
||||
switch (spellInfo->GetDmgClass())
|
||||
{
|
||||
// Melee and Ranged Spells
|
||||
case SPELL_DAMAGE_CLASS_RANGED:
|
||||
|
|
@ -1969,8 +1969,9 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
|||
continue;
|
||||
|
||||
SpellEntry const* i_spellProto = (*i)->GetSpellProto();
|
||||
SpellClassOptionsEntry const* adsClassOptions = i_spellProto->GetSpellClassOptions();
|
||||
// Fire Ward or Frost Ward
|
||||
if (i_spellProto->SpellFamilyName == SPELLFAMILY_MAGE && i_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000108))
|
||||
if(adsClassOptions && adsClassOptions->SpellFamilyName == SPELLFAMILY_MAGE && adsClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000108))
|
||||
{
|
||||
int chance = 0;
|
||||
Unit::AuraList const& auras = GetAurasByType(SPELL_AURA_ADD_PCT_MODIFIER);
|
||||
|
|
@ -1978,7 +1979,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
|||
{
|
||||
SpellEntry const* itr_spellProto = (*itr)->GetSpellProto();
|
||||
// Frost Warding (chance full absorb)
|
||||
if (itr_spellProto->SpellFamilyName == SPELLFAMILY_MAGE && itr_spellProto->SpellIconID == 501)
|
||||
if (itr_spellProto->GetSpellFamilyName() == SPELLFAMILY_MAGE && itr_spellProto->SpellIconID == 501)
|
||||
{
|
||||
// chance stored in next dummy effect
|
||||
chance = itr_spellProto->CalculateSimpleValue(EFFECT_INDEX_1);
|
||||
|
|
@ -2025,8 +2026,9 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
|||
|
||||
// Handle custom absorb auras
|
||||
// TODO: try find better way
|
||||
SpellClassOptionsEntry const* classOptions = spellProto->GetSpellClassOptions();
|
||||
|
||||
switch (spellProto->SpellFamilyName)
|
||||
switch(spellProto->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
|
|
@ -2277,7 +2279,9 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
|||
else
|
||||
currentAbsorb = RemainingDamage;
|
||||
|
||||
if (float manaMultiplier = (*i)->GetSpellProto()->EffectMultipleValue[(*i)->GetEffIndex()])
|
||||
SpellEffectEntry const* spellEffect = (*i)->GetSpellProto()->GetSpellEffect((*i)->GetEffIndex());
|
||||
|
||||
if (float manaMultiplier = (spellEffect ? spellEffect->EffectMultipleValue : 0))
|
||||
{
|
||||
if (Player* modOwner = GetSpellModOwner())
|
||||
modOwner->ApplySpellMod((*i)->GetId(), SPELLMOD_MULTIPLE_VALUE, manaMultiplier);
|
||||
|
|
@ -2315,8 +2319,8 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
|||
SpellEntry const* itr_spellProto = (*itr)->GetSpellProto();
|
||||
|
||||
// Incanter's Absorption
|
||||
if (itr_spellProto->SpellFamilyName == SPELLFAMILY_GENERIC &&
|
||||
itr_spellProto->SpellIconID == 2941)
|
||||
if (itr_spellProto->GetSpellFamilyName() == SPELLFAMILY_GENERIC &&
|
||||
itr_spellProto->SpellIconID == 2941)
|
||||
{
|
||||
int32 amount = int32(incanterAbsorption * (*itr)->GetModifier()->m_amount / 100);
|
||||
|
||||
|
|
@ -2398,7 +2402,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
|||
// Apply death prevention spells effects
|
||||
if (preventDeathSpell && RemainingDamage >= (int32)GetHealth())
|
||||
{
|
||||
switch (preventDeathSpell->SpellFamilyName)
|
||||
switch(preventDeathSpell->GetSpellFamilyName())
|
||||
{
|
||||
// Cheat Death
|
||||
case SPELLFAMILY_ROGUE:
|
||||
|
|
@ -2437,7 +2441,7 @@ void Unit::CalculateAbsorbResistBlock(Unit* pCaster, SpellNonMeleeDamage* damage
|
|||
{
|
||||
bool blocked = false;
|
||||
// Get blocked status
|
||||
switch (spellProto->DmgClass)
|
||||
switch (spellProto->GetDmgClass())
|
||||
{
|
||||
// Melee and Ranged Spells
|
||||
case SPELL_DAMAGE_CLASS_RANGED:
|
||||
|
|
@ -2823,8 +2827,8 @@ uint32 Unit::CalculateDamage(WeaponAttackType attType, bool normalized)
|
|||
|
||||
float Unit::CalculateLevelPenalty(SpellEntry const* spellProto) const
|
||||
{
|
||||
uint32 spellLevel = spellProto->spellLevel;
|
||||
if (spellLevel <= 0)
|
||||
uint32 spellLevel = spellProto->GetSpellLevel();
|
||||
if(spellLevel <= 0)
|
||||
return 1.0f;
|
||||
|
||||
float LvlPenalty = 0.0f;
|
||||
|
|
@ -2950,11 +2954,11 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* pVictim, SpellEntry const* spell)
|
|||
{
|
||||
WeaponAttackType attType = BASE_ATTACK;
|
||||
|
||||
if (spell->DmgClass == SPELL_DAMAGE_CLASS_RANGED)
|
||||
if (spell->GetDmgClass() == SPELL_DAMAGE_CLASS_RANGED)
|
||||
attType = RANGED_ATTACK;
|
||||
|
||||
// bonus from skills is 0.04% per skill Diff
|
||||
int32 attackerWeaponSkill = (spell->EquippedItemClass == ITEM_CLASS_WEAPON) ? int32(GetWeaponSkillValue(attType, pVictim)) : GetMaxSkillValueForLevel();
|
||||
int32 attackerWeaponSkill = (spell->GetEquippedItemClass() == ITEM_CLASS_WEAPON) ? int32(GetWeaponSkillValue(attType,pVictim)) : GetMaxSkillValueForLevel();
|
||||
int32 skillDiff = attackerWeaponSkill - int32(pVictim->GetMaxSkillValueForLevel(this));
|
||||
int32 fullSkillDiff = attackerWeaponSkill - int32(pVictim->GetDefenseSkillValue(this));
|
||||
|
||||
|
|
@ -3136,7 +3140,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* pVictim, SpellEntry const* spell)
|
|||
modHitChance -= resist_mech;
|
||||
|
||||
// Chance resist debuff
|
||||
modHitChance -= pVictim->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DEBUFF_RESISTANCE, int32(spell->Dispel));
|
||||
modHitChance-=pVictim->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DEBUFF_RESISTANCE, int32(spell->GetDispel()));
|
||||
|
||||
int32 HitChance = modHitChance * 100;
|
||||
// Increase hit chance from attacker SPELL_AURA_MOD_SPELL_HIT_CHANCE and attacker ratings
|
||||
|
|
@ -3217,7 +3221,7 @@ SpellMissInfo Unit::SpellHitResult(Unit* pVictim, SpellEntry const* spell, bool
|
|||
}
|
||||
}
|
||||
|
||||
switch (spell->DmgClass)
|
||||
switch (spell->GetDmgClass())
|
||||
{
|
||||
case SPELL_DAMAGE_CLASS_NONE:
|
||||
return SPELL_MISS_NONE;
|
||||
|
|
@ -4007,7 +4011,7 @@ bool Unit::AddSpellAuraHolder(SpellAuraHolder* holder)
|
|||
if (foundHolder->GetCasterGuid() == holder->GetCasterGuid())
|
||||
{
|
||||
// Aura can stack on self -> Stack it;
|
||||
if (aurSpellInfo->StackAmount)
|
||||
if (aurSpellInfo->GetStackAmount())
|
||||
{
|
||||
// can be created with >1 stack by some spell mods
|
||||
foundHolder->ModStackAmount(holder->GetStackAmount());
|
||||
|
|
@ -4027,7 +4031,8 @@ bool Unit::AddSpellAuraHolder(SpellAuraHolder* holder)
|
|||
if (Aura* aur = holder->GetAuraByEffectIndex(SpellEffectIndex(i)))
|
||||
{
|
||||
// m_auraname can be modified to SPELL_AURA_NONE for area auras, use original
|
||||
AuraType aurNameReal = AuraType(aurSpellInfo->EffectApplyAuraName[i]);
|
||||
SpellEffectEntry const* spellEffect = aurSpellInfo->GetSpellEffect(SpellEffectIndex(i));
|
||||
AuraType aurNameReal = AuraType(spellEffect ? spellEffect->EffectApplyAuraName : 0);
|
||||
|
||||
if (aurNameReal == SPELL_AURA_PERIODIC_DAMAGE && aur->GetAuraDuration() > 0)
|
||||
{
|
||||
|
|
@ -4059,7 +4064,8 @@ bool Unit::AddSpellAuraHolder(SpellAuraHolder* holder)
|
|||
continue;
|
||||
|
||||
// m_auraname can be modified to SPELL_AURA_NONE for area auras, use original
|
||||
AuraType aurNameReal = AuraType(aurSpellInfo->EffectApplyAuraName[i]);
|
||||
SpellEffectEntry const* spellEffect = aurSpellInfo->GetSpellEffect(SpellEffectIndex(i));
|
||||
AuraType aurNameReal = AuraType(spellEffect ? spellEffect->EffectApplyAuraName : SPELL_AURA_NONE);
|
||||
|
||||
switch (aurNameReal)
|
||||
{
|
||||
|
|
@ -4233,14 +4239,25 @@ bool Unit::RemoveNoStackAurasDueToAuraHolder(SpellAuraHolder* holder)
|
|||
|
||||
bool is_triggered_by_spell = false;
|
||||
// prevent triggering aura of removing aura that triggered it
|
||||
for (int j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
if (i_spellProto->EffectTriggerSpell[j] == spellId)
|
||||
for(int j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
{
|
||||
SpellEffectEntry const* iSpellEffect = i_spellProto->GetSpellEffect(SpellEffectIndex(j));
|
||||
if(!iSpellEffect)
|
||||
continue;
|
||||
|
||||
if (iSpellEffect->EffectTriggerSpell == spellId)
|
||||
is_triggered_by_spell = true;
|
||||
}
|
||||
|
||||
// prevent triggered aura of removing aura that triggering it (triggered effect early some aura of parent spell
|
||||
for (int j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
if (spellProto->EffectTriggerSpell[j] == i_spellId)
|
||||
for(int j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
{
|
||||
SpellEffectEntry const* spellEffect = i_spellProto->GetSpellEffect(SpellEffectIndex(j));
|
||||
if(!spellEffect)
|
||||
continue;
|
||||
if (spellEffect->EffectTriggerSpell == i_spellId)
|
||||
is_triggered_by_spell = true;
|
||||
}
|
||||
|
||||
if (is_triggered_by_spell)
|
||||
continue;
|
||||
|
|
@ -4318,7 +4335,7 @@ bool Unit::RemoveNoStackAurasDueToAuraHolder(SpellAuraHolder* holder)
|
|||
}
|
||||
|
||||
// Potions stack aura by aura (elixirs/flask already checked)
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_POTION && i_spellProto->SpellFamilyName == SPELLFAMILY_POTION)
|
||||
if( spellProto->GetSpellFamilyName() == SPELLFAMILY_POTION && i_spellProto->GetSpellFamilyName() == SPELLFAMILY_POTION )
|
||||
{
|
||||
if (IsNoStackAuraDueToAura(spellId, i_spellId))
|
||||
{
|
||||
|
|
@ -4396,10 +4413,11 @@ void Unit::RemoveSingleAuraFromSpellAuraHolder(uint32 spellId, SpellEffectIndex
|
|||
void Unit::RemoveAuraHolderDueToSpellByDispel(uint32 spellId, uint32 stackAmount, ObjectGuid casterGuid, Unit* dispeller)
|
||||
{
|
||||
SpellEntry const* spellEntry = sSpellStore.LookupEntry(spellId);
|
||||
SpellClassOptionsEntry const* classOptions = spellEntry->GetSpellClassOptions();
|
||||
|
||||
// Custom dispel case
|
||||
// Unstable Affliction
|
||||
if (spellEntry->SpellFamilyName == SPELLFAMILY_WARLOCK && (spellEntry->SpellFamilyFlags & UI64LIT(0x010000000000)))
|
||||
if(classOptions && classOptions->SpellFamilyName == SPELLFAMILY_WARLOCK && (classOptions->SpellFamilyFlags & UI64LIT(0x010000000000)))
|
||||
{
|
||||
if (Aura* dotAura = GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_WARLOCK, UI64LIT(0x010000000000), 0x00000000, casterGuid))
|
||||
{
|
||||
|
|
@ -4416,7 +4434,7 @@ void Unit::RemoveAuraHolderDueToSpellByDispel(uint32 spellId, uint32 stackAmount
|
|||
}
|
||||
}
|
||||
// Lifebloom
|
||||
else if (spellEntry->SpellFamilyName == SPELLFAMILY_DRUID && (spellEntry->SpellFamilyFlags & UI64LIT(0x0000001000000000)))
|
||||
else if (classOptions && classOptions->SpellFamilyName == SPELLFAMILY_DRUID && (classOptions->SpellFamilyFlags & UI64LIT(0x0000001000000000)))
|
||||
{
|
||||
if (Aura* dotAura = GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, UI64LIT(0x0000001000000000), 0x00000000, casterGuid))
|
||||
{
|
||||
|
|
@ -4425,13 +4443,13 @@ void Unit::RemoveAuraHolderDueToSpellByDispel(uint32 spellId, uint32 stackAmount
|
|||
|
||||
if (Unit* caster = dotAura->GetCaster())
|
||||
{
|
||||
int32 returnmana = (spellEntry->ManaCostPercentage * caster->GetCreateMana() / 100) * stackAmount / 2;
|
||||
int32 returnmana = (spellEntry->GetManaCostPercentage() * caster->GetCreateMana() / 100) * stackAmount / 2;
|
||||
caster->CastCustomSpell(caster, 64372, &returnmana, NULL, NULL, true, NULL, dotAura, casterGuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Flame Shock
|
||||
else if (spellEntry->SpellFamilyName == SPELLFAMILY_SHAMAN && (spellEntry->SpellFamilyFlags & UI64LIT(0x10000000)))
|
||||
else if (classOptions && classOptions->SpellFamilyName == SPELLFAMILY_SHAMAN && (classOptions->SpellFamilyFlags & UI64LIT(0x10000000)))
|
||||
{
|
||||
Unit* caster = NULL;
|
||||
uint32 triggeredSpell = 0;
|
||||
|
|
@ -4464,7 +4482,7 @@ void Unit::RemoveAuraHolderDueToSpellByDispel(uint32 spellId, uint32 stackAmount
|
|||
return;
|
||||
}
|
||||
// Vampiric touch (first dummy aura)
|
||||
else if (spellEntry->SpellFamilyName == SPELLFAMILY_PRIEST && spellEntry->SpellFamilyFlags & UI64LIT(0x0000040000000000))
|
||||
else if (classOptions && classOptions->SpellFamilyName == SPELLFAMILY_PRIEST && classOptions->SpellFamilyFlags & UI64LIT(0x0000040000000000))
|
||||
{
|
||||
if (Aura* dot = GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, UI64LIT(0x0000040000000000), 0x00000000, casterGuid))
|
||||
{
|
||||
|
|
@ -4550,7 +4568,7 @@ void Unit::RemoveAurasWithDispelType(DispelType type, ObjectGuid casterGuid)
|
|||
for (SpellAuraHolderMap::iterator itr = auras.begin(); itr != auras.end();)
|
||||
{
|
||||
SpellEntry const* spell = itr->second->GetSpellProto();
|
||||
if (((1 << spell->Dispel) & dispelMask) && (!casterGuid || casterGuid == itr->second->GetCasterGuid()))
|
||||
if (((1<<spell->GetDispel()) & dispelMask) && (!casterGuid || casterGuid == itr->second->GetCasterGuid()))
|
||||
{
|
||||
// Dispel aura
|
||||
RemoveAurasDueToSpell(spell->Id);
|
||||
|
|
@ -4618,7 +4636,7 @@ void Unit::RemoveAurasWithInterruptFlags(uint32 flags)
|
|||
{
|
||||
for (SpellAuraHolderMap::iterator iter = m_spellAuraHolders.begin(); iter != m_spellAuraHolders.end();)
|
||||
{
|
||||
if (iter->second->GetSpellProto()->AuraInterruptFlags & flags)
|
||||
if (iter->second->GetSpellProto()->GetAuraInterruptFlags() & flags)
|
||||
{
|
||||
RemoveSpellAuraHolder(iter->second);
|
||||
iter = m_spellAuraHolders.begin();
|
||||
|
|
@ -5886,7 +5904,7 @@ void Unit::ModifyAuraState(AuraState flag, bool apply)
|
|||
if (itr->second.state == PLAYERSPELL_REMOVED) continue;
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||
if (!spellInfo || !IsPassiveSpell(spellInfo)) continue;
|
||||
if (AuraState(spellInfo->CasterAuraState) == flag)
|
||||
if (AuraState(spellInfo->GetCasterAuraState()) == flag)
|
||||
CastSpell(this, itr->first, true, NULL);
|
||||
}
|
||||
}
|
||||
|
|
@ -5904,7 +5922,7 @@ void Unit::ModifyAuraState(AuraState flag, bool apply)
|
|||
for (Unit::SpellAuraHolderMap::iterator itr = tAuras.begin(); itr != tAuras.end();)
|
||||
{
|
||||
SpellEntry const* spellProto = (*itr).second->GetSpellProto();
|
||||
if (AuraState(spellProto->CasterAuraState) == flag)
|
||||
if (AuraState(spellProto->GetCasterAuraState()) == flag)
|
||||
{
|
||||
RemoveSpellAuraHolder(itr->second);
|
||||
itr = tAuras.begin();
|
||||
|
|
@ -6167,7 +6185,7 @@ Unit* Unit::SelectMagnetTarget(Unit* victim, Spell* spell, SpellEffectIndex eff)
|
|||
return NULL;
|
||||
|
||||
// Magic case
|
||||
if (spell && spell->m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MAGIC)
|
||||
if (spell && (spell->m_spellInfo->GetDmgClass() == SPELL_DAMAGE_CLASS_NONE || spell->m_spellInfo->GetDmgClass() == SPELL_DAMAGE_CLASS_MAGIC))
|
||||
{
|
||||
Unit::AuraList const& magnetAuras = victim->GetAurasByType(SPELL_AURA_SPELL_MAGNET);
|
||||
for (Unit::AuraList::const_iterator itr = magnetAuras.begin(); itr != magnetAuras.end(); ++itr)
|
||||
|
|
@ -6251,7 +6269,7 @@ int32 Unit::SpellBonusWithCoeffs(SpellEntry const* spellProto, int32 total, int3
|
|||
float ap_bonus = damagetype == DOT ? bonus->ap_dot_bonus : bonus->ap_bonus;
|
||||
|
||||
// Impurity
|
||||
if (GetTypeId() == TYPEID_PLAYER && spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT)
|
||||
if (GetTypeId() == TYPEID_PLAYER && spellProto->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT)
|
||||
{
|
||||
if (SpellEntry const* spell = ((Player*)this)->GetKnownTalentRankById(2005))
|
||||
ap_bonus += ((spell->CalculateSimpleValue(EFFECT_INDEX_0) * ap_bonus) / 100.0f);
|
||||
|
|
@ -6308,11 +6326,12 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
|||
AuraList const& mModDamagePercentDone = GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
||||
for (AuraList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
|
||||
{
|
||||
if (((*i)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellProto)) &&
|
||||
(*i)->GetSpellProto()->EquippedItemClass == -1 &&
|
||||
// -1 == any item class (not wand then)
|
||||
(*i)->GetSpellProto()->EquippedItemInventoryTypeMask == 0)
|
||||
// 0 == any inventory type (not wand then)
|
||||
SpellEquippedItemsEntry const* spellEquip = (*i)->GetSpellProto()->GetSpellEquippedItems();
|
||||
if( ((*i)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellProto)) &&
|
||||
spellEquip && spellEquip->EquippedItemClass == -1 &&
|
||||
// -1 == any item class (not wand then)
|
||||
spellEquip->EquippedItemInventoryTypeMask == 0 )
|
||||
// 0 == any inventory type (not wand then)
|
||||
{
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
||||
}
|
||||
|
|
@ -6367,7 +6386,8 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
|||
for (SpellAuraHolderMap::const_iterator itr = victimAuras.begin(); itr != victimAuras.end(); ++itr)
|
||||
{
|
||||
SpellEntry const* m_spell = itr->second->GetSpellProto();
|
||||
if (m_spell->SpellFamilyName != SPELLFAMILY_WARLOCK || !(m_spell->SpellFamilyFlags & UI64LIT(0x0004071B8044C402)))
|
||||
SpellClassOptionsEntry const* itrClassOptions = m_spell->GetSpellClassOptions();
|
||||
if (itrClassOptions && (itrClassOptions->SpellFamilyName != SPELLFAMILY_WARLOCK || !(itrClassOptions->SpellFamilyFlags & UI64LIT(0x0004071B8044C402))))
|
||||
continue;
|
||||
modPercent += stepPercent * itr->second->GetStackAmount();
|
||||
if (modPercent >= maxPercent)
|
||||
|
|
@ -6449,8 +6469,10 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
|||
}
|
||||
}
|
||||
|
||||
// Custom scripted damage
|
||||
switch (spellProto->SpellFamilyName)
|
||||
SpellClassOptionsEntry const* classOptions = spellProto->GetSpellClassOptions();
|
||||
|
||||
// Custom scripted damage
|
||||
switch(spellProto->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_MAGE:
|
||||
{
|
||||
|
|
@ -6471,8 +6493,8 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
|||
}
|
||||
}
|
||||
// Torment the weak affected (Arcane Barrage, Arcane Blast, Frostfire Bolt, Arcane Missiles, Fireball)
|
||||
if ((spellProto->SpellFamilyFlags & UI64LIT(0x0000900020200021)) &&
|
||||
(pVictim->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || pVictim->HasAuraType(SPELL_AURA_HASTE_ALL)))
|
||||
if (classOptions && (classOptions->SpellFamilyFlags & UI64LIT(0x0000900020200021)) &&
|
||||
(pVictim->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || pVictim->HasAuraType(SPELL_AURA_HASTE_ALL)))
|
||||
{
|
||||
// Search for Torment the weak dummy aura
|
||||
Unit::AuraList const& ttw = GetAurasByType(SPELL_AURA_DUMMY);
|
||||
|
|
@ -6490,7 +6512,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
|||
case SPELLFAMILY_WARLOCK:
|
||||
{
|
||||
// Drain Soul
|
||||
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000004000))
|
||||
if (classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x0000000000004000))
|
||||
{
|
||||
if (pVictim->GetHealth() * 100 / pVictim->GetMaxHealth() <= 25)
|
||||
DoneTotalMod *= 4;
|
||||
|
|
@ -6525,7 +6547,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
|||
case SPELLFAMILY_DRUID:
|
||||
{
|
||||
// Improved Insect Swarm (Wrath part)
|
||||
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000001))
|
||||
if (classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x0000000000000001))
|
||||
{
|
||||
// if Insect Swarm on target
|
||||
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, UI64LIT(0x000000000200000), 0, GetObjectGuid()))
|
||||
|
|
@ -6546,14 +6568,14 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
|||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
{
|
||||
// Icy Touch and Howling Blast
|
||||
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000200000002))
|
||||
if (classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x0000000200000002))
|
||||
{
|
||||
// search disease
|
||||
bool found = false;
|
||||
Unit::SpellAuraHolderMap const& auras = pVictim->GetSpellAuraHolderMap();
|
||||
for (Unit::SpellAuraHolderMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||
{
|
||||
if (itr->second->GetSpellProto()->Dispel == DISPEL_DISEASE)
|
||||
if(itr->second->GetSpellProto()->GetDispel() == DISPEL_DISEASE)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
|
|
@ -6566,7 +6588,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
|||
Unit::AuraList const& dummyAuras = GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for (Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetSpellProto()->EffectMiscValue[(*i)->GetEffIndex()] == 7244)
|
||||
if ((*i)->GetSpellProto()->GetEffectMiscValue((*i)->GetEffIndex()) == 7244)
|
||||
{
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
||||
break;
|
||||
|
|
@ -6574,7 +6596,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
|||
}
|
||||
}
|
||||
// Death Coil (bonus from Item - Death Knight T8 DPS Relic)
|
||||
else if (spellProto->SpellFamilyFlags & UI64LIT(0x00002000))
|
||||
else if (classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x00002000))
|
||||
{
|
||||
if (Aura* sigil = GetDummyAura(64962))
|
||||
DoneTotal += sigil->GetModifier()->m_amount;
|
||||
|
|
@ -6693,10 +6715,11 @@ int32 Unit::SpellBaseDamageBonusDone(SpellSchoolMask schoolMask)
|
|||
AuraList const& mDamageDone = GetAurasByType(SPELL_AURA_MOD_DAMAGE_DONE);
|
||||
for (AuraList::const_iterator i = mDamageDone.begin(); i != mDamageDone.end(); ++i)
|
||||
{
|
||||
SpellEquippedItemsEntry const* spellEquip = (*i)->GetSpellProto()->GetSpellEquippedItems();
|
||||
if (((*i)->GetModifier()->m_miscvalue & schoolMask) != 0 &&
|
||||
(*i)->GetSpellProto()->EquippedItemClass == -1 && // -1 == any item class (not wand then)
|
||||
(*i)->GetSpellProto()->EquippedItemInventoryTypeMask == 0) // 0 == any inventory type (not wand then)
|
||||
DoneAdvertisedBenefit += (*i)->GetModifier()->m_amount;
|
||||
spellEquip && spellEquip->EquippedItemClass == -1 && // -1 == any item class (not wand then)
|
||||
spellEquip->EquippedItemInventoryTypeMask == 0) // 0 == any inventory type (not wand then)
|
||||
DoneAdvertisedBenefit += (*i)->GetModifier()->m_amount;
|
||||
}
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
|
|
@ -6749,7 +6772,7 @@ bool Unit::IsSpellCrit(Unit* pVictim, SpellEntry const* spellProto, SpellSchoolM
|
|||
return false;
|
||||
|
||||
float crit_chance = 0.0f;
|
||||
switch (spellProto->DmgClass)
|
||||
switch(spellProto->GetDmgClass())
|
||||
{
|
||||
case SPELL_DAMAGE_CLASS_NONE:
|
||||
return false;
|
||||
|
|
@ -6813,8 +6836,9 @@ bool Unit::IsSpellCrit(Unit* pVictim, SpellEntry const* spellProto, SpellSchoolM
|
|||
}
|
||||
}
|
||||
|
||||
SpellClassOptionsEntry const* classOptions = spellProto->GetSpellClassOptions();
|
||||
// Custom crit by class
|
||||
switch (spellProto->SpellFamilyName)
|
||||
switch(spellProto->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_MAGE:
|
||||
{
|
||||
|
|
@ -6838,8 +6862,8 @@ bool Unit::IsSpellCrit(Unit* pVictim, SpellEntry const* spellProto, SpellSchoolM
|
|||
for (AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
|
||||
{
|
||||
// Improved Flash Heal
|
||||
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_PRIEST &&
|
||||
(*i)->GetSpellProto()->SpellIconID == 2542)
|
||||
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_PRIEST &&
|
||||
(*i)->GetSpellProto()->SpellIconID == 2542)
|
||||
{
|
||||
crit_chance += (*i)->GetModifier()->m_amount;
|
||||
break;
|
||||
|
|
@ -6868,14 +6892,14 @@ bool Unit::IsSpellCrit(Unit* pVictim, SpellEntry const* spellProto, SpellSchoolM
|
|||
break;
|
||||
case SPELLFAMILY_PALADIN:
|
||||
// Sacred Shield
|
||||
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000040000000))
|
||||
if (classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x0000000040000000))
|
||||
{
|
||||
Aura* aura = pVictim->GetDummyAura(58597);
|
||||
if (aura && aura->GetCasterGuid() == GetObjectGuid())
|
||||
crit_chance += aura->GetModifier()->m_amount;
|
||||
}
|
||||
// Exorcism
|
||||
else if (spellProto->Category == 19)
|
||||
else if (spellProto->GetCategory() == 19)
|
||||
{
|
||||
if (pVictim->GetCreatureTypeMask() & CREATURE_TYPEMASK_DEMON_OR_UNDEAD)
|
||||
return true;
|
||||
|
|
@ -6921,7 +6945,7 @@ uint32 Unit::SpellCriticalDamageBonus(SpellEntry const* spellProto, uint32 damag
|
|||
{
|
||||
// Calculate critical bonus
|
||||
int32 crit_bonus;
|
||||
switch (spellProto->DmgClass)
|
||||
switch(spellProto->GetDmgClass())
|
||||
{
|
||||
case SPELL_DAMAGE_CLASS_MELEE: // for melee based spells is 100%
|
||||
case SPELL_DAMAGE_CLASS_RANGED:
|
||||
|
|
@ -6940,7 +6964,7 @@ uint32 Unit::SpellCriticalDamageBonus(SpellEntry const* spellProto, uint32 damag
|
|||
return damage += crit_bonus;
|
||||
|
||||
int32 critPctDamageMod = 0;
|
||||
if (spellProto->DmgClass >= SPELL_DAMAGE_CLASS_MELEE)
|
||||
if(spellProto->GetDmgClass() >= SPELL_DAMAGE_CLASS_MELEE)
|
||||
{
|
||||
if (GetWeaponAttackType(spellProto) == RANGED_ATTACK)
|
||||
critPctDamageMod += pVictim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE);
|
||||
|
|
@ -6968,7 +6992,7 @@ uint32 Unit::SpellCriticalHealingBonus(SpellEntry const* spellProto, uint32 dama
|
|||
{
|
||||
// Calculate critical bonus
|
||||
int32 crit_bonus;
|
||||
switch (spellProto->DmgClass)
|
||||
switch(spellProto->GetDmgClass())
|
||||
{
|
||||
case SPELL_DAMAGE_CLASS_MELEE: // for melee based spells is 100%
|
||||
case SPELL_DAMAGE_CLASS_RANGED:
|
||||
|
|
@ -7006,7 +7030,7 @@ uint32 Unit::SpellHealingBonusDone(Unit* pVictim, SpellEntry const* spellProto,
|
|||
return owner->SpellHealingBonusDone(pVictim, spellProto, healamount, damagetype, stack);
|
||||
|
||||
// No heal amount for this class spells
|
||||
if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE)
|
||||
if (spellProto->GetDmgClass() == SPELL_DAMAGE_CLASS_NONE)
|
||||
return healamount < 0 ? 0 : healamount;
|
||||
|
||||
// Healing Done
|
||||
|
|
@ -7058,9 +7082,9 @@ uint32 Unit::SpellHealingBonusDone(Unit* pVictim, SpellEntry const* spellProto,
|
|||
int ownHotCount = 0; // counted HoT types amount, not stacks
|
||||
|
||||
Unit::AuraList const& RejorRegr = pVictim->GetAurasByType(SPELL_AURA_PERIODIC_HEAL);
|
||||
for (Unit::AuraList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
|
||||
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID &&
|
||||
(*i)->GetCasterGuid() == GetObjectGuid())
|
||||
for(Unit::AuraList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
|
||||
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DRUID &&
|
||||
(*i)->GetCasterGuid() == GetObjectGuid())
|
||||
++ownHotCount;
|
||||
|
||||
if (ownHotCount)
|
||||
|
|
@ -7078,25 +7102,23 @@ uint32 Unit::SpellHealingBonusDone(Unit* pVictim, SpellEntry const* spellProto,
|
|||
}
|
||||
}
|
||||
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_DRUID)
|
||||
// Nourish 20% of heal increase if target is affected by Druids HOTs
|
||||
SpellClassOptionsEntry const* classOptions = spellProto->GetSpellClassOptions();
|
||||
if (classOptions && classOptions->SpellFamilyName == SPELLFAMILY_DRUID && (classOptions->SpellFamilyFlags & UI64LIT(0x0200000000000000)))
|
||||
{
|
||||
// Nourish 20% of heal increase if target is affected by Druids HOTs
|
||||
if (spellProto->SpellFamilyFlags & UI64LIT(0x0200000000000000))
|
||||
int ownHotCount = 0; // counted HoT types amount, not stacks
|
||||
Unit::AuraList const& RejorRegr = pVictim->GetAurasByType(SPELL_AURA_PERIODIC_HEAL);
|
||||
for(Unit::AuraList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
|
||||
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DRUID &&
|
||||
(*i)->GetCasterGuid() == GetObjectGuid())
|
||||
++ownHotCount;
|
||||
|
||||
if (ownHotCount)
|
||||
{
|
||||
int ownHotCount = 0; // counted HoT types amount, not stacks
|
||||
Unit::AuraList const& RejorRegr = pVictim->GetAurasByType(SPELL_AURA_PERIODIC_HEAL);
|
||||
for (Unit::AuraList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
|
||||
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID &&
|
||||
(*i)->GetCasterGuid() == GetObjectGuid())
|
||||
++ownHotCount;
|
||||
DoneTotalMod *= 1.2f; // base bonus at HoTs
|
||||
|
||||
if (ownHotCount)
|
||||
{
|
||||
DoneTotalMod *= 1.2f; // base bonus at HoTs
|
||||
|
||||
if (Aura* glyph = GetAura(62971, EFFECT_INDEX_0))// Glyph of Nourish
|
||||
DoneTotalMod *= (glyph->GetModifier()->m_amount * ownHotCount + 100.0f) / 100.0f;
|
||||
}
|
||||
if (Aura* glyph = GetAura(62971, EFFECT_INDEX_0))// Glyph of Nourish
|
||||
DoneTotalMod *= (glyph->GetModifier()->m_amount * ownHotCount + 100.0f) / 100.0f;
|
||||
}
|
||||
// Lifebloom
|
||||
else if (spellProto->IsFitToFamilyMask(UI64LIT(0x0000001000000000)))
|
||||
|
|
@ -7155,7 +7177,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit* pCaster, SpellEntry const* spellProto,
|
|||
TakenTotalMod *= (100.0f + maxval) / 100.0f;
|
||||
|
||||
// No heal amount for this class spells
|
||||
if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE)
|
||||
if (spellProto->GetDmgClass() == SPELL_DAMAGE_CLASS_NONE)
|
||||
{
|
||||
healamount = int32(healamount * TakenTotalMod);
|
||||
return healamount < 0 ? 0 : healamount;
|
||||
|
|
@ -7202,7 +7224,7 @@ int32 Unit::SpellBaseHealingBonusDone(SpellSchoolMask schoolMask)
|
|||
for (AuraList::const_iterator i = mHealingDoneOfStatPercent.begin(); i != mHealingDoneOfStatPercent.end(); ++i)
|
||||
{
|
||||
// stat used dependent from misc value (stat index)
|
||||
Stats usedStat = Stats((*i)->GetSpellProto()->EffectMiscValue[(*i)->GetEffIndex()]);
|
||||
Stats usedStat = Stats((*i)->GetSpellProto()->GetEffectMiscValue((*i)->GetEffIndex()));
|
||||
AdvertisedBenefit += int32(GetStat(usedStat) * (*i)->GetModifier()->m_amount / 100.0f);
|
||||
}
|
||||
|
||||
|
|
@ -7252,8 +7274,8 @@ bool Unit::IsImmuneToSpell(SpellEntry const* spellInfo)
|
|||
// SpellImmuneList const& dispelList = m_spellImmune[IMMUNITY_EFFECT];
|
||||
|
||||
SpellImmuneList const& dispelList = m_spellImmune[IMMUNITY_DISPEL];
|
||||
for (SpellImmuneList::const_iterator itr = dispelList.begin(); itr != dispelList.end(); ++itr)
|
||||
if (itr->type == spellInfo->Dispel)
|
||||
for(SpellImmuneList::const_iterator itr = dispelList.begin(); itr != dispelList.end(); ++itr)
|
||||
if (itr->type == spellInfo->GetDispel())
|
||||
return true;
|
||||
|
||||
if (!spellInfo->HasAttribute(SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE) && // unaffected by school immunity
|
||||
|
|
@ -7266,7 +7288,7 @@ bool Unit::IsImmuneToSpell(SpellEntry const* spellInfo)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (uint32 mechanic = spellInfo->Mechanic)
|
||||
if(uint32 mechanic = spellInfo->GetMechanic())
|
||||
{
|
||||
SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC];
|
||||
for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr)
|
||||
|
|
@ -7284,14 +7306,18 @@ bool Unit::IsImmuneToSpell(SpellEntry const* spellInfo)
|
|||
|
||||
bool Unit::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const
|
||||
{
|
||||
// If m_immuneToEffect type contain this effect type, IMMUNE effect.
|
||||
uint32 effect = spellInfo->Effect[index];
|
||||
//If m_immuneToEffect type contain this effect type, IMMUNE effect.
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(index);
|
||||
if(!spellEffect)
|
||||
return false;
|
||||
|
||||
uint32 effect = spellEffect->Effect;
|
||||
SpellImmuneList const& effectList = m_spellImmune[IMMUNITY_EFFECT];
|
||||
for (SpellImmuneList::const_iterator itr = effectList.begin(); itr != effectList.end(); ++itr)
|
||||
if (itr->type == effect)
|
||||
return true;
|
||||
|
||||
if (uint32 mechanic = spellInfo->EffectMechanic[index])
|
||||
if(uint32 mechanic = spellEffect->EffectMechanic)
|
||||
{
|
||||
SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC];
|
||||
for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr)
|
||||
|
|
@ -7304,7 +7330,7 @@ bool Unit::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex i
|
|||
return true;
|
||||
}
|
||||
|
||||
if (uint32 aura = spellInfo->EffectApplyAuraName[index])
|
||||
if(uint32 aura = spellEffect->EffectApplyAuraName)
|
||||
{
|
||||
SpellImmuneList const& list = m_spellImmune[IMMUNITY_STATE];
|
||||
for (SpellImmuneList::const_iterator itr = list.begin(); itr != list.end(); ++itr)
|
||||
|
|
@ -7314,8 +7340,8 @@ bool Unit::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex i
|
|||
// Check for immune to application of harmful magical effects
|
||||
AuraList const& immuneAuraApply = GetAurasByType(SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL);
|
||||
if (!immuneAuraApply.empty() &&
|
||||
spellInfo->Dispel == DISPEL_MAGIC && // Magic debuff)
|
||||
!IsPositiveEffect(spellInfo, index)) // Harmful
|
||||
spellInfo->GetDispel() == DISPEL_MAGIC && // Magic debuff)
|
||||
!IsPositiveEffect(spellInfo, index)) // Harmful
|
||||
{
|
||||
// Check school
|
||||
SpellSchoolMask schoolMask = GetSpellSchoolMask(spellInfo);
|
||||
|
|
@ -7354,10 +7380,10 @@ uint32 Unit::MeleeDamageBonusDone(Unit* pVictim, uint32 pdamage, WeaponAttackTyp
|
|||
AuraList const& mModDamageDone = GetAurasByType(SPELL_AURA_MOD_DAMAGE_DONE);
|
||||
for (AuraList::const_iterator i = mModDamageDone.begin(); i != mModDamageDone.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetModifier()->m_miscvalue & schoolMask && // schoolmask has to fit with the intrinsic spell school
|
||||
(*i)->GetModifier()->m_miscvalue & GetMeleeDamageSchoolMask() && // AND schoolmask has to fit with weapon damage school (essential for non-physical spells)
|
||||
(((*i)->GetSpellProto()->EquippedItemClass == -1) || // general, weapon independent
|
||||
(pWeapon && pWeapon->IsFitToSpellRequirements((*i)->GetSpellProto())))) // OR used weapon fits aura requirements
|
||||
if (((*i)->GetModifier()->m_miscvalue & schoolMask && // schoolmask has to fit with the intrinsic spell school
|
||||
(*i)->GetModifier()->m_miscvalue & GetMeleeDamageSchoolMask() && // AND schoolmask has to fit with weapon damage school (essential for non-physical spells)
|
||||
((*i)->GetSpellProto()->GetEquippedItemClass() == -1) || // general, weapon independent
|
||||
(pWeapon && pWeapon->IsFitToSpellRequirements((*i)->GetSpellProto())))) // OR used weapon fits aura requirements
|
||||
{
|
||||
DoneFlat += (*i)->GetModifier()->m_amount;
|
||||
}
|
||||
|
|
@ -7393,10 +7419,10 @@ uint32 Unit::MeleeDamageBonusDone(Unit* pVictim, uint32 pdamage, WeaponAttackTyp
|
|||
AuraList const& mModDamagePercentDone = GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
||||
for (AuraList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetModifier()->m_miscvalue & schoolMask && // schoolmask has to fit with the intrinsic spell school
|
||||
(*i)->GetModifier()->m_miscvalue & GetMeleeDamageSchoolMask() && // AND schoolmask has to fit with weapon damage school (essential for non-physical spells)
|
||||
(((*i)->GetSpellProto()->EquippedItemClass == -1) || // general, weapon independent
|
||||
(pWeapon && pWeapon->IsFitToSpellRequirements((*i)->GetSpellProto())))) // OR used weapon fits aura requirements
|
||||
if (((*i)->GetModifier()->m_miscvalue & schoolMask && // schoolmask has to fit with the intrinsic spell school
|
||||
(*i)->GetModifier()->m_miscvalue & GetMeleeDamageSchoolMask() && // AND schoolmask has to fit with weapon damage school (essential for non-physical spells)
|
||||
((*i)->GetSpellProto()->GetEquippedItemClass()) == -1 || // general, weapon independent
|
||||
(pWeapon && pWeapon->IsFitToSpellRequirements((*i)->GetSpellProto())))) // OR used weapon fits aura requirements
|
||||
{
|
||||
DonePercent *= ((*i)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
||||
}
|
||||
|
|
@ -7493,15 +7519,17 @@ uint32 Unit::MeleeDamageBonusDone(Unit* pVictim, uint32 pdamage, WeaponAttackTyp
|
|||
|
||||
if (spellProto)
|
||||
{
|
||||
SpellClassOptionsEntry const* classOptions = spellProto->GetSpellClassOptions();
|
||||
|
||||
// Frost Strike
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && spellProto->SpellFamilyFlags & UI64LIT(0x0000000400000000))
|
||||
if (classOptions && classOptions->IsFitToFamily(SPELLFAMILY_DEATHKNIGHT, UI64LIT(0x0000000400000000)))
|
||||
{
|
||||
// search disease
|
||||
bool found = false;
|
||||
Unit::SpellAuraHolderMap const& auras = pVictim->GetSpellAuraHolderMap();
|
||||
for (Unit::SpellAuraHolderMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||
{
|
||||
if (itr->second->GetSpellProto()->Dispel == DISPEL_DISEASE)
|
||||
if(itr->second->GetSpellProto()->GetDispel() == DISPEL_DISEASE)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
|
|
@ -7514,7 +7542,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* pVictim, uint32 pdamage, WeaponAttackTyp
|
|||
Unit::AuraList const& dummyAuras = GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for (Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetSpellProto()->EffectMiscValue[(*i)->GetEffIndex()] == 7244)
|
||||
if ((*i)->GetSpellProto()->GetEffectMiscValue((*i)->GetEffIndex()) == 7244)
|
||||
{
|
||||
DonePercent *= ((*i)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
||||
break;
|
||||
|
|
@ -7523,7 +7551,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* pVictim, uint32 pdamage, WeaponAttackTyp
|
|||
}
|
||||
}
|
||||
// Glyph of Steady Shot (Steady Shot check)
|
||||
else if (spellProto->SpellFamilyName == SPELLFAMILY_HUNTER && spellProto->SpellFamilyFlags & UI64LIT(0x0000000100000000))
|
||||
else if (classOptions && classOptions->IsFitToFamily(SPELLFAMILY_HUNTER, UI64LIT(0x0000000100000000)))
|
||||
{
|
||||
// search for glyph dummy aura
|
||||
if (Aura* aur = GetDummyAura(56826))
|
||||
|
|
@ -7598,8 +7626,9 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* pCaster, uint32 pdamage, WeaponAttackTy
|
|||
uint32 mechanicMask = spellProto ? GetAllSpellMechanicMask(spellProto) : 0;
|
||||
|
||||
// Shred also have bonus as MECHANIC_BLEED damages
|
||||
if (spellProto && spellProto->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags & UI64LIT(0x00008000))
|
||||
mechanicMask |= (1 << (MECHANIC_BLEED - 1));
|
||||
SpellClassOptionsEntry const* classOptions = spellProto ? spellProto->GetSpellClassOptions() : NULL;
|
||||
if (classOptions && classOptions->SpellFamilyName==SPELLFAMILY_DRUID && classOptions->SpellFamilyFlags & UI64LIT(0x00008000))
|
||||
mechanicMask |= (1 << (MECHANIC_BLEED-1));
|
||||
|
||||
// FLAT damage bonus auras
|
||||
// =======================
|
||||
|
|
@ -8790,17 +8819,24 @@ int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProt
|
|||
uint8 comboPoints = unitPlayer ? unitPlayer->GetComboPoints() : 0;
|
||||
|
||||
int32 level = int32(getLevel());
|
||||
if (level > (int32)spellProto->maxLevel && spellProto->maxLevel > 0)
|
||||
level = (int32)spellProto->maxLevel;
|
||||
else if (level < (int32)spellProto->baseLevel)
|
||||
level = (int32)spellProto->baseLevel;
|
||||
level -= (int32)spellProto->spellLevel;
|
||||
uint32 maxLevel = spellProto->GetMaxLevel();
|
||||
uint32 baseLevel = spellProto->GetBaseLevel();
|
||||
uint32 spellLevel = spellProto->GetSpellLevel();
|
||||
if (level > (int32)maxLevel && maxLevel > 0)
|
||||
level = (int32)maxLevel;
|
||||
else if (level < (int32)baseLevel)
|
||||
level = (int32)baseLevel;
|
||||
level-= (int32)spellLevel;
|
||||
|
||||
float basePointsPerLevel = spellProto->EffectRealPointsPerLevel[effect_index];
|
||||
int32 basePoints = effBasePoints ? *effBasePoints - 1 : spellProto->EffectBasePoints[effect_index];
|
||||
SpellEffectEntry const* spellEffect = spellProto->GetSpellEffect(effect_index);
|
||||
if(!spellEffect)
|
||||
return 0;
|
||||
|
||||
float basePointsPerLevel = spellEffect->EffectRealPointsPerLevel;
|
||||
int32 basePoints = effBasePoints ? *effBasePoints - 1 : spellEffect->EffectBasePoints;
|
||||
basePoints += int32(level * basePointsPerLevel);
|
||||
int32 randomPoints = int32(spellProto->EffectDieSides[effect_index]);
|
||||
float comboDamage = spellProto->EffectPointsPerComboPoint[effect_index];
|
||||
int32 randomPoints = int32(spellEffect->EffectDieSides);
|
||||
float comboDamage = spellEffect->EffectPointsPerComboPoint;
|
||||
|
||||
switch (randomPoints)
|
||||
{
|
||||
|
|
@ -8842,11 +8878,11 @@ int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProt
|
|||
}
|
||||
}
|
||||
|
||||
if (spellProto->HasAttribute(SPELL_ATTR_LEVEL_DAMAGE_CALCULATION) && spellProto->spellLevel &&
|
||||
spellProto->Effect[effect_index] != SPELL_EFFECT_WEAPON_PERCENT_DAMAGE &&
|
||||
spellProto->Effect[effect_index] != SPELL_EFFECT_KNOCK_BACK &&
|
||||
(spellProto->Effect[effect_index] != SPELL_EFFECT_APPLY_AURA || spellProto->EffectApplyAuraName[effect_index] != SPELL_AURA_MOD_DECREASE_SPEED))
|
||||
value = int32(value * 0.25f * exp(getLevel() * (70 - spellProto->spellLevel) / 1000.0f));
|
||||
if(spellProto->Attributes & SPELL_ATTR_LEVEL_DAMAGE_CALCULATION && spellLevel &&
|
||||
spellEffect->Effect != SPELL_EFFECT_WEAPON_PERCENT_DAMAGE &&
|
||||
spellEffect->Effect != SPELL_EFFECT_KNOCK_BACK &&
|
||||
(spellEffect->Effect != SPELL_EFFECT_APPLY_AURA || spellEffect->EffectApplyAuraName != SPELL_AURA_MOD_DECREASE_SPEED))
|
||||
value = int32(value*0.25f*exp(getLevel()*(70-spellLevel)/1000.0f));
|
||||
|
||||
return value;
|
||||
}
|
||||
|
|
@ -8875,8 +8911,8 @@ int32 Unit::CalculateAuraDuration(SpellEntry const* spellProto, uint32 effectMas
|
|||
|
||||
if (!IsPositiveSpell(spellProto))
|
||||
{
|
||||
dispelMod = GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL, spellProto->Dispel);
|
||||
dmgClassMod = GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DURATION_OF_MAGIC_EFFECTS, spellProto->DmgClass);
|
||||
dispelMod = GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL, spellProto->GetDispel());
|
||||
dmgClassMod = GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DURATION_OF_MAGIC_EFFECTS, spellProto->GetDmgClass());
|
||||
}
|
||||
|
||||
int32 durationMod = std::min(mechanicMod, std::min(dispelMod, dmgClassMod));
|
||||
|
|
@ -8891,11 +8927,11 @@ int32 Unit::CalculateAuraDuration(SpellEntry const* spellProto, uint32 effectMas
|
|||
|
||||
if (caster == this)
|
||||
{
|
||||
switch (spellProto->SpellFamilyName)
|
||||
switch(spellProto->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_DRUID:
|
||||
// Thorns
|
||||
if (spellProto->SpellIconID == 53 && (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000100)))
|
||||
if (spellProto->SpellIconID == 53 && spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000000100)))
|
||||
{
|
||||
// Glyph of Thorns
|
||||
if (Aura* aur = GetAura(57862, EFFECT_INDEX_0))
|
||||
|
|
@ -8904,14 +8940,14 @@ int32 Unit::CalculateAuraDuration(SpellEntry const* spellProto, uint32 effectMas
|
|||
break;
|
||||
case SPELLFAMILY_PALADIN:
|
||||
// Blessing of Might
|
||||
if (spellProto->SpellIconID == 298 && spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000002))
|
||||
if (spellProto->SpellIconID == 298 && spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000000002)))
|
||||
{
|
||||
// Glyph of Blessing of Might
|
||||
if (Aura* aur = GetAura(57958, EFFECT_INDEX_0))
|
||||
duration += aur->GetModifier()->m_amount * MINUTE * IN_MILLISECONDS;
|
||||
}
|
||||
// Blessing of Wisdom
|
||||
else if (spellProto->SpellIconID == 306 && spellProto->SpellFamilyFlags & UI64LIT(0x0000000000010000))
|
||||
else if (spellProto->SpellIconID == 306 && spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000010000)))
|
||||
{
|
||||
// Glyph of Blessing of Wisdom
|
||||
if (Aura* aur = GetAura(57979, EFFECT_INDEX_0))
|
||||
|
|
@ -9240,14 +9276,14 @@ float Unit::GetTotalAttackPowerValue(WeaponAttackType attType) const
|
|||
{
|
||||
if (attType == RANGED_ATTACK)
|
||||
{
|
||||
int32 ap = GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MODS);
|
||||
int32 ap = GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MOD_POS);
|
||||
if (ap < 0)
|
||||
return 0.0f;
|
||||
return ap * (1.0f + GetFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER));
|
||||
}
|
||||
else
|
||||
{
|
||||
int32 ap = GetInt32Value(UNIT_FIELD_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS);
|
||||
int32 ap = GetInt32Value(UNIT_FIELD_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_ATTACK_POWER_MOD_POS);
|
||||
if (ap < 0)
|
||||
return 0.0f;
|
||||
return ap * (1.0f + GetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER));
|
||||
|
|
@ -9456,11 +9492,17 @@ uint32 Unit::GetCreatePowers(Powers power) const
|
|||
case POWER_HEALTH: return 0; // is it really should be here?
|
||||
case POWER_MANA: return GetCreateMana();
|
||||
case POWER_RAGE: return 1000;
|
||||
case POWER_FOCUS: return (GetTypeId() == TYPEID_PLAYER || !((Creature const*)this)->IsPet() || ((Pet const*)this)->getPetType() != HUNTER_PET ? 0 : 100);
|
||||
case POWER_FOCUS:
|
||||
if(GetTypeId() == TYPEID_PLAYER && ((Player const*)this)->getClass() == CLASS_HUNTER)
|
||||
return 100;
|
||||
return (GetTypeId() == TYPEID_PLAYER || !((Creature const*)this)->IsPet() || ((Pet const*)this)->getPetType() != HUNTER_PET ? 0 : 100);
|
||||
case POWER_ENERGY: return 100;
|
||||
case POWER_HAPPINESS: return (GetTypeId() == TYPEID_PLAYER || !((Creature const*)this)->IsPet() || ((Pet const*)this)->getPetType() != HUNTER_PET ? 0 : 1050000);
|
||||
case POWER_RUNE: return (GetTypeId() == TYPEID_PLAYER && ((Player const*)this)->getClass() == CLASS_DEATH_KNIGHT ? 8 : 0);
|
||||
case POWER_RUNIC_POWER: return (GetTypeId() == TYPEID_PLAYER && ((Player const*)this)->getClass() == CLASS_DEATH_KNIGHT ? 1000 : 0);
|
||||
case POWER_SOUL_SHARDS: return 0; // TODO: fix me
|
||||
case POWER_ECLIPSE: return 0; // TODO: fix me
|
||||
case POWER_HOLY_POWER: return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -9597,7 +9639,10 @@ void CharmInfo::InitCharmCreateSpells()
|
|||
if (!spellInfo) onlyselfcast = false;
|
||||
for (uint32 i = 0; i < 3 && onlyselfcast; ++i) // nonexistent spell will not make any problems as onlyselfcast would be false -> break right away
|
||||
{
|
||||
if (spellInfo->EffectImplicitTargetA[i] != TARGET_SELF && spellInfo->EffectImplicitTargetA[i] != 0)
|
||||
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(i));
|
||||
if(!spellEffect)
|
||||
continue;
|
||||
if(spellEffect->EffectImplicitTargetA != TARGET_SELF && spellEffect->EffectImplicitTargetA != 0)
|
||||
onlyselfcast = false;
|
||||
}
|
||||
|
||||
|
|
@ -9890,6 +9935,10 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag,
|
|||
if (!triggeredByAura)
|
||||
continue;
|
||||
|
||||
SpellEffectEntry const* spellEffect = triggeredByHolder->GetSpellProto()->GetSpellEffect(SpellEffectIndex(i));
|
||||
if (!spellEffect)
|
||||
continue;
|
||||
|
||||
if (procSpell)
|
||||
{
|
||||
if (spellProcEvent)
|
||||
|
|
@ -9918,7 +9967,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag,
|
|||
continue;
|
||||
}
|
||||
|
||||
SpellAuraProcResult procResult = (*this.*AuraProcHandler[triggeredByHolder->GetSpellProto()->EffectApplyAuraName[i]])(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown);
|
||||
SpellAuraProcResult procResult = (*this.*AuraProcHandler[spellEffect->EffectApplyAuraName])(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown);
|
||||
switch (procResult)
|
||||
{
|
||||
case SPELL_AURA_PROC_CANT_TRIGGER:
|
||||
|
|
@ -10398,7 +10447,7 @@ bool Unit::hasNegativeAuraWithInterruptFlag(uint32 flag)
|
|||
{
|
||||
for (SpellAuraHolderMap::const_iterator iter = m_spellAuraHolders.begin(); iter != m_spellAuraHolders.end(); ++iter)
|
||||
{
|
||||
if (!iter->second->IsPositive() && iter->second->GetSpellProto()->AuraInterruptFlags & flag)
|
||||
if (!iter->second->IsPositive() && iter->second->GetSpellProto()->GetAuraInterruptFlags() & flag)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -479,8 +479,8 @@ enum CombatRating
|
|||
CR_HIT_TAKEN_MELEE = 11,
|
||||
CR_HIT_TAKEN_RANGED = 12,
|
||||
CR_HIT_TAKEN_SPELL = 13,
|
||||
CR_CRIT_TAKEN_MELEE = 14,
|
||||
CR_CRIT_TAKEN_RANGED = 15,
|
||||
CR_CRIT_TAKEN_MELEE = 14, // COMBAT_RATING_RESILIENCE_CRIT_TAKEN
|
||||
CR_CRIT_TAKEN_RANGED = 15, // COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN
|
||||
CR_CRIT_TAKEN_SPELL = 16,
|
||||
CR_HASTE_MELEE = 17,
|
||||
CR_HASTE_RANGED = 18,
|
||||
|
|
@ -489,10 +489,11 @@ enum CombatRating
|
|||
CR_WEAPON_SKILL_OFFHAND = 21,
|
||||
CR_WEAPON_SKILL_RANGED = 22,
|
||||
CR_EXPERTISE = 23,
|
||||
CR_ARMOR_PENETRATION = 24
|
||||
CR_ARMOR_PENETRATION = 24,
|
||||
CR_MASTERY = 25
|
||||
};
|
||||
|
||||
#define MAX_COMBAT_RATING 25
|
||||
#define MAX_COMBAT_RATING 26
|
||||
|
||||
/// internal used flags for marking special auras - for example some dummy-auras
|
||||
enum UnitAuraFlags
|
||||
|
|
@ -562,6 +563,9 @@ enum UnitFlags2
|
|||
UNIT_FLAG2_UNK9 = 0x00000200,
|
||||
UNIT_FLAG2_DISARM_RANGED = 0x00000400,
|
||||
UNIT_FLAG2_REGENERATE_POWER = 0x00000800,
|
||||
UNIT_FLAG2_WORGEN_TRANSFORM = 0x00080000, // transform to worgen
|
||||
UNIT_FLAG2_WORGEN_TRANSFORM2 = 0x00100000, // transform to worgen, but less animation?
|
||||
UNIT_FLAG2_WORGEN_TRANSFORM3 = 0x00200000 // transform to worgen, but less animation?
|
||||
};
|
||||
|
||||
/// Non Player Character flags
|
||||
|
|
|
|||
|
|
@ -360,10 +360,10 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* pVictim, SpellAuraHolder* holder, S
|
|||
|
||||
// Get EventProcFlag
|
||||
uint32 EventProcFlag;
|
||||
if (spellProcEvent && spellProcEvent->procFlags) // if exist get custom spellProcEvent->procFlags
|
||||
if (spellProcEvent && spellProcEvent->procFlags) // if exist get custom spellProcEvent->procFlags
|
||||
EventProcFlag = spellProcEvent->procFlags;
|
||||
else
|
||||
EventProcFlag = spellProto->procFlags; // else get from spell proto
|
||||
EventProcFlag = spellProto->GetProcFlags(); // else get from spell proto
|
||||
// Continue if no trigger exist
|
||||
if (!EventProcFlag)
|
||||
return false;
|
||||
|
|
@ -390,7 +390,9 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* pVictim, SpellAuraHolder* holder, S
|
|||
// Check if current equipment allows aura to proc
|
||||
if (!isVictim && GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (spellProto->EquippedItemClass == ITEM_CLASS_WEAPON)
|
||||
SpellEquippedItemsEntry const* eqItems = spellProto->GetSpellEquippedItems();
|
||||
|
||||
if(eqItems && eqItems->EquippedItemClass == ITEM_CLASS_WEAPON)
|
||||
{
|
||||
Item* item = NULL;
|
||||
if (attType == BASE_ATTACK)
|
||||
|
|
@ -400,19 +402,19 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* pVictim, SpellAuraHolder* holder, S
|
|||
else
|
||||
item = ((Player*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED);
|
||||
|
||||
if (!item || item->IsBroken() || item->GetProto()->Class != ITEM_CLASS_WEAPON || !((1 << item->GetProto()->SubClass) & spellProto->EquippedItemSubClassMask))
|
||||
if(!item || item->IsBroken() || item->GetProto()->Class != ITEM_CLASS_WEAPON || !((1<<item->GetProto()->SubClass) & eqItems->EquippedItemSubClassMask))
|
||||
return false;
|
||||
}
|
||||
else if (spellProto->EquippedItemClass == ITEM_CLASS_ARMOR)
|
||||
else if(eqItems && eqItems->EquippedItemClass == ITEM_CLASS_ARMOR)
|
||||
{
|
||||
// Check if player is wearing shield
|
||||
Item* item = ((Player*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
|
||||
if (!item || item->IsBroken() || !CanUseEquippedWeapon(OFF_ATTACK) || item->GetProto()->Class != ITEM_CLASS_ARMOR || !((1 << item->GetProto()->SubClass) & spellProto->EquippedItemSubClassMask))
|
||||
Item *item = ((Player*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
|
||||
if(!item || item->IsBroken() || !CanUseEquippedWeapon(OFF_ATTACK) || item->GetProto()->Class != ITEM_CLASS_ARMOR || !((1<<item->GetProto()->SubClass) & eqItems->EquippedItemSubClassMask))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Get chance from spell
|
||||
float chance = (float)spellProto->procChance;
|
||||
float chance = (float)spellProto->GetProcChance();
|
||||
// If in spellProcEvent exist custom chance, chance = spellProcEvent->customChance;
|
||||
if (spellProcEvent && spellProcEvent->customChance)
|
||||
chance = spellProcEvent->customChance;
|
||||
|
|
@ -443,7 +445,7 @@ SpellAuraProcResult Unit::HandleHasteAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
Unit* target = pVictim;
|
||||
int32 basepoints0 = 0;
|
||||
|
||||
switch (hasteSpell->SpellFamilyName)
|
||||
switch(hasteSpell->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_ROGUE:
|
||||
{
|
||||
|
|
@ -509,7 +511,7 @@ SpellAuraProcResult Unit::HandleSpellCritChanceAuraProc(Unit* pVictim, uint32 /*
|
|||
Unit* target = pVictim;
|
||||
int32 basepoints0 = 0;
|
||||
|
||||
switch (triggeredByAuraSpell->SpellFamilyName)
|
||||
switch(triggeredByAuraSpell->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_MAGE:
|
||||
{
|
||||
|
|
@ -562,19 +564,22 @@ SpellAuraProcResult Unit::HandleSpellCritChanceAuraProc(Unit* pVictim, uint32 /*
|
|||
|
||||
SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
|
||||
{
|
||||
SpellEntry const* dummySpell = triggeredByAura->GetSpellProto();
|
||||
SpellEntry const *dummySpell = triggeredByAura->GetSpellProto();
|
||||
SpellEffectIndex effIndex = triggeredByAura->GetEffIndex();
|
||||
SpellEffectEntry const* dummySpellEffect = dummySpell->GetSpellEffect(effIndex);
|
||||
SpellClassOptionsEntry const* dummyClassOptions = dummySpell->GetSpellClassOptions();
|
||||
SpellClassOptionsEntry const* procClassOptions = procSpell->GetSpellClassOptions();
|
||||
int32 triggerAmount = triggeredByAura->GetModifier()->m_amount;
|
||||
|
||||
Item* castItem = triggeredByAura->GetCastItemGuid() && GetTypeId() == TYPEID_PLAYER
|
||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||
|
||||
// some dummy spells have trigger spell in spell data already (from 3.0.3)
|
||||
uint32 triggered_spell_id = dummySpell->EffectApplyAuraName[effIndex] == SPELL_AURA_DUMMY ? dummySpell->EffectTriggerSpell[effIndex] : 0;
|
||||
uint32 triggered_spell_id = dummySpellEffect->EffectApplyAuraName == SPELL_AURA_DUMMY ? dummySpellEffect->EffectTriggerSpell : 0;
|
||||
Unit* target = pVictim;
|
||||
int32 basepoints[MAX_EFFECT_INDEX] = {0, 0, 0};
|
||||
|
||||
switch (dummySpell->SpellFamilyName)
|
||||
switch(dummySpell->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
|
|
@ -640,7 +645,8 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
{
|
||||
if (SpellEntry const* iterSpellProto = (*iter)->GetSpellProto())
|
||||
{
|
||||
if (iterSpellProto->SpellFamilyName == SPELLFAMILY_MAGE && (iterSpellProto->SpellFamilyFlags & UI64LIT(0x10000000)))
|
||||
SpellClassOptionsEntry const* iterClassOptions = iterSpellProto->GetSpellClassOptions();
|
||||
if(iterClassOptions && iterClassOptions->SpellFamilyName == SPELLFAMILY_MAGE && (iterClassOptions->SpellFamilyFlags & UI64LIT(0x10000000)))
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
|
|
@ -996,7 +1002,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
else if (aurHolder->GetStackAmount() + 1 == 6)
|
||||
CastSpell(this, 72523, true); // Shadowmourne Visual High
|
||||
// full stack
|
||||
else if (aurHolder->GetStackAmount() + 1 >= aurHolder->GetSpellProto()->StackAmount)
|
||||
else if (aurHolder->GetStackAmount() + 1 >= aurHolder->GetSpellProto()->GetStackAmount())
|
||||
{
|
||||
RemoveAurasDueToSpell(triggered_spell_id);
|
||||
CastSpell(this, 71904, true); // Chaos Bane
|
||||
|
|
@ -1028,9 +1034,9 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
// mana cost save
|
||||
int32 cost = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100;
|
||||
basepoints[0] = cost * triggerAmount / 100;
|
||||
if (basepoints[0] <= 0)
|
||||
int32 cost = procSpell->GetManaCost() + procSpell->GetManaCostPercentage() * GetCreateMana() / 100;
|
||||
basepoints[0] = cost * triggerAmount/100;
|
||||
if (basepoints[0] <=0)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
target = this;
|
||||
|
|
@ -1085,9 +1091,9 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
if (!procSpell)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
int32 cost = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100;
|
||||
basepoints[0] = cost * triggerAmount / 100;
|
||||
if (basepoints[0] <= 0)
|
||||
int32 cost = procSpell->GetManaCost() + procSpell->GetManaCostPercentage() * GetCreateMana() / 100;
|
||||
basepoints[0] = cost * triggerAmount/100;
|
||||
if (basepoints[0] <=0)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
triggered_spell_id = 44450;
|
||||
target = this;
|
||||
|
|
@ -1213,7 +1219,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
case SPELLFAMILY_WARLOCK:
|
||||
{
|
||||
// Seed of Corruption
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000001000000000))
|
||||
if (dummyClassOptions && dummyClassOptions->SpellFamilyFlags & UI64LIT(0x0000001000000000))
|
||||
{
|
||||
Modifier* mod = triggeredByAura->GetModifier();
|
||||
// if damage is more than need or target die from damage deal finish spell
|
||||
|
|
@ -1235,7 +1241,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
// Seed of Corruption (Mobs cast) - no die req
|
||||
if (dummySpell->SpellFamilyFlags == UI64LIT(0x0) && dummySpell->SpellIconID == 1932)
|
||||
if (dummyClassOptions && dummyClassOptions->SpellFamilyFlags == UI64LIT(0x0) && dummySpell->SpellIconID == 1932)
|
||||
{
|
||||
Modifier* mod = triggeredByAura->GetModifier();
|
||||
// if damage is more than need deal finish spell
|
||||
|
|
@ -1328,7 +1334,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
case SPELLFAMILY_PRIEST:
|
||||
{
|
||||
// Vampiric Touch
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000040000000000))
|
||||
if (dummyClassOptions && dummyClassOptions->SpellFamilyFlags & UI64LIT(0x0000040000000000))
|
||||
{
|
||||
if (!pVictim || !pVictim->isAlive())
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
|
@ -1414,10 +1420,10 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
case 40438:
|
||||
{
|
||||
// Shadow Word: Pain
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000008000))
|
||||
if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000008000))
|
||||
triggered_spell_id = 40441;
|
||||
// Renew
|
||||
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000010))
|
||||
else if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000010))
|
||||
triggered_spell_id = 40440;
|
||||
else
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
|
@ -1515,7 +1521,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
case 28719:
|
||||
{
|
||||
// mana back
|
||||
basepoints[0] = int32(procSpell->manaCost * 30 / 100);
|
||||
basepoints[0] = int32(procSpell->GetManaCost() * 30 / 100);
|
||||
target = this;
|
||||
triggered_spell_id = 28742;
|
||||
break;
|
||||
|
|
@ -1541,19 +1547,19 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
float chance;
|
||||
|
||||
// Starfire
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000004))
|
||||
if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000004))
|
||||
{
|
||||
triggered_spell_id = 40445;
|
||||
chance = 25.0f;
|
||||
}
|
||||
// Rejuvenation
|
||||
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000010))
|
||||
else if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000010))
|
||||
{
|
||||
triggered_spell_id = 40446;
|
||||
chance = 25.0f;
|
||||
}
|
||||
// Mangle (Bear) and Mangle (Cat)
|
||||
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000044000000000))
|
||||
else if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0000044000000000))
|
||||
{
|
||||
triggered_spell_id = 40452;
|
||||
chance = 40.0f;
|
||||
|
|
@ -1597,8 +1603,9 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
float radius;
|
||||
if (procSpell->EffectRadiusIndex[EFFECT_INDEX_0])
|
||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(procSpell->EffectRadiusIndex[EFFECT_INDEX_0]));
|
||||
SpellEffectEntry const* spellEffect = procSpell->GetSpellEffect(EFFECT_INDEX_0);
|
||||
if (spellEffect && spellEffect->EffectRadiusIndex)
|
||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellEffect->EffectRadiusIndex));
|
||||
else
|
||||
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(procSpell->rangeIndex));
|
||||
|
||||
|
|
@ -1649,7 +1656,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
// Wrath crit
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000001))
|
||||
if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000001))
|
||||
{
|
||||
if (HasAura(48517))
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
|
@ -1660,7 +1667,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
break;
|
||||
}
|
||||
// Starfire crit
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000004))
|
||||
if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000004))
|
||||
{
|
||||
if (HasAura(48518))
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
|
@ -1686,7 +1693,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
// Clean Escape
|
||||
case 23582:
|
||||
// triggered spell have same masks and etc with main Vanish spell
|
||||
if (!procSpell || procSpell->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_NONE)
|
||||
if (!procSpell || procSpell->GetSpellEffectIdByIndex(EFFECT_INDEX_0) == SPELL_EFFECT_NONE)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
triggered_spell_id = 23583;
|
||||
break;
|
||||
|
|
@ -1720,9 +1727,10 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
AuraList const& sd = GetAurasByType(SPELL_AURA_MOD_MELEE_HASTE);
|
||||
for (AuraList::const_iterator itr = sd.begin(); itr != sd.end(); ++itr)
|
||||
{
|
||||
SpellEntry const* spellProto = (*itr)->GetSpellProto();
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_ROGUE &&
|
||||
(spellProto->SpellFamilyFlags & UI64LIT(0x0000000000040000)))
|
||||
SpellEntry const *spellProto = (*itr)->GetSpellProto();
|
||||
SpellClassOptionsEntry const* itrClassOptions = spellProto->GetSpellClassOptions();
|
||||
if (itrClassOptions && itrClassOptions->SpellFamilyName == SPELLFAMILY_ROGUE &&
|
||||
(itrClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000040000)))
|
||||
{
|
||||
(*itr)->GetHolder()->RefreshHolder();
|
||||
return SPELL_AURA_PROC_OK;
|
||||
|
|
@ -1743,7 +1751,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
// energy cost save
|
||||
basepoints[0] = procSpell->manaCost * triggerAmount / 100;
|
||||
basepoints[0] = procSpell->GetManaCost() * triggerAmount/100;
|
||||
if (basepoints[0] <= 0)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
|
|
@ -1762,8 +1770,8 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
// mana cost save
|
||||
int32 mana = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100;
|
||||
basepoints[0] = mana * 40 / 100;
|
||||
int32 mana = procSpell->GetManaCost() + procSpell->GetManaCostPercentage() * GetCreateMana() / 100;
|
||||
basepoints[0] = mana * 40/100;
|
||||
if (basepoints[0] <= 0)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
|
|
@ -1792,7 +1800,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
if (dummySpell->SpellIconID == 3560)
|
||||
{
|
||||
// This effect only from Rapid Killing (mana regen)
|
||||
if (!(procSpell->SpellFamilyFlags & UI64LIT(0x0100000000000000)))
|
||||
if (!(procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0100000000000000)))
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
target = this;
|
||||
|
|
@ -1826,7 +1834,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
case SPELLFAMILY_PALADIN:
|
||||
{
|
||||
// Seal of Righteousness - melee proc dummy (addition ${$MWS*(0.022*$AP+0.044*$SPH)} damage)
|
||||
if ((dummySpell->SpellFamilyFlags & UI64LIT(0x000000008000000)) && effIndex == EFFECT_INDEX_0)
|
||||
if (dummyClassOptions && (dummyClassOptions->SpellFamilyFlags & UI64LIT(0x000000008000000)) && effIndex == EFFECT_INDEX_0)
|
||||
{
|
||||
triggered_spell_id = 25742;
|
||||
float ap = GetTotalAttackPowerValue(BASE_ATTACK);
|
||||
|
|
@ -1982,7 +1990,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
case 31877:
|
||||
case 31878:
|
||||
// triggered only at casted Judgement spells, not at additional Judgement effects
|
||||
if (!procSpell || procSpell->Category != 1210)
|
||||
if(!procSpell || procSpell->GetCategory() != 1210)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
target = this;
|
||||
|
|
@ -2000,7 +2008,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
float chance;
|
||||
|
||||
// Flash of light/Holy light
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x00000000C0000000))
|
||||
if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x00000000C0000000))
|
||||
{
|
||||
triggered_spell_id = 40471;
|
||||
chance = 15.0f;
|
||||
|
|
@ -2090,7 +2098,15 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
case 58597:
|
||||
{
|
||||
triggered_spell_id = 66922;
|
||||
basepoints[0] = int32(damage / GetSpellAuraMaxTicks(triggered_spell_id));
|
||||
SpellEntry const* triggeredEntry = sSpellStore.LookupEntry(triggered_spell_id);
|
||||
if (!triggeredEntry)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
SpellEffectEntry const* spellEffect = triggeredEntry->GetSpellEffect(EFFECT_INDEX_0);
|
||||
if(!spellEffect)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
basepoints[0] = int32(damage / (GetSpellDuration(triggeredEntry) / spellEffect->EffectAmplitude));
|
||||
target = this;
|
||||
break;
|
||||
}
|
||||
|
|
@ -2118,7 +2134,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
SpellEntry const* mote = sSpellStore.LookupEntry(71432);
|
||||
if (!mote)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
uint32 maxStack = mote->StackAmount - (dummySpell->Id == 71545 ? 1 : 0);
|
||||
uint32 maxStack = mote->GetStackAmount() - (dummySpell->Id == 71545 ? 1 : 0);
|
||||
|
||||
SpellAuraHolder* aurHolder = GetSpellAuraHolder(71432);
|
||||
if (aurHolder && uint32(aurHolder->GetStackAmount() + 1) >= maxStack)
|
||||
|
|
@ -2289,18 +2305,18 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
if (!procSpell)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
float chance;
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000001))
|
||||
float chance;
|
||||
if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000001))
|
||||
{
|
||||
triggered_spell_id = 40465; // Lightning Bolt
|
||||
chance = 15.0f;
|
||||
}
|
||||
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000080))
|
||||
else if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000080))
|
||||
{
|
||||
triggered_spell_id = 40465; // Lesser Healing Wave
|
||||
chance = 10.0f;
|
||||
}
|
||||
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000001000000000))
|
||||
else if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0000001000000000))
|
||||
{
|
||||
triggered_spell_id = 40466; // Stormstrike
|
||||
chance = 50.0f;
|
||||
|
|
@ -2348,8 +2364,10 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
for (AuraList::const_iterator i = spellPower.begin(); i != spellPower.end(); ++i)
|
||||
{
|
||||
// select proper aura for format aura type in spell proto
|
||||
if ((*i)->GetTarget() == totem && (*i)->GetSpellProto()->EffectApplyAuraName[(*i)->GetEffIndex()] == SPELL_AURA_MOD_HEALING_DONE &&
|
||||
(*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN && (*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000004000000))
|
||||
SpellEffectEntry const* itrSpellEffect = (*i)->GetSpellProto()->GetSpellEffect((*i)->GetEffIndex());
|
||||
SpellClassOptionsEntry const* itrClassOptions = (*i)->GetSpellProto()->GetSpellClassOptions();
|
||||
if ((*i)->GetTarget()==totem && itrSpellEffect && itrSpellEffect->EffectApplyAuraName == SPELL_AURA_MOD_HEALING_DONE &&
|
||||
itrClassOptions && itrClassOptions->SpellFamilyName == SPELLFAMILY_SHAMAN && itrClassOptions->SpellFamilyFlags & UI64LIT(0x0000000004000000))
|
||||
{
|
||||
basepoints[0] = triggerAmount * (*i)->GetModifier()->m_amount / 100;
|
||||
break;
|
||||
|
|
@ -2408,7 +2426,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
break;
|
||||
}
|
||||
// Flametongue Weapon (Passive), Ranks
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000000000200000))
|
||||
if (dummyClassOptions && dummyClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000200000))
|
||||
{
|
||||
if (GetTypeId() != TYPEID_PLAYER || !castItem)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
|
@ -2436,7 +2454,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
break;
|
||||
}
|
||||
// Earth Shield
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000040000000000))
|
||||
if (dummyClassOptions && dummyClassOptions->SpellFamilyFlags & UI64LIT(0x0000040000000000))
|
||||
{
|
||||
target = this;
|
||||
basepoints[0] = triggerAmount;
|
||||
|
|
@ -2461,19 +2479,21 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
// Lesser Healing Wave need aditional 60% roll
|
||||
if ((procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000080)) && !roll_chance_i(60))
|
||||
if (procClassOptions && (procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000080)) && !roll_chance_i(60))
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
// Chain Heal needs additional 30% roll
|
||||
if ((procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000100)) && !roll_chance_i(30))
|
||||
if (procClassOptions && (procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000100)) && !roll_chance_i(30))
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
// lookup water shield
|
||||
AuraList const& vs = GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
for (AuraList::const_iterator itr = vs.begin(); itr != vs.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN &&
|
||||
((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000002000000000)))
|
||||
SpellClassOptionsEntry const* itrClassOptions = (*itr)->GetSpellProto()->GetSpellClassOptions();
|
||||
if (itrClassOptions && itrClassOptions->SpellFamilyName == SPELLFAMILY_SHAMAN &&
|
||||
(itrClassOptions->SpellFamilyFlags & UI64LIT(0x0000002000000000)))
|
||||
{
|
||||
uint32 spell = (*itr)->GetSpellProto()->EffectTriggerSpell[(*itr)->GetEffIndex()];
|
||||
SpellEffectEntry const* itrSpellEffect = (*itr)->GetSpellProto()->GetSpellEffect((*itr)->GetEffIndex());
|
||||
uint32 spell = itrSpellEffect ? itrSpellEffect->EffectTriggerSpell : 0;
|
||||
CastSpell(this, spell, true, castItem, triggeredByAura);
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
|
|
@ -2524,7 +2544,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
}
|
||||
|
||||
// Remove cooldown (Chain Lightning - have Category Recovery time)
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000002))
|
||||
if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000002))
|
||||
((Player*)this)->RemoveSpellCooldown(spellId);
|
||||
|
||||
CastSpell(pVictim, spellId, true, castItem, triggeredByAura);
|
||||
|
|
@ -2541,8 +2561,9 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
AuraList const& vs = GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
for (AuraList::const_iterator itr = vs.begin(); itr != vs.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN &&
|
||||
((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000400)))
|
||||
SpellClassOptionsEntry const* itrClassOptions = (*itr)->GetSpellProto()->GetSpellClassOptions();
|
||||
if (itrClassOptions && itrClassOptions->SpellFamilyName == SPELLFAMILY_SHAMAN &&
|
||||
(itrClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000400)))
|
||||
{
|
||||
uint32 spell = 0;
|
||||
switch ((*itr)->GetId())
|
||||
|
|
@ -2618,7 +2639,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
break;
|
||||
}
|
||||
// Vendetta
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000000000010000))
|
||||
if (dummyClassOptions && dummyClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000010000))
|
||||
{
|
||||
basepoints[0] = triggerAmount * GetMaxHealth() / 100;
|
||||
triggered_spell_id = 50181;
|
||||
|
|
@ -2791,12 +2812,15 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
{
|
||||
// Get triggered aura spell info
|
||||
SpellEntry const* auraSpellInfo = triggeredByAura->GetSpellProto();
|
||||
SpellClassOptionsEntry const* auraClassOptions = auraSpellInfo->GetSpellClassOptions();
|
||||
SpellClassOptionsEntry const* procClassOptions = procSpell->GetSpellClassOptions();
|
||||
|
||||
// Basepoints of trigger aura
|
||||
int32 triggerAmount = triggeredByAura->GetModifier()->m_amount;
|
||||
|
||||
// Set trigger spell id, target, custom basepoints
|
||||
uint32 trigger_spell_id = auraSpellInfo->EffectTriggerSpell[triggeredByAura->GetEffIndex()];
|
||||
SpellEffectEntry const* spellEffect = auraSpellInfo->GetSpellEffect(triggeredByAura->GetEffIndex());
|
||||
uint32 trigger_spell_id = spellEffect ? spellEffect->EffectTriggerSpell : 0;
|
||||
Unit* target = NULL;
|
||||
int32 basepoints[MAX_EFFECT_INDEX] = {0, 0, 0};
|
||||
|
||||
|
|
@ -2809,7 +2833,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
// Try handle unknown trigger spells
|
||||
// Custom requirements (not listed in procEx) Warning! damage dealing after this
|
||||
// Custom triggered spells
|
||||
switch (auraSpellInfo->SpellFamilyName)
|
||||
switch (auraSpellInfo->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
switch (auraSpellInfo->Id)
|
||||
|
|
@ -3027,7 +3051,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
break;
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
// Deep Wounds (replace triggered spells to directly apply DoT), dot spell have familyflags
|
||||
if (auraSpellInfo->SpellFamilyFlags == UI64LIT(0x0) && auraSpellInfo->SpellIconID == 243)
|
||||
if (auraClassOptions && auraClassOptions->SpellFamilyFlags == UI64LIT(0x0) && auraSpellInfo->SpellIconID == 243)
|
||||
{
|
||||
float weaponDamage;
|
||||
// DW should benefit of attack power, damage percent mods etc.
|
||||
|
|
@ -3072,7 +3096,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
Unit::AuraList const& mDummyAura = GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for (Unit::AuraList::const_iterator i = mDummyAura.begin(); i != mDummyAura.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (*i)->GetSpellProto()->SpellIconID == 113)
|
||||
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_WARLOCK && (*i)->GetSpellProto()->SpellIconID == 113)
|
||||
{
|
||||
// basepoints of trigger spell stored in dummyeffect of spellProto
|
||||
int32 basepoints = GetMaxPower(POWER_MANA) * (*i)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2) / 100;
|
||||
|
|
@ -3219,7 +3243,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
else if (auraSpellInfo->Id == 53228 || auraSpellInfo->Id == 53232)
|
||||
{
|
||||
// This effect only from Rapid Fire (ability cast)
|
||||
if (!(procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000020)))
|
||||
if (!(procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000020)))
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
}
|
||||
// Lock and Load
|
||||
|
|
@ -3275,7 +3299,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
// procspell is triggered spell but we need mana cost of original casted spell
|
||||
uint32 originalSpellId = procSpell->Id;
|
||||
// Holy Shock heal
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0001000000000000))
|
||||
if (procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0001000000000000))
|
||||
{
|
||||
switch (procSpell->Id)
|
||||
{
|
||||
|
|
@ -3298,8 +3322,8 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
return SPELL_AURA_PROC_FAILED;
|
||||
}
|
||||
// percent stored in effect 1 (class scripts) base points
|
||||
int32 cost = originalSpell->manaCost + originalSpell->ManaCostPercentage * GetCreateMana() / 100;
|
||||
basepoints[0] = cost * auraSpellInfo->CalculateSimpleValue(EFFECT_INDEX_1) / 100;
|
||||
int32 cost = originalSpell->GetManaCost() + originalSpell->GetManaCostPercentage() * GetCreateMana() / 100;
|
||||
basepoints[0] = cost*auraSpellInfo->CalculateSimpleValue(EFFECT_INDEX_1)/100;
|
||||
trigger_spell_id = 20272;
|
||||
target = this;
|
||||
}
|
||||
|
|
@ -3350,7 +3374,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
case SPELLFAMILY_SHAMAN:
|
||||
{
|
||||
// Lightning Shield (overwrite non existing triggered spell call in spell.dbc
|
||||
if (auraSpellInfo->SpellFamilyFlags & UI64LIT(0x0000000000000400))
|
||||
if (auraClassOptions && auraClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000400))
|
||||
{
|
||||
switch (auraSpellInfo->Id)
|
||||
{
|
||||
|
|
@ -3395,7 +3419,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
{
|
||||
if (!procSpell)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
basepoints[0] = procSpell->manaCost * 35 / 100;
|
||||
basepoints[0] = procSpell->GetManaCost() * 35 / 100;
|
||||
trigger_spell_id = 23571;
|
||||
target = this;
|
||||
}
|
||||
|
|
@ -3519,7 +3543,8 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
// Enlightenment (trigger only from mana cost spells)
|
||||
case 35095:
|
||||
{
|
||||
if (!procSpell || procSpell->powerType != POWER_MANA || (procSpell->manaCost == 0 && procSpell->ManaCostPercentage == 0 && procSpell->manaCostPerlevel == 0))
|
||||
SpellPowerEntry const* spellPower = procSpell->GetSpellPower();
|
||||
if(!spellPower || !procSpell || procSpell->powerType!=POWER_MANA || spellPower->manaCost==0 && spellPower->ManaCostPercentage==0 && spellPower->manaCostPerlevel==0)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
break;
|
||||
}
|
||||
|
|
@ -3576,7 +3601,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
if (!procSpell)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
// For trigger from Blizzard need exist Improved Blizzard
|
||||
if (procSpell->SpellFamilyName == SPELLFAMILY_MAGE && (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000080)))
|
||||
if (procClassOptions && procClassOptions->SpellFamilyName==SPELLFAMILY_MAGE && (procClassOptions->SpellFamilyFlags & UI64LIT(0x0000000000000080)))
|
||||
{
|
||||
bool found = false;
|
||||
AuraList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
|
|
@ -3808,9 +3833,10 @@ SpellAuraProcResult Unit::HandleMendingAuraProc(Unit* /*pVictim*/, uint32 /*dama
|
|||
// next target selection
|
||||
if (jumps > 0 && GetTypeId() == TYPEID_PLAYER && caster_guid.IsPlayer())
|
||||
{
|
||||
SpellEffectEntry const* spellEffect = spellProto->GetSpellEffect(effIdx);
|
||||
float radius;
|
||||
if (spellProto->EffectRadiusIndex[effIdx])
|
||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellProto->EffectRadiusIndex[effIdx]));
|
||||
if (spellEffect && spellEffect->EffectRadiusIndex)
|
||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellEffect->EffectRadiusIndex));
|
||||
else
|
||||
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(spellProto->rangeIndex));
|
||||
|
||||
|
|
@ -3865,15 +3891,15 @@ SpellAuraProcResult Unit::HandleModPowerCostSchoolAuraProc(Unit* /*pVictim*/, ui
|
|||
{
|
||||
// Skip melee hits and spells ws wrong school or zero cost
|
||||
return !(procSpell == NULL ||
|
||||
(procSpell->manaCost == 0 && procSpell->ManaCostPercentage == 0) || // Cost check
|
||||
(triggeredByAura->GetModifier()->m_miscvalue & procSpell->SchoolMask) == 0) ? SPELL_AURA_PROC_OK : SPELL_AURA_PROC_FAILED; // School check
|
||||
(procSpell->GetManaCost() == 0 && procSpell->GetManaCostPercentage() == 0) || // Cost check
|
||||
(triggeredByAura->GetModifier()->m_miscvalue & procSpell->SchoolMask) == 0) ? SPELL_AURA_PROC_OK : SPELL_AURA_PROC_FAILED; // School check
|
||||
}
|
||||
|
||||
SpellAuraProcResult Unit::HandleMechanicImmuneResistanceAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
|
||||
{
|
||||
// Compare mechanic
|
||||
return !(procSpell == NULL || int32(procSpell->Mechanic) != triggeredByAura->GetModifier()->m_miscvalue)
|
||||
? SPELL_AURA_PROC_OK : SPELL_AURA_PROC_FAILED;
|
||||
return !(procSpell==NULL || int32(procSpell->GetMechanic()) != triggeredByAura->GetModifier()->m_miscvalue)
|
||||
? SPELL_AURA_PROC_OK : SPELL_AURA_PROC_FAILED;
|
||||
}
|
||||
|
||||
SpellAuraProcResult Unit::HandleModDamageFromCasterAuraProc(Unit* pVictim, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
|
||||
|
|
@ -3913,7 +3939,7 @@ SpellAuraProcResult Unit::HandleAddPctModifierAuraProc(Unit* /*pVictim*/, uint32
|
|||
Item* castItem = triggeredByAura->GetCastItemGuid() && GetTypeId() == TYPEID_PLAYER
|
||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||
|
||||
switch (spellInfo->SpellFamilyName)
|
||||
switch(spellInfo->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_MAGE:
|
||||
{
|
||||
|
|
@ -3937,7 +3963,10 @@ SpellAuraProcResult Unit::HandleAddPctModifierAuraProc(Unit* /*pVictim*/, uint32
|
|||
// Lookup base amount mana restore
|
||||
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
if (procSpell->Effect[i] == SPELL_EFFECT_ENERGIZE)
|
||||
SpellEffectEntry const* spellEffect = procSpell->GetSpellEffect(SpellEffectIndex(i));
|
||||
if(!spellEffect)
|
||||
continue;
|
||||
if (spellEffect->Effect == SPELL_EFFECT_ENERGIZE)
|
||||
{
|
||||
int32 mana = procSpell->CalculateSimpleValue(SpellEffectIndex(i));
|
||||
CastCustomSpell(this, 54986, NULL, &mana, NULL, true, castItem, triggeredByAura);
|
||||
|
|
@ -3959,7 +3988,8 @@ SpellAuraProcResult Unit::HandleModDamagePercentDoneAuraProc(Unit* /*pVictim*/,
|
|||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||
|
||||
// Aspect of the Viper
|
||||
if (spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && spellInfo->SpellFamilyFlags & UI64LIT(0x4000000000000))
|
||||
SpellClassOptionsEntry const* classOptions = spellInfo->GetSpellClassOptions();
|
||||
if (classOptions && classOptions->SpellFamilyName == SPELLFAMILY_HUNTER && classOptions->SpellFamilyFlags & UI64LIT(0x4000000000000))
|
||||
{
|
||||
uint32 maxmana = GetMaxPower(POWER_MANA);
|
||||
int32 bp = int32(maxmana * GetAttackTime(RANGED_ATTACK) / 1000.0f / 100.0f);
|
||||
|
|
@ -3970,7 +4000,7 @@ SpellAuraProcResult Unit::HandleModDamagePercentDoneAuraProc(Unit* /*pVictim*/,
|
|||
CastCustomSpell(this, 34075, &bp, NULL, NULL, true, castItem, triggeredByAura);
|
||||
}
|
||||
// Arcane Blast
|
||||
else if (spellInfo->Id == 36032 && procSpell->SpellFamilyName == SPELLFAMILY_MAGE && procSpell->SpellIconID == 2294)
|
||||
else if (spellInfo->Id == 36032 && procSpell->GetSpellFamilyName() == SPELLFAMILY_MAGE && procSpell->SpellIconID == 2294)
|
||||
// prevent proc from self(spell that triggered this aura)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
|
|
@ -4007,7 +4037,8 @@ SpellAuraProcResult Unit::HandleSpellMagnetAuraProc(Unit* /*pVictim*/, uint32 da
|
|||
|
||||
SpellAuraProcResult Unit::HandleManaShieldAuraProc(Unit* pVictim, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
|
||||
{
|
||||
SpellEntry const* dummySpell = triggeredByAura->GetSpellProto();
|
||||
SpellEntry const *dummySpell = triggeredByAura->GetSpellProto ();
|
||||
SpellClassOptionsEntry const* dummyClassOptions = dummySpell->GetSpellClassOptions();
|
||||
|
||||
Item* castItem = triggeredByAura->GetCastItemGuid() && GetTypeId() == TYPEID_PLAYER
|
||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||
|
|
@ -4015,12 +4046,12 @@ SpellAuraProcResult Unit::HandleManaShieldAuraProc(Unit* pVictim, uint32 /*damag
|
|||
uint32 triggered_spell_id = 0;
|
||||
Unit* target = pVictim;
|
||||
|
||||
switch (dummySpell->SpellFamilyName)
|
||||
switch(dummyClassOptions->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_MAGE:
|
||||
{
|
||||
// Incanter's Regalia set (add trigger chance to Mana Shield)
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000000000008000))
|
||||
if (dummyClassOptions->IsFitToFamilyMask(UI64LIT(0x0000000000008000)))
|
||||
{
|
||||
if (GetTypeId() != TYPEID_PLAYER)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
|
|
|||
|
|
@ -19,16 +19,17 @@
|
|||
#ifndef _UPDATEFIELDS_AUTO_H
|
||||
#define _UPDATEFIELDS_AUTO_H
|
||||
|
||||
// Auto generated for version 3, 3, 5, 12340
|
||||
// Auto generated for version 4, 0, 3, 13287
|
||||
|
||||
enum EObjectFields
|
||||
{
|
||||
OBJECT_FIELD_GUID = 0x0000, // Size: 2, Type: LONG, Flags: PUBLIC
|
||||
OBJECT_FIELD_TYPE = 0x0002, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
OBJECT_FIELD_TYPE = 0x0002, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
OBJECT_FIELD_ENTRY = 0x0003, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
OBJECT_FIELD_SCALE_X = 0x0004, // Size: 1, Type: FLOAT, Flags: PUBLIC
|
||||
OBJECT_FIELD_PADDING = 0x0005, // Size: 1, Type: INT, Flags: NONE
|
||||
OBJECT_END = 0x0006,
|
||||
OBJECT_FIELD_DATA = 0x0005, // Size: 2, Type: LONG, Flags: PUBLIC
|
||||
OBJECT_FIELD_PADDING = 0x0007, // Size: 1, Type: INT, Flags: NONE
|
||||
OBJECT_END = 0x0008,
|
||||
};
|
||||
|
||||
enum EItemFields
|
||||
|
|
@ -65,13 +66,17 @@ enum EItemFields
|
|||
ITEM_FIELD_ENCHANTMENT_11_3 = OBJECT_END + 0x0030, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
ITEM_FIELD_ENCHANTMENT_12_1 = OBJECT_END + 0x0031, // Size: 2, Type: INT, Flags: PUBLIC
|
||||
ITEM_FIELD_ENCHANTMENT_12_3 = OBJECT_END + 0x0033, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
ITEM_FIELD_PROPERTY_SEED = OBJECT_END + 0x0034, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
ITEM_FIELD_RANDOM_PROPERTIES_ID = OBJECT_END + 0x0035, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
ITEM_FIELD_DURABILITY = OBJECT_END + 0x0036, // Size: 1, Type: INT, Flags: OWNER, ITEM_OWNER
|
||||
ITEM_FIELD_MAXDURABILITY = OBJECT_END + 0x0037, // Size: 1, Type: INT, Flags: OWNER, ITEM_OWNER
|
||||
ITEM_FIELD_CREATE_PLAYED_TIME = OBJECT_END + 0x0038, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
ITEM_FIELD_PAD = OBJECT_END + 0x0039, // Size: 1, Type: INT, Flags: NONE
|
||||
ITEM_END = OBJECT_END + 0x003A,
|
||||
ITEM_FIELD_ENCHANTMENT_13_1 = OBJECT_END + 0x0034, // Size: 2, Type: INT, Flags: PUBLIC
|
||||
ITEM_FIELD_ENCHANTMENT_13_3 = OBJECT_END + 0x0036, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
ITEM_FIELD_ENCHANTMENT_14_1 = OBJECT_END + 0x0037, // Size: 2, Type: INT, Flags: PUBLIC
|
||||
ITEM_FIELD_ENCHANTMENT_14_3 = OBJECT_END + 0x0039, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
ITEM_FIELD_PROPERTY_SEED = OBJECT_END + 0x003A, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
ITEM_FIELD_RANDOM_PROPERTIES_ID = OBJECT_END + 0x003B, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
ITEM_FIELD_DURABILITY = OBJECT_END + 0x003C, // Size: 1, Type: INT, Flags: OWNER, ITEM_OWNER
|
||||
ITEM_FIELD_MAXDURABILITY = OBJECT_END + 0x003D, // Size: 1, Type: INT, Flags: OWNER, ITEM_OWNER
|
||||
ITEM_FIELD_CREATE_PLAYED_TIME = OBJECT_END + 0x003E, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
ITEM_FIELD_PAD = OBJECT_END + 0x003F, // Size: 1, Type: INT, Flags: NONE
|
||||
ITEM_END = OBJECT_END + 0x0040,
|
||||
};
|
||||
|
||||
enum EContainerFields
|
||||
|
|
@ -102,295 +107,407 @@ enum EUnitFields
|
|||
UNIT_FIELD_POWER5 = OBJECT_END + 0x0017, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_POWER6 = OBJECT_END + 0x0018, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_POWER7 = OBJECT_END + 0x0019, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXHEALTH = OBJECT_END + 0x001A, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER1 = OBJECT_END + 0x001B, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER2 = OBJECT_END + 0x001C, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER3 = OBJECT_END + 0x001D, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER4 = OBJECT_END + 0x001E, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER5 = OBJECT_END + 0x001F, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER6 = OBJECT_END + 0x0020, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER7 = OBJECT_END + 0x0021, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER = OBJECT_END + 0x0022, // Size: 7, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER = OBJECT_END + 0x0029, // Size: 7, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_LEVEL = OBJECT_END + 0x0030, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_FACTIONTEMPLATE = OBJECT_END + 0x0031, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_VIRTUAL_ITEM_SLOT_ID = OBJECT_END + 0x0032, // Size: 3, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_FLAGS = OBJECT_END + 0x0035, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_FLAGS_2 = OBJECT_END + 0x0036, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_AURASTATE = OBJECT_END + 0x0037, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_BASEATTACKTIME = OBJECT_END + 0x0038, // Size: 2, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_RANGEDATTACKTIME = OBJECT_END + 0x003A, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
UNIT_FIELD_BOUNDINGRADIUS = OBJECT_END + 0x003B, // Size: 1, Type: FLOAT, Flags: PUBLIC
|
||||
UNIT_FIELD_COMBATREACH = OBJECT_END + 0x003C, // Size: 1, Type: FLOAT, Flags: PUBLIC
|
||||
UNIT_FIELD_DISPLAYID = OBJECT_END + 0x003D, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_NATIVEDISPLAYID = OBJECT_END + 0x003E, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MOUNTDISPLAYID = OBJECT_END + 0x003F, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MINDAMAGE = OBJECT_END + 0x0040, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER, PARTY_LEADER
|
||||
UNIT_FIELD_MAXDAMAGE = OBJECT_END + 0x0041, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER, PARTY_LEADER
|
||||
UNIT_FIELD_MINOFFHANDDAMAGE = OBJECT_END + 0x0042, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER, PARTY_LEADER
|
||||
UNIT_FIELD_MAXOFFHANDDAMAGE = OBJECT_END + 0x0043, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER, PARTY_LEADER
|
||||
UNIT_FIELD_BYTES_1 = OBJECT_END + 0x0044, // Size: 1, Type: BYTES, Flags: PUBLIC
|
||||
UNIT_FIELD_PETNUMBER = OBJECT_END + 0x0045, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_PET_NAME_TIMESTAMP = OBJECT_END + 0x0046, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_PETEXPERIENCE = OBJECT_END + 0x0047, // Size: 1, Type: INT, Flags: OWNER
|
||||
UNIT_FIELD_PETNEXTLEVELEXP = OBJECT_END + 0x0048, // Size: 1, Type: INT, Flags: OWNER
|
||||
UNIT_DYNAMIC_FLAGS = OBJECT_END + 0x0049, // Size: 1, Type: INT, Flags: DYNAMIC
|
||||
UNIT_MOD_CAST_SPEED = OBJECT_END + 0x004A, // Size: 1, Type: FLOAT, Flags: PUBLIC
|
||||
UNIT_CREATED_BY_SPELL = OBJECT_END + 0x004B, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_NPC_FLAGS = OBJECT_END + 0x004C, // Size: 1, Type: INT, Flags: DYNAMIC
|
||||
UNIT_NPC_EMOTESTATE = OBJECT_END + 0x004D, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_STAT0 = OBJECT_END + 0x004E, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_STAT1 = OBJECT_END + 0x004F, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_STAT2 = OBJECT_END + 0x0050, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_STAT3 = OBJECT_END + 0x0051, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_STAT4 = OBJECT_END + 0x0052, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POSSTAT0 = OBJECT_END + 0x0053, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POSSTAT1 = OBJECT_END + 0x0054, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POSSTAT2 = OBJECT_END + 0x0055, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POSSTAT3 = OBJECT_END + 0x0056, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POSSTAT4 = OBJECT_END + 0x0057, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_NEGSTAT0 = OBJECT_END + 0x0058, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_NEGSTAT1 = OBJECT_END + 0x0059, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_NEGSTAT2 = OBJECT_END + 0x005A, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_NEGSTAT3 = OBJECT_END + 0x005B, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_NEGSTAT4 = OBJECT_END + 0x005C, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_RESISTANCES = OBJECT_END + 0x005D, // Size: 7, Type: INT, Flags: PRIVATE, OWNER, PARTY_LEADER
|
||||
UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE = OBJECT_END + 0x0064, // Size: 7, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE = OBJECT_END + 0x006B, // Size: 7, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_BASE_MANA = OBJECT_END + 0x0072, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_BASE_HEALTH = OBJECT_END + 0x0073, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_BYTES_2 = OBJECT_END + 0x0074, // Size: 1, Type: BYTES, Flags: PUBLIC
|
||||
UNIT_FIELD_ATTACK_POWER = OBJECT_END + 0x0075, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_ATTACK_POWER_MODS = OBJECT_END + 0x0076, // Size: 1, Type: TWO_SHORT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_ATTACK_POWER_MULTIPLIER = OBJECT_END + 0x0077, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_RANGED_ATTACK_POWER = OBJECT_END + 0x0078, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_RANGED_ATTACK_POWER_MODS = OBJECT_END + 0x0079, // Size: 1, Type: TWO_SHORT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER = OBJECT_END + 0x007A, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_MINRANGEDDAMAGE = OBJECT_END + 0x007B, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_MAXRANGEDDAMAGE = OBJECT_END + 0x007C, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POWER_COST_MODIFIER = OBJECT_END + 0x007D, // Size: 7, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POWER_COST_MULTIPLIER = OBJECT_END + 0x0084, // Size: 7, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_MAXHEALTHMODIFIER = OBJECT_END + 0x008B, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_HOVERHEIGHT = OBJECT_END + 0x008C, // Size: 1, Type: FLOAT, Flags: PUBLIC
|
||||
UNIT_FIELD_PADDING = OBJECT_END + 0x008D, // Size: 1, Type: INT, Flags: NONE
|
||||
UNIT_END = OBJECT_END + 0x008E,
|
||||
UNIT_FIELD_POWER8 = OBJECT_END + 0x001A, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_POWER9 = OBJECT_END + 0x001B, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_POWER10 = OBJECT_END + 0x001C, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_POWER11 = OBJECT_END + 0x001D, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXHEALTH = OBJECT_END + 0x001E, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER1 = OBJECT_END + 0x001F, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER2 = OBJECT_END + 0x0020, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER3 = OBJECT_END + 0x0021, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER4 = OBJECT_END + 0x0022, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER5 = OBJECT_END + 0x0023, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER6 = OBJECT_END + 0x0024, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER7 = OBJECT_END + 0x0025, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER8 = OBJECT_END + 0x0026, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER9 = OBJECT_END + 0x0027, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER10 = OBJECT_END + 0x0028, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXPOWER11 = OBJECT_END + 0x0029, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER = OBJECT_END + 0x002A, // Size: 11, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER = OBJECT_END + 0x0035, // Size: 11, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_LEVEL = OBJECT_END + 0x0040, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_FACTIONTEMPLATE = OBJECT_END + 0x0041, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_VIRTUAL_ITEM_SLOT_ID = OBJECT_END + 0x0042, // Size: 3, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_FLAGS = OBJECT_END + 0x0045, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_FLAGS_2 = OBJECT_END + 0x0046, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_AURASTATE = OBJECT_END + 0x0047, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_BASEATTACKTIME = OBJECT_END + 0x0048, // Size: 2, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_RANGEDATTACKTIME = OBJECT_END + 0x004A, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
UNIT_FIELD_BOUNDINGRADIUS = OBJECT_END + 0x004B, // Size: 1, Type: FLOAT, Flags: PUBLIC
|
||||
UNIT_FIELD_COMBATREACH = OBJECT_END + 0x004C, // Size: 1, Type: FLOAT, Flags: PUBLIC
|
||||
UNIT_FIELD_DISPLAYID = OBJECT_END + 0x004D, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_NATIVEDISPLAYID = OBJECT_END + 0x004E, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MOUNTDISPLAYID = OBJECT_END + 0x004F, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_MINDAMAGE = OBJECT_END + 0x0050, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER, PARTY_LEADER
|
||||
UNIT_FIELD_MAXDAMAGE = OBJECT_END + 0x0051, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER, PARTY_LEADER
|
||||
UNIT_FIELD_MINOFFHANDDAMAGE = OBJECT_END + 0x0052, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER, PARTY_LEADER
|
||||
UNIT_FIELD_MAXOFFHANDDAMAGE = OBJECT_END + 0x0053, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER, PARTY_LEADER
|
||||
UNIT_FIELD_BYTES_1 = OBJECT_END + 0x0054, // Size: 1, Type: BYTES, Flags: PUBLIC
|
||||
UNIT_FIELD_PETNUMBER = OBJECT_END + 0x0055, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_PET_NAME_TIMESTAMP = OBJECT_END + 0x0056, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_PETEXPERIENCE = OBJECT_END + 0x0057, // Size: 1, Type: INT, Flags: OWNER
|
||||
UNIT_FIELD_PETNEXTLEVELEXP = OBJECT_END + 0x0058, // Size: 1, Type: INT, Flags: OWNER
|
||||
UNIT_DYNAMIC_FLAGS = OBJECT_END + 0x0059, // Size: 1, Type: INT, Flags: DYNAMIC
|
||||
UNIT_MOD_CAST_SPEED = OBJECT_END + 0x005A, // Size: 1, Type: FLOAT, Flags: PUBLIC
|
||||
UNIT_CREATED_BY_SPELL = OBJECT_END + 0x005B, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_NPC_FLAGS = OBJECT_END + 0x005C, // Size: 1, Type: INT, Flags: DYNAMIC
|
||||
UNIT_NPC_EMOTESTATE = OBJECT_END + 0x005D, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_STAT0 = OBJECT_END + 0x005E, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_STAT1 = OBJECT_END + 0x005F, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_STAT2 = OBJECT_END + 0x0060, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_STAT3 = OBJECT_END + 0x0061, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_STAT4 = OBJECT_END + 0x0062, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POSSTAT0 = OBJECT_END + 0x0063, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POSSTAT1 = OBJECT_END + 0x0064, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POSSTAT2 = OBJECT_END + 0x0065, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POSSTAT3 = OBJECT_END + 0x0066, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POSSTAT4 = OBJECT_END + 0x0067, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_NEGSTAT0 = OBJECT_END + 0x0068, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_NEGSTAT1 = OBJECT_END + 0x0069, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_NEGSTAT2 = OBJECT_END + 0x006A, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_NEGSTAT3 = OBJECT_END + 0x006B, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_NEGSTAT4 = OBJECT_END + 0x006C, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_RESISTANCES = OBJECT_END + 0x006D, // Size: 7, Type: INT, Flags: PRIVATE, OWNER, PARTY_LEADER
|
||||
UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE = OBJECT_END + 0x0074, // Size: 7, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE = OBJECT_END + 0x007B, // Size: 7, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_BASE_MANA = OBJECT_END + 0x0082, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_FIELD_BASE_HEALTH = OBJECT_END + 0x0083, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_BYTES_2 = OBJECT_END + 0x0084, // Size: 1, Type: BYTES, Flags: PUBLIC
|
||||
UNIT_FIELD_ATTACK_POWER = OBJECT_END + 0x0085, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_ATTACK_POWER_MOD_POS = OBJECT_END + 0x0086, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_ATTACK_POWER_MOD_NEG = OBJECT_END + 0x0087, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_ATTACK_POWER_MULTIPLIER = OBJECT_END + 0x0088, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_RANGED_ATTACK_POWER = OBJECT_END + 0x0089, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_RANGED_ATTACK_POWER_MOD_POS = OBJECT_END + 0x008A, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_RANGED_ATTACK_POWER_MOD_NEG = OBJECT_END + 0x008B, // Size: 1, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER = OBJECT_END + 0x008C, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_MINRANGEDDAMAGE = OBJECT_END + 0x008D, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_MAXRANGEDDAMAGE = OBJECT_END + 0x008E, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POWER_COST_MODIFIER = OBJECT_END + 0x008F, // Size: 7, Type: INT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_POWER_COST_MULTIPLIER = OBJECT_END + 0x0096, // Size: 7, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_MAXHEALTHMODIFIER = OBJECT_END + 0x009D, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER
|
||||
UNIT_FIELD_HOVERHEIGHT = OBJECT_END + 0x009E, // Size: 1, Type: FLOAT, Flags: PUBLIC
|
||||
UNIT_FIELD_MAXITEMLEVEL = OBJECT_END + 0x009F, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
UNIT_END = OBJECT_END + 0x00A0,
|
||||
|
||||
PLAYER_DUEL_ARBITER = UNIT_END + 0x0000, // Size: 2, Type: LONG, Flags: PUBLIC
|
||||
PLAYER_FLAGS = UNIT_END + 0x0002, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_GUILDID = UNIT_END + 0x0003, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_GUILDRANK = UNIT_END + 0x0004, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_BYTES = UNIT_END + 0x0005, // Size: 1, Type: BYTES, Flags: PUBLIC
|
||||
PLAYER_BYTES_2 = UNIT_END + 0x0006, // Size: 1, Type: BYTES, Flags: PUBLIC
|
||||
PLAYER_BYTES_3 = UNIT_END + 0x0007, // Size: 1, Type: BYTES, Flags: PUBLIC
|
||||
PLAYER_DUEL_TEAM = UNIT_END + 0x0008, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_GUILD_TIMESTAMP = UNIT_END + 0x0009, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_QUEST_LOG_1_1 = UNIT_END + 0x000A, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_1_2 = UNIT_END + 0x000B, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_1_3 = UNIT_END + 0x000C, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_1_4 = UNIT_END + 0x000E, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_2_1 = UNIT_END + 0x000F, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_2_2 = UNIT_END + 0x0010, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_2_3 = UNIT_END + 0x0011, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_2_5 = UNIT_END + 0x0013, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_3_1 = UNIT_END + 0x0014, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_3_2 = UNIT_END + 0x0015, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_3_3 = UNIT_END + 0x0016, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_3_5 = UNIT_END + 0x0018, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_4_1 = UNIT_END + 0x0019, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_4_2 = UNIT_END + 0x001A, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_4_3 = UNIT_END + 0x001B, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_4_5 = UNIT_END + 0x001D, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_5_1 = UNIT_END + 0x001E, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_5_2 = UNIT_END + 0x001F, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_5_3 = UNIT_END + 0x0020, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_5_5 = UNIT_END + 0x0022, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_6_1 = UNIT_END + 0x0023, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_6_2 = UNIT_END + 0x0024, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_6_3 = UNIT_END + 0x0025, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_6_5 = UNIT_END + 0x0027, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_7_1 = UNIT_END + 0x0028, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_7_2 = UNIT_END + 0x0029, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_7_3 = UNIT_END + 0x002A, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_7_5 = UNIT_END + 0x002C, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_8_1 = UNIT_END + 0x002D, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_8_2 = UNIT_END + 0x002E, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_8_3 = UNIT_END + 0x002F, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_8_5 = UNIT_END + 0x0031, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_9_1 = UNIT_END + 0x0032, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_9_2 = UNIT_END + 0x0033, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_9_3 = UNIT_END + 0x0034, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_9_5 = UNIT_END + 0x0036, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_10_1 = UNIT_END + 0x0037, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_10_2 = UNIT_END + 0x0038, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_10_3 = UNIT_END + 0x0039, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_10_5 = UNIT_END + 0x003B, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_11_1 = UNIT_END + 0x003C, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_11_2 = UNIT_END + 0x003D, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_11_3 = UNIT_END + 0x003E, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_11_5 = UNIT_END + 0x0040, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_12_1 = UNIT_END + 0x0041, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_12_2 = UNIT_END + 0x0042, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_12_3 = UNIT_END + 0x0043, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_12_5 = UNIT_END + 0x0045, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_13_1 = UNIT_END + 0x0046, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_13_2 = UNIT_END + 0x0047, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_13_3 = UNIT_END + 0x0048, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_13_5 = UNIT_END + 0x004A, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_14_1 = UNIT_END + 0x004B, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_14_2 = UNIT_END + 0x004C, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_14_3 = UNIT_END + 0x004D, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_14_5 = UNIT_END + 0x004F, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_15_1 = UNIT_END + 0x0050, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_15_2 = UNIT_END + 0x0051, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_15_3 = UNIT_END + 0x0052, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_15_5 = UNIT_END + 0x0054, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_16_1 = UNIT_END + 0x0055, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_16_2 = UNIT_END + 0x0056, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_16_3 = UNIT_END + 0x0057, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_16_5 = UNIT_END + 0x0059, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_17_1 = UNIT_END + 0x005A, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_17_2 = UNIT_END + 0x005B, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_17_3 = UNIT_END + 0x005C, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_17_5 = UNIT_END + 0x005E, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_18_1 = UNIT_END + 0x005F, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_18_2 = UNIT_END + 0x0060, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_18_3 = UNIT_END + 0x0061, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_18_5 = UNIT_END + 0x0063, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_19_1 = UNIT_END + 0x0064, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_19_2 = UNIT_END + 0x0065, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_19_3 = UNIT_END + 0x0066, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_19_5 = UNIT_END + 0x0068, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_20_1 = UNIT_END + 0x0069, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_20_2 = UNIT_END + 0x006A, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_20_3 = UNIT_END + 0x006B, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_20_5 = UNIT_END + 0x006D, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_21_1 = UNIT_END + 0x006E, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_21_2 = UNIT_END + 0x006F, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_21_3 = UNIT_END + 0x0070, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_21_5 = UNIT_END + 0x0072, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_22_1 = UNIT_END + 0x0073, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_22_2 = UNIT_END + 0x0074, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_22_3 = UNIT_END + 0x0075, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_22_5 = UNIT_END + 0x0077, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_23_1 = UNIT_END + 0x0078, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_23_2 = UNIT_END + 0x0079, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_23_3 = UNIT_END + 0x007A, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_23_5 = UNIT_END + 0x007C, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_24_1 = UNIT_END + 0x007D, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_24_2 = UNIT_END + 0x007E, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_24_3 = UNIT_END + 0x007F, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_24_5 = UNIT_END + 0x0081, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_25_1 = UNIT_END + 0x0082, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_25_2 = UNIT_END + 0x0083, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_25_3 = UNIT_END + 0x0084, // Size: 2, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_QUEST_LOG_25_5 = UNIT_END + 0x0086, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_VISIBLE_ITEM_1_ENTRYID = UNIT_END + 0x0087, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_1_ENCHANTMENT = UNIT_END + 0x0088, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_2_ENTRYID = UNIT_END + 0x0089, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_2_ENCHANTMENT = UNIT_END + 0x008A, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_3_ENTRYID = UNIT_END + 0x008B, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_3_ENCHANTMENT = UNIT_END + 0x008C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_4_ENTRYID = UNIT_END + 0x008D, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_4_ENCHANTMENT = UNIT_END + 0x008E, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_5_ENTRYID = UNIT_END + 0x008F, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_5_ENCHANTMENT = UNIT_END + 0x0090, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_6_ENTRYID = UNIT_END + 0x0091, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_6_ENCHANTMENT = UNIT_END + 0x0092, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_7_ENTRYID = UNIT_END + 0x0093, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_7_ENCHANTMENT = UNIT_END + 0x0094, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_8_ENTRYID = UNIT_END + 0x0095, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_8_ENCHANTMENT = UNIT_END + 0x0096, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_9_ENTRYID = UNIT_END + 0x0097, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_9_ENCHANTMENT = UNIT_END + 0x0098, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_10_ENTRYID = UNIT_END + 0x0099, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_10_ENCHANTMENT = UNIT_END + 0x009A, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_11_ENTRYID = UNIT_END + 0x009B, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_11_ENCHANTMENT = UNIT_END + 0x009C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_12_ENTRYID = UNIT_END + 0x009D, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_12_ENCHANTMENT = UNIT_END + 0x009E, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_13_ENTRYID = UNIT_END + 0x009F, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_13_ENCHANTMENT = UNIT_END + 0x00A0, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_14_ENTRYID = UNIT_END + 0x00A1, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_14_ENCHANTMENT = UNIT_END + 0x00A2, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_15_ENTRYID = UNIT_END + 0x00A3, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_15_ENCHANTMENT = UNIT_END + 0x00A4, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_16_ENTRYID = UNIT_END + 0x00A5, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_16_ENCHANTMENT = UNIT_END + 0x00A6, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_17_ENTRYID = UNIT_END + 0x00A7, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_17_ENCHANTMENT = UNIT_END + 0x00A8, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_18_ENTRYID = UNIT_END + 0x00A9, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_18_ENCHANTMENT = UNIT_END + 0x00AA, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_19_ENTRYID = UNIT_END + 0x00AB, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_19_ENCHANTMENT = UNIT_END + 0x00AC, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_CHOSEN_TITLE = UNIT_END + 0x00AD, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_FAKE_INEBRIATION = UNIT_END + 0x00AE, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_FIELD_PAD_0 = UNIT_END + 0x00AF, // Size: 1, Type: INT, Flags: NONE
|
||||
PLAYER_FIELD_INV_SLOT_HEAD = UNIT_END + 0x00B0, // Size: 46, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_PACK_SLOT_1 = UNIT_END + 0x00DE, // Size: 32, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_BANK_SLOT_1 = UNIT_END + 0x00FE, // Size: 56, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_BANKBAG_SLOT_1 = UNIT_END + 0x0136, // Size: 14, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_VENDORBUYBACK_SLOT_1 = UNIT_END + 0x0144, // Size: 24, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_KEYRING_SLOT_1 = UNIT_END + 0x015C, // Size: 64, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_CURRENCYTOKEN_SLOT_1 = UNIT_END + 0x019C, // Size: 64, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FARSIGHT = UNIT_END + 0x01DC, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER__FIELD_KNOWN_TITLES = UNIT_END + 0x01DE, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER__FIELD_KNOWN_TITLES1 = UNIT_END + 0x01E0, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER__FIELD_KNOWN_TITLES2 = UNIT_END + 0x01E2, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_KNOWN_CURRENCIES = UNIT_END + 0x01E4, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_XP = UNIT_END + 0x01E6, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_NEXT_LEVEL_XP = UNIT_END + 0x01E7, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_SKILL_INFO_1_1 = UNIT_END + 0x01E8, // Size: 384, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_CHARACTER_POINTS1 = UNIT_END + 0x0368, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_CHARACTER_POINTS2 = UNIT_END + 0x0369, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_TRACK_CREATURES = UNIT_END + 0x036A, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_TRACK_RESOURCES = UNIT_END + 0x036B, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_BLOCK_PERCENTAGE = UNIT_END + 0x036C, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_DODGE_PERCENTAGE = UNIT_END + 0x036D, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_PARRY_PERCENTAGE = UNIT_END + 0x036E, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_EXPERTISE = UNIT_END + 0x036F, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_OFFHAND_EXPERTISE = UNIT_END + 0x0370, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_CRIT_PERCENTAGE = UNIT_END + 0x0371, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_RANGED_CRIT_PERCENTAGE = UNIT_END + 0x0372, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_OFFHAND_CRIT_PERCENTAGE = UNIT_END + 0x0373, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_SPELL_CRIT_PERCENTAGE1 = UNIT_END + 0x0374, // Size: 7, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_SHIELD_BLOCK = UNIT_END + 0x037B, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_SHIELD_BLOCK_CRIT_PERCENTAGE = UNIT_END + 0x037C, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_EXPLORED_ZONES_1 = UNIT_END + 0x037D, // Size: 128, Type: BYTES, Flags: PRIVATE
|
||||
PLAYER_REST_STATE_EXPERIENCE = UNIT_END + 0x03FD, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_COINAGE = UNIT_END + 0x03FE, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_DAMAGE_DONE_POS = UNIT_END + 0x03FF, // Size: 7, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_DAMAGE_DONE_NEG = UNIT_END + 0x0406, // Size: 7, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_DAMAGE_DONE_PCT = UNIT_END + 0x040D, // Size: 7, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_HEALING_DONE_POS = UNIT_END + 0x0414, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_HEALING_PCT = UNIT_END + 0x0415, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_HEALING_DONE_PCT = UNIT_END + 0x0416, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_TARGET_RESISTANCE = UNIT_END + 0x0417, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_TARGET_PHYSICAL_RESISTANCE = UNIT_END + 0x0418, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_BYTES = UNIT_END + 0x0419, // Size: 1, Type: BYTES, Flags: PRIVATE
|
||||
PLAYER_AMMO_ID = UNIT_END + 0x041A, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_SELF_RES_SPELL = UNIT_END + 0x041B, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_PVP_MEDALS = UNIT_END + 0x041C, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_BUYBACK_PRICE_1 = UNIT_END + 0x041D, // Size: 12, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_BUYBACK_TIMESTAMP_1 = UNIT_END + 0x0429, // Size: 12, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_KILLS = UNIT_END + 0x0435, // Size: 1, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_FIELD_TODAY_CONTRIBUTION = UNIT_END + 0x0436, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_YESTERDAY_CONTRIBUTION = UNIT_END + 0x0437, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_LIFETIME_HONORBALE_KILLS = UNIT_END + 0x0438, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_BYTES2 = UNIT_END + 0x0439, // Size: 1, Type: 6, Flags: PRIVATE
|
||||
PLAYER_FIELD_WATCHED_FACTION_INDEX = UNIT_END + 0x043A, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_COMBAT_RATING_1 = UNIT_END + 0x043B, // Size: 25, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_ARENA_TEAM_INFO_1_1 = UNIT_END + 0x0454, // Size: 21, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_HONOR_CURRENCY = UNIT_END + 0x0469, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_ARENA_CURRENCY = UNIT_END + 0x046A, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MAX_LEVEL = UNIT_END + 0x046B, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_DAILY_QUESTS_1 = UNIT_END + 0x046C, // Size: 25, Type: INT, Flags: PRIVATE
|
||||
PLAYER_RUNE_REGEN_1 = UNIT_END + 0x0485, // Size: 4, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_NO_REAGENT_COST_1 = UNIT_END + 0x0489, // Size: 3, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_GLYPH_SLOTS_1 = UNIT_END + 0x048C, // Size: 6, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_GLYPHS_1 = UNIT_END + 0x0492, // Size: 6, Type: INT, Flags: PRIVATE
|
||||
PLAYER_GLYPHS_ENABLED = UNIT_END + 0x0498, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_PET_SPELL_POWER = UNIT_END + 0x0499, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_END = UNIT_END + 0x049A,
|
||||
PLAYER_GUILDRANK = UNIT_END + 0x0003, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_GUILDDELETE_DATE = UNIT_END + 0x0004, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_GUILDLEVEL = UNIT_END + 0x0005, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_BYTES = UNIT_END + 0x0006, // Size: 1, Type: BYTES, Flags: PUBLIC
|
||||
PLAYER_BYTES_2 = UNIT_END + 0x0007, // Size: 1, Type: BYTES, Flags: PUBLIC
|
||||
PLAYER_BYTES_3 = UNIT_END + 0x0008, // Size: 1, Type: BYTES, Flags: PUBLIC
|
||||
PLAYER_DUEL_TEAM = UNIT_END + 0x0009, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_GUILD_TIMESTAMP = UNIT_END + 0x000A, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_QUEST_LOG_1_1 = UNIT_END + 0x000B, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_1_2 = UNIT_END + 0x000C, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_1_3 = UNIT_END + 0x000D, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_1_4 = UNIT_END + 0x000F, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_2_1 = UNIT_END + 0x0010, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_2_2 = UNIT_END + 0x0011, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_2_3 = UNIT_END + 0x0012, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_2_5 = UNIT_END + 0x0014, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_3_1 = UNIT_END + 0x0015, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_3_2 = UNIT_END + 0x0016, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_3_3 = UNIT_END + 0x0017, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_3_5 = UNIT_END + 0x0019, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_4_1 = UNIT_END + 0x001A, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_4_2 = UNIT_END + 0x001B, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_4_3 = UNIT_END + 0x001C, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_4_5 = UNIT_END + 0x001E, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_5_1 = UNIT_END + 0x001F, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_5_2 = UNIT_END + 0x0020, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_5_3 = UNIT_END + 0x0021, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_5_5 = UNIT_END + 0x0023, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_6_1 = UNIT_END + 0x0024, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_6_2 = UNIT_END + 0x0025, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_6_3 = UNIT_END + 0x0026, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_6_5 = UNIT_END + 0x0028, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_7_1 = UNIT_END + 0x0029, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_7_2 = UNIT_END + 0x002A, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_7_3 = UNIT_END + 0x002B, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_7_5 = UNIT_END + 0x002D, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_8_1 = UNIT_END + 0x002E, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_8_2 = UNIT_END + 0x002F, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_8_3 = UNIT_END + 0x0030, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_8_5 = UNIT_END + 0x0032, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_9_1 = UNIT_END + 0x0033, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_9_2 = UNIT_END + 0x0034, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_9_3 = UNIT_END + 0x0035, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_9_5 = UNIT_END + 0x0037, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_10_1 = UNIT_END + 0x0038, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_10_2 = UNIT_END + 0x0039, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_10_3 = UNIT_END + 0x003A, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_10_5 = UNIT_END + 0x003C, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_11_1 = UNIT_END + 0x003D, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_11_2 = UNIT_END + 0x003E, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_11_3 = UNIT_END + 0x003F, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_11_5 = UNIT_END + 0x0041, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_12_1 = UNIT_END + 0x0042, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_12_2 = UNIT_END + 0x0043, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_12_3 = UNIT_END + 0x0044, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_12_5 = UNIT_END + 0x0046, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_13_1 = UNIT_END + 0x0047, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_13_2 = UNIT_END + 0x0048, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_13_3 = UNIT_END + 0x0049, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_13_5 = UNIT_END + 0x004B, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_14_1 = UNIT_END + 0x004C, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_14_2 = UNIT_END + 0x004D, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_14_3 = UNIT_END + 0x004E, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_14_5 = UNIT_END + 0x0050, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_15_1 = UNIT_END + 0x0051, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_15_2 = UNIT_END + 0x0052, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_15_3 = UNIT_END + 0x0053, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_15_5 = UNIT_END + 0x0055, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_16_1 = UNIT_END + 0x0056, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_16_2 = UNIT_END + 0x0057, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_16_3 = UNIT_END + 0x0058, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_16_5 = UNIT_END + 0x005A, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_17_1 = UNIT_END + 0x005B, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_17_2 = UNIT_END + 0x005C, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_17_3 = UNIT_END + 0x005D, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_17_5 = UNIT_END + 0x005F, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_18_1 = UNIT_END + 0x0060, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_18_2 = UNIT_END + 0x0061, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_18_3 = UNIT_END + 0x0062, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_18_5 = UNIT_END + 0x0064, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_19_1 = UNIT_END + 0x0065, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_19_2 = UNIT_END + 0x0066, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_19_3 = UNIT_END + 0x0067, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_19_5 = UNIT_END + 0x0069, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_20_1 = UNIT_END + 0x006A, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_20_2 = UNIT_END + 0x006B, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_20_3 = UNIT_END + 0x006C, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_20_5 = UNIT_END + 0x006E, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_21_1 = UNIT_END + 0x006F, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_21_2 = UNIT_END + 0x0070, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_21_3 = UNIT_END + 0x0071, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_21_5 = UNIT_END + 0x0073, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_22_1 = UNIT_END + 0x0074, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_22_2 = UNIT_END + 0x0075, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_22_3 = UNIT_END + 0x0076, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_22_5 = UNIT_END + 0x0078, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_23_1 = UNIT_END + 0x0079, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_23_2 = UNIT_END + 0x007A, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_23_3 = UNIT_END + 0x007B, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_23_5 = UNIT_END + 0x007D, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_24_1 = UNIT_END + 0x007E, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_24_2 = UNIT_END + 0x007F, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_24_3 = UNIT_END + 0x0080, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_24_5 = UNIT_END + 0x0082, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_25_1 = UNIT_END + 0x0083, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_25_2 = UNIT_END + 0x0084, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_25_3 = UNIT_END + 0x0085, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_25_5 = UNIT_END + 0x0087, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_26_1 = UNIT_END + 0x0088, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_26_2 = UNIT_END + 0x0089, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_26_3 = UNIT_END + 0x008A, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_26_5 = UNIT_END + 0x008C, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_27_1 = UNIT_END + 0x008D, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_27_2 = UNIT_END + 0x008E, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_27_3 = UNIT_END + 0x008F, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_27_5 = UNIT_END + 0x0091, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_28_1 = UNIT_END + 0x0092, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_28_2 = UNIT_END + 0x0093, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_28_3 = UNIT_END + 0x0094, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_28_5 = UNIT_END + 0x0096, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_29_1 = UNIT_END + 0x0097, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_29_2 = UNIT_END + 0x0098, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_29_3 = UNIT_END + 0x0099, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_29_5 = UNIT_END + 0x009B, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_30_1 = UNIT_END + 0x009C, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_30_2 = UNIT_END + 0x009D, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_30_3 = UNIT_END + 0x009E, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_30_5 = UNIT_END + 0x00A0, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_31_1 = UNIT_END + 0x00A1, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_31_2 = UNIT_END + 0x00A2, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_31_3 = UNIT_END + 0x00A3, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_31_5 = UNIT_END + 0x00A5, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_32_1 = UNIT_END + 0x00A6, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_32_2 = UNIT_END + 0x00A7, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_32_3 = UNIT_END + 0x00A8, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_32_5 = UNIT_END + 0x00AA, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_33_1 = UNIT_END + 0x00AB, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_33_2 = UNIT_END + 0x00AC, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_33_3 = UNIT_END + 0x00AD, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_33_5 = UNIT_END + 0x00AF, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_34_1 = UNIT_END + 0x00B0, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_34_2 = UNIT_END + 0x00B1, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_34_3 = UNIT_END + 0x00B2, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_34_5 = UNIT_END + 0x00B4, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_35_1 = UNIT_END + 0x00B5, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_35_2 = UNIT_END + 0x00B6, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_35_3 = UNIT_END + 0x00B7, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_35_5 = UNIT_END + 0x00B9, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_36_1 = UNIT_END + 0x00BA, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_36_2 = UNIT_END + 0x00BB, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_36_3 = UNIT_END + 0x00BC, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_36_5 = UNIT_END + 0x00BE, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_37_1 = UNIT_END + 0x00BF, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_37_2 = UNIT_END + 0x00C0, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_37_3 = UNIT_END + 0x00C1, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_37_5 = UNIT_END + 0x00C3, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_38_1 = UNIT_END + 0x00C4, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_38_2 = UNIT_END + 0x00C5, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_38_3 = UNIT_END + 0x00C6, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_38_5 = UNIT_END + 0x00C8, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_39_1 = UNIT_END + 0x00C9, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_39_2 = UNIT_END + 0x00CA, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_39_3 = UNIT_END + 0x00CB, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_39_5 = UNIT_END + 0x00CD, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_40_1 = UNIT_END + 0x00CE, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_40_2 = UNIT_END + 0x00CF, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_40_3 = UNIT_END + 0x00D0, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_40_5 = UNIT_END + 0x00D2, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_41_1 = UNIT_END + 0x00D3, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_41_2 = UNIT_END + 0x00D4, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_41_3 = UNIT_END + 0x00D5, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_41_5 = UNIT_END + 0x00D7, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_42_1 = UNIT_END + 0x00D8, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_42_2 = UNIT_END + 0x00D9, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_42_3 = UNIT_END + 0x00DA, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_42_5 = UNIT_END + 0x00DC, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_43_1 = UNIT_END + 0x00DD, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_43_2 = UNIT_END + 0x00DE, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_43_3 = UNIT_END + 0x00DF, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_43_5 = UNIT_END + 0x00E1, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_44_1 = UNIT_END + 0x00E2, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_44_2 = UNIT_END + 0x00E3, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_44_3 = UNIT_END + 0x00E4, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_44_5 = UNIT_END + 0x00E6, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_45_1 = UNIT_END + 0x00E7, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_45_2 = UNIT_END + 0x00E8, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_45_3 = UNIT_END + 0x00E9, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_45_5 = UNIT_END + 0x00EB, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_46_1 = UNIT_END + 0x00EC, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_46_2 = UNIT_END + 0x00ED, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_46_3 = UNIT_END + 0x00EE, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_46_5 = UNIT_END + 0x00F0, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_47_1 = UNIT_END + 0x00F1, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_47_2 = UNIT_END + 0x00F2, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_47_3 = UNIT_END + 0x00F3, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_47_5 = UNIT_END + 0x00F5, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_48_1 = UNIT_END + 0x00F6, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_48_2 = UNIT_END + 0x00F7, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_48_3 = UNIT_END + 0x00F8, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_48_5 = UNIT_END + 0x00FA, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_49_1 = UNIT_END + 0x00FB, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_49_2 = UNIT_END + 0x00FC, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_49_3 = UNIT_END + 0x00FD, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_49_5 = UNIT_END + 0x00FF, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_50_1 = UNIT_END + 0x0100, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_50_2 = UNIT_END + 0x0101, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_50_3 = UNIT_END + 0x0102, // Size: 2, Type: TWO_SHORT, Flags: PARTY_MEMBER
|
||||
PLAYER_QUEST_LOG_50_5 = UNIT_END + 0x0104, // Size: 1, Type: INT, Flags: PARTY_MEMBER
|
||||
PLAYER_VISIBLE_ITEM_1_ENTRYID = UNIT_END + 0x0105, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_1_ENCHANTMENT = UNIT_END + 0x0106, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_2_ENTRYID = UNIT_END + 0x0107, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_2_ENCHANTMENT = UNIT_END + 0x0108, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_3_ENTRYID = UNIT_END + 0x0109, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_3_ENCHANTMENT = UNIT_END + 0x010A, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_4_ENTRYID = UNIT_END + 0x010B, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_4_ENCHANTMENT = UNIT_END + 0x010C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_5_ENTRYID = UNIT_END + 0x010D, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_5_ENCHANTMENT = UNIT_END + 0x010E, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_6_ENTRYID = UNIT_END + 0x010F, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_6_ENCHANTMENT = UNIT_END + 0x0110, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_7_ENTRYID = UNIT_END + 0x0111, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_7_ENCHANTMENT = UNIT_END + 0x0112, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_8_ENTRYID = UNIT_END + 0x0113, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_8_ENCHANTMENT = UNIT_END + 0x0114, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_9_ENTRYID = UNIT_END + 0x0115, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_9_ENCHANTMENT = UNIT_END + 0x0116, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_10_ENTRYID = UNIT_END + 0x0117, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_10_ENCHANTMENT = UNIT_END + 0x0118, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_11_ENTRYID = UNIT_END + 0x0119, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_11_ENCHANTMENT = UNIT_END + 0x011A, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_12_ENTRYID = UNIT_END + 0x011B, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_12_ENCHANTMENT = UNIT_END + 0x011C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_13_ENTRYID = UNIT_END + 0x011D, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_13_ENCHANTMENT = UNIT_END + 0x011E, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_14_ENTRYID = UNIT_END + 0x011F, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_14_ENCHANTMENT = UNIT_END + 0x0120, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_15_ENTRYID = UNIT_END + 0x0121, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_15_ENCHANTMENT = UNIT_END + 0x0122, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_16_ENTRYID = UNIT_END + 0x0123, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_16_ENCHANTMENT = UNIT_END + 0x0124, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_17_ENTRYID = UNIT_END + 0x0125, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_17_ENCHANTMENT = UNIT_END + 0x0126, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_18_ENTRYID = UNIT_END + 0x0127, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_18_ENCHANTMENT = UNIT_END + 0x0128, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_19_ENTRYID = UNIT_END + 0x0129, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_VISIBLE_ITEM_19_ENCHANTMENT = UNIT_END + 0x012A, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
|
||||
PLAYER_CHOSEN_TITLE = UNIT_END + 0x012B, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_FAKE_INEBRIATION = UNIT_END + 0x012C, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
PLAYER_FIELD_PAD_0 = UNIT_END + 0x012D, // Size: 1, Type: INT, Flags: NONE
|
||||
PLAYER_FIELD_INV_SLOT_HEAD = UNIT_END + 0x012E, // Size: 46, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_PACK_SLOT_1 = UNIT_END + 0x015C, // Size: 32, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_BANK_SLOT_1 = UNIT_END + 0x017C, // Size: 56, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_BANKBAG_SLOT_1 = UNIT_END + 0x01B4, // Size: 14, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_VENDORBUYBACK_SLOT_1 = UNIT_END + 0x01C2, // Size: 24, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_KEYRING_SLOT_1 = UNIT_END + 0x01DA, // Size: 64, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FARSIGHT = UNIT_END + 0x021A, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER__FIELD_KNOWN_TITLES = UNIT_END + 0x021C, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER__FIELD_KNOWN_TITLES1 = UNIT_END + 0x021E, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER__FIELD_KNOWN_TITLES2 = UNIT_END + 0x0220, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_XP = UNIT_END + 0x0222, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_NEXT_LEVEL_XP = UNIT_END + 0x0223, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_SKILL_INFO_1_1 = UNIT_END + 0x0224, // Size: 384, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_CHARACTER_POINTS = UNIT_END + 0x03A4, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_TRACK_CREATURES = UNIT_END + 0x03A5, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_TRACK_RESOURCES = UNIT_END + 0x03A6, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_BLOCK_PERCENTAGE = UNIT_END + 0x03A7, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_DODGE_PERCENTAGE = UNIT_END + 0x03A8, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_PARRY_PERCENTAGE = UNIT_END + 0x03A9, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_EXPERTISE = UNIT_END + 0x03AA, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_OFFHAND_EXPERTISE = UNIT_END + 0x03AB, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_CRIT_PERCENTAGE = UNIT_END + 0x03AC, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_RANGED_CRIT_PERCENTAGE = UNIT_END + 0x03AD, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_OFFHAND_CRIT_PERCENTAGE = UNIT_END + 0x03AE, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_SPELL_CRIT_PERCENTAGE1 = UNIT_END + 0x03AF, // Size: 7, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_SHIELD_BLOCK = UNIT_END + 0x03B6, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_SHIELD_BLOCK_CRIT_PERCENTAGE = UNIT_END + 0x03B7, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_MASTERY = UNIT_END + 0x03B8, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_EXPLORED_ZONES_1 = UNIT_END + 0x03B9, // Size: 144, Type: BYTES, Flags: PRIVATE
|
||||
PLAYER_REST_STATE_EXPERIENCE = UNIT_END + 0x0449, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_COINAGE = UNIT_END + 0x044A, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_DAMAGE_DONE_POS = UNIT_END + 0x044C, // Size: 7, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_DAMAGE_DONE_NEG = UNIT_END + 0x0453, // Size: 7, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_DAMAGE_DONE_PCT = UNIT_END + 0x045A, // Size: 7, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_HEALING_DONE_POS = UNIT_END + 0x0461, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_HEALING_PCT = UNIT_END + 0x0462, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_HEALING_DONE_PCT = UNIT_END + 0x0463, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_SPELL_POWER_PCT = UNIT_END + 0x0464, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_TARGET_RESISTANCE = UNIT_END + 0x0465, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MOD_TARGET_PHYSICAL_RESISTANCE = UNIT_END + 0x0466, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_BYTES = UNIT_END + 0x0467, // Size: 1, Type: BYTES, Flags: PRIVATE
|
||||
PLAYER_SELF_RES_SPELL = UNIT_END + 0x0468, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_PVP_MEDALS = UNIT_END + 0x0469, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_BUYBACK_PRICE_1 = UNIT_END + 0x046A, // Size: 12, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_BUYBACK_TIMESTAMP_1 = UNIT_END + 0x0476, // Size: 12, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_KILLS = UNIT_END + 0x0482, // Size: 1, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_FIELD_LIFETIME_HONORBALE_KILLS = UNIT_END + 0x0483, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_BYTES2 = UNIT_END + 0x0484, // Size: 1, Type: TWO_BYTES_SHORT, Flags: PRIVATE
|
||||
PLAYER_FIELD_WATCHED_FACTION_INDEX = UNIT_END + 0x0485, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_COMBAT_RATING_1 = UNIT_END + 0x0486, // Size: 26, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_ARENA_TEAM_INFO_1_1 = UNIT_END + 0x04A0, // Size: 21, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_BATTLEGROUND_RATING = UNIT_END + 0x04B5, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_MAX_LEVEL = UNIT_END + 0x04B6, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_DAILY_QUESTS_1 = UNIT_END + 0x04B7, // Size: 25, Type: INT, Flags: PRIVATE
|
||||
PLAYER_RUNE_REGEN_1 = UNIT_END + 0x04D0, // Size: 4, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_NO_REAGENT_COST_1 = UNIT_END + 0x04D4, // Size: 3, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_GLYPH_SLOTS_1 = UNIT_END + 0x04D7, // Size: 9, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_GLYPHS_1 = UNIT_END + 0x04E0, // Size: 9, Type: INT, Flags: PRIVATE
|
||||
PLAYER_GLYPHS_ENABLED = UNIT_END + 0x04E9, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_PET_SPELL_POWER = UNIT_END + 0x04EA, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_RESEARCHING_1 = UNIT_END + 0x04EB, // Size: 8, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_FIELD_RESERACH_SITE_1 = UNIT_END + 0x04F3, // Size: 8, Type: TWO_SHORT, Flags: PRIVATE
|
||||
PLAYER_PROFESSION_SKILL_LINE_1 = UNIT_END + 0x04FB, // Size: 2, Type: INT, Flags: PRIVATE
|
||||
PLAYER_FIELD_UI_HIT_MODIFIER = UNIT_END + 0x04FD, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_FIELD_UI_SPELL_HIT_MODIFIER = UNIT_END + 0x04FE, // Size: 1, Type: FLOAT, Flags: PRIVATE
|
||||
PLAYER_FIELD_HOME_REALM_TIME_OFFSET = UNIT_END + 0x04FF, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_END = UNIT_END + 0x0500,
|
||||
};
|
||||
|
||||
enum EGameObjectFields
|
||||
|
|
@ -424,10 +541,8 @@ enum ECorpseFields
|
|||
CORPSE_FIELD_ITEM = OBJECT_END + 0x0005, // Size: 19, Type: INT, Flags: PUBLIC
|
||||
CORPSE_FIELD_BYTES_1 = OBJECT_END + 0x0018, // Size: 1, Type: BYTES, Flags: PUBLIC
|
||||
CORPSE_FIELD_BYTES_2 = OBJECT_END + 0x0019, // Size: 1, Type: BYTES, Flags: PUBLIC
|
||||
CORPSE_FIELD_GUILD = OBJECT_END + 0x001A, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
CORPSE_FIELD_FLAGS = OBJECT_END + 0x001B, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
CORPSE_FIELD_DYNAMIC_FLAGS = OBJECT_END + 0x001C, // Size: 1, Type: INT, Flags: DYNAMIC
|
||||
CORPSE_FIELD_PAD = OBJECT_END + 0x001D, // Size: 1, Type: INT, Flags: NONE
|
||||
CORPSE_END = OBJECT_END + 0x001E,
|
||||
CORPSE_FIELD_FLAGS = OBJECT_END + 0x001A, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
CORPSE_FIELD_DYNAMIC_FLAGS = OBJECT_END + 0x001B, // Size: 1, Type: INT, Flags: DYNAMIC
|
||||
CORPSE_END = OBJECT_END + 0x001C,
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -925,7 +925,7 @@ void World::SetInitialWorldSettings()
|
|||
{
|
||||
sLog.outError("Correct *.map files not found in path '%smaps' or *.vmtree/*.vmtile files in '%svmaps'. Please place *.map and vmap files in appropriate directories or correct the DataDir value in the mangosd.conf file.", m_dataPath.c_str(), m_dataPath.c_str());
|
||||
Log::WaitBeforeContinueIfNeed();
|
||||
exit(1);
|
||||
//exit(1);
|
||||
}
|
||||
|
||||
///- Loading strings. Getting no records means core load has to be canceled because no error message can be output.
|
||||
|
|
@ -954,9 +954,6 @@ void World::SetInitialWorldSettings()
|
|||
DetectDBCLang();
|
||||
sObjectMgr.SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts)
|
||||
|
||||
sLog.outString("Loading SpellTemplate...");
|
||||
sObjectMgr.LoadSpellTemplate();
|
||||
|
||||
sLog.outString("Loading Script Names...");
|
||||
sScriptMgr.LoadScriptNames();
|
||||
|
||||
|
|
|
|||
|
|
@ -243,9 +243,7 @@ int WorldSocket::open(void* a)
|
|||
m_Address = remote_addr.get_host_addr();
|
||||
|
||||
// Send startup packet.
|
||||
WorldPacket packet(SMSG_AUTH_CHALLENGE, 40);
|
||||
packet << uint32(1); // 1...31
|
||||
packet << m_Seed;
|
||||
WorldPacket packet (SMSG_AUTH_CHALLENGE, 37);
|
||||
|
||||
BigNumber seed1;
|
||||
seed1.SetRand(16 * 8);
|
||||
|
|
@ -255,7 +253,10 @@ int WorldSocket::open(void* a)
|
|||
seed2.SetRand(16 * 8);
|
||||
packet.append(seed2.AsByteArray(16), 16); // new encryption seeds
|
||||
|
||||
if (SendPacket(packet) == -1)
|
||||
packet << uint8(1); // 1...31
|
||||
packet << uint32(m_Seed);
|
||||
|
||||
if (SendPacket (packet) == -1)
|
||||
return -1;
|
||||
|
||||
// Register with ACE Reactor
|
||||
|
|
@ -477,7 +478,7 @@ int WorldSocket::handle_input_header(void)
|
|||
EndianConvertReverse(header.size);
|
||||
EndianConvert(header.cmd);
|
||||
|
||||
if ((header.size < 4) || (header.size > 10240) || (header.cmd > 10240))
|
||||
if ((header.size < 4) || (header.size > 10240))
|
||||
{
|
||||
sLog.outError("WorldSocket::handle_input_header: client sent malformed packet size = %d , cmd = %d",
|
||||
header.size, header.cmd);
|
||||
|
|
@ -743,7 +744,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
|||
// NOTE: ATM the socket is singlethread, have this in mind ...
|
||||
uint8 digest[20];
|
||||
uint32 clientSeed, id, security;
|
||||
uint32 ClientBuild;
|
||||
uint16 ClientBuild;
|
||||
uint8 expansion = 0;
|
||||
LocaleConstant locale;
|
||||
std::string account;
|
||||
|
|
@ -752,16 +753,14 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
|||
WorldPacket packet;
|
||||
|
||||
// Read the content of the packet
|
||||
recvPacket >> ClientBuild;
|
||||
recvPacket.read_skip<uint32>();
|
||||
recvPacket >> account;
|
||||
recvPacket.read(digest, 20);
|
||||
recvPacket.read_skip<uint64>();
|
||||
recvPacket.read_skip<uint32>();
|
||||
recvPacket >> clientSeed;
|
||||
recvPacket.read_skip<uint32>();
|
||||
recvPacket.read_skip<uint32>();
|
||||
recvPacket.read_skip<uint32>();
|
||||
recvPacket.read_skip<uint64>();
|
||||
recvPacket.read(digest, 20);
|
||||
recvPacket >> ClientBuild;
|
||||
recvPacket.read_skip<uint8>();
|
||||
recvPacket >> account;
|
||||
recvPacket.read_skip<uint32>(); // addon data size
|
||||
|
||||
DEBUG_LOG("WorldSocket::HandleAuthSession: client build %u, account %s, clientseed %X",
|
||||
ClientBuild,
|
||||
|
|
|
|||
|
|
@ -1058,9 +1058,12 @@ bool ChatHandler::HandleDebugSpellCoefsCommand(char* args)
|
|||
bool isDirectHeal = false;
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
SpellEffectEntry const* spellEffect = spellEntry->GetSpellEffect(SpellEffectIndex(i));
|
||||
if(!spellEffect)
|
||||
continue;
|
||||
// Heals (Also count Mana Shield and Absorb effects as heals)
|
||||
if (spellEntry->Effect[i] == SPELL_EFFECT_HEAL || spellEntry->Effect[i] == SPELL_EFFECT_HEAL_MAX_HEALTH ||
|
||||
(spellEntry->Effect[i] == SPELL_EFFECT_APPLY_AURA && (spellEntry->EffectApplyAuraName[i] == SPELL_AURA_SCHOOL_ABSORB || spellEntry->EffectApplyAuraName[i] == SPELL_AURA_PERIODIC_HEAL)))
|
||||
if (spellEffect->Effect == SPELL_EFFECT_HEAL || spellEffect->Effect == SPELL_EFFECT_HEAL_MAX_HEALTH ||
|
||||
(spellEffect->Effect == SPELL_EFFECT_APPLY_AURA && (spellEffect->EffectApplyAuraName == SPELL_AURA_SCHOOL_ABSORB || spellEffect->EffectApplyAuraName == SPELL_AURA_PERIODIC_HEAL)))
|
||||
{
|
||||
isDirectHeal = true;
|
||||
break;
|
||||
|
|
@ -1070,8 +1073,11 @@ bool ChatHandler::HandleDebugSpellCoefsCommand(char* args)
|
|||
bool isDotHeal = false;
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
SpellEffectEntry const* spellEffect = spellEntry->GetSpellEffect(SpellEffectIndex(i));
|
||||
if(!spellEffect)
|
||||
continue;
|
||||
// Periodic Heals
|
||||
if (spellEntry->Effect[i] == SPELL_EFFECT_APPLY_AURA && spellEntry->EffectApplyAuraName[i] == SPELL_AURA_PERIODIC_HEAL)
|
||||
if (spellEffect->Effect == SPELL_EFFECT_APPLY_AURA && spellEffect->EffectApplyAuraName == SPELL_AURA_PERIODIC_HEAL)
|
||||
{
|
||||
isDotHeal = true;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -764,7 +764,7 @@ LogColors = ""
|
|||
|
||||
GameType = 1
|
||||
RealmZone = 1
|
||||
Expansion = 2
|
||||
Expansion = 3
|
||||
DBC.Locale = 255
|
||||
DeclinedNames = 0
|
||||
StrictPlayerNames = 0
|
||||
|
|
@ -779,7 +779,7 @@ CharactersPerRealm = 10
|
|||
HeroicCharactersPerRealm = 1
|
||||
MinLevelForHeroicCharacterCreating = 55
|
||||
SkipCinematics = 0
|
||||
MaxPlayerLevel = 80
|
||||
MaxPlayerLevel = 85
|
||||
StartPlayerLevel = 1
|
||||
StartHeroicPlayerLevel = 55
|
||||
StartPlayerMoney = 0
|
||||
|
|
|
|||
|
|
@ -141,6 +141,16 @@ uint32 DBCFileLoader::GetFormatRecordSize(const char* format, int32* index_pos)
|
|||
return recordsize;
|
||||
}
|
||||
|
||||
uint32 DBCFileLoader::GetFormatStringsFields(const char * format)
|
||||
{
|
||||
uint32 stringfields = 0;
|
||||
for(uint32 x=0; format[x];++x)
|
||||
if (format[x] == FT_STRING)
|
||||
++stringfields;
|
||||
|
||||
return stringfields;
|
||||
}
|
||||
|
||||
char* DBCFileLoader::AutoProduceData(const char* format, uint32& records, char**& indexTable)
|
||||
{
|
||||
/*
|
||||
|
|
@ -234,13 +244,77 @@ char* DBCFileLoader::AutoProduceData(const char* format, uint32& records, char**
|
|||
return dataTable;
|
||||
}
|
||||
|
||||
char* DBCFileLoader::AutoProduceStrings(const char* format, char* dataTable)
|
||||
static char const* const nullStr = "";
|
||||
|
||||
char* DBCFileLoader::AutoProduceStringsArrayHolders(const char* format, char* dataTable)
|
||||
{
|
||||
if(strlen(format)!=fieldCount)
|
||||
return NULL;
|
||||
|
||||
// we store flat holders pool as single memory block
|
||||
size_t stringFields = GetFormatStringsFields(format);
|
||||
// each string field at load have array of string for each locale
|
||||
size_t stringHolderSize = sizeof(char*) * MAX_LOCALE;
|
||||
size_t stringHoldersRecordPoolSize = stringFields * stringHolderSize;
|
||||
size_t stringHoldersPoolSize = stringHoldersRecordPoolSize * recordCount;
|
||||
|
||||
char* stringHoldersPool= new char[stringHoldersPoolSize];
|
||||
|
||||
// dbc strings expected to have at least empty string
|
||||
for(size_t i = 0; i < stringHoldersPoolSize / sizeof(char*); ++i)
|
||||
((char const**)stringHoldersPool)[i] = nullStr;
|
||||
|
||||
uint32 offset=0;
|
||||
|
||||
// assign string holders to string field slots
|
||||
for(uint32 y =0;y<recordCount;y++)
|
||||
{
|
||||
uint32 stringFieldNum = 0;
|
||||
|
||||
for(uint32 x=0;x<fieldCount;x++)
|
||||
switch(format[x])
|
||||
{
|
||||
case FT_FLOAT:
|
||||
case FT_IND:
|
||||
case FT_INT:
|
||||
offset+=4;
|
||||
break;
|
||||
case FT_BYTE:
|
||||
offset+=1;
|
||||
break;
|
||||
case FT_STRING:
|
||||
{
|
||||
// init dbc string field slots by pointers to string holders
|
||||
char const*** slot = (char const***)(&dataTable[offset]);
|
||||
*slot = (char const**)(&stringHoldersPool[stringHoldersRecordPoolSize * y + stringHolderSize*stringFieldNum]);
|
||||
|
||||
++stringFieldNum;
|
||||
offset+=sizeof(char*);
|
||||
break;
|
||||
}
|
||||
case FT_NA:
|
||||
case FT_NA_BYTE:
|
||||
case FT_SORT:
|
||||
break;
|
||||
default:
|
||||
assert(false && "unknown format character");
|
||||
}
|
||||
}
|
||||
|
||||
//send as char* for store in char* pool list for free at unload
|
||||
return stringHoldersPool;
|
||||
}
|
||||
|
||||
char* DBCFileLoader::AutoProduceStrings(const char* format, char* dataTable, LocaleConstant loc)
|
||||
{
|
||||
if (strlen(format) != fieldCount)
|
||||
return NULL;
|
||||
|
||||
char* stringPool = new char[stringSize];
|
||||
memcpy(stringPool, stringTable, stringSize);
|
||||
// each string field at load have array of string for each locale
|
||||
size_t stringHolderSize = sizeof(char*) * MAX_LOCALE;
|
||||
|
||||
char* stringPool= new char[stringSize];
|
||||
memcpy(stringPool,stringTable,stringSize);
|
||||
|
||||
uint32 offset = 0;
|
||||
|
||||
|
|
@ -262,14 +336,17 @@ char* DBCFileLoader::AutoProduceStrings(const char* format, char* dataTable)
|
|||
break;
|
||||
case FT_STRING:
|
||||
{
|
||||
char** holder = *((char***)(&dataTable[offset]));
|
||||
char** slot = &holder[loc];
|
||||
|
||||
// fill only not filled entries
|
||||
char** slot = (char**)(&dataTable[offset]);
|
||||
if (!*slot || !** slot)
|
||||
if (*slot == nullStr)
|
||||
{
|
||||
const char* st = getRecord(y).getString(x);
|
||||
*slot = stringPool + (st - (const char*)stringTable);
|
||||
}
|
||||
offset += sizeof(char*);
|
||||
|
||||
offset+=sizeof(char*);
|
||||
break;
|
||||
}
|
||||
case FT_LOGIC:
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#define DBC_FILE_LOADER_H
|
||||
#include "Platform/Define.h"
|
||||
#include "Utilities/ByteConverter.h"
|
||||
#include "Common.h"
|
||||
#include <cassert>
|
||||
|
||||
enum
|
||||
|
|
@ -94,10 +95,12 @@ class DBCFileLoader
|
|||
uint32 GetOffset(size_t id) const { return (fieldsOffset != NULL && id < fieldCount) ? fieldsOffset[id] : 0; }
|
||||
bool IsLoaded() {return (data != NULL);}
|
||||
char* AutoProduceData(const char* fmt, uint32& count, char**& indexTable);
|
||||
char* AutoProduceStrings(const char* fmt, char* dataTable);
|
||||
static uint32 GetFormatRecordSize(const char* format, int32* index_pos = NULL);
|
||||
private:
|
||||
char* AutoProduceStringsArrayHolders(const char* fmt, char* dataTable);
|
||||
char* AutoProduceStrings(const char* fmt, char* dataTable, LocaleConstant loc);
|
||||
static uint32 GetFormatRecordSize(const char * format, int32 * index_pos = NULL);
|
||||
static uint32 GetFormatStringsFields(const char * format);
|
||||
|
||||
private:
|
||||
uint32 recordSize;
|
||||
uint32 recordCount;
|
||||
uint32 fieldCount;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class DBCStorage
|
|||
char const* GetFormat() const { return fmt; }
|
||||
uint32 GetFieldCount() const { return fieldCount; }
|
||||
|
||||
bool Load(char const* fn)
|
||||
bool Load(char const* fn, LocaleConstant loc)
|
||||
{
|
||||
DBCFileLoader dbc;
|
||||
// Check if load was sucessful, only then continue
|
||||
|
|
@ -46,14 +46,17 @@ class DBCStorage
|
|||
// load raw non-string data
|
||||
m_dataTable = (T*)dbc.AutoProduceData(fmt, nCount, (char**&)indexTable);
|
||||
|
||||
// create string holders for loaded string fields
|
||||
m_stringPoolList.push_back(dbc.AutoProduceStringsArrayHolders(fmt,(char*)m_dataTable));
|
||||
|
||||
// load strings from dbc data
|
||||
m_stringPoolList.push_back(dbc.AutoProduceStrings(fmt, (char*)m_dataTable));
|
||||
m_stringPoolList.push_back(dbc.AutoProduceStrings(fmt,(char*)m_dataTable,loc));
|
||||
|
||||
// error in dbc file at loading if NULL
|
||||
return indexTable != NULL;
|
||||
}
|
||||
|
||||
bool LoadStringsFrom(char const* fn)
|
||||
bool LoadStringsFrom(char const* fn, LocaleConstant loc)
|
||||
{
|
||||
// DBC must be already loaded using Load
|
||||
if (!indexTable)
|
||||
|
|
@ -65,7 +68,7 @@ class DBCStorage
|
|||
return false;
|
||||
|
||||
// load strings from another locale dbc data
|
||||
m_stringPoolList.push_back(dbc.AutoProduceStrings(fmt, (char*)m_dataTable));
|
||||
m_stringPoolList.push_back(dbc.AutoProduceStrings(fmt,(char*)m_dataTable,loc));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,4 +17,3 @@
|
|||
*/
|
||||
|
||||
//#include "DatabaseEnv.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -389,6 +389,7 @@
|
|||
<ClCompile Include="..\..\src\game\CreatureEventAIMgr.cpp" />
|
||||
<ClCompile Include="..\..\src\game\CreatureLinkingMgr.cpp" />
|
||||
<ClCompile Include="..\..\src\game\DBCStores.cpp" />
|
||||
<ClCompile Include="..\..\src\game\DBCStructure.cpp" />
|
||||
<ClCompile Include="..\..\src\game\debugcmds.cpp" />
|
||||
<ClCompile Include="..\..\src\game\DuelHandler.cpp" />
|
||||
<ClCompile Include="..\..\src\game\DynamicObject.cpp" />
|
||||
|
|
|
|||
|
|
@ -466,6 +466,9 @@
|
|||
<ClCompile Include="..\..\src\game\Camera.cpp">
|
||||
<Filter>Object</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\game\DBCStructure.cpp">
|
||||
<Filter>Server</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\game\UnitAuraProcHandler.cpp">
|
||||
<Filter>World/Handlers</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
|||
|
|
@ -1518,6 +1518,10 @@
|
|||
RelativePath="..\..\src\game\DBCStores.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\DBCStructure.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\DBCStructure.h"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue