diff options
| author | Intel <chemicstry@gmail.com> | 2014-11-10 02:51:55 +0200 |
|---|---|---|
| committer | Intel <chemicstry@gmail.com> | 2014-11-10 02:51:55 +0200 |
| commit | 43d5fb5eaefeafb34bea10ff5c6a2878c6c14df1 (patch) | |
| tree | aec71df4cf481459512756b27521113f1aae2198 /src/server/game/Entities/Unit | |
| parent | f847f55385cd1babc67d701d49f180242c63e83e (diff) | |
Core/DataStores: Updating spells dbc part 2
Diffstat (limited to 'src/server/game/Entities/Unit')
| -rw-r--r-- | src/server/game/Entities/Unit/StatSystem.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 22 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index 53d4a01ac4c..b832292d89b 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -327,7 +327,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged) SpellShapeshiftFormEntry const* form = sSpellShapeshiftFormStore.LookupEntry(GetShapeshiftForm()); // Directly taken from client, SHAPESHIFT_FLAG_AP_FROM_STRENGTH ? - if (form && form->flags1 & 0x20) + if (form && form->Flags & 0x20) agilityValue += std::max((GetStat(STAT_AGILITY) - 10.0f) * entry->AttackPowerPerStrength, 0.0f); val2 = strengthValue + agilityValue; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index e2fd4d3b96b..0152b132370 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -6032,7 +6032,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere Item* addWeapon = player->GetWeaponForAttack(attType == BASE_ATTACK ? OFF_ATTACK : BASE_ATTACK, true); uint32 enchant_id_add = addWeapon ? addWeapon->GetEnchantmentId(EnchantmentSlot(TEMP_ENCHANTMENT_SLOT)) : 0; SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id_add); - if (pEnchant && pEnchant->spellid[0] == dummySpell->Id) + if (pEnchant && pEnchant->EffectSpellID[0] == dummySpell->Id) chance += 14; if (!roll_chance_i(chance)) @@ -11398,7 +11398,7 @@ float Unit::GetSpellMaxRangeForTarget(Unit const* target, SpellInfo const* spell { if (!spellInfo->RangeEntry) return 0; - if (spellInfo->RangeEntry->maxRangeFriend == spellInfo->RangeEntry->maxRangeHostile) + if (spellInfo->RangeEntry->MaxRangeFriend == spellInfo->RangeEntry->MaxRangeHostile) return spellInfo->GetMaxRange(); if (target == NULL) return spellInfo->GetMaxRange(true); @@ -11409,7 +11409,7 @@ float Unit::GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spell { if (!spellInfo->RangeEntry) return 0; - if (spellInfo->RangeEntry->minRangeFriend == spellInfo->RangeEntry->minRangeHostile) + if (spellInfo->RangeEntry->MinRangeFriend == spellInfo->RangeEntry->MinRangeHostile) return spellInfo->GetMinRange(); return spellInfo->GetMinRange(!IsHostileTo(target)); } @@ -11420,8 +11420,8 @@ uint32 Unit::GetCreatureType() const { ShapeshiftForm form = GetShapeshiftForm(); SpellShapeshiftFormEntry const* ssEntry = sSpellShapeshiftFormStore.LookupEntry(form); - if (ssEntry && ssEntry->creatureType > 0) - return ssEntry->creatureType; + if (ssEntry && ssEntry->CreatureType > 0) + return ssEntry->CreatureType; else return CREATURE_TYPE_HUMANOID; } @@ -11454,7 +11454,7 @@ bool Unit::IsInDisallowedMountForm() const if (!shapeshift) return true; - if (!(shapeshift->flags1 & 0x1)) + if (!(shapeshift->Flags & 0x1)) return true; } @@ -15206,21 +15206,21 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form) const uint32 modelid = 0; SpellShapeshiftFormEntry const* formEntry = sSpellShapeshiftFormStore.LookupEntry(form); - if (formEntry && formEntry->modelID_A) + if (formEntry && formEntry->CreatureDisplayID[0]) { // Take the alliance modelid as default if (GetTypeId() != TYPEID_PLAYER) - return formEntry->modelID_A; + return formEntry->CreatureDisplayID[0]; else { if (Player::TeamForRace(getRace()) == ALLIANCE) - modelid = formEntry->modelID_A; + modelid = formEntry->CreatureDisplayID[0]; else - modelid = formEntry->modelID_H; + modelid = formEntry->CreatureDisplayID[1]; // If the player is horde but there are no values for the horde modelid - take the alliance modelid if (!modelid && Player::TeamForRace(getRace()) == HORDE) - modelid = formEntry->modelID_A; + modelid = formEntry->CreatureDisplayID[0]; } } |
