Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/DataStores/DBCEnums.h src/server/scripts/Commands/cs_wp.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
This commit is contained in:
commit
07024d3ea8
31 files changed
+3139
-1933
No files matched your search
@@ -10640,6 +10640,9 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
|
||||
|
||||
void Unit::setDeathState(DeathState s)
|
||||
{
|
||||
// Death state needs to be updated before RemoveAllAurasOnDeath() is called, to prevent entering combat
|
||||
m_deathState = s;
|
||||
|
||||
if (s != ALIVE && s != JUST_RESPAWNED)
|
||||
{
|
||||
CombatStop();
|
||||
@@ -10688,8 +10691,6 @@ void Unit::setDeathState(DeathState s)
|
||||
}
|
||||
else if (s == JUST_RESPAWNED)
|
||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); // clear skinnable for creature and player (at battleground)
|
||||
|
||||
m_deathState = s;
|
||||
}
|
||||
|
||||
/*########################################
|
||||
@@ -10697,14 +10698,14 @@ void Unit::setDeathState(DeathState s)
|
||||
######## AGGRO SYSTEM ########
|
||||
######## ########
|
||||
########################################*/
|
||||
bool Unit::CanHaveThreatList() const
|
||||
bool Unit::CanHaveThreatList(bool skipAliveCheck) const
|
||||
{
|
||||
// only creatures can have threat list
|
||||
if (GetTypeId() != TYPEID_UNIT)
|
||||
return false;
|
||||
|
||||
// only alive units can have threat list
|
||||
if (!IsAlive() || isDying())
|
||||
if (!skipAliveCheck && !IsAlive())
|
||||
return false;
|
||||
|
||||
// totems can not have threat list
|
||||
@@ -10747,7 +10748,7 @@ void Unit::AddThreat(Unit* victim, float fThreat, SpellSchoolMask schoolMask, Sp
|
||||
|
||||
void Unit::DeleteThreatList()
|
||||
{
|
||||
if (CanHaveThreatList() && !m_ThreatManager.isThreatListEmpty())
|
||||
if (CanHaveThreatList(true) && !m_ThreatManager.isThreatListEmpty())
|
||||
SendClearThreatListOpcode();
|
||||
m_ThreatManager.clearReferences();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user