diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2018-03-07 03:32:32 -0300 | 
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2018-03-07 03:34:45 -0300 | 
| commit | 6e0b9a7916d158981cebe6107710141458d656cc (patch) | |
| tree | 2a44ad4e6049a7ed60b04ffbb8dd7f86d30d44a3 /src/server/scripts/Northrend | |
| parent | 68dde9f8c5467c5983078b190e58105f99dad75c (diff) | |
Core/Creatures: port power type updates from master branch
Core/Misc: Added helper function Unit::SetFullPower
Cherry-picked from 8199eef81cad464bb43f3613ed884a2c8fc3973d
Core/Creatures: Updated power type handling (#20981)
Cherry-picked from 16a7a414abcc93c4514905b871f53c1049261c12
Diffstat (limited to 'src/server/scripts/Northrend')
7 files changed, 9 insertions, 9 deletions
| diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp index 6bc1bdc9e10..15572301b94 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp @@ -616,7 +616,7 @@ struct boss_faction_championsAI : public BossAI      void UpdatePower()      { -        if (me->getPowerType() == POWER_MANA) +        if (me->GetPowerType() == POWER_MANA)              me->ModifyPower(POWER_MANA, me->GetMaxPower(POWER_MANA) / 3);      } @@ -675,7 +675,7 @@ struct boss_faction_championsAI : public BossAI      {          for (auto const& pair : me->GetCombatManager().GetPvECombatRefs())              if (Player* player = pair.second->GetOther(me)->ToPlayer()) -                if (player->getPowerType() == POWER_MANA) +                if (player->GetPowerType() == POWER_MANA)                      return player;          return nullptr;      } @@ -1820,7 +1820,7 @@ class npc_toc_rogue : public CreatureScript                  events.ScheduleEvent(EVENT_EVISCERATE, urand(20*IN_MILLISECONDS, 40*IN_MILLISECONDS));                  events.ScheduleEvent(EVENT_WOUND_POISON, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));                  SetEquipmentSlots(false, 47422, 49982, EQUIP_NO_CHANGE); -                me->setPowerType(POWER_ENERGY); +                me->SetPowerType(POWER_ENERGY);                  me->SetMaxPower(POWER_ENERGY, 100);              } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp index 8ec53102b02..240dbca6fe4 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp @@ -508,7 +508,7 @@ class spell_mistress_kiss_area : public SpellScript          // get a list of players with mana          targets.remove_if([](WorldObject* target)          { -            return target->GetTypeId() == TYPEID_PLAYER && target->ToPlayer()->getPowerType() == POWER_MANA; +            return target->GetTypeId() == TYPEID_PLAYER && target->ToPlayer()->GetPowerType() == POWER_MANA;          });          if (targets.empty()) diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp index d5045c82bfd..d0c3a42f3ed 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp @@ -271,7 +271,7 @@ class spell_bronjahm_magic_bane : public SpellScriptLoader              void RecalculateDamage(SpellEffIndex /*effIndex*/)              { -                if (GetHitUnit()->getPowerType() != POWER_MANA) +                if (GetHitUnit()->GetPowerType() != POWER_MANA)                      return;                  int32 const maxDamage = GetCaster()->GetMap()->IsHeroic() ? 15000 : 10000; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index 92251489963..334e3d73775 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -1055,7 +1055,7 @@ class spell_deathbringer_blood_link_aura : public SpellScriptLoader              void HandlePeriodicTick(AuraEffect const* /*aurEff*/)              {                  PreventDefaultAction(); -                if (GetUnitOwner()->getPowerType() == POWER_ENERGY && GetUnitOwner()->GetPower(POWER_ENERGY) == GetUnitOwner()->GetMaxPower(POWER_ENERGY)) +                if (GetUnitOwner()->GetPowerType() == POWER_ENERGY && GetUnitOwner()->GetPower(POWER_ENERGY) == GetUnitOwner()->GetMaxPower(POWER_ENERGY))                      if (Creature* saurfang = GetUnitOwner()->ToCreature())                          saurfang->AI()->DoAction(ACTION_MARK_OF_THE_FALLEN_CHAMPION);              } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index e483d960db7..bf9035604a3 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -1161,7 +1161,7 @@ class UnchainedMagicTargetSelector          bool operator()(WorldObject* object) const          {              if (Unit* unit = object->ToUnit()) -                return unit->getPowerType() != POWER_MANA; +                return unit->GetPowerType() != POWER_MANA;              return true;          }  }; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp index d5e5dfcb5d7..95360a368ed 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp @@ -169,7 +169,7 @@ struct ManaVoidSelector : public std::unary_function<Unit*, bool>          bool operator()(Unit* unit) const          { -            return unit->getPowerType() == POWER_MANA && _source->GetDistance(unit) > 15.0f; +            return unit->GetPowerType() == POWER_MANA && _source->GetDistance(unit) > 15.0f;          }          WorldObject const* _source; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index c514fff54b0..16a44bb54bb 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -201,7 +201,7 @@ struct ManaUserTargetSelector : public std::unary_function<Unit*, bool>  {      bool operator()(Unit const* target) const      { -        return target->GetTypeId() == TYPEID_PLAYER && target->getPowerType() == POWER_MANA; +        return target->GetTypeId() == TYPEID_PLAYER && target->GetPowerType() == POWER_MANA;      }  }; | 
