From a428293dae905f7c3730277ac15fe5f5cba70aa5 Mon Sep 17 00:00:00 2001 From: thenecromancer Date: Thu, 14 Jan 2010 17:47:38 +0100 Subject: Issue 62: DK talent Impurity Note that there are probably more of things having just "dummy effect". This way to get them is quite slow (auras are at least sorted by their type) and probably some sort of modifier could be stored for them --HG-- branch : trunk --- src/game/Unit.cpp | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'src') 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)); } -- cgit v1.2.3 From bf6c5b3ee6adf507412f3850e844e8cda017c0e5 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Jan 2010 14:05:56 -0700 Subject: * Add support for waypoint wisp's level to show the point of the waypoint * Author Kaelima * Thanks Malcrom for the idea --HG-- branch : trunk --- sql/updates/7037_world_creature_template.sql | 7 +++++++ src/game/Level2.cpp | 1 + 2 files changed, 8 insertions(+) create mode 100644 sql/updates/7037_world_creature_template.sql (limited to 'src') diff --git a/sql/updates/7037_world_creature_template.sql b/sql/updates/7037_world_creature_template.sql new file mode 100644 index 00000000000..f8867532584 --- /dev/null +++ b/sql/updates/7037_world_creature_template.sql @@ -0,0 +1,7 @@ +-- Usually creature_template changes MUST GO to TDB +-- However, this is the one exception ... the GM waypoint +-- DO NOT REMOVE THIS FROM CORE REPO this is part of the core :) +-- Set Waypoint (Only GM can see it) so health is 1 from levels 1 - 80 +UPDATE `creature_template` SET `maxlevel`=80,`Health_mod`=0.0125 WHERE `entry`=1; +-- Set Waypoint (Only GM can see it) so it can also show altitude +UPDATE `creature_template` SET InhabitType=7 WHERE `entry`=1; 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() ); -- cgit v1.2.3