mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 15:16:24 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -6880,7 +6880,13 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map
|
||||
}
|
||||
else if (missingPlayerItems.size())
|
||||
{
|
||||
GetSession()->SendAreaTriggerMessage(GetSession()->GetAcoreString(LANG_LEVEL_MINREQUIRED_AND_ITEM), LevelMin, sObjectMgr->GetItemTemplate(missingPlayerItems[0]->id)->Name1.c_str());
|
||||
LocaleConstant loc_idx = GetSession()->GetSessionDbLocaleIndex();
|
||||
std::string name = sObjectMgr->GetItemTemplate(missingPlayerItems[0]->id)->Name1;
|
||||
if (ItemLocale const* il = sObjectMgr->GetItemLocale(missingPlayerItems[0]->id))
|
||||
{
|
||||
ObjectMgr::GetLocaleString(il->Name, loc_idx, name);
|
||||
}
|
||||
GetSession()->SendAreaTriggerMessage(GetSession()->GetAcoreString(LANG_LEVEL_MINREQUIRED_AND_ITEM), ar->levelMin, name.c_str());
|
||||
}
|
||||
else if (LevelMin)
|
||||
{
|
||||
|
||||
@@ -1412,16 +1412,16 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
|
||||
uint32 mapid = m_caster->GetMapId();
|
||||
uint32 phasemask = m_caster->GetPhaseMask();
|
||||
float collisionHeight = m_caster->GetCollisionHeight();
|
||||
float destx = 0.0f, desty = 0.0f, destz = 0.0f, ground = 0.0f, startx = 0.0f, starty = 0.0f, startz = 0.0f, starto = 0.0f;
|
||||
float destz = 0.0f, startx = 0.0f, starty = 0.0f, startz = 0.0f, starto = 0.0f;
|
||||
|
||||
Position pos;
|
||||
Position lastpos;
|
||||
m_caster->GetPosition(startx, starty, startz, starto);
|
||||
pos.Relocate(startx, starty, startz, starto);
|
||||
destx = pos.GetPositionX() + distance * cos(pos.GetOrientation());
|
||||
desty = pos.GetPositionY() + distance * sin(pos.GetOrientation());
|
||||
float destx = pos.GetPositionX() + distance * cos(pos.GetOrientation());
|
||||
float desty = pos.GetPositionY() + distance * sin(pos.GetOrientation());
|
||||
|
||||
ground = map->GetHeight(phasemask, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ());
|
||||
float ground = map->GetHeight(phasemask, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ());
|
||||
|
||||
bool isCasterInWater = m_caster->IsInWater();
|
||||
if (!m_caster->HasUnitMovementFlag(MOVEMENTFLAG_FALLING) || (pos.GetPositionZ() - ground < distance))
|
||||
@@ -1586,6 +1586,15 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
|
||||
destz = prevZ;
|
||||
//LOG_ERROR("spells", "(collision) destZ rewrited in prevZ");
|
||||
|
||||
// Don't make the player move backward from the xy adjustments by collisions.
|
||||
if ((DELTA_X > 0 && startx > destx) || (DELTA_X < 0 && startx < destx) ||
|
||||
(DELTA_Y > 0 && starty > desty) || (DELTA_Y < 0 && starty < desty))
|
||||
{
|
||||
destx = startx;
|
||||
desty = starty;
|
||||
destz = startz;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
// we have correct destz now
|
||||
@@ -1597,9 +1606,9 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
|
||||
else
|
||||
{
|
||||
float z = pos.GetPositionZ();
|
||||
bool col = VMAP::VMapFactory::createOrGetVMapMgr()->GetObjectHitPos(mapid, pos.GetPositionX(), pos.GetPositionY(), z + 0.5f, destx, desty, z + 0.5f, destx, desty, z, -0.5f);
|
||||
bool col = VMAP::VMapFactory::createOrGetVMapMgr()->GetObjectHitPos(mapid, pos.GetPositionX(), pos.GetPositionY(), z, destx, desty, z, destx, desty, z, -0.5f);
|
||||
// check dynamic collision
|
||||
bool dcol = m_caster->GetMap()->GetObjectHitPos(phasemask, pos.GetPositionX(), pos.GetPositionY(), z + 0.5f, destx, desty, z + 0.5f, destx, desty, z, -0.5f);
|
||||
bool dcol = m_caster->GetMap()->GetObjectHitPos(phasemask, pos.GetPositionX(), pos.GetPositionY(), z, destx, desty, z, destx, desty, z, -0.5f);
|
||||
|
||||
// collision occured
|
||||
if (col || dcol)
|
||||
|
||||
@@ -57,6 +57,12 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
spellInfo->AttributesEx3 |= SPELL_ATTR3_ALWAYS_HIT;
|
||||
});
|
||||
|
||||
// Has Brewfest Mug
|
||||
ApplySpellFix({ 42533 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(347); // 15 min
|
||||
});
|
||||
|
||||
// Elixir of Minor Fortitude
|
||||
ApplySpellFix({ 2378 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
@@ -592,6 +598,14 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_DUMMY; // just a marker
|
||||
});
|
||||
|
||||
ApplySpellFix({
|
||||
6940, // Hand of Sacrifice
|
||||
64205 // Divine Sacrifice
|
||||
}, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->AttributesEx7 |= SPELL_ATTR7_DONT_CAUSE_SPELL_PUSHBACK;
|
||||
});
|
||||
|
||||
// Seal of Command trigger
|
||||
ApplySpellFix({ 20424 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
@@ -4566,6 +4580,12 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
spellInfo->AuraInterruptFlags |= AURA_INTERRUPT_FLAG_TAKE_DAMAGE;
|
||||
});
|
||||
|
||||
// Torment of the Worgen
|
||||
ApplySpellFix({ 30567 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->ProcChance = 3;
|
||||
});
|
||||
|
||||
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
|
||||
{
|
||||
SpellInfo* spellInfo = mSpellInfoMap[i];
|
||||
|
||||
Reference in New Issue
Block a user