diff options
| author | Shauren <shauren.trinity@gmail.com> | 2015-07-07 12:13:14 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2015-07-07 12:13:14 +0200 |
| commit | dea6c0b122c8f4b97cb7b3833b41d9bef5c0d911 (patch) | |
| tree | 8ced5dfe3c85d1742b91b00325bbb0ffd2d9df7a /src/server/game/Entities/Unit | |
| parent | d8338669d51fe114ce0698ddde44de113d95e76e (diff) | |
Core/DataStores: Updated dbc/db2 structures to 6.2.0
Diffstat (limited to 'src/server/game/Entities/Unit')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 22 | ||||
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.h | 1 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 74056219a7e..5631b486774 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -5625,7 +5625,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere case 70664: { // Proc only from normal Rejuvenation - if (procSpell->SpellVisual[0] != 32) + if (procSpell->Id != 774) return false; Player* caster = ToPlayer(); @@ -5707,7 +5707,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // At melee attack or Hammer of the Righteous spell damage considered as melee attack bool stacker = !procSpell || procSpell->Id == 53595; // spells with SPELL_DAMAGE_CLASS_MELEE excluding Judgements - bool damager = procSpell && (procSpell->EquippedItemClass != -1 || (procSpell->SpellIconID == 243 && procSpell->SpellVisual[0] == 39)); + bool damager = procSpell && (procSpell->EquippedItemClass != -1 || procSpell->Id == 71433 || procSpell->Id == 71434); if (!stacker && !damager) return false; @@ -9701,11 +9701,11 @@ void Unit::Dismount() MountCapabilityEntry const* Unit::GetMountCapability(uint32 mountType) const { if (!mountType) - return NULL; + return nullptr; - MountTypeEntry const* mountTypeEntry = sMountTypeStore.LookupEntry(mountType); - if (!mountTypeEntry) - return NULL; + DB2Manager::MountTypeXCapabilitySet const* capabilities = sDB2Manager.GetMountCapabilities(mountType); + if (!capabilities) + return nullptr; uint32 zoneId, areaId; GetZoneAndAreaId(zoneId, areaId); @@ -9713,9 +9713,9 @@ MountCapabilityEntry const* Unit::GetMountCapability(uint32 mountType) const if (GetTypeId() == TYPEID_PLAYER) ridingSkill = ToPlayer()->GetSkillValue(SKILL_RIDING); - for (uint32 i = MAX_MOUNT_CAPABILITIES; i > 0; --i) + for (MountTypeXCapabilityEntry const* mountTypeXCapability : *capabilities) { - MountCapabilityEntry const* mountCapability = sMountCapabilityStore.LookupEntry(mountTypeEntry->MountCapability[i - 1]); + MountCapabilityEntry const* mountCapability = sMountCapabilityStore.LookupEntry(mountTypeXCapability->MountCapabilityID); if (!mountCapability) continue; @@ -9753,7 +9753,7 @@ MountCapabilityEntry const* Unit::GetMountCapability(uint32 mountType) const return mountCapability; } - return NULL; + return nullptr; } bool Unit::IsServiceProvider() const @@ -10999,7 +10999,7 @@ void Unit::ModSpellCastTime(SpellInfo const* spellInfo, int32 & castTime, Spell* castTime = int32(float(castTime) * GetFloatValue(UNIT_MOD_CAST_SPEED)); else if (spellInfo->HasAttribute(SPELL_ATTR0_REQ_AMMO) && !spellInfo->HasAttribute(SPELL_ATTR2_AUTOREPEAT_FLAG)) castTime = int32(float(castTime) * m_modAttackSpeedPct[RANGED_ATTACK]); - else if (spellInfo->SpellVisual[0] == 3881 && HasAura(67556)) // cooking with Chef Hat. + else if (IsPartOfSkillLine(SKILL_COOKING, spellInfo->Id) && HasAura(67556)) // cooking with Chef Hat. castTime = 500; } @@ -11589,7 +11589,7 @@ uint32 Unit::GetPowerIndex(uint32 powerType) const if (ToPet() && ToPet()->getPetType() == HUNTER_PET) classId = CLASS_HUNTER; - return GetPowerIndexByClass(powerType, classId); + return sDB2Manager.GetPowerIndexByClass(powerType, classId); } int32 Unit::GetCreatePowers(Powers power) const diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 066996a1bd5..ebf05876e10 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -380,6 +380,7 @@ enum InventorySlot }; struct FactionTemplateEntry; +struct MountCapabilityEntry; struct SpellValue; class AuraApplication; |
