Core/Handlers: Spell handler no longer downranks otherwise-negative spells because they have a potentially-positive aura effect.
This commit is contained in:
1 parent
204145b3df
commit
da8b129857
3 files changed
+12
-10
No files matched your search
@@ -439,14 +439,16 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// auto-selection buff level base at target level (in spellInfo)
|
// auto-selection buff level base at target level (in spellInfo)
|
||||||
if (targets.GetUnitTarget())
|
// TODO: is this even necessary? client already seems to send correct rank for "standard" buffs
|
||||||
{
|
if (spellInfo->IsPositive())
|
||||||
SpellInfo const* actualSpellInfo = spellInfo->GetAuraRankForLevel(targets.GetUnitTarget()->getLevel());
|
if (Unit* target = targets.GetUnitTarget())
|
||||||
|
{
|
||||||
|
SpellInfo const* actualSpellInfo = spellInfo->GetAuraRankForLevel(target->getLevel());
|
||||||
|
|
||||||
// if rank not found then function return nullptr but in explicit cast case original spell can be cast and later failed with appropriate error message
|
// if rank not found then function return NULL but in explicit cast case original spell can be cast and later failed with appropriate error message
|
||||||
if (actualSpellInfo)
|
if (actualSpellInfo)
|
||||||
spellInfo = actualSpellInfo;
|
spellInfo = actualSpellInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE, ObjectGuid::Empty, false);
|
Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE, ObjectGuid::Empty, false);
|
||||||
spell->m_cast_count = castCount; // set count of casts
|
spell->m_cast_count = castCount; // set count of casts
|
||||||
|
|||||||
@@ -1034,7 +1034,7 @@ private:
|
|||||||
// Wait for the current build job to finish, if the job finishes in time
|
// Wait for the current build job to finish, if the job finishes in time
|
||||||
// evaluate it and continue with the next one.
|
// evaluate it and continue with the next one.
|
||||||
if (_build_job->GetProcess()->GetFutureResult().
|
if (_build_job->GetProcess()->GetFutureResult().
|
||||||
wait_for(0s) == std::future_status::ready)
|
wait_for(std::chrono::seconds(0)) == std::future_status::ready)
|
||||||
ProcessReadyBuildJob();
|
ProcessReadyBuildJob();
|
||||||
else
|
else
|
||||||
return; // Return when the job didn't finish in time
|
return; // Return when the job didn't finish in time
|
||||||
|
|||||||
@@ -1045,11 +1045,11 @@ void WorldSession::ProcessQueryCallbacks()
|
|||||||
{
|
{
|
||||||
_queryProcessor.ProcessReadyQueries();
|
_queryProcessor.ProcessReadyQueries();
|
||||||
|
|
||||||
if (_realmAccountLoginCallback.valid() && _realmAccountLoginCallback.wait_for(0s) == std::future_status::ready)
|
if (_realmAccountLoginCallback.valid() && _realmAccountLoginCallback.wait_for(std::chrono::seconds(0)) == std::future_status::ready)
|
||||||
InitializeSessionCallback(_realmAccountLoginCallback.get());
|
InitializeSessionCallback(_realmAccountLoginCallback.get());
|
||||||
|
|
||||||
//! HandlePlayerLoginOpcode
|
//! HandlePlayerLoginOpcode
|
||||||
if (_charLoginCallback.valid() && _charLoginCallback.wait_for(0s) == std::future_status::ready)
|
if (_charLoginCallback.valid() && _charLoginCallback.wait_for(std::chrono::seconds(0)) == std::future_status::ready)
|
||||||
HandlePlayerLogin(reinterpret_cast<LoginQueryHolder*>(_charLoginCallback.get()));
|
HandlePlayerLogin(reinterpret_cast<LoginQueryHolder*>(_charLoginCallback.get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user