diff options
author | XTZGZoReX <none@none> | 2010-01-14 18:33:27 +0100 |
---|---|---|
committer | XTZGZoReX <none@none> | 2010-01-14 18:33:27 +0100 |
commit | 20df99ae746a64a8397fdea9495366cf48c7d748 (patch) | |
tree | 00c07e249d6ec3b9d64cc7eaa42d681bf26e569e /src | |
parent | 91ee03d9bf14e17e048c6b162307524845e9ab64 (diff) | |
parent | bf6c5b3ee6adf507412f3850e844e8cda017c0e5 (diff) |
* Merge...
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Level2.cpp | 1 | ||||
-rw-r--r-- | src/game/Unit.cpp | 31 |
2 files changed, 24 insertions, 8 deletions
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index f93b7fc326a..28179568a28 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -3058,6 +3058,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args) { wpCreature->SetDisplayId(target->GetDisplayId()); wpCreature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5); + wpCreature->SetLevel(point); } } while( result->NextRow() ); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3e918396c0e..f1e799ea43d 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9847,9 +9847,29 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3 if (pVictim->GetDiseasesByCaster(owner->GetGUID()) > 0) DoneTotalMod *= (100.0f + aurEff->GetAmount()) / 100.0f; - // This is not a typo - Impurity has SPELLFAMILY_DRUID - if (AuraEffect * aurEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 1986, 0)) - ApCoeffMod *= (100.0f + aurEff->GetAmount()) / 100.0f; + // Impurity (dummy effect) + if (GetTypeId() == TYPEID_PLAYER) + { + PlayerSpellMap playerSpells = ((Player*)this)->GetSpellMap(); + for (PlayerSpellMap::const_iterator itr = playerSpells.begin(); itr != playerSpells.end(); ++itr) + { + if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->disabled) + continue; + switch (itr->first) + { + case 49220: + case 49633: + case 49635: + case 49636: + case 49638: + { + if (const SpellEntry *proto=sSpellStore.LookupEntry(itr->first)) + ApCoeffMod *= (100.0f + proto->CalculateSimpleValue(0)) / 100.0f; + } + break; + } + } + } break; } @@ -10815,11 +10835,6 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage, WeaponAttackType att normalized = true; break; } - - // This is not a typo - Impurity has SPELLFAMILY_DRUID - if (AuraEffect const * aurEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 1986, 0)) - APbonus *= (100.0f + aurEff->GetAmount()) / 100.0f; - DoneFlatBenefit += int32(APbonus/14.0f * GetAPMultiplier(attType,normalized)); } |