mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Merge branch 'master' into 310
Conflicts: src/game/Chat.cpp src/game/Chat.h src/game/GameObject.cpp src/game/Level2.cpp
This commit is contained in:
commit
e5bde711ea
31 changed files with 1295 additions and 1109 deletions
|
|
@ -3549,6 +3549,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||
SpellSpecific i_spellId_spec = GetSpellSpecific(i_spellId);
|
||||
|
||||
bool is_sspc = IsSingleFromSpellSpecificPerCaster(spellId_spec,i_spellId_spec);
|
||||
bool is_sspt = IsSingleFromSpellSpecificRanksPerTarget(spellId_spec,i_spellId_spec);
|
||||
|
||||
if( is_sspc && Aur->GetCasterGUID() == (*i).second->GetCasterGUID() )
|
||||
{
|
||||
|
|
@ -3570,6 +3571,25 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||
else
|
||||
next = m_Auras.begin();
|
||||
}
|
||||
else if( is_sspt && Aur->GetCasterGUID() != (*i).second->GetCasterGUID() && spellmgr.IsRankSpellDueToSpell(spellProto, i_spellId) )
|
||||
{
|
||||
// cannot remove higher rank
|
||||
if(CompareAuraRanks(spellId, effIndex, i_spellId, i_effIndex) < 0)
|
||||
return false;
|
||||
|
||||
// Its a parent aura (create this aura in ApplyModifier)
|
||||
if ((*i).second->IsInUse())
|
||||
{
|
||||
sLog.outError("Aura (Spell %u Effect %u) is in process but attempt removed at aura (Spell %u Effect %u) adding, need add stack rule for Unit::RemoveNoStackAurasDueToAura", i->second->GetId(), i->second->GetEffIndex(),Aur->GetId(), Aur->GetEffIndex());
|
||||
continue;
|
||||
}
|
||||
RemoveAurasDueToSpell(i_spellId);
|
||||
|
||||
if( m_Auras.empty() )
|
||||
break;
|
||||
else
|
||||
next = m_Auras.begin();
|
||||
}
|
||||
else if( !is_sspc && spellmgr.IsNoStackSpellDueToSpell(spellId, i_spellId) )
|
||||
{
|
||||
// Its a parent aura (create this aura in ApplyModifier)
|
||||
|
|
@ -4070,17 +4090,25 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del)
|
|||
{
|
||||
assert(gameObj && gameObj->GetOwnerGUID()==GetGUID());
|
||||
|
||||
// GO created by some spell
|
||||
if ( GetTypeId()==TYPEID_PLAYER && gameObj->GetSpellId() )
|
||||
{
|
||||
SpellEntry const* createBySpell = sSpellStore.LookupEntry(gameObj->GetSpellId());
|
||||
// Need activate spell use for owner
|
||||
if (createBySpell && createBySpell->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE)
|
||||
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases)
|
||||
((Player*)this)->SendCooldownEvent(createBySpell);
|
||||
}
|
||||
gameObj->SetOwnerGUID(0);
|
||||
|
||||
// GO created by some spell
|
||||
if (uint32 spellid = gameObj->GetSpellId())
|
||||
{
|
||||
RemoveAurasDueToSpell(spellid);
|
||||
|
||||
if (GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
SpellEntry const* createBySpell = sSpellStore.LookupEntry(spellid );
|
||||
// Need activate spell use for owner
|
||||
if (createBySpell && createBySpell->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE)
|
||||
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases)
|
||||
((Player*)this)->SendCooldownEvent(createBySpell);
|
||||
}
|
||||
}
|
||||
|
||||
m_gameObj.remove(gameObj);
|
||||
|
||||
if(del)
|
||||
{
|
||||
gameObj->SetRespawnTime(0);
|
||||
|
|
@ -5120,6 +5148,16 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
triggered_spell_id = 28810;
|
||||
break;
|
||||
}
|
||||
// Glyph of Dispel Magic
|
||||
case 55677:
|
||||
{
|
||||
if(!target->IsFriendlyTo(this))
|
||||
return false;
|
||||
|
||||
basepoints0 = int32(target->GetMaxHealth() * triggerAmount / 100);
|
||||
triggered_spell_id = 56131;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -9725,7 +9763,7 @@ float Unit::GetModifierValue(UnitMods unitMod, UnitModifierType modifierType) co
|
|||
{
|
||||
if( unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END)
|
||||
{
|
||||
sLog.outError("ERROR: trial to access non existed modifier value from UnitMods!");
|
||||
sLog.outError("trial to access non existed modifier value from UnitMods!");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
|
@ -9755,7 +9793,7 @@ float Unit::GetTotalAuraModValue(UnitMods unitMod) const
|
|||
{
|
||||
if(unitMod >= UNIT_MOD_END)
|
||||
{
|
||||
sLog.outError("ERROR: trial to access non existed UnitMods in GetTotalAuraModValue()!");
|
||||
sLog.outError("trial to access non existed UnitMods in GetTotalAuraModValue()!");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
|
@ -11185,7 +11223,7 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id)
|
|||
|
||||
if(!pet->InitStatsForLevel(level))
|
||||
{
|
||||
sLog.outError("ERROR: Pet::InitStatsForLevel() failed for creature (Entry: %u)!",creatureTarget->GetEntry());
|
||||
sLog.outError("Pet::InitStatsForLevel() failed for creature (Entry: %u)!",creatureTarget->GetEntry());
|
||||
delete pet;
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue