Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts: src/server/game/Handlers/BattleGroundHandler.cpp
This commit is contained in:
commit
459454cbe4
5 files changed
+35
-29
No files matched your search
@@ -256,6 +256,7 @@ m_HostileRefManager(this), m_TempSpeed(0.0f), m_AutoRepeatFirstCast(false)
|
||||
_focusSpell = NULL;
|
||||
_targetLocked = false;
|
||||
_lastLiquid = NULL;
|
||||
_isWalkingBeforeCharm = false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -8988,7 +8989,8 @@ void Unit::SetCharm(Unit* charm, bool apply)
|
||||
if (!charm->AddUInt64Value(UNIT_FIELD_CHARMEDBY, GetGUID()))
|
||||
sLog->outFatal(LOG_FILTER_UNITS, "Unit %u is being charmed, but it already has a charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID());
|
||||
|
||||
if (charm->HasUnitMovementFlag(MOVEMENTFLAG_WALKING))
|
||||
_isWalkingBeforeCharm = charm->IsWalking();
|
||||
if (_isWalkingBeforeCharm)
|
||||
{
|
||||
charm->SetWalk(false);
|
||||
charm->SendMovementFlagUpdate();
|
||||
@@ -9026,6 +9028,12 @@ void Unit::SetCharm(Unit* charm, bool apply)
|
||||
charm->SetByteValue(UNIT_FIELD_BYTES_2, 1, 0);
|
||||
}
|
||||
|
||||
if (charm->IsWalking() != _isWalkingBeforeCharm)
|
||||
{
|
||||
charm->SetWalk(_isWalkingBeforeCharm);
|
||||
charm->SendMovementFlagUpdate(true); // send packet to self, to update movement state on player.
|
||||
}
|
||||
|
||||
if (charm->GetTypeId() == TYPEID_PLAYER
|
||||
|| !charm->ToCreature()->HasUnitTypeMask(UNIT_MASK_MINION)
|
||||
|| charm->GetOwnerGUID() != GetGUID())
|
||||
@@ -9300,6 +9308,10 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
if (!spellProto || !victim || damagetype == DIRECT_DAMAGE)
|
||||
return pdamage;
|
||||
|
||||
// Some spells don't benefit from done mods
|
||||
if (spellProto->AttributesEx3 & SPELL_ATTR3_NO_DONE_BONUS)
|
||||
return pdamage;
|
||||
|
||||
// small exception for Deep Wounds, can't find any general rule
|
||||
// should ignore ALL damage mods, they already calculated in trigger spell
|
||||
if (spellProto->Id == 12721) // Deep Wounds
|
||||
@@ -9554,13 +9566,6 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
DoneTotal += int32(DoneAdvertisedBenefit * coeff * factorMod);
|
||||
}
|
||||
|
||||
// Some spells don't benefit from done mods
|
||||
if (spellProto->AttributesEx3 & SPELL_ATTR3_NO_DONE_BONUS)
|
||||
{
|
||||
DoneTotal = 0;
|
||||
DoneTotalMod = 1.0f;
|
||||
}
|
||||
|
||||
float tmpDamage = (int32(pdamage) + DoneTotal) * DoneTotalMod;
|
||||
// apply spellmod to Done damage (flat and pct)
|
||||
if (Player* modOwner = GetSpellModOwner())
|
||||
@@ -13935,11 +13940,11 @@ void Unit::StopMoving()
|
||||
Movement::MoveSplineInit(*this).Stop();
|
||||
}
|
||||
|
||||
void Unit::SendMovementFlagUpdate()
|
||||
void Unit::SendMovementFlagUpdate(bool self /* = false */)
|
||||
{
|
||||
WorldPacket data;
|
||||
BuildHeartBeatMsg(&data);
|
||||
SendMessageToSet(&data, false);
|
||||
SendMessageToSet(&data, self);
|
||||
}
|
||||
|
||||
bool Unit::IsSitState() const
|
||||
|
||||
Reference in new issue
Block a user