diff options
| author | Shauren <shauren.trinity@gmail.com> | 2017-03-23 00:11:58 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2017-03-23 00:11:58 +0100 |
| commit | f097e341f5afcac2dd0ae9dbb265201c0de2a934 (patch) | |
| tree | 6313a3f569c5b179deb675b2e836cb82d0859443 /src/server/game | |
| parent | 408d8768135dd8fb72150cc5ede9967cf57a728b (diff) | |
Core/Utilities: Rename RandomResizeList->RandomResize as it is no longer restricted to a list
* Also fix gcc build
Diffstat (limited to 'src/server/game')
| -rw-r--r-- | src/server/game/AI/CoreAI/UnitAI.h | 2 | ||||
| -rw-r--r-- | src/server/game/AI/ScriptedAI/ScriptedCreature.h | 2 | ||||
| -rw-r--r-- | src/server/game/BlackMarket/BlackMarketMgr.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Garrison/GarrisonMgr.cpp | 6 | ||||
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 15 |
6 files changed, 21 insertions, 10 deletions
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index 2ca49653b50..eeb49a46123 100644 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -228,7 +228,7 @@ class TC_GAME_API UnitAI targetList.reverse(); if (targetType == SELECT_TARGET_RANDOM) - Trinity::Containers::RandomResizeList(targetList, maxTargets); + Trinity::Containers::RandomResize(targetList, maxTargets); else targetList.resize(maxTargets); } diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index 6d377e5f874..3cb9677f00a 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -111,7 +111,7 @@ public: { // We need to use a copy of SummonList here, otherwise original SummonList would be modified StorageType listCopy = storage_; - Trinity::Containers::RandomResizeList<StorageType, Predicate>(listCopy, std::forward<Predicate>(predicate), max); + Trinity::Containers::RandomResize<StorageType, Predicate>(listCopy, std::forward<Predicate>(predicate), max); for (StorageType::iterator i = listCopy.begin(); i != listCopy.end(); ) { Creature* summon = ObjectAccessor::GetCreature(*me, *i++); diff --git a/src/server/game/BlackMarket/BlackMarketMgr.cpp b/src/server/game/BlackMarket/BlackMarketMgr.cpp index 61cb7c1f286..4710519084a 100644 --- a/src/server/game/BlackMarket/BlackMarketMgr.cpp +++ b/src/server/game/BlackMarket/BlackMarketMgr.cpp @@ -182,7 +182,7 @@ void BlackMarketMgr::RefreshAuctions() templates.push_back(pair.second); } - Trinity::Containers::RandomResizeList(templates, sWorld->getIntConfig(CONFIG_BLACKMARKET_MAXAUCTIONS)); + Trinity::Containers::RandomResize(templates, sWorld->getIntConfig(CONFIG_BLACKMARKET_MAXAUCTIONS)); for (BlackMarketTemplate const* templat : templates) { diff --git a/src/server/game/Garrison/GarrisonMgr.cpp b/src/server/game/Garrison/GarrisonMgr.cpp index 550a4ddf877..9006dc4bfed 100644 --- a/src/server/game/Garrison/GarrisonMgr.cpp +++ b/src/server/game/Garrison/GarrisonMgr.cpp @@ -207,8 +207,8 @@ std::list<GarrAbilityEntry const*> GarrisonMgr::RollFollowerAbilities(uint32 gar } } - Trinity::Containers::RandomResizeList(abilityList, std::max<int32>(0, slots[0] - forcedAbilities.size())); - Trinity::Containers::RandomResizeList(traitList, std::max<int32>(0, slots[1] - forcedTraits.size())); + Trinity::Containers::RandomResize(abilityList, std::max<int32>(0, slots[0] - forcedAbilities.size())); + Trinity::Containers::RandomResize(traitList, std::max<int32>(0, slots[1] - forcedTraits.size())); // Add abilities specified in GarrFollowerXAbility.db2 before generic classspec ones on follower creation if (initial) @@ -240,7 +240,7 @@ std::list<GarrAbilityEntry const*> GarrisonMgr::RollFollowerAbilities(uint32 gar std::set_difference(classSpecAbilities.begin(), classSpecAbilities.end(), forcedAbilities.begin(), forcedAbilities.end(), std::back_inserter(classSpecAbilitiesTemp)); std::set_union(classSpecAbilitiesTemp.begin(), classSpecAbilitiesTemp.end(), classSpecAbilitiesTemp2.begin(), classSpecAbilitiesTemp2.end(), std::back_inserter(abilityList)); - Trinity::Containers::RandomResizeList(abilityList, std::max<int32>(0, slots[0] - forcedAbilities.size())); + Trinity::Containers::RandomResize(abilityList, std::max<int32>(0, slots[0] - forcedAbilities.size())); } if (slots[1] > forcedTraits.size() + traitList.size()) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index dd5e4c70302..e3e2814974d 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1147,7 +1147,7 @@ void Spell::SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTarge { // Other special target selection goes here if (uint32 maxTargets = m_spellValue->MaxAffectedTargets) - Trinity::Containers::RandomResizeList(targets, maxTargets); + Trinity::Containers::RandomResize(targets, maxTargets); for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr) { @@ -1226,7 +1226,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTarge { // Other special target selection goes here if (uint32 maxTargets = m_spellValue->MaxAffectedTargets) - Trinity::Containers::RandomResizeList(targets, maxTargets); + Trinity::Containers::RandomResize(targets, maxTargets); for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr) { diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index af1fc188256..a3ef383b83c 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -319,7 +319,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]= &Spell::EffectNULL, //251 SPELL_EFFECT_SET_GARRISON_CACHE_SIZE &Spell::EffectTeleportUnits, //252 SPELL_EFFECT_TELEPORT_UNITS &Spell::EffectNULL, //253 SPELL_EFFECT_GIVE_HONOR - &Spell::EffectNULL, //254 SPELL_EFFECT_254 + &Spell::EffectJumpDest, //254 SPELL_EFFECT_254 &Spell::EffectNULL, //255 SPELL_EFFECT_LEARN_TRANSMOG_SET }; @@ -889,7 +889,18 @@ void Spell::EffectJumpDest(SpellEffIndex /*effIndex*/) CalculateJumpSpeeds(effectInfo, m_caster->GetExactDist2d(destTarget), speedXY, speedZ); JumpArrivalCastArgs arrivalCast; arrivalCast.SpellId = effectInfo->TriggerSpell; - m_caster->GetMotionMaster()->MoveJump(*destTarget, speedXY, speedZ, EVENT_JUMP, !m_targets.GetObjectTargetGUID().IsEmpty(), &arrivalCast); + Optional<Movement::SpellEffectExtraData> extra; + if (m_spellInfo->Id == 191428) + { + // 0.88 - time, A CONSTANT + // 0.001 - parabolic max_height - THIS IS A CONSTANT!!! + // 0.19642354884476423184854952469683 - speedZ - CONSTANT FOR MAX_HEIGHT + // EFFECT_254 = SPELL_EFFECT_JUMP_CONSTANT_TIME? + // time taken from curve? + extra = boost::in_place(); + extra->ProgressCurveId = 1717; + } + m_caster->GetMotionMaster()->MoveJump(*destTarget, speedXY, speedZ, EVENT_JUMP, !m_targets.GetObjectTargetGUID().IsEmpty(), &arrivalCast, extra.get_ptr()); } void Spell::CalculateJumpSpeeds(SpellEffectInfo const* effInfo, float dist, float& speedXY, float& speedZ) |
