Cmangos Cata commits applied

I thankee, cmangos :-)

Commits:

13271d6 Commit Ported  Core Pet DB cleanup and simplification
60d6e29 Commit Imported  Core Utilize flags in PetAI (And uniform extra
flags with the other cores)
06d30ce Commit Ported  Core Make pet assist owner on summon if not a
passive
2821da8 Commit Ported  Core Fix Guardian reactions
4f88a9e Commit Ported  Core Pet AI Fixup
67e0558 Commit Imported  Core Fix pet unsummon on mount
f50041f Commit Imported  Core Fix player rooted after possesing an unit.
df59a93 Commit Imported  Core Syncing up pet work
056f4f5 Commit Imported  Core Fix a couple of invalid name for spell
attributes
6a58f1f Commit Imported  Core only save correct auras on
pet::SavePetToDB
34ab59b Commit Imported  Core Hunter summon pet (call pet) checkcast
fixup
dfbb69c Commit Imported  Core Handle owner entering combat properly
4b10eb4 Commit Imported  Core Pet Aggro
1bdb7e3 Commit Ported  Core Clean up pet stay functionality
1bdb7e3 Commit Ported  Core Clean up pet stay functionality
9b7b50e Commit Imported  Core UNIT_BYTE2_FLAG work
0777235 Commit Imported  Core Implement displaying group leader
indicators on players
5efab47 Commit Imported  Core Health funnel fixes
60e6a84 Commit Ported  Core Fix SMSG_QUESTGIVER_STATUS_MULTIPLE and
GetDialogStatus
60e6a84 Commit Ported  Core Fix SMSG_QUESTGIVER_STATUS_MULTIPLE and

GetDialogStatus
f8d3cbd Commit Imported  Core Fix talent spell cannot stack
32ba32e Commit Imported  Core Fix channeled spell distance check
interval
47ec2fa Commit Imported  Core Adding state to aura holder Now proc
cannot remove an aura not finalized
34588dc Commit Ported  Core Unbreak creature pets
bd079a1 Commit Imported  Core The (not so)Great Pet Rework
This commit is contained in:
Charles A Edwards 2016-09-15 14:56:42 +01:00 committed by Antz
parent c4c83f5b58
commit 600205641d
20 changed files with 634 additions and 507 deletions

View file

@ -2898,12 +2898,7 @@ void Unit::AttackerStateUpdate(Unit* pVictim, WeaponAttackType attType, bool ext
if (IsNonMeleeSpellCasted(false))
return;
uint32 hitInfo;
if (attType == BASE_ATTACK)
hitInfo = HITINFO_NORMALSWING2;
else if (attType == OFF_ATTACK)
hitInfo = HITINFO_LEFTSWING;
else
if (attType == RANGED_ATTACK)
return; // ignore ranged case
uint32 extraAttacks = m_extraAttacks;
@ -2945,7 +2940,7 @@ void Unit::AttackerStateUpdate(Unit* pVictim, WeaponAttackType attType, bool ext
else
DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "AttackerStateUpdate: (NPC) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
GetGUIDLow(), pVictim->GetGUIDLow(), pVictim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist);
if (Unit* owner = GetOwner())
if (owner->GetTypeId() == TYPEID_UNIT)
{
@ -4637,21 +4632,27 @@ bool Unit::RemoveNoStackAurasDueToAuraHolder(SpellAuraHolder* holder)
}
// non single (per caster) per target spell specific (possible single spell per target at caster)
if (!is_spellSpecPerTargetPerCaster && !is_spellSpecPerTarget && sSpellMgr.IsNoStackSpellDueToSpell(spellId, i_spellId))
if (!is_spellSpecPerTargetPerCaster && !is_spellSpecPerTarget)
{
// Its a parent aura (create this aura in ApplyModifier)
if ((*i).second->IsInUse())
{
sLog.outError("SpellAuraHolder (Spell %u) is in process but attempt removed at SpellAuraHolder (Spell %u) adding, need add stack rule for Unit::RemoveNoStackAurasDueToAuraHolder", i->second->GetId(), holder->GetId());
SpellEntry const* triggeredBy = holder->GetTriggeredBy();
if (triggeredBy && sSpellMgr.IsSpellCanAffectSpell(triggeredBy, i_spellProto)) // check if this spell can be triggered by any talent aura
continue;
if (sSpellMgr.IsNoStackSpellDueToSpell(spellProto->Id, i_spellProto->Id))
{
// Its a parent aura (create this aura in ApplyModifier)
if ((*i).second->IsInUse())
{
sLog.outError("SpellAuraHolder (Spell %u) is in process but attempt removed at SpellAuraHolder (Spell %u) adding, need add stack rule for Unit::RemoveNoStackAurasDueToAuraHolder", i->second->GetId(), holder->GetId());
continue;
}
RemoveAurasDueToSpell(i_spellId);
if (m_spellAuraHolders.empty())
break;
else
next = m_spellAuraHolders.begin();
}
RemoveAurasDueToSpell(i_spellId);
if (m_spellAuraHolders.empty())
break;
else
next = m_spellAuraHolders.begin();
continue;
}
@ -10945,7 +10946,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag,
for (SpellAuraHolderMap::const_iterator itr = GetSpellAuraHolderMap().begin(); itr != GetSpellAuraHolderMap().end(); ++itr)
{
// skip deleted auras (possible at recursive triggered call
if (itr->second->IsDeleted())
if (itr->second->GetState() != SPELLAURAHOLDER_STATE_READY || itr->second->IsDeleted())
continue;
SpellProcEventEntry const* spellProcEvent = NULL;